Acceptance for Turing Machines is Undecidable, but Recognizable

  Переглядів 30,789

Easy Theory

Easy Theory

3 роки тому

Here we show that the A_TM problem is undecidable and recognizable, which is asking if there is a decider for whether an arbitrary Turing Machine accepts an arbitrary input. The proof is by contradiction and diagonalization.
What is a Turing Machine? It is a state machine that has a set of states, input, tape alphabet, a start state, exactly one accept state, and exactly one reject state. See • Turing Machines - what... for more details.
Easy Theory Website: www.easytheory.org
Become a member: / @easytheory
Donation (appears on streams): streamlabs.com/easytheory1/tip
Paypal: paypal.me/easytheory
Patreon: / easytheory
Discord: / discord
#easytheory
Merch:
Language Hierarchy Apparel: teespring.com/language-hierar...
Pumping Lemma Apparel: teespring.com/pumping-lemma-f...
If you like this content, please consider subscribing to my channel: / @easytheory
Gold Supporters: Micah Wood
Silver Supporters: Timmy Gy
▶SEND ME THEORY QUESTIONS◀
ryan.e.dougherty@icloud.com
▶ABOUT ME◀
I am a professor of Computer Science, and am passionate about CS theory. I have taught many courses at several different universities, including several sections of undergraduate and graduate theory-level classes.

