Logic Puzzle Contest

Rules

How to enter: Submit solution, by the indicated due date. Remember to include your full name and year of graduation ('07, '08, etc.), or your entry may be disqualified. If you submit more than one entry, only the first will be counted.  If you encounter difficulties with the submission process, please send an email to the puzzle master at puzzle@hamilton.edu

The prize: If yours is the first correct solution to be drawn out of a metaphorical hat, you will win a book prize and a $5.00 gift certificate to the bookstore at Reamer. You will be notified by e-mail, and your name will be posted on this page.

Who may enter: The contest is open to all current and past Union students. However, only current students are eligible to win the prizes. If the first correct solution drawn is one submitted by an alum, we will continue drawing until we have a correct solution submitted by a current student, to whom the book prize will be awarded; both people will be identified on this site as contest winners.

April Logic Puzzle

The Puzzle

Once upon a time, the Union College administration was taken over by a rogue band of number theorists intent on developing a new system of student ID numbers. The number theorists wanted the new ID numbers to have ten digits in which each of the numerals from 0 to 9 appeared exactly once. They also wanted each ID number to be divisible by each of the digits (except 0!).

Questions

1. What would be the smallest possible new ID number?

2. What would be the largest possible new ID number?

The Deadline for April Puzzle is Monday, April 27, at noon.  Please see the instructions for how to submit your answer at the top of this page.

.

==The Winner==

Steve Herron '09 submitted the best entry and got the high number correct.  Congratulations, Steve!

==The Solution==

All whole numbers are divisible by 1. Any number using all the digits will be divisible by both 3 and 9. Since the numbers have to be divisible by both 2 and 5, they must end in 0. Any number divisible by 3 and 2 will be divisible by 6. And, if a number is divisible by 8, then it will be divisible by 4. So, if the number ends in 0, we only have to worry about making it divisible by 7 and 8.

Any number whose last three digits are divisible by 8 will be divisible by 8. Furthermore, since the numbers end in 0, for the last three digits to be divisible by 8, the two-digit number formed by the hundreds and tens digits (in that order) must be divisible by 4.

Let’s start with the small number, and let’s say that the number is 123456***0. The number is only missing 7, 8 and 9. But, there are no two-digit numbers formed by 7, 8, and 9 which are divisible by 4. So, we have to choose a slightly larger lead, swapping the 7 for the 6: 123457***0. Now, our missing digits are 6, 8, and 9, which yield two two-digit numbers divisible by 4: 68 and 96. So, we can test 1234579680 and 1234578960 for divisibility by 7. There’s no easier way to test for divisibility by 7. Do it by hand or use a calculator; either way both number fail. Continuing in this manner, choosing slightly larger leads each time, we get to the solution: 1234759680.

.

For the largest number, start with 987654***0, and work up. The solution is 9876351240.

.

.

February Logic Puzzle

Professor Inscrutable had three students in his contemporary meta-metaphysics course: Amie, Matthew, and Sven. Each student had to write the same number of papers for the course. Professor Inscrutable graded on a curve, such that the best of the three papers got p points, the second-best got q points, and the third-best got r points, where p, q, and r are distinct integers such that p > q > r > 0. There were no ties, and all students handed in all the required papers.

At the end of the term, Amie had earned 22 points, and Matthew and Sven each had 9 points.

Matthew had the best grade on the first paper.

Questions

1. How many papers were there?

2. What are the values of p, q, and r?

3. Who had the second-best grade on the second paper?

Solutions must contain explanations!

Solutions are due by noon on Monday, February 23.  Please see the instructions for how to submit your answer at the top of this page.  

==The Winner==

Sangin Lee, Class of 2010, submitted a winning answer.  Congratulations Sangin!

==The Solution==

The Puzzle Master’s Solution:

The total number of points awarded was 40. So, n(p + q + r) = 40, where n is the number of papers. p + q + r has to be at least 1 + 2 + 3 = 6, so n must be 1, 2, 4, or 5.

Since Matthew had the best grade on the first paper, we know that p must be less than 9. If there were only one or two papers, then Amie would not be able to collect her 22 points. So, n must be 4 or 5.

Assume n is 4. Then, p + q + r = 10. Thus, p must be at most 7. Since Amie earned 22 points in four papers, p must be at least 6. If p were 7, Matthew could not get 9 points, even if he received the fewest points on each of the other three papers. Thus, p would have to be 6, r would have to be 1, and q would have to be 3. But then there would be no way for Amie to collect 22 points.

