I'm working on creating a deterministic finite state automata for the following problem:
You can create strings made of x's and y's. How do you create a diagram that only accepts the language when the number of (x's mod 4) is greater than the number of (y's mod 4)?
What I am currently able to understand is that I need to create a diagram similar to below:
>(0,0) -b-> (0,1) -b-> (0,2) -b-> (0,3) -b-> (0,4)
a a a a a
(1,0) -b-> (1,1) -b-> (1,2) -b-> (1,3) -b-> (1,4)
a a a a a
(2,0) -b-> (2,1) -b-> (2,2) -b-> (2,3) -b-> (2,4)
a a a a a
(3,0) -b-> (3,1) -b-> (3,2) -b-> (3,3) -b-> (3,4)
a a a a a
(4,0) -b-> (4,1) -b-> (4,2) -b-> (4,3) -b-> (4,4)
But what I don't understand is how to compare the number of times x and y occur relative to one another.