Chapter 12.2, Problem 1ES

BuyFind*arrow_forward*

5th Edition

EPP + 1 other

ISBN: 9781337694193

Textbook Problem

8 views

Find the state of the vending machine in Example 12.2.1 after each of the following sequences of coins have been input.

a. Quarter, half-dollar, quarter

b. Quarter, half-dollar, half-dollar

c. Half-dollar, quarter, quarter, quarter, half-dollar

To determine

**(a)**

The state of the vending machine after each of the following sequences of coins have been input quarter, half-dollar, quarter.

Explanation

**Given information:**

Quarter, half-dollar, quarter

**Calculation:**

Quarter, Half-dollar, Quarter

We start from the initial state (which is the state to which an arrow points that does not start at another state), which is the state with 0 cent.

We next deposit a quarter. We note that there is an arrow with label “quarter” from the state with 0 cent to the state with 25 cent.

We next deposit a half-dollar. We note that there is an arrow with label “half-dollar” from the state with 25 cent to the state with 75 cent...

To determine

**(b)**

The state of the vending machine after each of the following sequences of coins have been input quarter, half-dollar, half-dollar.

To determine

**(c)**

The state of the vending machine after each of the following sequences of coins have been input half-dollar, quarter, quarter, half-dollar.

Sect-12.1 P-1TYSect-12.1 P-2TYSect-12.1 P-3TYSect-12.1 P-4TYSect-12.1 P-5TYSect-12.1 P-6TYSect-12.1 P-7TYSect-12.1 P-8TYSect-12.1 P-9TYSect-12.1 P-10TY

Sect-12.1 P-11TYSect-12.1 P-12TYSect-12.1 P-1ESSect-12.1 P-2ESSect-12.1 P-3ESSect-12.1 P-4ESSect-12.1 P-5ESSect-12.1 P-6ESSect-12.1 P-7ESSect-12.1 P-8ESSect-12.1 P-9ESSect-12.1 P-10ESSect-12.1 P-11ESSect-12.1 P-12ESSect-12.1 P-13ESSect-12.1 P-14ESSect-12.1 P-15ESSect-12.1 P-16ESSect-12.1 P-17ESSect-12.1 P-18ESSect-12.1 P-19ESSect-12.1 P-20ESSect-12.1 P-21ESSect-12.1 P-22ESSect-12.1 P-23ESSect-12.1 P-24ESSect-12.1 P-25ESSect-12.1 P-26ESSect-12.1 P-27ESSect-12.1 P-28ESSect-12.1 P-29ESSect-12.1 P-30ESSect-12.1 P-31ESSect-12.1 P-32ESSect-12.1 P-33ESSect-12.1 P-34ESSect-12.1 P-35ESSect-12.1 P-36ESSect-12.1 P-37ESSect-12.1 P-38ESSect-12.1 P-39ESSect-12.1 P-40ESSect-12.1 P-41ESSect-12.2 P-1TYSect-12.2 P-2TYSect-12.2 P-3TYSect-12.2 P-4TYSect-12.2 P-5TYSect-12.2 P-6TYSect-12.2 P-7TYSect-12.2 P-8TYSect-12.2 P-9TYSect-12.2 P-10TYSect-12.2 P-1ESSect-12.2 P-2ESSect-12.2 P-3ESSect-12.2 P-4ESSect-12.2 P-5ESSect-12.2 P-6ESSect-12.2 P-7ESSect-12.2 P-8ESSect-12.2 P-9ESSect-12.2 P-10ESSect-12.2 P-11ESSect-12.2 P-12ESSect-12.2 P-13ESSect-12.2 P-14ESSect-12.2 P-15ESSect-12.2 P-16ESSect-12.2 P-17ESSect-12.2 P-18ESSect-12.2 P-19ESSect-12.2 P-20ESSect-12.2 P-21ESSect-12.2 P-22ESSect-12.2 P-23ESSect-12.2 P-24ESSect-12.2 P-25ESSect-12.2 P-26ESSect-12.2 P-27ESSect-12.2 P-28ESSect-12.2 P-29ESSect-12.2 P-30ESSect-12.2 P-31ESSect-12.2 P-32ESSect-12.2 P-33ESSect-12.2 P-34ESSect-12.2 P-35ESSect-12.2 P-36ESSect-12.2 P-37ESSect-12.2 P-38ESSect-12.2 P-39ESSect-12.2 P-40ESSect-12.2 P-41ESSect-12.2 P-42ESSect-12.2 P-43ESSect-12.2 P-44ESSect-12.2 P-45ESSect-12.2 P-46ESSect-12.2 P-47ESSect-12.2 P-48ESSect-12.2 P-49ESSect-12.2 P-50ESSect-12.2 P-51ESSect-12.2 P-52ESSect-12.2 P-53ESSect-12.2 P-54ESSect-12.3 P-1TYSect-12.3 P-2TYSect-12.3 P-3TYSect-12.3 P-4TYSect-12.3 P-5TYSect-12.3 P-1ESSect-12.3 P-2ESSect-12.3 P-3ESSect-12.3 P-4ESSect-12.3 P-5ESSect-12.3 P-6ESSect-12.3 P-7ESSect-12.3 P-8ESSect-12.3 P-9ESSect-12.3 P-10ESSect-12.3 P-11ESSect-12.3 P-12ESSect-12.3 P-13ESSect-12.3 P-14ESSect-12.3 P-15ESSect-12.3 P-16ESSect-12.3 P-17ESSect-12.3 P-18ES