So, n must be 5 and p + q + r = 8. Since Amie earned 22 points on five papers, p must be at least 5, which entails that p=5, q=2, and r=1. Thus, Matthew must have gotten the lowest grade on all papers except the first. The only way for Amie to earn 22 points would be for her to get the most points on every paper other than the first, and the second-best grade on the first assignment. Thus, Sven must have had the second-best grade on all papers other than the first, including the second.

January 2009

A little-known fact about Ramée’s design for Union College is that he was prescient enough to include a plan to bury electrical wires underground, connecting North and South Colleges. At that time, there was a vast mountain range, Nott Peak, between the proposed buildings. Travel between the two sides of Nott Peak took weeks, and many brave workers lost their lives traversing east-west across the great range. The heroic men and women of Building Services and Utility Management took two years to dig a small conduit, and inserted 501 identical wires between the two sides. Unfortunately, they neglected to leave any indication of which wire ends on the east side corresponded to which ends on the west side. The mountain settled on top of the tunnel, and there was no way to remove the wires. A new tunnel would take another two years to dig. And, since this was in the days before telephones or helicopters, the only way to figure out which east-side ends corresponded to which west-side ends was to send an electrical signal through wires on one side, and then travel to the other side to see which wires were live on the other end.

Your challenge is to travel back in time to help the workers identify the ends of the wires on each side. You must minimize the number of trips required across Nott peak in order to label each wire, from 1 to 501, with matching numbers on each side. You are permitted to connect wires on one side or the other. Connected wires will conduct electricity through the connection. But, you have only one voltage course, and no voltmeter. You can connect or disconnect as many wires, and as often, as you please.

Solutions must contain complete instructions and the minimum number of trips.

Bonus question: What would the minimum number of trips be if there were 502 wires?

===The Winner===

Ben Lawrence '11 submitted a correct answer to the January Logic Puzzle.  Congratulations to Ben!

Solution to the January Logic Puzzle (Puzzle Master Russell Marcus)

 In two trips:

1. Arbitrarily, we’ll start on the south side. Choose one wire, and label it #1. Pair up all other wires,

leaving wire #1 unconnected. Label each pair, but not with numbers. Pairs of letters, e.g. AA, AB,

AC...BA, BB, BC.... will provide enough labels.

2. Travel to the north side.

3. Determine the lone, unconnected wire by attaching the voltage source to each wire in turn, until you

find one that does not electrify any other wire. Label it #1.

4. Pick any other wire, label it #2.

5. Find the wire to which #2 is connected. Label it #3.

6. Repeat steps 4 and 5, increasing the label numbers by twos, until all wires are numbered.

7. Connect #1 to #2, #3, to #4, and so on, leaving #501 unconnected. Notice that all the wires are now

connected, so that if you send electricity through #1, it will pass through all the wires.

8. Travel to the south side.

9. Disconnect all connections, but leave the letter labels in place.

10. Send electricity through wire #1. Wire #2 will now be live. Label it #2.

11. Find the wire which had previously been paired with Wire #2. Label it #3.

12. Repeat steps 10 and 11, increasing label numbers by twos, until all wires are numbered.

QED

.

November 2008

Thanksgiving is coming. Quadmates Judith, Penelope, Ruth, and Virginia are all driving home separately. Willard has come to their dorm room to say goodbye. Willard asks, “How long do you each have to drive to get home?”

The women reply as follows:

     We each have a different whole number of hours to drive.

     The sum of these four numbers is less than eighteen.

     The product of these numbers is our dorm room number.

Judith has the shortest drive, followed by Penelope, Ruth and Virginia, in that order.

Willard thinks for a little while, and scribbles some notes on a pad, but can not determine the four numbers. He asks whether any one of the women has to drive just one hour to get home. The women answer him, and he immediately knows the four numbers.

How long does each woman have to drive to get home?  (Your answer must include an explanation.)

===The Winner===

 Derek Ohanesian

==Solution to Union College Logic Puzzle #2 (Russell Marcus)==

Drive times and dorm room numbers are assumed to be positive whole numbers.

There are 38 combinations of different positive whole numbers whose sum is less than 18.

Willard knows the product of the four numbers.

