Construct a finite-state machine that models an old fashioned soda machine that accepts nickels, dimes, and quarters. The soda machine accepts change until 35 cents has been put in. It gives change back for any amount greater than 35 cents. Then the customer can push buttons to receive either a cola, a root beer, or a ginger ale.

Respuesta :

To create a  finite-state machine that models an old fashioned soda machine which can perform the stated work we can follow the given steps.

The machine accepts nickels (5 cents), dimes (10 cents) and quarters (25 cents).

Let the states be s , s1 ,s2 ,s3 ,s4 etc.

If we add a nickel to the machine, then the the input is 5 to the current state s , we move them to state s+1 ans so on , and similarly for dime and quarter.

On taking x a the input button for soda pop , we can create the required  finite-state machine that models an old fashioned soda machine that accepts nickels, dimes, and quarters.

A finite-state machine (FSM), sometimes known as a finite automaton  or simply a state machine, is a mathematical model of computation.

It is an abstract machine that can only be in one of a finite set of states at any one moment. In response to some inputs, the FSM can transition from one state to another; this transition is referred to as a transition. An FSM is defined by a set of states, an initial state, and the inputs that cause each transition.

To learn more about machine

brainly.com/question/15100010

#SPJ4