My understanding of the logic: We assume that a turingmachine R that solves haltTM exists, ie. a turing machine that accepts if something halts and rejects if it loops forever. If R exists we can also solve Atm. Before Atm runs its input, we throw the input in R, if R rejects, ie. it is a input that loops forever, then Atm should also reject. If R accepts, then Atm can run the input it tested on its own turing machine. Since it Atm is garanteed by R that it will not loop, we know that Atm will not loop, it will either accept or reject. This means that Atm is decidable. We know from previous proofs that Atm is not decidable so the fact that with R we can make Atm decidable means that R cannot be a correct assumption. Thereby we have proven that R which had to exist for haltTM to be decidable does not exist, and therefore haltTM is not decidable. Proof by contradiction.
My understanding: We use the reduction proof. This means: We assume that there exists M such that it "decides" HALTtm. With this assumption, we can generate M' such that it "decides" Atm. If there is an input for M such that w is a machine and s is a string, M returns true if w halts on the input string s. So let's assume that M returned true. Also, we know that M itself does not loop (since M is a decider - that's just the definition of a decider) - meaning it always returns true or false. With the facts that M returned true (which means w halted on input string s), we can say that there are three possible outcomes for M' on the input : 1. M' either accept since w is a Turning Machine that accepts s, or, 2. M' rejects since w is a Turing Machine that rejects s. 3. M' rejects since the input is invalid (i.e. w is not a Turing Machine, wrong format, etc) This is a full functioning algorithm that M' follows IF M returns true for an input . Now, let's look at what happens if M returned false. If M returned false, then that means the machine M from the input does not halt on M. In other words, it loops endlessly. If M loops, then M must return false. So when is fed to M', M' recognizes the input as invalid. Therefore, M' rejects. Here, we have correctly created an algorithm for the decider M' which accepts and rejects any scenario for M' without looping. We already know that M' is impossible since Atm is not decidable. Thus, the fact that we were able to derive perfect M' with our initial assumption that there exists a decider M for HALTtm tells us that our initial assumption was wrong - meaning that there does NOT exist a decider M for HALTtm. In other words, a machine that recognizes HALTtm is undecidable.
Very well put. I was lost reading my class notes until watching this video, but amazingly it is all clear now and I can move on more prepared to handle other reduction proofs. Awesome stuff! Thank you very much!!
Pictorial representation of what sir is trying to explain : imgur.com/a/fEwWglU Another way to prove halting problem by reducibility : First of all I'll try to explain what reducibility means : a) Reducing a harder problem to an easier problem gives us the flow of decidability, meaning : Suppose we're reducing A to B, then if A is known undecidable problem then B is also undecidable. And if B is known decidable problem then A is decidable. You cannot say B is decidable if A is decidable or A is undecidable if B is undecidable. (Attached an image at bottom to make it clear) Now after clearing the terminology Let's actually understand what reducibility actually means here in decidability : We're reducing A to B, Now assuming there's an algorithm or decider for B, we're gonna try to use that algorithm to make an algorithm for A. Thereby reducing A to B. Now coming to the case of reducing Acceptance problem (undecidable) to halting problem and trying to say that halting problem is also undecidable. Suppose you say that halting problem is decidable, then this means that you've an algorithm or decider 'R' (as any algorithm at the end can be described as a language which in turn can be made into TM). We will use this decider R to form another decider S which will decide the acceptance problem. Step 1 : You're given an input { | where M is a TM and w is an input to that TM}. We will create another M' Turing machine which will be fed this input and it will take M from this input and will introduce an infinite loop to all the non-accepting state. And this can be done in polynomial time(because reduction has to be done in polynomial time) Now we will feed this
Your videos are amazing, they really solve a lot of problems of this class, and everything is clear! You share with us for free, how nice your are!!!!! Thank you sooooooooo much!
In high-level language: A_tm is undecidable because it can potentially loop infinitely (never halt) R can decide whether or not an input, w, causes M to halt. If R decides that M(w) halts, then we can use that to decide A_tm as we have cleared the condition that M(w) will not loop infinitely. As A_tm is undecidable, that means that R cannot possibly do the job it claims to have done.
How can you say that the accepting problem reduces to the halting problem formally? I can understand that they're similar intuitively but could you be more precise?
so the logic goes like this: we are reducing ATM to HALTTM. Assuming there's a decider S that decides ATM. then we construct a subroutine R that decides if halts. If the input halts, accept. If not, reject. Then we have S that accepts R if R accepts (meaning on input R halts) and reject if R reject (meaning loops). Now we've built a decider for ATM, but since we've proven ATM is undecidable, the whole S is a decider with R as a subroutine thing fails, thus meaning R cannot be a decider for HALTTM either.
When you say "If M loops then => reject" How come the proof doesn't just stop there? Couldn't we already know at this point that you cannot reject on something that loops because you can not check whether or not something is looping or just taking a long time to calculate?
+TeFaZ , he assumed at some point that there is some methodology like a "time limit" given for that "M" machine to operate within and return a result. If for example it exceeded that time set, then we will consider that it has gone into an infinite loop. Theoretically, your words are correct as we already proved that its not possible to decide whether a TM is looping or it just did not have enough time to do the computation, but in end, its all assumptions he made in this video, so you can agree on making some intentionally made mistakes to conclude a contradiction.
The point was to prove that halt() is not decidable without having to prove it from first principles, and instead use an already proven undecideable language/problem through reduction
In 2:28 aren't we reducing the HALTtm to the Atm? If I'm incorrect, than my understanding is when proving HALTtm we found out it to be the reduced problem of Atm, and since Atm is undecidable, HALTtm is undecidable
wrg, no such thing as undecidable langx, not expresx all probx as langx, express anyx by anyx no matter what and it'd be perfx, no such thing as langx. can decide
You're a wizard harry
My understanding of the logic:
We assume that a turingmachine R that solves haltTM exists, ie. a turing machine that accepts if something halts and rejects if it loops forever.
If R exists we can also solve Atm.
Before Atm runs its input, we throw the input in R, if R rejects, ie. it is a input that loops forever, then Atm should also reject. If R accepts, then Atm can run the input it tested on its own turing machine. Since it Atm is garanteed by R that it will not loop, we know that Atm will not loop, it will either accept or reject. This means that Atm is decidable. We know from previous proofs that Atm is not decidable so the fact that with R we can make Atm decidable means that R cannot be a correct assumption. Thereby we have proven that R which had to exist for haltTM to be decidable does not exist, and therefore haltTM is not decidable. Proof by contradiction.
thanks. your explanation made the video clearer to me!
This is very clear, thank you
My understanding:
We use the reduction proof. This means:
We assume that there exists M such that it "decides" HALTtm. With this assumption, we can generate M' such that it "decides" Atm.
If there is an input for M such that w is a machine and s is a string, M returns true if w halts on the input string s. So let's assume that M returned true. Also, we know that M itself does not loop (since M is a decider - that's just the definition of a decider) - meaning it always returns true or false.
With the facts that M returned true (which means w halted on input string s), we can say that there are three possible outcomes for M' on the input :
1. M' either accept since w is a Turning Machine that accepts s, or,
2. M' rejects since w is a Turing Machine that rejects s.
3. M' rejects since the input is invalid (i.e. w is not a Turing Machine, wrong format, etc)
This is a full functioning algorithm that M' follows IF M returns true for an input . Now, let's look at what happens if M returned false.
If M returned false, then that means the machine M from the input does not halt on M. In other words, it loops endlessly. If M loops, then M must return false. So when is fed to M', M' recognizes the input as invalid. Therefore, M' rejects.
Here, we have correctly created an algorithm for the decider M' which accepts and rejects any scenario for M' without looping. We already know that M' is impossible since Atm is not decidable. Thus, the fact that we were able to derive perfect M' with our initial assumption that there exists a decider M for HALTtm tells us that our initial assumption was wrong - meaning that there does NOT exist a decider M for HALTtm.
In other words, a machine that recognizes HALTtm is undecidable.
Very well put. I was lost reading my class notes until watching this video, but amazingly it is all clear now and I can move on more prepared to handle other reduction proofs. Awesome stuff! Thank you very much!!
still lost. but thank you
LMAO
Pictorial representation of what sir is trying to explain : imgur.com/a/fEwWglU
Another way to prove halting problem by reducibility :
First of all I'll try to explain what reducibility means :
a) Reducing a harder problem to an easier problem gives us the flow of decidability, meaning : Suppose we're reducing A to B, then if A is known undecidable problem then B is also undecidable. And if B is known decidable problem then A is decidable. You cannot say B is decidable if A is decidable or A is undecidable if B is undecidable.
(Attached an image at bottom to make it clear)
Now after clearing the terminology
Let's actually understand what reducibility actually means here in decidability :
We're reducing A to B,
Now assuming there's an algorithm or decider for B, we're gonna try to use that algorithm to make an algorithm for A. Thereby reducing A to B.
Now coming to the case of reducing Acceptance problem (undecidable) to halting problem and trying to say that halting problem is also undecidable.
Suppose you say that halting problem is decidable, then this means that you've an algorithm or decider 'R' (as any algorithm at the end can be described as a language which in turn can be made into TM). We will use this decider R to form another decider S which will decide the acceptance problem.
Step 1 : You're given an input { | where M is a TM and w is an input to that TM}.
We will create another M' Turing machine which will be fed this input and it will take M from this input and will introduce an infinite loop to all the non-accepting state. And this can be done in polynomial time(because reduction has to be done in polynomial time)
Now we will feed this
Your videos are amazing, they really solve a lot of problems of this class, and everything is clear! You share with us for free, how nice your are!!!!!
Thank you sooooooooo much!
This is amazing! Top quality videos, seriously :)
In high-level language:
A_tm is undecidable because it can potentially loop infinitely (never halt)
R can decide whether or not an input, w, causes M to halt.
If R decides that M(w) halts, then we can use that to decide A_tm as we have cleared the condition that M(w) will not loop infinitely.
As A_tm is undecidable, that means that R cannot possibly do the job it claims to have done.
This actually makes things a lot easier to understand.
How can you say that the accepting problem reduces to the halting problem formally? I can understand that they're similar intuitively but could you be more precise?
so the logic goes like this:
we are reducing ATM to HALTTM. Assuming there's a decider S that decides ATM. then we construct a subroutine R that decides if halts. If the input halts, accept. If not, reject. Then we have S that accepts R if R accepts (meaning on input R halts) and reject if R reject (meaning loops). Now we've built a decider for ATM, but since we've proven ATM is undecidable, the whole S is a decider with R as a subroutine thing fails, thus meaning R cannot be a decider for HALTTM either.
When you say "If M loops then => reject" How come the proof doesn't just stop there? Couldn't we already know at this point that you cannot reject on something that loops because you can not check whether or not something is looping or just taking a long time to calculate?
+TeFaZ , he assumed at some point that there is some methodology like a "time limit" given for that "M" machine to operate within and return a result. If for example it exceeded that time set, then we will consider that it has gone into an infinite loop. Theoretically, your words are correct as we already proved that its not possible to decide whether a TM is looping or it just did not have enough time to do the computation, but in end, its all assumptions he made in this video, so you can agree on making some intentionally made mistakes to conclude a contradiction.
The point was to prove that halt() is not decidable without having to prove it from first principles, and instead use an already proven undecideable language/problem through reduction
"I think it is easy to get lost in the details..." and the author continues by providing even more details
In 2:28 aren't we reducing the HALTtm to the Atm?
If I'm incorrect, than my understanding is when proving HALTtm we found out it to be the reduced problem of Atm, and since Atm is undecidable, HALTtm is undecidable
Thank you so much for these videos.
Thank You so very much. Wonderfully clear explanations.
You are my fucking hero. I have trying to understand this for days, came here, saw the video twice and...voila!!
Simply brilliant
Why does M never loop when we simulate M on input w after constructing the reducer?
it's an assumption.
Contract a 2 input function into an 1 input function, then into a 0 input function(feed function to itself. This is how I memorize the key process.
Thank you
Hmm, I feel like this proof uses its conclusion as one of its premises...
Thanks sir
wrg, no such thing as undecidable langx, not expresx all probx as langx, express anyx by anyx no matter what and it'd be perfx, no such thing as langx. can decide
before you criticize, learn to type properly.