Since Willard can not determine the numbers from the information given initially, we know that there

must be at least two different combinations with the same product.

We can thus eliminate all combinations with unique products, which leaves us with the following table.

Sum Product

1 2 3 8 14 48

1 2 4 6 13 48

1 2 3 10 16 60

1 2 5 6 14 60

1 3 4 5 13 60

1 2 4 9 16 72

1 3 4 6 14 72

1 2 4 10 17 80

1 2 5 8 16 80

1 2 6 7 16 84

1 3 4 7 15 84

1 2 5 9 17 90

1 3 5 6 15 90

1 2 6 8 17 96

1 3 4 8 16 96

1 3 5 8 17 120

1 4 5 6 16 120

2 3 4 5 14 120

When Willard asks if any of the women have to drive just one hour, he immediately knows the solution.

Note that every group of products above contains more than one combination that has a ‘1’.

Thus, if the answer were, ‘Yes’, he would not immediately know the solution.

But, if the answer is ‘No’, there is only one possible combination, the last in the table.

So, he would immediately know the answer.

Thus, the combination is {2, 3, 4, 5} and the women’s dorm room number is 120.

==October 2008==

Family Weekend is coming, and the Dean of Students is preparing a champagne brunch at which 500 bottles of champagne will be served. Unfortunately, some pranksters have tampered with one of the bottles, injecting a dye that, though otherwise harmless, will turn the teeth of anyone who drinks even the tiniest drop of it garnet. The person’s teeth will remain dyed for a full week.

The dye is triggered between 8 and 12 hours after drinking, at which time its effects are immediate and obvious. The time of the trigger varies both with the person and with the wine. It is now 2pm on Saturday, and the brunch begins at 10am on Sunday.

The dean wants to find the single bottle that has been contaminated. He is willing to open all 500 bottles of champagne for testing. Since testing only requires the smallest drop, removing even 500 drops of champagne will not reduce the quantity in the bottle significantly. The pranksters have also sabotaged the chemistry labs, so the only way to determine if a bottle has been contaminated is by drinking a sip.

The dean insists on using students to test the champagne. There are over 500 students of drinking age available for testing, but the dean wishes to avoid subjecting more students than necessary to the test. There are 50 students whose parents are not coming to Family Weekend.

Questions:

1. Can the dean determine which is the single, contaminated bottle using only the 50 students whose parents are not coming to Family Weekend?

2. What is the smallest number of students that must drink from the bottles to be sure to find the contaminated bottle before the brunch begins?

3. Given the minimum number of testers, what is the maximum number of those testers whose teeth will turn garnet?

Bonus: What is the probability that any of the testers will have garnet teeth after 12 hours?

Solutions must include an explanation.

Answers are due by noon on *[Activities/puzzle-submit.txt&puzzle=2008-10-16,Thursday], October 16*


===The Winner===

Ben Lawrence c/o 2011

==The Winning Solution to the October 2008 Puzzle:==

