retagged by
2,072 views
5 votes
5 votes
Can anyone provide the proof of halting problem of turing machines by contradiction ?

If possible, give example, how is it reduced to other turing problems ?
retagged by

2 Answers

Best answer
4 votes
4 votes

We can prove this by contradiction as follows => 


Consider a machine A which does arithmetic operations and always halts and prints the right answer, but when we feed this machine with the input of macine B, it stucks (Loops forever).


Consider a machine B which plays checkers game and prints the right ouput, but when we feed this machine with the input of machine A,it then stucks.


Now, consider a very smart machine H, which simulates machine A and B with their inputs. 

Now, we take the cases :-->

A). It simulates taking machine A along with arithmetic operations, it halts and says not stuck.

B). It simulates taking machine A along with machine B input, it halts and says stuck.

C). It simulates taking machine B along with checker inputs, it halts and says not stuck. 

D). It simulates taking machine B along with machine A inputs, it halts and says stuck .


Now, we can say that machine H is a very smart machine which always halts and gives the output. H is here is actually a decider.

But, can a machine like this exist in real world, does it have existence in our world ? 

Now, we are going to prove, that this machine existence is impossible . How ?


Consider a machine X which consists of three machines :-->

1). D(Duplicate) - Making 1 copy of whatever is feed into it .

2). H - Our magic machine which is very smart .

3). N(Negation) - Which negates whatever the input is given to it and gives the output .

Ex :- Take a case when we provide machine X with its own description, suppose it stucks (Loops forever).


Now, its time to test how machine X works .

A). Provide the machine X with input of its own description . 

B). It goes inside and watches machine D and D takes it as input and Makes a copy of it .So, now there are 2 copies, one is original and other is duplicate copy .

C). These two copies now move forward and encounter H, our smart machine which can do anything . It takes the 2 copies as input and  we took this case as example above-->  "(Take a case when we provide machine X with its own description, suppose it stucks (Loops forever)."

D). Hence, Machine H prints stuck and this output moves forward .

E). Now, this encounters Machine N, which negates the input and hence, prints Not stuck .


Now, we actually took a case -> 

  "(Take a case when we provide machine X with its own description, and suppose it stucks (Loops forever)."

But, now we see it does not stuck . Hence, it is comtradicting itself. 


Now, take this case -> 

 "(Take a case when we provide machine X with its own description, and  suppose it does not stucks ."

But again, we see that machine X is stuck and hence again contradicting itself .


Hence, No such machine X can really exist .

and similarly, No such machine H can exist .


Hence, Halting problem is undecidable .

edited by
5 votes
5 votes
Halting problem of turing machine simply says if a turing machine halt on a certain input. If it halts, then 'yes' condition is possible. If not halts , then it may cause loop forever. So, halting problem of Turing Machine is undecidable.

Eg- 'A TM accepts atleast 10 string'

Here 'yes' ans possible , as upto 10 string it is accepting. But we cannot say 'no' in any case it is acceping less than 10 string. Because then there also possibility it is next going to accept 10 string. So, it is partially decidable or semi decidable.

Another one kind of problem is , if there are only 'no' condition is possible.

Eg- If a string only accept empty string?

Here 'yes' answer is not possible. As after certain time it is possible that string is not empty, or it have some input. So, it is not even recursive enumerable.

Related questions

2 votes
2 votes
1 answer
3
monty asked Oct 26, 2016
784 views
1 votes
1 votes
1 answer
4
Abhipsa asked Jan 22, 2019
347 views
What is the difference between Turing Recognizable and Turing Decidable?Thanks!