Download presentation

Presentation is loading. Please wait.

Published byCollin Myers Modified about 1 year ago

1
Equivalent Formalisms For Turing Machine CS6800 By Tiba Zaki & Abdalrahman Alsaedi

2
Lambda calculus. Tag systems Post production systems Partial recursive functions Conway's Game of Life. Equivalent Formalisms ********** Many machines that might be thought to have more computational capability than a simple universal Turing machine,they might compute faster, or use less memory, or their instruction set might be smaller, but they cannot compute more powerfully (i.e. more mathematical functions). Some of these machines are:

3
Lambda Expression : Function application written in prefix form. Ex1: “Add four and five” is (+ 4 5) Lambda calculus developed by Alonzo Church. While Turing's solution to specific problem is a procedure Church's solution is like a mathematical specification. Alonzo Church Lambda abstraction : ( λ x. + x 1) the function of x that adds x to 1 Lambda calculus

4
The set of functions that can be defined in the lambda calculus is equal to the set of functions that can be computed by a Turing machine. Another example ( λ x. λ y. +x(( λ x.-x3)y))5 6 ( λ y.+5(( λ x.-x3)y)) +5(( λ x.-x3)6) +5(-6 3) 8 ( λ x. λ y. +x(( λ x.-x3)y))5 6 ( λ y.+5(( λ x.-x3)y)) +5(( λ x.-x3)6) +5(-6 3) 8 Example 2 5*6+8*3 is (+ (* 5 6) (* 8 3)) (+ 30 (*8 3)) ( ) 54 (+ (* 5 6) (* 8 3)) (+ 30 (*8 3)) ( ) 54

5
Tag Systems Tag systems developed by Polish logician Emil Post (some times called Tag Machine) Tag system is a finite state machine that is augmented with a first- in-first-out (FIFO) queue. In other words, it's a PDA with a FIFO queue rather than a stack. Example L = {ww R : w ∈ {a, b} *} is context-free language can be accepted by PDA but L2={ww : w ∈ {a, b} *} is not and can’t be accepted by PDA Simply we can build a tag system to accept L2 1.writes the first half of its input string into its queue 2.then removes characters from the head of the queue. one at a time, and checks each of them against the characters in the second half of the input string.

6
Is Tag System equivalent to Turing machine ? Let the head of the tag system’s queue contain the square that is under the TM’s read write head. To move both left and write in the queue, treat the queue as circular and simulates the transitions as follows: 1.TM’s move right= adding to the tail the symbol that was scanned. 2.TM’s move left= if number of symbols on the queue =n remove n-1 from queue and put in the tail one at a time 3.TM’s moves to the blank=push to the tail two symbols one of them is nonblank square Simulating a Turing Machine using Tag system: Let Tag system’s queue corresponds to the TM active tape plus a blank on either side.

7
Goal Nowadays, tag systems still play a fundamental role in the race for ﬁnding small universal systems. many small universal systems are proven to be universal through simulation of 2-tag systems, or some variant of tag systems. Turing machine 2 Tag System Universal Turing Machine. Can we produce UTM in polynomial time? Polynomial Exponential Minimal description of a universally computational model.

8
- The computation is accomplished by applying a set of production rules. - Left-hand sides are matched against a current working string and whose right-hand sides are used to rewrite the working string. - Sometimes called Post System Post Production Systems

9
Post system P to be a quintuple (V, L, X, R, S), where: V is the rule alphabet (nonterminal and terminal) ∑ (the set of terminals) is a subset of V, X is a set of variables whose values are drawn from V *, R (the set of rules) is a finite subset of (V U X)* X (V U X)*, constraint “every variable that occurs on the right-hand side of a rule must also have occurred on the left-hand side.” S (the start symbol) can be any element of V -∑. Post Production Systems

10
Not similar to regular and context free grammar in 1. left-hand side are two or more symbols. 2. rules may contain variables. match any element of V *. 3. A rule may be applied only if its left-hand side matches the entire working string. So, A B that replaced an A anywhere in the string with a B is written as XAY XBY. Post Production Systems

11
L1={ww :w in {a,b}*} P=(S,a,b},{a,b},{X},R,S)where R is 1. XS XaS 2. XS XbS 3. XS XX To generate abbabb S aS abS abbS abbabb

12
Partial recursive functions A child couldn't sleep, so her mother told a story about a little frog, who couldn't sleep, so the frog's mother told a story about a little bear, who couldn't sleep, so bear's mother told a story about a little weasel...who fell asleep....and the little bear fell asleep;...and the little frog fell asleep;...and the child fell asleep. A child couldn't sleep, so her mother told a story about a little frog, who couldn't sleep, so the frog's mother told a story about a little bear, who couldn't sleep, so bear's mother told a story about a little weasel...who fell asleep....and the little bear fell asleep;...and the little frog fell asleep;...and the child fell asleep. Recursion is the process of repeating items in a self-similar wayself-similar

13
Sierpinski Triangle Koch Snowflake Fractals are self-similar, recursive structures

