DFA Category 4: Specific length
DFA accepts strings of exactly n characters. For Examples
- Strings of length 3
- Binary strings of length 5
- Strings over
{a, b}
of length 2
DFA Example:
Construct DFA, which accept all the string over alphabets ∑ {0,1} where the length of each string is exactly 2.
DFA Example:
Construct DFA, which accept all the string over alphabets ∑ {0,1} where the length of each string is ≥ 2.
DFA Example:
Construct DFA, which accept all the string over alphabets ∑ {0,1} where the length of each string is ≤ 2
DFA Example:
Design a DFA over w {a,b}* such that length of “a” is greater or equals to 2 and there is no restriction over length of b.
DFA Example:
Construct DFA, which accept all the string over alphabets ∑ {0,1} where the length of each string is EVEN.
DFA Example:
Construct DFA, which accept all the string over alphabets ∑ {0,1} where the length of each string is ODD.
DFA Example:
Design a DFA with sigma ∑ = {0, 1}, accepts those strings that have an even number of “0’s” and an even number of “1’s”.
In Above DFA,
- If state q1 becomes final instead of q0, the DFA will accept all those strings with Odd “0” and even “1”.
- And if state q2 becomes final instead of q0, then the DFA will accept all those strings with even “0” and odd “1”.
- And If state q3 becomes final instead of q0, then the DFA will accept all those strings with odd “0” and odd “1”.
Comments
Post a Comment