Tuesday 5 July 2016

mathematics - Aside from brute force, how can I solve this puzzle?




Once upon a time, and old lady went to sell her vast quantity of eggs at the local market. When asked how many she had, she replied:


Son, I can't count past 100 but I know that:


If you divide the number of eggs by 2 there will be one egg left.
If you divide the number of eggs by 3 there will be one egg left.
If you divide the number of eggs by 4 there will be one egg left.
If you divide the number of eggs by 5 there will be one egg left.
If you divide the number of eggs by 6 there will be one egg left.
If you divide the number of eggs by 7 there will be one egg left.
If you divide the number of eggs by 8 there will be one egg left.

If you divide the number of eggs by 9 there will be one egg left.
If you divide the number of eggs by 10 there will be one egg left.


Finally. If you divide the number of eggs by 11 there will be NO EGGS left!


How many eggs did the old lady have?



Source (with solution): BrainBashers


From reading the puzzle, some easily-indentifiable properties of the total number of eggs are:




  • it's a multiple of 11 (remainder of 0 if divided by 11)





  • it's odd (if divided by 2 there's one egg remaining)




I haven't been able to come up with any other clues, so the only way I can see to solve this puzzle is to brute-force it (that is, start listing odd multiples of 11 and manually check if x modulo 3->10 = 1.


11, 33, 55, 77, 99, 121, 143...

At this point I got bored of brute-forcing it and decided there had to be a better way.


Is there? Can I use the other clues to build more rules to make it easier to find the correct number? (I started to think that maybe combining two clues would lead to a nugget of information, but then I couldn't figure out how to do that.) What math can I use to solve this other than brute-forcing the set of odd multiples of 11?





No comments:

Post a Comment

Understanding Stagnation point in pitot fluid

What is stagnation point in fluid mechanics. At the open end of the pitot tube the velocity of the fluid becomes zero.But that should result...