yes. (modular counting is regular )

The Gateway to Computer Science Excellence

0 votes

0

Other options is to make a DFA or NFA for it or use pumping lemma to show that its not regular.

A language is said to be regular if you can draw a Finite Automata for it.

Every mod n counting has n states and the remainder that we want is the final state.

for example mod 3 counting will have 3 states and if we want remainder as 1 then the middle state will be the final state.

A language is said to be regular if you can draw a Finite Automata for it.

Every mod n counting has n states and the remainder that we want is the final state.

for example mod 3 counting will have 3 states and if we want remainder as 1 then the middle state will be the final state.

0 votes

state/inputs |
x |
y |
z |

A |
B | B | B |

B |
C | C | C |

C |
D | D | D |

D |
E | E | E |

E |
A | A | A |

**A** is the initial as well as final state.

since we can draw a finite automata for this language

=> the language is regular.

0

Thanks for the solution.

I still have a doubt that while providing the loop back to state A from state E there will be strings out of the language and they also get accepted right?. Also x should be followed by y and then by z. Please clear this one.

Appreciate that :)

I still have a doubt that while providing the loop back to state A from state E there will be strings out of the language and they also get accepted right?. Also x should be followed by y and then by z. Please clear this one.

Appreciate that :)

- All categories
- General Aptitude 1.9k
- Engineering Mathematics 7.5k
- Digital Logic 2.9k
- Programming and DS 4.9k
- Algorithms 4.3k
- Theory of Computation 6.2k
- Compiler Design 2.1k
- Databases 4.1k
- CO and Architecture 3.4k
- Computer Networks 4.1k
- Non GATE 1.4k
- Others 1.6k
- Admissions 595
- Exam Queries 576
- Tier 1 Placement Questions 23
- Job Queries 72
- Projects 17

50,650 questions

56,192 answers

193,988 comments

94,852 users