This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: Massachusetts Institute of Technology 6.042J/18.062J, Spring ’10 : Mathematics for Computer Science March 5 Prof. Albert R. Meyer revised February 28, 2010, 1326 minutes In-Class Problems Week 5, Fri. Problem 1. The Massachusetts Turnpike Authority is concerned about the integrity of the new Zakim bridge. Their consulting architect has warned that the bridge may collapse if more than 1000 cars are on it at the same time. The Authority has also been warned by their traffic consultants that the rate of accidents from cars speeding across bridges has been increasing. Both to lighten traffic and to discourage speeding, the Authority has decided to make the bridge one-way and to put tolls at both ends of the bridge (don’t laugh, this is Massachusetts). So cars will pay tolls both on entering and exiting the bridge, but the tolls will be different. In particular, a car will pay $3 to enter onto the bridge and will pay $2 to exit. To be sure that there are never too many cars on the bridge, the Authority will let a car onto the bridge only if the difference between the amount of money currently at the entry toll booth minus the amount at the exit toll booth is strictly less than a certain threshold amount of $ T . The consultants have decided to model this scenario with a state machine whose states are triples of natural numbers, ( A,B,C ) , where • A is an amount of money at the entry booth, • B is an amount of money at the exit booth, and • C is a number of cars on the bridge. Any state with C > 1000 is called a collapsed state, which the Authority dearly hopes to avoid. There will be no transition out of a collapsed state....
View Full Document
This note was uploaded on 05/27/2011 for the course CS 6.042J taught by Professor Prof.albertr.meyer during the Spring '11 term at MIT.
- Spring '11
- Computer Science