Computability Douglas Cenzer University of Florida March 11, 2020
Introduction Let Σ be a finite alphabet and let Σ ∗ be the set of finite strings or words over Σ.
Introduction Let Σ be a finite alphabet and let Σ ∗ be the set of finite strings or words over Σ. A function F : Σ ∗ → Σ ∗ (or in general F : (Σ ∗ ) k → Σ ∗ ) is computable if there is an algorithm or procedure for determining the output F ( w 1 , . . . , w n ) from the input − → w = ( w 1 , . . . , w n ).
Introduction Let Σ be a finite alphabet and let Σ ∗ be the set of finite strings or words over Σ. A function F : Σ ∗ → Σ ∗ (or in general F : (Σ ∗ ) k → Σ ∗ ) is computable if there is an algorithm or procedure for determining the output F ( w 1 , . . . , w n ) from the input − → w = ( w 1 , . . . , w n ). Frequently we are interested in functions over the set N of natural numbers. The number n may be represented in { 0 , 1 } ∗ in reverse binary notation as n = e 0 e 1 . . . e k − 1 e k , where n = � k i =1 e i 2 i . The tally or unary representation of n is just 1 n .
Introduction Let Σ be a finite alphabet and let Σ ∗ be the set of finite strings or words over Σ. A function F : Σ ∗ → Σ ∗ (or in general F : (Σ ∗ ) k → Σ ∗ ) is computable if there is an algorithm or procedure for determining the output F ( w 1 , . . . , w n ) from the input − → w = ( w 1 , . . . , w n ). Frequently we are interested in functions over the set N of natural numbers. The number n may be represented in { 0 , 1 } ∗ in reverse binary notation as n = e 0 e 1 . . . e k − 1 e k , where n = � k i =1 e i 2 i . The tally or unary representation of n is just 1 n . Example Basic computable functions include (i) the successor function S ( x ) = x + 1, (ii) the addition function +( x , y ) = x + y , and (iii) the multiplication function · ( x , y ) = x · y .
More Complicated Examples Example (i) The Division Algorithm demonstrates that the two functions that compute, for inputs a and b , the unique quotient q = q ( a , b ) and remainder r = r ( a , b ), with 0 ≤ r < a , such that b = qa + r , are both computable.
More Complicated Examples Example (i) The Division Algorithm demonstrates that the two functions that compute, for inputs a and b , the unique quotient q = q ( a , b ) and remainder r = r ( a , b ), with 0 ≤ r < a , such that b = qa + r , are both computable. (ii) The Euclidean Algorithm demonstrates that the function gcd ( a , b ) which computes the greatest common divisor of a and b is computable. It follows that least common multiple function lcm ( a , b ) = ( a · b ) / gcd ( a , b ) is also computable
Turing Machines A Turing machine consists of one or more infinite tapes with cells on which symbols from Σ may be written,
Turing Machines A Turing machine consists of one or more infinite tapes with cells on which symbols from Σ may be written, together with heads which can do the following ◮ read thecontents of a given cell;
Turing Machines A Turing machine consists of one or more infinite tapes with cells on which symbols from Σ may be written, together with heads which can do the following ◮ read thecontents of a given cell; ◮ write a new symbol on the cell;
Turing Machines A Turing machine consists of one or more infinite tapes with cells on which symbols from Σ may be written, together with heads which can do the following ◮ read thecontents of a given cell; ◮ write a new symbol on the cell; ◮ and move to an adjacent cell.
Turing Machines A Turing machine consists of one or more infinite tapes with cells on which symbols from Σ may be written, together with heads which can do the following ◮ read thecontents of a given cell; ◮ write a new symbol on the cell; ◮ and move to an adjacent cell. A program for such a machine is given by a finite set of states
Turing Machines A Turing machine consists of one or more infinite tapes with cells on which symbols from Σ may be written, together with heads which can do the following ◮ read thecontents of a given cell; ◮ write a new symbol on the cell; ◮ and move to an adjacent cell. A program for such a machine is given by a finite set of states and a transition function which describes the action taken in a given state when a certain symbol is scanned. Possible actions are ◮ writing a new symbol in the cell;
Turing Machines A Turing machine consists of one or more infinite tapes with cells on which symbols from Σ may be written, together with heads which can do the following ◮ read thecontents of a given cell; ◮ write a new symbol on the cell; ◮ and move to an adjacent cell. A program for such a machine is given by a finite set of states and a transition function which describes the action taken in a given state when a certain symbol is scanned. Possible actions are ◮ writing a new symbol in the cell; ◮ moving to an adjacent cell;
Turing Machines A Turing machine consists of one or more infinite tapes with cells on which symbols from Σ may be written, together with heads which can do the following ◮ read thecontents of a given cell; ◮ write a new symbol on the cell; ◮ and move to an adjacent cell. A program for such a machine is given by a finite set of states and a transition function which describes the action taken in a given state when a certain symbol is scanned. Possible actions are ◮ writing a new symbol in the cell; ◮ moving to an adjacent cell; ◮ switching to a new state.
Finite State Automata A finite state automaton (FSA) is a simplified version of a Turing machine, and plays an important role in computer science.
Finite State Automata A finite state automaton (FSA) is a simplified version of a Turing machine, and plays an important role in computer science. A finite state M automaton over a finite alphabet Σ (usually { 0 , 1 } ) is given by the following: ◮ A finite set of states Q = { q 0 , q 1 , . . . , q k } of states , including the initial state q 0 and a set Q F ⊆ Q of accepting states;
Finite State Automata A finite state automaton (FSA) is a simplified version of a Turing machine, and plays an important role in computer science. A finite state M automaton over a finite alphabet Σ (usually { 0 , 1 } ) is given by the following: ◮ A finite set of states Q = { q 0 , q 1 , . . . , q k } of states , including the initial state q 0 and a set Q F ⊆ Q of accepting states; ◮ a transition function δ : Q × Σ → Q .
Finite State Automata A finite state automaton (FSA) is a simplified version of a Turing machine, and plays an important role in computer science. A finite state M automaton over a finite alphabet Σ (usually { 0 , 1 } ) is given by the following: ◮ A finite set of states Q = { q 0 , q 1 , . . . , q k } of states , including the initial state q 0 and a set Q F ⊆ Q of accepting states; ◮ a transition function δ : Q × Σ → Q . ◮ There may also be an output function F : Q × Σ → Σ. In this case, M is said to be a transducer .
The action of an FSA
The action of an FSA The action of a finite automaton M on input w = a 0 a 1 . . . a k occurs in stages .
The action of an FSA The action of a finite automaton M on input w = a 0 a 1 . . . a k occurs in stages . ◮ Stage 0 : M scans a 0 in state q 0 and transitions to state s 1 = δ ( q 0 , a 0 ), possibly writing b 0 = F ( q 0 , a 0 ).
The action of an FSA The action of a finite automaton M on input w = a 0 a 1 . . . a k occurs in stages . ◮ Stage 0 : M scans a 0 in state q 0 and transitions to state s 1 = δ ( q 0 , a 0 ), possibly writing b 0 = F ( q 0 , a 0 ). ◮ Stage n : M scans a n in state s n , transitions to state s n +1 = F ( s n , a n ), and possibly writes b n = F ( s n , a n ).
The action of an FSA The action of a finite automaton M on input w = a 0 a 1 . . . a k occurs in stages . ◮ Stage 0 : M scans a 0 in state q 0 and transitions to state s 1 = δ ( q 0 , a 0 ), possibly writing b 0 = F ( q 0 , a 0 ). ◮ Stage n : M scans a n in state s n , transitions to state s n +1 = F ( s n , a n ), and possibly writes b n = F ( s n , a n ). ◮ The last Stage : M reads a k and halts in state s k +1 . The input word w is accepted by M if s k +1 ∈ Q F .
The action of an FSA The action of a finite automaton M on input w = a 0 a 1 . . . a k occurs in stages . ◮ Stage 0 : M scans a 0 in state q 0 and transitions to state s 1 = δ ( q 0 , a 0 ), possibly writing b 0 = F ( q 0 , a 0 ). ◮ Stage n : M scans a n in state s n , transitions to state s n +1 = F ( s n , a n ), and possibly writes b n = F ( s n , a n ). ◮ The last Stage : M reads a k and halts in state s k +1 . The input word w is accepted by M if s k +1 ∈ Q F . If M is a transducer, then the output is M ( w ) = b 0 b 1 . . . b k .
The action of an FSA The action of a finite automaton M on input w = a 0 a 1 . . . a k occurs in stages . ◮ Stage 0 : M scans a 0 in state q 0 and transitions to state s 1 = δ ( q 0 , a 0 ), possibly writing b 0 = F ( q 0 , a 0 ). ◮ Stage n : M scans a n in state s n , transitions to state s n +1 = F ( s n , a n ), and possibly writes b n = F ( s n , a n ). ◮ The last Stage : M reads a k and halts in state s k +1 . The input word w is accepted by M if s k +1 ∈ Q F . If M is a transducer, then the output is M ( w ) = b 0 b 1 . . . b k . A subset L of Σ ∗ may be called a language .
Recommend
More recommend