This action might not be possible to undo. Are you sure you want to continue?

pair of consecutive zeros and at most one pair of consecutive ones.

A transition diagram of the finite automata accepting the set of all strings of zeros and ones, with at most one pair of consecutive zeros and at most one pair of consecutive ones is shown in Figure 1.

Figure 1: Transition diagram for Example 1 finite automata. EXAMPLE 2 Construct a finite automata that will accept strings of zeros and ones that contain even numbers of zeros and odd numbers of ones.

A transition diagram of the finite automata that accepts the set of all strings of zeros and ones that contains even numbers of zeros and odd numbers of ones is shown in Figure 2.

A transition diagram of finite automata accepting the set of all strings of zeros and ones that contains an odd number of zeros and an even number of ones is shown in Figure 3. and no prefix of the string should contain two more zeros than ones or two more ones than zeros. Figure 3: Finite automata containing odd number of zeros and even number of ones. . EXAMPLE 3 Construct a finite automata that will accept a string of zeros and ones that contains an odd number of zeros and an even number of ones. EXAMPLE 4 Construct the finite automata for accepting strings of zeros and ones that contain equal numbers of zeros and ones.Figure 2: Finite automata containing even number of zeros and odd number of ones.

B} {A. Figure 5: Finite automata accepts strings containing the substring 101. EXAMPLE 5 Construct a finite automata for accepting all possible strings of zeros and ones that do not contain 101 as a substring. B} {A. Figure 5 shows a transition diagram of the finite automata that accepts the strings containing 101 as a substring. C} 0 {A} {A. Figure 4: Example 4 finite automata considers the set prefix. D} . A DFA equivalent to this NFA will be: � {A} {A. and contain no string prefixes of two more zeros than ones or two more ones than zeros is shown in Figure 4. B.A transition diagram of the finite automata that will accept the set of all strings of zeros and ones. contain equal numbers of zeros and ones. C} {A} 1 {A. B} {A.

because states q3. they get combined. B. C. D} {A. Figure 7: Complement to Figure 6 automata. B. q4. we get the DFA shown in Figure 8. . D} {A. C. Figure 6: DFA using the names A-D and q0−5.{A. D} q0 q1 q2 q3 q4 q5 The transition diagram of this automata is shown in Figure 6. B. D} {A. Hence. D}* {A. D}* {A. D}* {A. can be eliminated. D} Let us identify the states of this DFA using the names given below: {A} {A. C} {A. B} {A. and q5 are nondistinguishable states. C. D} {A. D} {A. B. D} {A. and this combination becomes a dead state and. The complement of the automata in Figure 6 is shown in Figure 7. B. C. After minimization. D} {A.

Figure 8: DFA after minimization. . EXAMPLE 7 Construct a finite automata that accepts all possible strings of zeros and ones that do not contain 011 as a substring. EXAMPLE 6 Construct a finite automata that will accept those strings of decimal digits that are divisible by three (see Figure 9). Figure 10 shows a transition diagram of the automata that accepts the strings containing 101 as a substring. Figure 9: Finite automata that accepts string decimals that are divisible by three.

D} {A. B} {A. C} {A. D} {A. D} {A. B} {A} {A. Figure 11: Finite automata identified by the name states A-D and q0−5. D}* {A. C. B} {A. B. B} {A. B} {A. D} q0 q1 q2 q3 q4 q5 The transition diagram of this automata is shown in Figure 11. A DFA equivalent to this NFA will be: � 0 1 {A} {A. C. B. D} {A. D} {A. C} {A. B. . B. D} {A. The complement of automata shown in Figure 11 is illustrated in Figure 12. D}* {A. C.Figure 10: Finite automata accepts strings containing 101. D}* {A. D} Let us identify the states of this DFA using the names given below: {A} {A. D} {A. D} {A. C} {A. B.

and q5 are nondistinguishable states. they get combined. EXAMPLE 8 Construct a finite automata that will accept those strings of a binary number that are divisible by three. we get the DFA shown in Figure 13. q4. . After minimization.Figure 12: Complement to Figure 11 automata. Figure 14: Automata that accepts binary strings that are divisible by three. because the states q3. Figure 13: Minimization of nondistinguishable states of Figure 12. and this combination becomes a dead state that can be eliminated. Hence. The transition diagram of this automata is shown in Figure 14.

- Met a Characters
- RE & FA
- Final Presentation
- seleccao_estrutura_dados.pdf
- Ruby Gotchas
- Lesson 6
- regex notes
- Fun With String
- Automata Theory
- Unix Shell Programs
- String
- 312s27 Finite Automata
- 07A50501-FORMALLANGUAGESANDAUTOMATATHEORYfr
- Unix Shell Programs
- Toc 2
- Assignment 5 XI Holidays
- Regex Tutorial
- String Matching Dengan Regex
- chap06
- acctest
- regex
- AnagramBySwapAdjacent.txt
- FAFL Padma Reddy1
- Data Cleansing Functions - InFORMATICA
- Regular Expressions for NLP
- Chapter 24 the Chomsky Hierarchy
- Regular Expression Matching Can Be Simple and Fast
- NFA
- MIT6_006F11_lec09
- sol1.ps
- Example 1

Are you sure?

This action might not be possible to undo. Are you sure you want to continue?

We've moved you to where you read on your other device.

Get the full title to continue

Get the full title to continue reading from where you left off, or restart the preview.

scribd