FOR FREE MATERIALS

Design a machine of the following language: 

L = Even number of a’s OR odd number of b’s

 

Answer:  This question is almost the same as the previous machine but the only difference AND is replaced by OR.

 

L = (mod 2 and mod 2) then number of states will be 2 X 2 = 4.

 

 

Here ra identified as remainder of a’s and rb identified reminder of b’s

 

In the above machine there are four grades

  1. Represent even number of  b’s
  2. Represent odd number of  b’s
  3. Represent even number of a’s
  4. Represent odd number of a’s

 

Now our automata is even a’s OR odd b’s then we select the grade where we get even no. of a’s then we select the grade where we got odd no. of b’s

 

Now it is OR means Union (U) i.e. we select the state which is summation all states of even no. of a’s line and odd no. of b’s line.