Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Here is something to take your minds off the Chongson mystery

 
Ranch Hand
Posts: 275
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I notice that gradually tempers are getting frayed. So here is a puzzle to take your minds off it. I hope you havent seen this before.


A woman was carrying a basket of eggs to market when a passer-by accidentally jostled her, causing her to drop the basket. All the eggs broke. The passer-by, wishing to pay for her loss, asked, "How many eggs were in your basket?"
"I don't remember exactly" the woman replied, "but I do recall that whether I divided the eggs by 2,3,4,5 or 6 there was always one egg left over. When I took the eggs out in groups of seven, I emptied the basket."
What is the least number of eggs that broke?

 
Ranch Hand
Posts: 400
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Sahir Shibley:

What is the least number of eggs that broke?


it Sound's Chong'ism
 
Ranch Hand
Posts: 3244
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
181
Knew it had to be a multiple of 7 greater than 7 * 6 and not an even number and also not ending in 5 or 0. After that it was all trial and error. I'm sure someone else has a more scientific way to do it.
Dave
 
Ranch Hand
Posts: 1012
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
sahir,
this is just a guess... i think you know the routine, i made my answer invisible, so just "highlight" my post to see what i said.
the least number of eggs would be 7...
 
Sahir Shibley
Ranch Hand
Posts: 275
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dave,
181 mod 7 is 6 so how can it be 181 ?
Please pay particular attention to the part
"When I took the eggs out in groups of seven, I emptied the basket"
No Greg that is also wrong. Let me re-phrase the question.
Let the number of eggs be x.
Find x such that
x mod 2 = 1
x mod 3 = 1
x mod 4 = 1
x mod 5 = 1
x mod 6 = 1
x mod 7 = 0
[This message has been edited by Sahir Shibley (edited May 25, 2001).]
 
Ranch Hand
Posts: 241
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
But 181 % 7 != 0!
I get 301, and here's how:
We're looking for an integer n such that n % e == 1 for every e in the set { 2, 3, 4, 5, 6 } AND n % 7 == 0.
In other words, n - 1 must be divisible by 2, 3, 4, 5 and 6. If a number is divisible by 2, 3, 4, 5 and 6, then it is equivalent to say that that number is also divisible by the least common denominator (LCD) of 2, 3, 4, 5 and 6. That LCD is 60.
So now, we test 60n + 1 for divisibility by 7:
n = 1: 61 % 7 == 5
n = 2: 121 % 7 == 2
n = 3: 181 % 7 == 6
n = 4: 241 % 7 == 4
n = 5: 301 % 7 == 0 <====
The questions I have are, how much do 301 eggs weigh, and how big was that basket, anyways?
Oh, well, I guess it's the yolk she had to bear.
Art, a.k.a. "Al Bumin"
[This message has been edited by Art Metzer (edited May 25, 2001).]
 
Sahir Shibley
Ranch Hand
Posts: 275
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That was quick work Art .
One more before I break off for the day.


A butcher received an invoice for a consignment of 72 turkeys, but unfortunately it was smudged and a couple of figures were unreadable. All he could read was '-67.9-', with the first and last figures illegible. Nevertheless, he was able to work out the price of a turkey immediately. What was the price of a turkey?


Cheers
Sahir

[This message has been edited by Sahir Shibley (edited June 08, 2001).]
 
Art Metzer
Ranch Hand
Posts: 241
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
$367.92 for 72 turkeys, meaning each turkey cost $5.11.
For clarity, I'm going to show my math here in cents, meaning I'll consider the cost of the 72 turkeys X679Y.
We know that X679Y must be divisible by 72, meaning it must be divisible by both 8 and 9.
For X679Y to be divisible by 8, the last three digits must be divisible by eight.
In other words, step #1 is to find 79Y such that 79Y % 8 == 0. Only one digit qualifies: 2.
That leaves step #2, to find X. To do that, we'll use the other fact, that X6792 must be divisible by 9. As you may know, if and only if an integer is divisible by 9, the sum of its digits is a multiple of 9. So far we have 6792, whose sum is 24. The only X that'll make our mystery number divisible by 9 is 3.
So the cost is $367.92 for 72 turkeys, or $5.11 per.
Art
P.S. This is one of the test problems in the fantastic book How to Solve It by G. Polya. It was first published in the '40s, but the methods and techniques it espouses still apply today, even (and especially!) in the world of computer programming.
I sound like a public service announcement during Saturday morning cartoons, but, "Check it out at your local library!"
Art
[This message has been edited by Art Metzer (edited May 25, 2001).]
 
Ranch Hand
Posts: 782
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would certainly fail a test if these kinds of questions were on it.....
 
Ranch Hand
Posts: 316
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Good solution, Art, but if you already know the answer then you're taking the fun away from the people who have a chance to figure it out.
Paul R
 
Don't get me started about those stupid light bulbs.
    Bookmark Topic Watch Topic
  • New Topic