1 / 11

Finite Automata

CSC 4170 Theory of Computation. Finite Automata. Section 1.1. 1.1.a. How a finite automaton works. 1. q 0. 0. q 2. 1. 1. 0. q 1. 0. 0 1 1 0 0. 1.1.b. The language of a machine. 1. q 0. 0. q 2. 1. 1. 0. q 1. 0.

trinh
Download Presentation

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. CSC 4170 Theory of Computation Finite Automata Section 1.1

  2. 1.1.a How a finite automaton works 1 q0 0 q2 1 1 0 q1 0 0 1 1 0 0

  3. 1.1.b The language of a machine 1 q0 0 q2 1 1 0 q1 0 L(M), “the language ofM”, or “the language recognized by M” --- the set all strings that the machine M accepts What is the language recognized by our automaton A? L(A) =

  4. 1.1.c Formal definition of a finite automaton • A finite automaton is a 5-tuple (Q, , , s, F), where: • Q is a finite set called the states, •  is a finite set called the alphabet, •  is a function of the type Q  Q called the transition function, • s is an element of Q called the start state, • F is a subset of Q called the set of accept states.

  5. 1.1.d Our automaton formalized 1 q0 0 q2 Q: : : s: F: 1 1 0 q1 0 A = (Q, , , s, F)

  6. 1.1.e Formal definition of accepting M = (Q, , , s, F) 1 q0 0 q2 1 1 0 q1 • M accepts the string • u1 u2 … un • iff there is a sequence • r1, r2,…, rn, rn+1 • of states such that: • r1=s • ri+1 = (ri,ui), for each i with 1 in • rn+1  F 0 u1 u2 … un 0 1 1 0 0 r1, r2,…, rn, rn+1

  7. 1.1.f Task: Design an automaton that accepts a bit string iff it contains an even number of “1”s. Designing finite automata

  8. 1.1.g Task: Design an automaton that accepts a bit string iff the number of “1”s that it contains is divisible by 3. Designing finite automata

  9. 1.1.h Task: Let L2={w | w is a string of 0s whose length is divisible by 2} and L3={w | w is a string of 0s whose length is divisible by 3} Design an automaton that recognizes L2L3 Designing finite automata

  10. 1.1.i Task: Let L2={w | w is a string of 0s whose length is divisible by 2} and L3={w | w is a string of 0s whose length is divisible by 3} Design an automaton that recognizes L2L3 Designing finite automata

  11. 1.1.j Task: Design an automaton that recognizes the language X={w | w is a string of 0s whose length is divisible neither by 2 nor by 3} Designing finite automata Definition: Let L be a language over an alphabet . The complement of L is the language {w | w is a string over  such that wL}. X is the complement of what language?

More Related