00:02
We're asked to construct a finite state machine, modeling an old -fashioned soda machine that will accept nickels, dimes, and quarters.
00:11
We're told that the soda machine accepts change until 35 cents has been put in it, and it will give back change for any amount to greater than 35 cents.
00:23
And then, the customer can push buttons to receive either a cola, a root beer, or a ginger ale.
00:31
So, we know the machine accepts nickels, dimes, and quarters.
00:42
So, nickels, of course, is five cents.
00:47
Dimes are 10 cents.
00:53
And then quarters are 25 cents.
01:02
So now let's consider eight different states.
01:13
S -0, s -1, s -2, s -3, s -4, s -5, s -6, and s7, these different states are going to represent.
01:30
The machine contains 0, 5, 10, 15, 20, 25, 30, and 35 cents respectively.
02:04
Because recall we can't go above 35 cents in the machine, otherwise we'd receive change.
02:12
Now, suppose that we add a nickel to machine...