1. Can the dean determine which is the single, contaminated bottle using only the 50 students whose parents are not coming to Family Weekend? Yes. There are 20 hours from 2pm to 10am. That means that each student can try 2 samples and conclude which sample caused garnet teeth, if they are changed. Each student tries a sample at 2pm, and another 5 hours later, at 7pm. The first sample’s effects will manifest some time from 10pm to 2am, and the second from 3am to 7am. It is therefore determinable which sample caused the effects. Let each student be called x[n] (x[1] through x[50]), and each bottle y[p] (y[1] through y[500]). Again, each student tastes twice. In the first test, students taste champagne bottle y10n, y10n-1, and on until y10n-9. In the second test, students taste bottles y[n], y[n+50], and on until y[n+450].
{Puzzle Master's note: So, x[1] tastes bottles 1, 51, 101, 151...451; x[2] tastes bottles 2, 52, 102, 152...452; etc.  There are lots of ways to set up the test as long as each bottle has a unique pair of testers.}
In the end, two students will have garnet teeth, and by solving for the student given the two n values, we can get the value of p (unless only one student has garnet teeth, in which case the two n values are equal and p can still be derived). For example, suppose that sometime 10pm-2am student x[13] gets garnet teeth, and sometime 3am to 7am student x[2]3 gets garnet teeth. In sample 1, student x[13] tried champagnes y[121] through y[130], based on the first equation above. In sample 2, student x[23] tried champagnes y[23], y[73], y[123], and on through y[473], based on the second equation above. The common bottle is y[123], so that is the dyed bottle.

2. What is the smallest number of students that must drink from the bottles to be sure to find the contaminated bottle before the brunch begins? 8 students, by using a more efficient way of finding the contaminated bottle. Break the bottles into 2 groups of 250. Each bottle will be represented by an 8-digit binary number e.g. bottle 1 is 00000001, bottle 20 is 00010100, bottle 120 is 01111000, etc. Each of the eight students will represent a place in the 8 digit number. There will again be two tests, each one testing one of the two 250-bottle groups. Every bottle is tasted, with each student trying the bottle if their place in the given number is a 1. For example, bottle 45, represented as 00101101, will be tasted by students 1, 3, 4, and 6 (going right-to-left, with the right-most place being student 1). The students will taste the first sample, then the other 5 hours later. The contaminated bottle will be present in only 1 of the 2 samples, so at 12 hours after the first test, the results will be there, unless no one has garnet teeth, in which case the results will be collected 12 hours after the second test. The results are simple to analyze: Say, for example, that students 2, 4, and 7 have garnet teeth 12 hours after test 1. That will represent the binary number 01001010, which is bottle 74.

3. Given the minimum number of testers, what is the maximum number of those testers whose teeth will turn garnet? The most 1’s possible for any of the bottles is 7, for example 01111111, bottle 127. Eight 1’s is not possible because that would be 11111111 which is bottle 255, which doesn’t exist in either sample of 250 bottles. Therefore the maximum number of testers with garnet teeth is 7.

Bonus: What is the probability that any of the testers will have garnet teeth after 12 hours? There is 50% chance that the first sample will have the contaminated bottle, so 50%. {Puzzle Master's Note: The probability is actually a bit less than 50%, since not all binary numbers will be used.}

February 2008

Answers are due by noon on Thursday, February 21

Watch for the spring logic puzzle on Thursday, April 17!

May

April showers bring May flowers. The final puzzle for the academic year is an ancient Hindu puzzle:

The square root of half the number of bees in a swarm has flown out upon a jasmine bush; eight ninths of the whole swarm has remained behind; one female bee flies about a male that is buzzing within the lotus flower into which he was lured in the night by its sweet scent, but he is now imprisoned in it.

What is the number of bees?

Answers are due by noon on Monday, May 21

The Solution

There are 72 bees in the swarm. If x is the number of bees, we have the equation (the square root of x/2)+ 2 = 1/9x (since one ninth of the swarm is out).

If we let y = the square root of x/2, then x = 2(y squared). The equation becomes y + 2 = 2/9(y squared). The only positive solution is 6, hence y squared = 36 and x = 72.

This ancient Hindu puzzle is presented in Raymond Smullyan's The Riddle of Scheherazade.

The Winner

John Peters, Class of 2010, submitted a winning answer. Congratulations to John!

April

Winter Turns to Summer?

Lewis Carroll invented a game whereby one word is to be transformed into to another word of the same length through a sequence of letter replacements. The letter replacements can only be done one at a time, and each interim letter replacement must result in a word. The letters must not be interchanged within a word.

Here's an example: Change 'head' to 'tail'

h e a d
h e a l
t e a l
t e l l
t a l l
t a i l

'Head' can be changed to 'tail' in five steps, with each interim step yielding a word of English.

Lewis Carroll called the pair of given words 'doublets' and the interims words 'links'. The objective is to change the first doublet word into the second using the minimum number of links.

This month's Logic Puzzle is one of Lewis Carroll's doublets: Change 'winter' into 'summer'.

The Winner

There were many creative answers to this problem, although some involved invented words, Google searches, or steps where more than one letter was changed at a time.

The winner is Jamal Ricks, Class of 2008, who submitted the following answer:

winter
winder
wander
warder
warded
warned
warred
warmed
warmer
harmer
hammer
hummer
summer

Congratulations, Jamal!

Answers are due by noon on Friday, May 18

February 2007

Two Imperfect Watches

(Based on a puzzle by Raymond Smullyan)

Years ago, there were two Union College students, both of whom had a watch that didn't keep perfect time.

One student, Alan, had a watch that gained ten seconds every hour. The other student, Ben, had a watch that lost ten seconds every hour.

One of the students was born in the year 1842. The other was born in either 1843 or 1844.

One day in January, Alan and Ben set both of their watches at exactly twelve o'clock. Alan pointed out to Ben that their watches would not be synchronized again until Ben's next birthday. Ben's birthday was in March, and he would be twenty-one on his next birthday.

Who was older, Alan or Ben?

(You must explain how you arrived at your answer to be eligible to win.)

Answers are due by noon on Monday, February 19

The Winner

Doug Wald, Class of 2007, is the winner of the February Logic Puzzle. Congratulations to Doug!

The Solution

Here is Doug's winning solution:

Alan is older. Since Ben's watch lost 10 seconds every hour and Alan's gain 10, they effectively grow 20 seconds apart each hour. Since there are 24 hour in one day, the time difference of the watches gains 480 seconds per day. Assuming the watches are 12 hour time pieces, then for them to sync up again, the the time difference of the two watches must be exactly 12 hours, or 43,200 seconds. Since the distance grows at a constant rate of 480 seconds per day, the time it takes to reach a difference of 43,200 is equivalent to exactly 90 days. Thus there has to be at least a 90 day period between the day they synchronized the watches in january and the time they synchronize again in march. To have a full 90 days contained within the two dates, it has to be a leap year. Thus the year Ben would have celebrated his 21st birthday would be 1864, making him born in 1843, which means Alan would have been born in 1842, making Alan the older of the two. To show it must be a leap year: assume they initially synchronized their watches at 12AM on january 1. In a non leap year, a full 90 days would be 12AM on April first. Thus the extra day in february is needed to make it possible for the watches to synchronize again in the month of March, or more specifically, on march 31st. QED Modify the Nav Bar

January 2007

The Invasion of the Utilitarians

There was a land inhabited only by Kantians and Pathological Liars. The Kantians always told the truth, and the Pathological Liars always lied.

One day, reports of an invasion by Utilitarians began to be circulated in the media. Utilitarians either told the truth or lied (presumably which they did was guided by what they thought would produce the most happiness overall). At first it wasn't known whether the reports were true or false because it wasn't known whether the reports were being circulated by Kantians or Pathological Liars.

Soon, however, some peculiar things happened that indicated that the reports of the invasion were true:

Some Kantians reported large sums of money missing from their bank accounts. These Kantians were mostly wealthy executives of large corporations.

Other Kantians reported receiving large credits to their accounts. These persons had very little money and could barely make ends meet. Some Kantian-run hospitals and social service agencies also reported receiving large sums of money from unknown sources.

A group of Pathological Liars vehemently denied either that money was missing from their bank accounts or that they had received funds from an unknown source.

It appeared that Utilitarians had, in fact, invaded the land (and some of the major banks in the land), and that they were busily at work redistributing the wealth in order to maximize the greatest happiness overall.

In a sting operation, local police arrested three employees of a major bank whom they suspected of having arranged the money transfers. Each was charged with the crime.

At the trial, the three defendants (A, B, and C) appeared together. The court knew two things: (1) a Utilitarian had committed the crime, and (2) one defendant was a Kantian, one was a Pathological Liar, and one was a Utilitarian, but it was not known who was which.

First A accused B of being the Utilitarian; then B accused C of being the Utilitarian; and then C pointed to one of the other two defendants and said, "He is really the Utilitarian!" The judge then knew who the Utilitarian was, and he convicted the Utilitarian. Which suspect did he convict?

Answers are due by noon on Friday, January 19

The Winner

Hao Wu

Hao Wu, Class of 2009, submitted a correct answer.
Congratulations to Hao!

The Solution

C is the Utilitarian. If C had accused A, the judge couldn't have determined who was the Utilitarian.

However, if C accused B, then both A and C accused B. This accusation is either true or false.

If the accusation were true, B would, in fact, be the Utilitarian. But both A and C, having truthfully accused B, would have to be Kantians. This is impossible. So the accusation is false. So B is not the Utilitarian.

If A were the Utilitarian, then B and C would have both lied in accusing each other. But then B and C would both be Pathological Liars, which is impossible. So A is not the Utilitarian.

Therefore, C is the Utilitarian. B, having truthfully accused C is the Kantian. And A, having falsely accused B, is the Pathological Liar.

And, as several of you pointed out, since Utilitarians do and say what they think will promote the greatest happiness overall, they would lie if they thought if were in the service of promoting the overall good.