Presentation is loading. Please wait.

Presentation is loading. Please wait.

Turing Machines Finite State Machines.

Similar presentations


Presentation on theme: "Turing Machines Finite State Machines."— Presentation transcript:

1 Turing Machines Finite State Machines

2 Finite State Machines - Before the age of digital computing began, software and programming didn’t exist, yet the foundations were being laid by a number of engineers and mathematicians. These programs or algorithms were broken down into STATES and TRANSITIONS We could make an imaginary (theoretical) machine that would respond to inputs and produce output

3 Finite State Machines (FSM)
3 STATE 2 START STATE Start State: Begins the automation Accepting State: a state at which the machine has successfully performed its procedure. It is usually represented by a double circle. Transition – the arrows that show movement between states

4 Finite State Machine Example 1
1 S3 S1 S2 The above is an FSM in which the accepted state is reached when a binary string starts and finishes with 0. For example, 0110 or would be accepted and 01 or would be rejected

5 Finite State Machine Example 2
S3 S1 S2 1 1 1 The above FSM accepts binary strings (a stream of 0’s and 1’s ) of any length or composition provided that each contains at least one substring of "11"

6 Finite State Machines: Task
Create a finite state machine that Accepts only strings that consist of alternating 0’s and 1’s Accepts only strings that contain the substring “abc” where strings consist of a’s, b’s and c’s.

7 FSM Formal Definition Here is the fancy way of showing any
Deterministic Finite Automata A DFA is a 5- tuple, (S, Σ, T, s, A), consisting of a finite set of states (S) a finite set called the alphabet (Σ) a transition function (T : S × Σ → S) a start state (s ∈ S) a set of accept states (A ⊆ S)

8 Alan Turing During the Second World War Alan Turing (1912 – 1954) worked at Bletchley Park, Britain's codebreaking centre, and was for a time head of Hut 8, the section responsible for German naval cryptanalysis. He devised a number of techniques for breaking German ciphers, including the method of the bombe, an electromechanical machine that could find settings for the Enigma machine. (wikipedia)

9 Turing’s Machine – Analytical Engine
A Turing Machine is simply a Finite State Machine that has access to memory (usually in tape form)

10 Turing Machines A Turing machine consists of: A TAPE – The tape has as much memory as needed by the machine to calculate the problem. It is divided into cells that contain a symbol from the alphabet (Σ) or a special character ‘b’ that represents a blank spac. A HEAD – The head can read and write symbols on the tape and move the tape left and right one (and only one) cell at a time. In some models the head moves and the tape is stationary. A TABLE ("action table", or transition function) – The table gives us the instructions needed to operate the machine. The instructions can be interpreted as a sequence or read, write, move left, move right, do nothing, or halt commands. A REGISTER – The register stores the state of the Turing table. The number of different states is always finite and there is one special start state with which the state register is initialized.

11 Turing Machines 1 1 1 If in STATE 3 and reading a 0 write a 1 FSM
Now in STATE 3 (S3) Reading a ‘0’ READ / WRITE HEAD 1 1 1 TAPE


Download ppt "Turing Machines Finite State Machines."

Similar presentations


Ads by Google