Reputation: 79
The question is:
Write a DFA to recognize the regular language
L1
={w ={1,2,3} |
the sum of the digits in w is divisible by 5}
More so, based on the input 1 , 2 , 3 the remainder of the sum should be 0 when dividing by 5. I am almost done this question but I can't seem to understand how to find the correct remainder when the input is 3. Since I have done most of the work I have a picture that I will link so you can understand where I am stuck.
Start State: q0
Accept State: q0
My problem is how to control the input 3 so the choices for it will lead to a remainder of 0 when dividing by 5.
Upvotes: 1
Views: 537
Reputation: 372664
Here's some hints:
Hope this helps!
Upvotes: 2