1 / 15

Finite Automata

Finite Automata. Lecture 4 Section 1.1 Wed, Sep 6, 2006. The Automatic Door. The automatic door at the grocery store has two pads: One in front of the door. One behind the door. The door is in one of two possible states: Open Closed. The Automatic Door.

lgallo
Télécharger la présentation

Finite Automata

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Finite Automata Lecture 4 Section 1.1 Wed, Sep 6, 2006

  2. The Automatic Door • The automatic door at the grocery store has two pads: • One in front of the door. • One behind the door. • The door is in one of two possible states: • Open • Closed

  3. The Automatic Door • There are two independent input signals: • A person is or is not standing on the front pad. • A person is or is not standing on the rear pad. • There are four combinations of input signals.

  4. The Automatic Door • In terms of input signals and door states, describe the behavior of the door.

  5. The Automatic Door • Express the behavior as a table. • Express the behavior as a graph.

  6. A Canal Lock • Describe the operation of a canal lock designed so that the gates can never be opened when the water on the two sides is not at the same level.

  7. A Canal Lock • The working parts of the lock are • Upper gate • Upper paddle • Lower gate • Lower paddle

  8. Definition of a Finite Automaton • A finite automaton is a 5-tuple (Q, , , q0, F), where • Q is a finite set of states, •  is a finite alphabet, •  : Q Q is the transition function, • q0 is the start state, and • F Q is the set of accept states.

  9. Definition of a Finite Automaton • If, at the end of reading the input string, the automaton is in an accept state, then the input is accepted. • Otherwise, it is rejected.

  10. Definition of a Finite Automaton • Describe the automatic door formally. • Describe the canal lock formally. • An accept state is any state that doesn’t cause a disaster.

  11. The Language of a Machine • A given finite automaton accepts a specific set of input strings. • That is called the language of the automaton. • A language is called regular if it is the language of some finite automaton.

  12. Examples • Design a finite automaton that accepts all strings that start with a and end with b. • Design a finite automaton that accepts all strings that contain an even number of a’s.

  13. The Regular Operations • We may define operations on languages: • Union: AB = {x | xA or xB}. • Concatenation: A B = {xy | xA and yB}. • Star: A* = {x1x2…xk | xiA and k 0}.

  14. Closure under Union • Theorem: If A and B are regular languages, then so are • AB • A B • A*

  15. Examples • Let A = {x | x contains an even number of a’s}. • Let B = {x | x contains an even number of b’s}. • Try to design finite automata for • AB • A B • A*

More Related