document.write( "Question 857603: I am doing discrete math, and we are studying Finite State Machines. But i am a little confuse on how to do this. Here is a question, Write a regular expression for the language, and define a finite state machine that recognizes word in the language(input alphabet, states, start state, state transition table, and accept states). Include a state digraph for the FSM.\r
\n" );
document.write( "\n" );
document.write( "L1: For alphabet {a,b}, all strings that contain an odd number of a's and exactly one b.\r
\n" );
document.write( "\n" );
document.write( "If you could help me understand this more in depth, that would be amazing. \n" );
document.write( "
Algebra.Com's Answer #516803 by richard1234(7193)![]() ![]() You can put this solution on YOUR website! Hint: Your states will be True or False depending on whether the string satisfies the constraints. Define two counters (e.g. numA and numB) that count the number of A's and number of B's. When numA % 2 = 0 or numB = 0 or numB >= 2, the current state will be False, and when numA % 2 = 1 and numB = 1, the state will be true. \n" ); document.write( " |