Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

1. 2. Construct a finite-state machine that models a newspaper vending machine t

ID: 3576633 • Letter: 1

Question

1.

2.

Construct a finite-state machine that models a newspaper vending machine that accepts $10 and $20 coins. The machine has a red button (R) that may bepressed at any stage to cancel the purchase and have all collected money returned. When $50 or more is deposited, the excess (over $50) is returned, and the customer may press the green button (G) to receive that day's newspaper (DP) By representing the finite-state machine as a state table, Assuming 1. s, be the state i where i is the number of $10 coins received 2. the columns of the state table are listed in the order, States (Column 1), Next State given Inputs-10-20-R-G (Columns 2 to 5), and Outputs given Inputs-10-20-R- G (Columns 6 to 9) State the eight elements in the order to be seen within the fifth state. 5 5 0 4. 1040n 5 5 s 0 0 10 2050DP s 5 5 5 4. 1040n 1 2 0 sonnnn S 4 5 0 3 Select one: o a. V only O b. II. only O c. III. only o d I. only o e. IV only

Explanation / Answer

1.construct a finite state machine that models a newspaper vending machine that accepts $10 and $20 coins.
the machine has a red button R that may bepressed at any stage to cancel the purchase and have all collected
money returned .when $50 or more is deposited ,the excess (over $50) is returned

solution: option B

s5s5s0s0102050DP

2.solution : option C

30