Presentation is loading. Please wait.

Presentation is loading. Please wait.

More Theory of Computing

Similar presentations


Presentation on theme: "More Theory of Computing"— Presentation transcript:

1 More Theory of Computing
Computer Science 101 More Theory of Computing

2 Another Example: Odd Parity
A parity bit is added to the right end of a string of bits if it makes the total number of 1’s odd; otherwise, add a 0 > > >

3 Design Strategy Three states
Even parity: if we read a blank here, we have an even number of 1s, so we write a 1 and goto the halt state Odd parity: if we read a blank here, we have an odd number of 1s, so we write a 0 and goto the halt state Halt

4 Design Strategy Even parity Odd parity
We stay here while we keep reading 0s Otherwise, we goto odd parity Odd parity Otherwise, we goto even parity

5 State Diagram for Odd Parity TM
Even parity Odd parity Halt

6 Tuples for Transitions
The Turing machine program (1,1,1,2,R) Even parity state reading 1, change state (1,0,0,1,R) Even parity state reading 0, don’t change state (2,1,1,1,R) Odd parity state reading 1, change state (2,0,0,2,R) Odd parity state reading 0, don’t change state (1,b,1,3,R) End of string in even parity state, write 1 and go to state 3 (2,b,0,3,R) End of string in odd parity state, write 0 and go to state 3

7 The Church-Turing Thesis
If there exists an algorithm to do a symbol manipulation task, then there exists a Turing machine to do that task Thesis Statement advanced for consideration and maintained by argument Theorem Ideas that can be proved in a formal, mathematical way

8 Emulating an Algorithm on a TM

9 A Universal TM Represent the algorithm as symbols on the tape
Put the algorithm’s inputs on the tape as well Run the universal TM to run the algorithm The universal TM is like a stored program computer (von Neumann machine)

10 Unsolvable Problems Problem to investigate
Decide, given any collection of Turing machine instructions together with any initial tape contents, whether that Turing machine will ever halt if started on that tape

11 The Proposed Solution T* = TM being tested t = T’s input
P = The testing TM

12 A Proposed Counterexample
T* = TM being tested t = T’s input Q = The testing TM

13 An Actual Counterexample
S* = TM being tested S*bS* = S’s input S = The testing TM

14 Other Unsolvable Problems
Unsolvable problems, related to the halting problem, have the following consequences No program can be written to decide whether any given program always stops eventually, no matter what the input No program can be written to decide whether any two programs are equivalent No program can be written to decide whether any given program run on any given input will ever produce some specific output


Download ppt "More Theory of Computing"

Similar presentations


Ads by Google