In the "Halting Problem" lecture, the Prof. Shai Simonson introduced a magic trick to use the fact that there exists no TM that accepts all other TM that accept themselves to prove that the halting problem is undecidable. There he asked to change the algorithm to alternate the answer i.e if the answer is yes change it to no and vice versa. Then he proved that the halting problem is undecidable. I kind of didn't get his magic trick for the proof. It would be great if somebody can shed some light on it. Thanks!
2026-03-27 00:10:44.1774570244
undecidability of halting
145 Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail At
1
There are 1 best solutions below
Related Questions in COMPUTATIONAL-COMPLEXITY
- Product of sums of all subsets mod $k$?
- Proving big theta notation?
- Little oh notation
- proving sigma = BigTheta (BigΘ)
- sources about SVD complexity
- Is all Linear Programming (LP) problems solvable in Polynomial time?
- growth rate of $f(x)= x^{1/7}$
- Unclear Passage in Cook's Proof of SAT NP-Completeness: Why The Machine M Should Be Modified?
- Minimum Matching on the Minimum Triangulation
- How to find the average case complexity of Stable marriage problem(Gale Shapley)?
Related Questions in TURING-MACHINES
- Has the effort to confirm $\Sigma(5)$ and the search for new champions with $6$ states been stopped?
- Pop-up cards Turing complete?
- How does a cellular automaton "know" when to halt?
- Is the halting problem also undecideable for turing machines always writing a $1$ on the tape?
- Proof of "Extension" for Rice's Theorem
- Do we need enumeration to find the maximal number of steps a special Turing machine can make?
- Deciding wether a language is regular, in the arithmetic hierarchy
- Can a machine exist making more steps than the current record, which is no busy beaver?
- Can the halting problem for bounded Turing machines be efficiently decided?
- Can we efficiently determine the function $f(n,s)$?
Trending Questions
- Induction on the number of equations
- How to convince a math teacher of this simple and obvious fact?
- Find $E[XY|Y+Z=1 ]$
- Refuting the Anti-Cantor Cranks
- What are imaginary numbers?
- Determine the adjoint of $\tilde Q(x)$ for $\tilde Q(x)u:=(Qu)(x)$ where $Q:U→L^2(Ω,ℝ^d$ is a Hilbert-Schmidt operator and $U$ is a Hilbert space
- Why does this innovative method of subtraction from a third grader always work?
- How do we know that the number $1$ is not equal to the number $-1$?
- What are the Implications of having VΩ as a model for a theory?
- Defining a Galois Field based on primitive element versus polynomial?
- Can't find the relationship between two columns of numbers. Please Help
- Is computer science a branch of mathematics?
- Is there a bijection of $\mathbb{R}^n$ with itself such that the forward map is connected but the inverse is not?
- Identification of a quadrilateral as a trapezoid, rectangle, or square
- Generator of inertia group in function field extension
Popular # Hahtags
second-order-logic
numerical-methods
puzzle
logic
probability
number-theory
winding-number
real-analysis
integration
calculus
complex-analysis
sequences-and-series
proof-writing
set-theory
functions
homotopy-theory
elementary-number-theory
ordinary-differential-equations
circles
derivatives
game-theory
definite-integrals
elementary-set-theory
limits
multivariable-calculus
geometry
algebraic-number-theory
proof-verification
partial-derivative
algebra-precalculus
Popular Questions
- What is the integral of 1/x?
- How many squares actually ARE in this picture? Is this a trick question with no right answer?
- Is a matrix multiplied with its transpose something special?
- What is the difference between independent and mutually exclusive events?
- Visually stunning math concepts which are easy to explain
- taylor series of $\ln(1+x)$?
- How to tell if a set of vectors spans a space?
- Calculus question taking derivative to find horizontal tangent line
- How to determine if a function is one-to-one?
- Determine if vectors are linearly independent
- What does it mean to have a determinant equal to zero?
- Is this Batman equation for real?
- How to find perpendicular vector to another vector?
- How to find mean and median from histogram
- How many sides does a circle have?
'magic trick' is a big word. Anyway, the 'trick' is easy to explain.
So the question is:
Is there a Turing machine (a 'Halting Macine') that can take a description of any Turing machine M, and input I on its input, and that can decide whether machine M with input I will halt?
The answer is No.
To prove that there is no such 'Halting Machine', you do a proof by Contradiction:
If there is a Halting machine, then you expand that machine by two little bits of code:
First, you have a 'Copy' machine that simply produces two copies of its input on its output.
Second, you have a 'Negator' machine that takes the output of the Halting machine, and does the following:
If the Halting machine says that M with I halts, then the Negator machine will go into some infinite loop, i.e. it will not halt.
If the Halting machine says that M with I does not halt, then the Negator machine will do nothing (and thus the Negator machine will halt)
Now, both the Copy machine and the Negator machine are easily shown to be implementable by a Turing machine. Thus, if there is a Halting machine, we can create a new Turing machine $Q$ that take as input a description of some machine $M$, runs the Copy machine, then the Halting machine, and finally the Negator machine.
Now, since $Q$ is a Turing machine itself, we can feed the description of $Q$ into $Q$ itself. So, the Copy machine will take the description of $Q$, and make two copies of it, and pass that to the Halting machine. So, the Halting machine has on its input $Q$ and $Q$, and so the Halting machine will try to figure out whether machine $Q$ with input $Q$ will halt or not. Fibally, oince the Halting machine has made its decision, the Negator machine will do its thing.
But note:
If we assume that $Q$ with input $Q$ halts, then the Halting machine will say exactly that on its output. But, the Negator machine was set up in such a way that it will then go into an infinite loop. So: If $Q$ with input $Q$ halts ... then it does not halt!
OK, so what if $Q$ with input $Q$ does not halt? Then the Halting machine will say so, and then the Negator machine will do nothing, and hence the whole machine $Q$ will halt. So: If $Q$ with input $Q$ does not halt ... then it does halt!
OK, but now we have a contradiction: machine $Q$ with input $Q$ will halt if and only if it does not!
OK, so where did things go wrong? In our assumption that we could create such a Halting machine .. apparently that is impossible!
Here is a cute video that goes through the same proof:
https://www.youtube.com/watch?v=92WHN-pAFCs