0% found this document useful (0 votes)
53 views

Auto

It is containing: Church Hypothesis, Halting Problem, Equivalency between CFG and PDA and Merger Graph

Uploaded by

amukhopadhyay
Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
53 views

Auto

It is containing: Church Hypothesis, Halting Problem, Equivalency between CFG and PDA and Merger Graph

Uploaded by

amukhopadhyay
Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 7

The Church-Turing Thesis

There are various equivalent formulations of the Church-Turing thesis. A common one is that every effective computation can be carried out by a Turing machine. The Church-Turing thesis concerns the notion of an effective or mechanicalmethod in logic and mathematics. Effective and its synonym mechanical are terms of art in these disciplines: they do not carry their everyday meaning. A method, or procedure, M, for achieving some desired result is called effective or mechanical ust in case !. M is set out in terms of a finite num"er of e#act instructions $each instruction "eing e#pressed "y means of a finite num"er of sym"ols%& '. M (ill, if carried out (ithout error, produce the desired result in a finite num"er of steps& ). M can $in practice or in principle% "e carried out "y a human "eing unaided "y any machinery save paper and pencil& *. M demands no insight or ingenuity on the part of the human "eing carrying it out. A well-known example of an effective method is the truth table test for tautologousness. In practice of course this test is unworkable for formulae containing a large number of propositional variables but in principle one could apply it successfully to any formula of the propositional calculus given sufficient time tenacity paper and pencils.

Universal Turing Machine


A Universal Turing Machine, or UTM, can emulate any other specific Turing machine, by defining states and symbols. The UTM is defined ith certain capabilities.

The UTM can define the symbols that the specific Turing machine ill use. !t can define the symbols that encode the states and transition rules for the specific Turing machine. !t can encode the rules for that specific Turing machine onto the input tape.

As noted, it is easier to describe any UTM as having three tapes, although it does not re"uire them.

The first tape encodes the set of states for the specific Turing machine to be emulated. The second tape is an input for that specific TM. The third tape is a or#ing memory for the current state of the emulated machine. The UTMs program must begin by reading the program tape to learn the initial state, and note this on the status tape. The UTMs states follo the follo ing processes.

$. &.

'. ). *. +.

%ead the current cell in the data tape. %ead the program tape to find the instruction for the current status and the current data cell, and note this on the status tape. This instruction includes the ne state. !f the ne state is halt, then set the UTM itself into the halt state( other ise proceed to step ). Apply the instruction from the state to the data tape. This might re rite a cell, and move the data tape to the right or left. Update the status tape. ,ontinue at step -$ above.

Halting Problem
Some mathematical problems can be solved in a limited number of steps. Anyone who follows a procedure to multiply a pair of four-digit numbers together proceeds by multiplying pairs of digits, in particular sequences, and includes carrying and adding steps as required. Multiplication of two finite numbers can be completed in some finite number of steps. ther problems, however, can never be completed. !he value of pi, or " ", is appro#imately $.%&%'(), but the decimal digits go on forever. *o mathematician, no !uring machine, nor any modern computer can complete the tas+. !uring machines can do multiplication problems, when the !M needs to complete the tas+ in a finite time, and has a correct instruction set. ,ut what if the programmer ma+es an error, such as repeatedly multiplying by the ones digit rather than moving on to the tens-!he programmer might e#amine the instructions, but there is no guarantee that this would be an error-free process itself. .ould a !uring machine inspect the instructions, instead-

.riteria for Solving the /alting 0roblem


Alan !uring stated that the three criteria for a machine that can avoid the halting problem or a /alting 0roblem Machine 1/0M2 were3 %. !he /0M must correctly report yes, the !M being tested will halt or no, it will not halt.

4. $. to halt.

!he /0M must wor+ for any given !uring machine and any appropriate input for that !M. !he /0M itself must halt within a finite amount of time, or a finite number of steps.

So the /0M must be somewhat more capable than the 5!M, which cannot recogni6e that it will fail

Sketch of a proof that the Halting Problem is unsolvable

