Find the Flaw
Suppose that the algorithm used in Example 16.6 was written as:
For each minute from 0 through 59
{ If there are customers waiting and the ATM is available { Remove a customer from the queue; Increment the number of customers served; Add to the total waiting time the waiting time of the current customer; Update the time the ATM is next available; } Determine the number of new customers arriving: 0, 1, or 2; For each new customer Place the new customer in the queue; } Print the summary statistics;Find the flaw in this algorithm. Explain how it might generate incorrect output.
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.