292 views

2 Answers

0 0 votes
We need a DFA for:

$L = \{w | \neg\,(n_a(w)\, mod \,3 =0) \,\text{or} \,\neg\,(n_b(w) <= 4)\}$

$L = \{w | \neg\,[(n_a(w)\, mod \,3 =0) \,\text{and} \,\,(n_b(w) >= 5)]\}$

$\bar{L} = \{w | (n_a(w)\, mod \,3 =0) \,\text{and} \,\,(n_b(w) >= 5)\}$

As $L$ and $\bar{L}$ require same number of states, so we will figure out the number of states for $\bar{L}$ and the same will hold for $L$ as well.

Essentially $\bar{L}$ has two conditions: first being divisibility on the count of $a$'s by 3, and second on count of $b$'s being at least 5. Hence the resulting product automata requires $(3 \times 5) = 15$ states.
Position:
Show:

Related questions

1 1 vote
2 2 answers
234
234 views
GO Classes asked Jul 10
234 views
Let $\Sigma = \{a\}$. Consider the language $L = \{a^{nk} \mid k 0,\ n$ is a positive integer constant$\}$. What is the minimum number of states in a DFA that recognises...
0 0 votes
2 2 answers
556
556 views
0 0 votes
0 0 answers
584
584 views
ankit-saha asked Mar 24, 2022
584 views
What will be the minimal DFA for $\left \{a^{n} :n mod 3 =0 \right \}\cup \left \{a^{n} :n mod 5 =1 \right \}$