{Mod n} I have to follow the same procedure like taking remainder and appropriately chose the state or there is some trick or easy way to do fast ?

The Gateway to Computer Science Excellence

First time here? Checkout the FAQ!

x

0 votes

The minimum number of state in the DFA for the language $L = \{ w \mid (n_a(w)+2n_b(w))mod \hspace{0.1cm} 3<2 \} $ is

0 votes

Best answer

0

@deepak sir in all this type of question

{Mod n} I have to follow the same procedure like taking remainder and appropriately chose the state or there is some trick or easy way to do fast ?

{Mod n} I have to follow the same procedure like taking remainder and appropriately chose the state or there is some trick or easy way to do fast ?

0

{Mod n} I have to follow the same procedure like taking remainder and appropriately chose the state

Remember that this is a guideline only, Not some concrete theorem or algorithm. With more and more Practice, you will get to know when and where we can use it and where we can not. For $modN$ languages, Most probably we can apply this idea of construction.

there is some trick or easy way to do fast ?

Tricks might be there...But then those tricks will be applicable for specific type of problems only. And This way is itself fast way. Just do lots of practice and be comfortable with all the types of problems and become P.T. Usha of constructing DFA.

0

no, **abb is not in the language**...

w=abb

n_{a}(w) = 1

n_{b}(w) = 2

( n_{a}(w) + 2* n_{b}(w) ) mod 3 < 2

= ( 1 + 2*2 ) mod 3 < 2

= (5) mod 3 < 2

= 2 < 2 ---- false ===> abb not in the language.

- All categories
- General Aptitude 1.3k
- Engineering Mathematics 5.2k
- Digital Logic 2k
- Programming & DS 3.7k
- Algorithms 3.2k
- Theory of Computation 4k
- Compiler Design 1.6k
- Databases 3k
- CO & Architecture 2.6k
- Computer Networks 3k
- Non GATE 1k
- Others 1.3k
- Admissions 486
- Exam Queries 435
- Tier 1 Placement Questions 18
- Job Queries 56
- Projects 9

36,157 questions

43,608 answers

123,961 comments

42,860 users