КОМЕНТАРІ: 50
@EasyTheory
@EasyTheory 3 роки тому
Thanks to my supporters Yuri, vinetor, Ali (UKposts) and Bruno, Timmy, Micah (Patreon) for making this video possible! If you want to contribute, links are in the video description.
@paolacalle5737
@paolacalle5737 2 роки тому
I learned this two weeks ago and could never grasp what exactly the contradiction was until I watched this video! Thank you so much truly appreciate you.
@oribenez
@oribenez Рік тому
Finally, I understand it. Thank you for an excellent explanation.
@AkashKumar-lr6hc
@AkashKumar-lr6hc 10 місяців тому
first time i understood the concept behind halting problem proof .. thanks a lot. 😄
@y.x3476
@y.x3476 Рік тому
Much clearly than anyone! Thank you
@alphadal99
@alphadal99 3 роки тому
Thank you so much man you are the best on youtube you made everything complicated easy. Much love from Portugal
@EasyTheory
@EasyTheory 3 роки тому
Thanks very much!
@betul3341
@betul3341 Рік тому
Thanks dude 👍🏻 I finally understood this part
@conradhansen-quartey5053
@conradhansen-quartey5053 Рік тому
This ATM proof really helped me understand
@madhavvyas3715
@madhavvyas3715 2 роки тому
THANK YOU SO MUCH FOR THIS .
@momusic1427
@momusic1427 11 місяців тому
Finally I understand the contradiction . thanks man !
@utkuceylan2309
@utkuceylan2309 5 місяців тому
You are a life saver man! Thank you
@blaze9558
@blaze9558 Рік тому
Thank you so much❤
@nickcooley8358
@nickcooley8358 Рік тому
beauty, was looking for this!
@storyofbo
@storyofbo 5 днів тому
For anyone still struggling with this here’s how I understand it. Assume you could know the number of ants in the world with 100% accuracy. You could definitely do that by getting all the ants and counting them. If you could get every ant that means you could definitely locate every ant. But it is impossible to locate every ant which means it’s impossible to count all the ants which means it’s impossible to know the entire ant population with 100% accuracy. The point is to assume the statement is true, find a smaller step that if done would guarantee the statement. Tweak that step in a way which would easily be allowed. Then see if it breaks everything.
@eatyourspinachtomperez8700
@eatyourspinachtomperez8700 2 роки тому
Very cool! Thank you.
@joserichorachmat8191
@joserichorachmat8191 2 роки тому
So, in this case, the property of TM D (always outputting the opposite of TM H) is one we derive just for the proof? As is the nature of any decider TM to freely do so?
@KnakuanaRka
@KnakuanaRka 4 місяці тому
What’s wrong with defining a TM that does that?
@KnakuanaRka
@KnakuanaRka 2 місяці тому
What's wrong with that? If there is an H, we can use it to make D, and D can cause contradictory behavior, so D can't exist, and thus neither does H. Standard proof by contradiction.
@Patrickblox
@Patrickblox Рік тому
good shit mang thx so much luv u
@pohloliq2122
@pohloliq2122 3 роки тому
I finally understand it fully
@EasyTheory
@EasyTheory 3 роки тому
Great!
@rasikaraja1840
@rasikaraja1840 Рік тому
Awesome 😎!!!
@nargesghanbari2340
@nargesghanbari2340 2 роки тому
Tu es brillant!!
@hammadmusakhel5102
@hammadmusakhel5102 2 роки тому
u r a legend, no cap.
@mohammedshahab705
@mohammedshahab705 Рік тому
no u r a legend, no cap
@keerthi1504
@keerthi1504 14 днів тому
We have *created* D to output the opposite..hence the contradiction arised. What if we create D such that the output is the same..it then does not create any contradiction. Please help..
@xufrank9945
@xufrank9945 11 днів тому
I got the same confusion
@otabekabduraimov5912
@otabekabduraimov5912 4 місяці тому
thanks
@MEWOVER9000
@MEWOVER9000 2 роки тому
Hey there, just a quick question. I see that you proved Atm to be undecidable, but how is it recognizable?
@alexm.2960
@alexm.2960 2 роки тому
If M accepts w, Step 1 "Run M on w" will finish in a finite amount of time.
@owen5106
@owen5106 2 роки тому
If we run M on w and it runs forever the first time, but will accept the second w in the language, how do we know its Turing Recognizable, if we never get to the second input? This is what im confused about.
@KnakuanaRka
@KnakuanaRka 4 місяці тому
The second w? What do you mean?
@KnakuanaRka
@KnakuanaRka 2 місяці тому
I'm not sure what you mean; the point is that the recognized emulates running M on w, and accepts if the emulation does. If M accepts w after some number of steps, so does the recognizer. So what do you mean related to the second w?
@superdahoho
@superdahoho 3 роки тому
but that's just the nature of D right? it always gives the opposite of its input. it just proves that a decider that does the opposite cannot exist, doesn't mean A_TM is undecidable. If you made D that accepts when accepts, and reject when rejects, doesn't that also prove it's a decider?
@KnakuanaRka
@KnakuanaRka 3 роки тому
I don’t quite understand what you mean; if you can make a decider for ATM, what prevents you from making D with it? If D can’t exist, then there can’t be an H that you can make D from. And what does the last part mean?
@barsbarancicek4138
@barsbarancicek4138 4 місяці тому
@@KnakuanaRka Well i am 2 years late to this conversation but hopefully i will get an answer because i am stuck at the same point. What @superdahoho means to say is D can not exist because it outputs the opposite. D not existing has nothing to do with it using H. So how can we say H cannot exist when H is not the reason for D not existing?
@KnakuanaRka
@KnakuanaRka 4 місяці тому
@@barsbarancicek4138 The point of the argument is that if H (the decider for ATM) exists, then we can construct D, which results in contradictory behavior. Since we can’t have that, D cannot exist, which means H cannot exist either.
@kailanefelix2890
@kailanefelix2890 2 місяці тому
@@KnakuanaRka it doesn't make any sense!!! I'm with @superdahoho. I can't understand this proof bc the problem is with D.
@KnakuanaRka
@KnakuanaRka 2 місяці тому
@@kailanefelix2890 The basic process is a proof by contradiction. If a decider for ATM exists, we can use it to make D, so D exists. Applying D to itself causes contradictory behavior (if it accepts, then it rejects, and vice versa); we can’t have that, so D can’t exist, meaning the ATM decider doesn’t exist. It’s a similar form of contradiction to the proof of an infinite number of primes. If there is a finite list of primes (a, b, c…. z), then you could multiply all these together to get P, and add 1 to get P+1. Then we can get P+1’s prime factors (p, q…); these exhibit contradictory behavior, as they are both in the list of primes (as they are prime) and not in the list (P is a multiple of every entry in the list, so P+1 is not, and its factors cannot be in the list). Thus P+1 cannot exist, so the finite list of primes doesn’t either; the list of primes must be infinite to prevent this contradiction from happening.
@vimalathithand917
@vimalathithand917 4 місяці тому
Finally !!! I understand :)'
@CLG111
@CLG111 Рік тому
How do you just arbitrarily say that turing machine D gives the opposite result? Why is this? There's no explanation as to why that is the case. This needs to be explained better.
@jmm5765
@jmm5765 5 місяців тому
If you run a decider (we assumed M) on an input, it will either accept OR reject, nothing else. And so when D runs M it gets a result back from it, either "accept" or "reject". You can then invert this result. The easiest way would be to use binary. Let's assume if M accepts, it outputs a 1, if it rejects, it outputs a 0. What we do is that after M has ran, we can have D look at the output and if it's a 1, D itself outputs a 0, and if it's 0, D itself outputs a 1. Does this make sense?
@7ow1nn1ng
@7ow1nn1ng 4 місяці тому
@@jmm5765but isnt that kind of "forcing" a contradiction? How would it be different from using a decidable language i.e. the Acceptance DFA and outputting the opposite result of that/claiming it's a contradiction?
@jmm5765
@jmm5765 4 місяці тому
@@7ow1nn1ng Well not quite, your scenario would be just inverting the input, which creates a machine (B) that inverts the input of another one (A). Each machine would still be consistent in its results, they would just contradict each other, which is fine. What happens here though is slightly different, by creating this machine D that inverts the result of M, you cause D to contradict *itself*, and that's where the logical contradiction arises. Does that help/make sense?
@kailanefelix2890
@kailanefelix2890 2 місяці тому
@@jmm5765 I'm having the same questions as @7ow1nn1ng, that doesn't make any sense for me. How does D contradict itself? And how do D contradictions implies M impossibility of existence?
@KnakuanaRka
@KnakuanaRka 2 місяці тому
@@kailanefelix2890 Basically, the cause of the contradiction is this: The D machine runs H on where M is a Turing machine (determining if the inputting the machine’s code into itself is accepted or not), and then returns the opposite (accept if H rejects, and vice versa). So what happens when you run H on ? This would basically determine whether or not D accepts D. However, internally, this would cause D to run H (the same thing), and then do the opposite. So if H accepts in the emulation, it rejects in the final output, and vice versa. This is a contradiction; you can’t assign a consistent value to the output because the internal emulation would require the same calculation to give the opposite response. It’s similar to Epimenides’ paradox of “This statement is false”; assigning a true/false value to it would imply the opposite, so you can’t evaluate it. So if this can’t happen due to contradictory behavior, what went wrong? If D existed, we could easily cause this by running D, so D can’t exist. And if we had an oracle H, the steps to make D from it are pretty simple; in order for D to not exist to avoid the contradiction, the oracle must not exist, either. The oracle is the only weak point or assumption in creating the contradiction, as if we had an oracle, we could easily do the rest, so by proof by contradiction, it’s where we went wrong. I also find it convenient to express the whole thing in terms of programming pseudocode with more clear names, like this: Oracle (TM, inp): #Return true if TM accepts on inp, false if it rejects or never halts Defier(TM): return NOT(Oracle(TM,TM)); #Does this give true or false? Print(Oracle(Defier, Defier));
Decidable iff Recognizable and co-Recognizable Proof
8:08
Easy Theory
Переглядів 5 тис.
The Halting Problem: The Unsolvable Problem
4:14
lydia
Переглядів 124 тис.
КИРПИЧ ОБ ГОЛОВУ #shorts
00:24
Паша Осадчий
Переглядів 6 млн
The Boundary of Computation
12:59
Mutual Information
Переглядів 903 тис.
Turing Machines Explained - Computerphile
5:25
Computerphile
Переглядів 1 млн
Is this language recognizable?
9:06
Easy Theory
Переглядів 4,5 тис.
Understanding the Halting Problem
6:33
Spanning Tree
Переглядів 70 тис.
Lecture 32/65: Decidability and Decidable Problems
31:58
hhp3
Переглядів 88 тис.
Turing & The Halting Problem - Computerphile
6:14
Computerphile
Переглядів 842 тис.
Why Electronic Voting Is Still A Bad Idea
12:01
Tom Scott
Переглядів 4,6 млн
Turing Complete - Computerphile
6:26
Computerphile
Переглядів 305 тис.