MHB What are the DFA configurations for L={w:${n}_{a}$(w) mod3 < 1} on $\sum$={a,b}?

AI Thread Summary
The discussion focuses on constructing a deterministic finite automaton (DFA) for the language L defined over the alphabet {a, b}, where the condition is that the number of occurrences of the symbol 'a' in any string w must satisfy the condition n_a(w) mod 3 < 1. The solution involves creating three states {0, 1, 2} that represent the remainders when the count of 'a's is divided by 3. The automaton transitions to the next state upon reading an 'a' while remaining in the same state when reading a 'b'. The key point is that the accepting state corresponds to the condition mod 3 = 0, which indicates that the number of 'a's is a multiple of 3. The original poster successfully determined the accepting states after interpreting the condition correctly.
comfortablynumb
Messages
3
Reaction score
0
Find dfa's for the following language on
$\sum$={a,b};

c)
L={w:${n}_{a}$(w) mod3 < 1;
 
Technology news on Phys.org
You need three states $\{0,1,2\}$ that will correspond to the remainder when the number of read symbols $a$ is divided by 3. When the automaton reads a $b$, it remains in the same state. When the automaton reads an $a$, it moves to the next state. Can you figure out which states should be accepting?
 
Thank you, Evgeny.Makarov, I figured it out. I treated mod3<1 as mod3=0 and did it. I was okay figuring out accepting states.
 
Dear Peeps I have posted a few questions about programing on this sectio of the PF forum. I want to ask you veterans how you folks learn program in assembly and about computer architecture for the x86 family. In addition to finish learning C, I am also reading the book From bits to Gates to C and Beyond. In the book, it uses the mini LC3 assembly language. I also have books on assembly programming and computer architecture. The few famous ones i have are Computer Organization and...
I have a quick questions. I am going through a book on C programming on my own. Afterwards, I plan to go through something call data structures and algorithms on my own also in C. I also need to learn C++, Matlab and for personal interest Haskell. For the two topic of data structures and algorithms, I understand there are standard ones across all programming languages. After learning it through C, what would be the biggest issue when trying to implement the same data...

Similar threads

Back
Top