|
Enigma 1477
Posted on: Thursday 17/1, 2008; 3:43 PM
Define the names of the people.
Define the landing and departure times.
Create a list of all possible landing and departure times, where a single case has the format {landings:{hw1, hw2, hw3}, departures:{hw1, hw2, hw3}} = {{{lh1,lw1}, {lh2,lw2}, {lh3,lw3}}, {{dh1,dw1}, {dh2,dw2}, {dh3,dw3}}}. In order to limit the size of the list it is immediately constrained to enforce the landing times of each husband-wife pair to be exactly as defined.
Construct a list of all possible alternative departure times in which husbands and wives are paired up in all possible ways (!).
Extract the set of cases that fit the above alternatives.
Extract the cases in which all the people had different waiting times. There are only 2 possibilities.
Compute the waiting times for these 2 cases.
For each of the 2 cases compute the number of husbands who waited for a shorter time than their wives. This tells us that the first case is the one for which more than one husband had a shorter wait than his wife.
For the first case compute the ordering of the waiting times.
List the names in the order given by the above ordering. This is the required solution.
Permalink Notebook
|
Recent Posts |
17/1, 2008; 3:43 PM: Enigma 1477 14/1, 2008; 11:24 AM: Enigma machine 11/1, 2008; 3:43 PM: Enigma 1476 7/1, 2008; 9:11 PM: Enigma 1475 21/12, 2007; 4:40 PM: Enigma 1474 14/12, 2007; 1:36 PM: Enigma 1473 9/12, 2007; 12:40 PM: Enigma 1472 2/12, 2007; 11:55 AM: Enigma 1471 1/12, 2007; 5:33 PM: Enigma 1467 29/11, 2007; 3:27 PM: Enigma 1469 29/11, 2007; 2:12 PM: Enigma 1468 29/11, 2007; 1:09 PM: Enigma 1465 27/11, 2007; 8:39 PM: Enigma 1462 27/11, 2007; 8:38 PM: Enigma 1464 27/11, 2007; 8:35 PM: Enigma 1463 27/11, 2007; 8:23 PM: Enigma 1461 27/11, 2007; 8:19 PM: Enigma 1460 27/11, 2007; 8:14 PM: Enigma 1459 27/11, 2007; 8:09 PM: Enigma 1458 27/11, 2007; 7:42 PM: Welcome
Archive |

Blogged from
A WorkLife FrameWork by
Scientific Arts |