14
Any function whose value may be obtained using a finite number of operations using a precisely specified algorithm (computation) Or Any function that uses recursion and can call itself until a certain condition is met. Ex: Write the first four terms of the sequence a 1 =-4 an=a n-1 +5 a 1 =-4n=1 n=2 : a 2 = a = 1 n=3 : a 2 = a = 6 n=4 : a 4 = a = 11 a 1 =-4n=1 n=2 : a 2 = a = 1 n=3 : a 2 = a = 6 n=4 : a 4 = a = 11

15
Recursive function (algorithms)break down a problem into smaller pieces which you either already know the answer to, or can solve by applying the same algorithm to each piece, and then combining the results. void myMethod( int counter) { if(counter == 0) return; else { System.out.println(""+counter); myMethod(--counter); return; } } JAVA parent(David, john). parent(Jim, David). parent(Steve, Jim). parent(Nathan, Steve). grandparent(A, B) :- parent(A, X), parent(X, B). PROLOG

16
Recursion theory originated in the 1930s, with work of Kut Gödel, Alonzo Church, Alan Turing, Stephen Kleene, and Emil Post A recursive (or countable ) function is one that can be computed by a Turing Machine that Halts on all inputs A partial recursive function is one can be computed by some Turing Machine (But one can loop if there are any inputs on which the function is undefined)

17
The difference between a circular definition and a recursive definition is that a recursive definition must always have base cases, cases that satisfy the definition without being defined in terms of the definition itself, and all other cases comprising the definition must be "smaller" (closer to those base cases that terminate the recursion) in some sense. In contrast, a circular definition may have no base case, and define the value of a function in terms of that value itself, rather than on other values of the function.circular definition

18
Kleene (1952) defines a "partial recursive function“(f) as noncontradictory system of equations whose left and right sides are composed from (1)function symbols (f,g,h,…) (2) variables for nonnegative integers (x,y,z,….) (3) the constant (0) (4) the successor function S(x)=x+1. The set of functions that can be defined recursively in this manner is known to be equivalent to the set of functions computed by Turing Machine and by the Lambda Calculus In Pascal terms, the primitive recursive functions are the FOR loop computable functions, while the general recursive functions the terminating WHILE and REPEAT loop computable functions.

19
Partial Recursive Function Primitive Recursive Function general Recursive Function Algorithms ⇔ Turing Machines ⇔ Recursive Functions ⇔ λ -Calculus ⇔ Tag System ⇔ Post System

20
Cellular Automaton (CA) A Cellular Automaton (CA), first invented by John von Neumann, is an infinite, regular grid (lattice) of simple finite state (cells) machines that change their states synchronously, according to a local update rule that specifies the new state of each cell based on the old states of its neighbors. Conway's Game of Life J. Neumann

21
The local update rule asks each cell to check the present states of the eight surrounding cells. If the cell is alive then it stays alive (survives) if and only if it has two or three live neighbors. Otherwise it dies of loneliness or overcrowding. If the cell is dead then it becomes alive if and only if it has exactly three living neighbors. All cells apply this rule simultaneously. As the process is repeated over and over again, a dynamical system is obtained that exhibits surprisingly complex behavior.

22
Conway's Game of Life CA invented by John Horton Conway's 1970 in Cambridge The Game of Life, also known simply as Life. The "game" is a zero-player game, meaning that its evolution is determined by its initial state, requiring no further input. J. Conway

23
Conway's laws are simple. The rules are: Any alive cell that is touching less than two alive neighbors dies. Any alive cell touching four or more alive neighbors dies. Any alive cell touching two or three alive neighbors does nothing. Any dead cell touching exactly three alive neighbors becomes alive x5 678

24
We write a rule as E1,E2,... /F1,F2,... Where: Ei : the number of live neighbors required to keep a living cell alive, Fi : give the number required to bring a nonliving cell to life. Thus the rule for the CA given above is 2,3/3.

25
Here we see a few of the small gliders that exist for 2,3/2.

26
It was soon discovered that Game-of-Life is a universal computer: for any given Turing machine M and input word w one can effectively construct a start configuration C to the Game-of-Life such that all cells eventually die if and only if M accepts w. Some of application Cryptography : generate long unpredictable key. Networking : Optimizing problem

27
References E. Rich (2008). “Automata, Computability and Complexity THEORY AND Application's”, Person. A. Adamatzky (2010). “Game of Life Cellular Automata”. Springer Zenil, H. (2008, March 25). “Some notes on the foundations of universal computation and the decidability”. universality frontier. Retrieved from Woods, D. (2006, December).”On the time complexity of 2-tag systems and small universal Turing machines”. Retrieved from tneary. M. Gymrek (May, 2010). “Conway’s Game of Life”. Retrieved from https://www.google.com/#q=Conway%E2%80%99s+Game+of+Life+Melissa +Gymrek+May

Similar presentations

© 2016 SlidePlayer.com Inc.

All rights reserved.

Ads by Google