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 March 5, 2010, 859 minutes Solutions to InClass 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 oneway 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. Since the toll booth collectors may need to start off with some amount of money in order to make change, and there may also be some number of “official” cars already on the bridge when it is opened to the public, the consultants must be ready to analyze the system started at any uncol lapsed state. So let A be the initial number of dollars at the entrance toll booth, B the initial number of dollars at the exit toll booth, and C ≤ 1000 the number of official cars on the bridge when it is opened. You should assume that even official cars pay tolls on exiting or entering the bridge after the bridge is opened. (a) Give a mathematical model of the Authority’s system for letting cars on and off the bridge by specifying a transition relation between states of the form ( A,B,C ) above. Solution. State ( A,B,C ) goes to state (i) ( A + 3 ,B,C + 1) , provided that A − B < T and C ≤ 1000 . This transition models the case where a car enters the bridge. Creative Commons 2010, Prof. Albert R. Meyer . 2 Solutions to InClass Problems Week 5, Fri....
View
Full Document
 Spring '11
 Prof.AlbertR.Meyer
 Computer Science, Order theory, Monotonic function, Convex function, Inclass problems

Click to edit the document details