computability
play

Computability Douglas Cenzer University of Florida March 11, 2020 - PowerPoint PPT Presentation

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


  1. Computability Douglas Cenzer University of Florida March 11, 2020

  2. Introduction Let Σ be a finite alphabet and let Σ ∗ be the set of finite strings or words over Σ.

  3. 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 ).

  4. 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 .

  5. 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 .

  6. 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.

  7. 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

  8. Turing Machines A Turing machine consists of one or more infinite tapes with cells on which symbols from Σ may be written,

  9. 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;

  10. 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;

  11. 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.

  12. 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

  13. 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;

  14. 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;

  15. 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.

  16. Finite State Automata A finite state automaton (FSA) is a simplified version of a Turing machine, and plays an important role in computer science.

  17. 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;

  18. 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 .

  19. 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 .

  20. The action of an FSA

  21. The action of an FSA The action of a finite automaton M on input w = a 0 a 1 . . . a k occurs in stages .

  22. 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 ).

  23. 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 ).

  24. 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 .

  25. 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 .

  26. 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