Is it possible for an ordinary Turing Machine, for some input x, to run for an infinite number of steps but also halt? Or do we say that Turing Machine does not halt on x?
Can a Turing Machine run for infinitely many steps and halt?
turing machines
The answer to your question, whether a Turing machine can run for infinitely many steps and subsequently halt, is negative. If a Turing machine runs for an infinite number of steps and never halts, then it just never halts. It runs forever. A Turing machine halts if it at some step, it halts. If this never happens, then it doesn't halt, and instead runs for infinitely many steps.One can define infinite time Turing machines for which infinite computations do result in an output, but these are different from the ordinary Turing machines taught in your class. In particular, infinite time Turing machines can compute uncomputable functions.