lec 01 finite state automata
play

Lec 01. Finite-state automata Eunjung Kim F UNDAMENTAL QUESTIONS FOR - PowerPoint PPT Presentation

C OMPUTABILITY AND C OMPLEXITY , 2020 F ALL SEMESTER Lec 01. Finite-state automata Eunjung Kim F UNDAMENTAL QUESTIONS FOR CS What do we mean by "computation"? "Computation is to solve a problem by an effective manner."


  1. C OMPUTABILITY AND C OMPLEXITY , 2020 F ALL SEMESTER Lec 01. Finite-state automata Eunjung Kim

  2. F UNDAMENTAL QUESTIONS FOR CS What do we mean by "computation"? � "Computation is to solve a problem by an effective manner." Vague. COMPUTABILITY & COMPLEXITY 1 / 16

  3. F UNDAMENTAL QUESTIONS FOR CS What do we mean by "computation"? � "Computation is to solve a problem by an effective manner." Vague. What is a computer? What can it do and cannot? COMPUTABILITY & COMPLEXITY 1 / 16

  4. F UNDAMENTAL QUESTIONS FOR CS What do we mean by "computation"? � "Computation is to solve a problem by an effective manner." Vague. What is a computer? What can it do and cannot? Can anyone on earth devise a fundamentally more powerful computer? (An alien? In another universe?) COMPUTABILITY & COMPLEXITY 1 / 16

  5. C OMPUTATION : WHAT AND HOW Any well-formulated information can be represented as a string of 0 and 1, or any finite alphabet Σ . The object for computation can be stated as a function. C OMPUTE WHAT computational problem ⇔ compute a function f : { 0 , 1 } ∗ → { 0 , 1 } ∗ . COMPUTABILITY & COMPLEXITY 2 / 16

  6. C OMPUTATION : WHAT AND HOW Compute HOW Let us agree: "computing a function f " means "there is an effective methodalgorithm which outputs f ( x ) for each input x ". The concept of "algorithm" is still vague. COMPUTABILITY & COMPLEXITY 3 / 16

  7. C OMPUTATION : WHAT AND HOW What do we expect for an algorithm, intuitively? � a finite number of finitely describable instructions. � each instruction and what to do next are unambiguous. � all the basic operation should be executable by the concerned executor. � terminates at some point (i.e. in finite number of steps) T OWARD A RIGOROUS NOTION OF ALGORITHM A mathematically rigorous description of an executor (computing device/machine...) and instructions is needed. COMPUTABILITY & COMPLEXITY 4 / 16

  8. M ODEL OF C OMPUTATION Exercutor(machine) constituents: an alphabet Σ it recognizes, a gadget to read an input x ∈ Σ ∗ , a finite set of states to recognize its status ("where am I?"), memory to write and read later. Basic operation: read one alphabet from input tape (or from memory), update its internal state, move the header (only in one fixed direction, or both direction, or neither) on input tape or memory, write/change on memory tape. COMPUTABILITY & COMPLEXITY 5 / 16

  9. S ET - UP Concatenation xy of x and y . Cartesian product A × B Notations: Σ , Σ i , ǫ , Σ ∗ . Computing a function f : Σ ∗ → Γ ∗ means ... Special function f : Σ ∗ → { 0 , 1 } � language. Language: a subset A of Σ ∗ , indicator function f A . Computing f A ⇔ membership test for A COMPUTABILITY & COMPLEXITY 6 / 16

  10. F INITE ( STATE ) AUTOMATA Example: vending machine Model of computation mimicking a simple computing device no/limited memory, basic operations: read one symbol from the input, update the state, and move to the next position in input. COMPUTABILITY & COMPLEXITY 7 / 16

  11. S TATE DIAGRAM Figure 1.4, Sipser 2012. S TRINGS ACCEPTED BY M The set of all w ∈ { 0 , 1 } ∗ such that... COMPUTABILITY & COMPLEXITY 8 / 16

  12. F ORMAL DEFINITION A FINITE AUTOMATA IS A 5- TUPLE ( Q , Σ , δ , q 0 , F ) Q a finite set called the states, Σ a finite set called the alphabet, δ a function from Q × Σ to Q called the transition function, q 0 ∈ Q the start state, F ⊆ Q the set of accept states. Figure 1.4, Sipser 2012. COMPUTABILITY & COMPLEXITY 9 / 16

  13. L ANGUAGE RECOGNIZED BY FA D EFINITION Let M be a finite automata. A string w ∈ Σ ∗ is accepted by a finite automata M if M ends in an accept state upon w . L ( M ) denotes the set of all strings accepted by M . A language A is said to be recognized by M if A = L ( M ) . COMPUTABILITY & COMPLEXITY 10 / 16

  14. E XAMPLES OF FINITE AUTOMATA Figure 1.7, 9, 12 from Sipser 2012. COMPUTABILITY & COMPLEXITY 11 / 16

  15. F ORMAL DEFINITION OF COMPUTATION Configuration of a finite automata M = ( Q , Σ , δ , q 0 , F ) is a pair ( q , w ) ∈ Q × Σ ∗ . We interpret a configuration ( q , w ) as... ( q , w ) � M ( q ′ , w ′ ) if... A sequence of configuration is a computation history if... ( q , w ) � ∗ M ( q ′ , w ′ ) if there is... A sequence of configurations is an accepting computation history if... COMPUTABILITY & COMPLEXITY 12 / 16

  16. L ANGUAGE RECOGNIZED BY FA REVISITED D EFINITION : LANGUAGE RECOGNIZED BY FA Let M be a finite automata. A string w ∈ Σ ∗ is accepted by a finite automata M if M ends in an accept state upon w : using the formal notation, if there is an accepting computation history starting from ( q 0 , w ) ending in ( q , ǫ ) for some q ∈ F . L ( M ) denotes the set of all strings accepted by M . A language A is said to be recognized by M if A = L ( M ) . COMPUTABILITY & COMPLEXITY 13 / 16

  17. R EGULAR OPERATIONS F IVE OPERATIONS Languages A , B over an alphabet Σ , we define the following opera- tions. Union: A ∪ B = { w : w ∈ A or w ∈ B } . Concatenation: A ◦ B = { xy : x ∈ A , y ∈ B } . Kleene star: A ∗ = � k ≥ 0 { w 1 w 2 · · · w k : w i ∈ A } . A = { w ∈ Σ ∗ : w / Complementation: ¯ ∈ A } . Intersection: A ∩ B = { w : w ∈ A and w ∈ B } . COMPUTABILITY & COMPLEXITY 14 / 16

  18. C LOSURE UNDER OPERATIONS T HEOREM The class of all languages recognizable by FA is closed under the union operation (concatenation, Kleene star, complementation, inter- section). COMPUTABILITY & COMPLEXITY 15 / 16

  19. R EFERENCE Lots of interesting chronicle and discussion on the search for definition of algorithm/computation can be found online, for example, here, here. COMPUTABILITY & COMPLEXITY 16 / 16

Recommend


More recommend