This proof (as devised "y Alan Turing, !+), -uppose you have a solution to the halting pro"lem called .. . ta/es t(o inputs: !. a program " and #. an input I for the program ". . generates an output 0halt0 if . determines that 1 stops on input 2 or it outputs 0loop0 other(ise.

-o no( . can "e revised to ta/e 1 as "oth inputs $the program and its input% and . should "e a"le to determine if 1 (ill halt on 1 as its input. 3et us construct a ne(, simple algorithm 4 that ta/es .5s output as its input and does the follo(ing !. if . outputs 0loop0 then 4 halts, '. other(ise .5s output of 0halt0 causes 4 to loop forever. That is, 4 (ill do the opposite of .5s output.
function K() { if (H()=="loop"){ return; } else { while(true); //loop forever } }

-ince 4 is a program, let us use 4 as the input to 4.

2f . says that 4 halts then 4 itself (ould loop $that5s ho( (e constructed it%. 2f . says that 4 loops then 4 (ill halt. 2n either case . gives the (rong ans(er for 4. Thus H cannot work in all cases. 6e5ve sho(n that it is possi"le to construct an input that causes any solution . to fail.

CFG to PDA Step 1: CFG PDA Let s look at an e!a"ple: # $e"e"%er the CFG &or o'' len(th palin'ro"es: Sa)% SaSa)%S% # Let s con*ert this to a PDA. +!a"ple: # , - ./0 10 2 030 450 65 0F7 # / - 8 450 410 49 :

# 1 - 8 a0 % : # 2 - 8 a0 %0 S0 65 : # F - 8 49 : State 41 Tape i;p < Stack S ,o*es .410 a7 .410 %7 .410 aSa7 .410 %S%7 .41 0 <7 .41 0 <7

41 41 Let s run , on a%%%a # .450 a%%%a0 67

a %

a %

.410 a%%%a0 S67

# .410 a%%%a0 aSa67 ;; push # .410 %%%a0 Sa67 ;; "atch # .410 %%%a0 %S%a67 ;; push # .410 %%a0 S%a67 ;; "atch # .410 %%a0 %%a67 ;; push # .410 %a0 %a67 ;; "atch # .410 a0 a67 ;; "atch # .410 <0 67 ;; "atch #.490 <0 6 7 ;; accept
What is Merger graph? Ans. Merger graph of a machine M of n states is an undirected graph defined as follows.

1. Merger graph consists of n number of vertices, where n is the number of states of the machine. That is in other words each states of the machine represent one vertex. 2. There is an undirected arc between a pair of vertices (states) if the outputs do not conflict for those pair of states. (a) The arc will be an uninterrupted arc if the next states of the two states [ ertices! do not conflict. (b) The arc will be an interrupted arc if the next states of the states [ ertices! conflict. The conflicting next states will be placed in the interrupted portions. ". There will be no arc between the two vertices if the outputs of the pair of states conflict.

Ans. #n the above machine there are six states. Therefore, number of vertices of the Merger $raph is six, namel% &, ', (, ), *, and +. ,ets consider two vertices & and '. #n the state table for & and ' for input I1 outputs are 1 and don-t care. #t is treated as same output ()on-t care can be either . or 1). /ame for I2, I", and I0 the outputs do not conflict. (#f the outputs are don-t care, consider it same with the other) Therefore, an undirected arc is drawn between & and '. +or input I0, & produces next state * and ' produces next state (. 1ence the undirected arc between & and ' is an interrupted arc and *( is placed in the interrupted portion. (onsider & and (. The outputs do not conflict for inputs I1, I2, I", and I0. &n undirected arc is drawn between & and (. The next states produced b% & and ( for input I1 are ) and *, i.e. conflicting. +or input I2 the next states are ' and + 2 also conflicting. The arc is an interrupted arc and ('+) and ()*) is placed in the interrupted portion. (onsider & and ). +or input I2, & and ) produce conflicting outputs 2 . for & and 1 for '. /o no arc can be drawn between & and ). (onsider & and *. +or all the inputs the% produce same outputs. &n undirected arc is drawn between & and *. The & and * produce next states * and &, respectivel%, for input I0. 1ence the arc is an interrupted arc and (*&) is placed in the interrupted portion. (onsider & and +. The & and + produce conflicting outputs (. for &, 1 for +) for input I2. 1ence no arc can be drawn between & and +.

'% &n &n &n

this process, an uninterrupted arc is drawn between ' and (. uninterrupted arc is drawn between ' and ). interrupted arc is drawn between ' and * and &( is placed in the interrupted portion. uninterrupted arc is drawn between ' and +.

+or input I2, ( and ) produce conflicting outputs. 3o arc can be drawn between ( and ). +or input I", ( and * produce conflicting outputs. 3o arc can be drawn between ( and *. +or input I3, ( and + produce conflicting outputs. 3o arc can be drawn between ( and +. The ) and * produce same outputs and same next states for all the inputs. &n uninterrupted arc is drawn between ) and *. The ) and + produce same outputs for all the inputs but conflicting next states (' and () for input I2. &n interrupted arc is drawn between ) and + and '( is placed in the interrupted portion. The * and + produce same output for all the inputs but conflicting next states (& and *) for input I". &n interrupted arc is drawn between * and + and &* is placed in the interrupted portion. The & and ' are connected b% an uninterrupted, undirected arc. #n the interrupted portion (* is placed. The connection between & and ' will be uninterrupted if ( and * are connected b% uninterrupted arc. 'ut there is no arc between ( and *. /o there will be no arc between & and '. (* is crossed therefore. The & and ( are connected b% uninterrupted undirected arc. #n the interrupted portion )* and '+ are placed. The & and ( will be connected b% uninterrupted arc if ', + and ), * are connected.

You might also like