Back to the 2022 paper

Module 1: Introduction & Regular Languages

20222m

The total number of states and transitions required to form a Moore machine that produces residue mod 3 are:

(i) 3 and 6
(ii) 3 and 5
(iii) 2 and 4
(iv) 2 and 5

Worked SolutionAI Assisted

Answer

Correct Option: (i) 3 states and 6 transitions (for residue mod 3 Moore machine)

Explanation

To produce residue mod 3, need 3 states corresponding to remainders 0,1,20,1,2.

  • Alphabet: e.g., binary or unary? For general input, Moore machine that outputs residue after each symbol needs 3 states.
  • Transitions: For binary alphabet {0,1}\{0,1\}, from each of 3 states there are 2 outgoing transitions (00 and 11): 3×2=63 \times 2 =6 transitions. Formula: new remainder r′=(r×base+digit) mod 3r' = (r \times base + digit) \bmod 3.

If alphabet were {0}\{0\} unary, transitions =3; but typical exam assumes binary/decimal digit input, hence 6.

Other options (3,5), (2,4) insufficient to represent 3 residues.

Final Answer

3 states, 6 transitions → Option (i). If input alphabet size ∣Σ∣=k|\Sigma|=k, transitions =3k=3k.

Similar questions

Official AppAndroid App

PYQDeck for Android

Solve BEU previous-year exam papers anywhere, anytime. Fast search, offline paper viewing, and step-by-step solutions designed specifically for your phone.