Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Give a DFA that recognizes all ternary sequences of 0s and 1s and 2's that evaluate to a value 1 mod 5, or, 4 mod
Give a DFA that recognizes all ternary sequences of 0s and 1s and 2's that evaluate to a value 1 mod 5, or, 4 mod 5, as a ternary number.
(A DFA has a arrow coming out of every state for each of the symbols in the alphabet: 0,1,2)
(A ternary number such as 210 evaluates to 232 + 131 + 030 = 21)
ex)
1 mod 5 | Decimal | 1 | 6 | 11 | 16 | 21 | 26 | ||
Ternary | 1 | 20 | 102 | 121 | 210 | 222 | Accept these string | ||
4 mod 5 | Decimal | 4 | 9 | 14 | 19 | 24 | 29 | ||
Ternary | 11 | 100 | 112 | 201 | 220 | 1002 | Accept these strings |
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started