I understand that this thread may be similar to one of my old threads but it's not the same since now I will providing my insight about what I understand.
I understand what the halting problem says, but I can't understand why it can't be solved. My professor used a diagonalization argument that I am about to explain.
The cardinality of the set of turing machines is countable, so any turing machine can be represented as a string. He laid out on the board a graph with two axes. One for the turing machines and one for their inputs which are strings that describe a turing machine and their according input and then he started to fill out the grid with Accept or reject or loop for ever. He then drew out a diagonal along that grid and created a new turing machine with the values in the diagonal. I understand that we are trying to prove that the given language is undecidable. Why is this turing machine that is not in the initial graph important? and how does this lead to the conclusion that the halting problem can't be solved?. I understand why the real numbers are uncountable, so there is no need for explaining that.
I need to understand the proof of why the halting problem can't be solved with the diagonalization argument.
Reese did a very good job of explaining how a proof of the undecidability of the halting problem may be written in a way that explicitly makes use of diagonalization. I'll offer an informal gloss.
Diagonalization is employed to reach a contradiction that forces us to abandon an assumption. Here the assumption is the existence of a TM (let's call it $H$) that decides the halting problem.
Diagonalization is applied by building a table $A$ such that that $A_{i,j}$ says whether the $i$-th TM halts on input $j$. We then say, "Let's build a TM that on input $i$ does the opposite of TM $i$."
Now the question is, "Does such a Turing machine exist?" It's not hard to see that given $H$, one can build the desired TM; but then this TM is not in the table, because it was built by diagonalization and yet the table lists all TMs (TMs can be enumerated) ... Contradiction!
The only assumption we can give up is the existence of the TM $H$ that decides the halting problem, which is what we do, so that we are not forced to admit that there is a TM that disagrees with TM $i$ on input $i$ for all $i$.
How would we build the "diagonal TM" given $H$? Just as explained in the "other" proof: duplicate the input, let $H$ decide whether the input TM halts when it reads itself, and then do the opposite of what $H$ said. This last step is diagonalization.