[net.puzzle] How to win a bottle of Champagne

frederic@ubvax.UUCP (Frederic Bach) (05/24/85)

I once won a bottle of Champagne by solving this
rather amusing problem.

   There once were two brothers herding a flock of
sheep. One day, they decided to sell them all in
the market. Each beast was sold for as many dollars
as sheep there originally were in the herd.
The total amount of money was in $10 bills, plus
less than $10 in $1 bills. The elder brother proceded
to share it. He took a $10 bill, then gave one to
his brother, then took one again, and so on till
he turned out taking the last $10 bill ; he then
gave all of the $1 bills to the youngster, who burst
out : "Hey, but you've got #@% dollars more than I have ".

How about now working out what he really said ?

dkatz@zaphod.UUCP (Dave Katz) (05/28/85)

In article <179@ubvax.UUCP> frederic@ubvax.UUCP (Frederic Bach) writes:

>   There once were two brothers herding a flock of
>sheep. One day, they decided to sell them all in
>the market. Each beast was sold for as many dollars
>as sheep there originally were in the herd.
>The total amount of money was in $10 bills, plus
>less than $10 in $1 bills. The elder brother proceded
>to share it. He took a $10 bill, then gave one to
>his brother, then took one again, and so on till
>he turned out taking the last $10 bill ; he then
>gave all of the $1 bills to the youngster, who burst
>out : "Hey, but you've got #@% dollars more than I have ".
>
>How about now working out what he really said ?

FOUR

As described, there must have been an odd number of $10's.  Since the
total value is the square of the number of sheep, look for values of
2 <= y <= 11 for which int((y^2) / 10) is odd,
(ignoring the trivial case of 1 since the problem
implies there were at least $30).  The only cases are 4^4=16, 6^6=36.
All others are even.

Further, (((n*10)+y)^2) = (n*10)^2 + 2ny + (y^2).  Since
int(((n*10)^2 + 2ny) /10 ) is always even, ((n*10)+y)^2 is odd in the
second digit iff y^2 is odd in the second digit.  This applies for all
n | 0 <= n (there being a positive number of sheep).

Hence the number of sheep must have been:
	(n*10+y | 0 <= n,  y = 4 or y = 6)
In either case, the value ends in 6 and the difference is four -

Now, where is my bottle of champagne?

js2j@mhuxt.UUCP (sonntag) (05/28/85)

>    There once were two brothers herding a flock of
> sheep. One day, they decided to sell them all in
> the market. Each beast was sold for as many dollars
> as sheep there originally were in the herd.

    The total amount of money was a square number, then.

> The total amount of money was in $10 bills, plus
> less than $10 in $1 bills. The elder brother proceded
> to share it. He took a $10 bill, then gave one to
> his brother, then took one again, and so on till
> he turned out taking the last $10 bill ; 

     There were an odd # of $10 bills plus change.

> he then
> gave all of the $1 bills to the youngster, who burst
> out : "Hey, but you've got #@% dollars more than I have ".
> 
> How about now working out what he really said ?

     The amount of money they had was a square number with an odd
digit in the 10's place.  Searching the numbers less than 10 exhaustively,
we find that 4 and 6 are the only numbers which, when squared, yield
such numbers.  The numbers greater than 10 can all be written as N=10*a+b,
where a and b are integers less than 10.  When squared,     
N^2=100*a^2+20*a*b+b^2.  Notice that the first two terms of this
expression have an *even* number of tens.  The only way N^2 can have an
odd digit in the 10's place is if b^2 has an odd digit there.  Thus the
number of sheep (and the price of the sheep) must be in the following
sequence: 4,6,14,16,24,26,34,36...   Happily, the square of any number
in this series ends in the same digit, 6, which is the number of $1 bills
which the younger brother receives in lieu of a tenner.  So what he really
said was "Hey, but you've got *four* dollars more than I have!"

    Now where's my champagne?

*** REPLACE THIS LINE WITH YOUR MESSAGE ***
-- 
Jeff Sonntag
ihnp4!mhuxt!js2j
    "You can be in my dream if I can be in yours." - Dylan

weissler@randvax.UUCP (Robert Weissler) (05/31/85)

I thought I'd try my hand at the following puzzle.

>    There once were two brothers herding a flock of
> sheep. One day, they decided to sell them all in
> the market. Each beast was sold for as many dollars
> as sheep there originally were in the herd.
> The total amount of money was in $10 bills, plus
> less than $10 in $1 bills. The elder brother proceded
> to share it. He took a $10 bill, then gave one to
> his brother, then took one again, and so on till
> he turned out taking the last $10 bill ; he then
> gave all of the $1 bills to the youngster, who burst
> out : "Hey, but you've got #@% dollars more than I have ".
> 
> How about now working out what he really said ?

He really said: "Hey, but you've got 6 dollars more than I have."

Here's my approach to the solution:

	There are n sheep, where each sheep sells for n dollars.
	According to the 3rd sentence above, that means the total
	amount of money the brothers made was n**2 dollars.  This
	money was in m $10 bills and less than 10 (say, k) $1 bills,
	so:

		10m + k = n**2	or	n**2 - 10m - k = 0.

	Since the elder brother took the first and last $10 bill,
	m must be odd.  Being the math klutz that I am, I had to
	solve it for k by trying several values for n and m.  Since
	we are talking dollars, n, m and k must be integers.  So:

		Let m = 1, 3, 5, 7...(the odd integers)

		Then 10m = 10, 30, 50, 70...

		So n**2 must be greater than 10m by less than 10 (i.e., k).

		Thus n**2 = 16, 36, -, 64	(25 and 49 don't work)

		And finally k = n**2 - 10m = 6 in each case above.

I'm sure the more mathematically adept can find a really elegant
solution, but I'll let somebody else waste their time on that. (:-)

-Robert

ARPA: Weissler@Rand-unix
UUCP: randvax!weissler

thomas@utah-gr.UUCP (Spencer W. Thomas) (06/01/85)

<enter mild flame mode>

I sure am glad I took a minute to work this problem before reading the
next article (the one this message is a followup to).  Otherwise I
wouldn't have had the pleasure of discovering the answer for myself.
*PLEASE, PLEASE, PLEASE*, if you must show off your puzzle-solving ability
by posting the answer to the net, at least encrypt the solution (and add
a "(SPOILER)" to the header, for extra warning.)  Judging from the
number of wrong answers I have seen posted to this newsgroup (and
others), you may be better off NOT posting the answer at all.

Don't let us know what a jerk you are that you have to be the first one
on the net with "the answer".  Show some consideration.

<somewhat relieved>

-- 
=Spencer   ({ihnp4,decvax}!utah-cs!thomas, thomas@utah-cs.ARPA)
	   "A pupil from whom nothing is ever demanded which he cannot do
	    never does all he can." -- John Stuart Mill

sml@luke.UUCP (Steven List) (06/01/85)

> In article <179@ubvax.UUCP> frederic@ubvax.UUCP (Frederic Bach) writes:
> 
> >   There once were two brothers herding a flock of
> >sheep. One day, they decided to sell them all in
> >the market. Each beast was sold for as many dollars
> >as sheep there originally were in the herd.
> >The total amount of money was in $10 bills, plus
> >less than $10 in $1 bills. The elder brother proceded
> >to share it. He took a $10 bill, then gave one to
> >his brother, then took one again, and so on till
> >he turned out taking the last $10 bill ; he then
> >gave all of the $1 bills to the youngster, who burst
> >out : "Hey, but you've got #@% dollars more than I have ".
> >
> >How about now working out what he really said ?
> 
> FOUR
> 
> As described, there must have been an odd number of $10's.  Since the
> total value is the square of the number of sheep, look for values of
> 2 <= y <= 11 for which int((y^2) / 10) is odd,
> (ignoring the trivial case of 1 since the problem
> implies there were at least $30).  The only cases are 4^4=16, 6^6=36.
> All others are even.
> 
> Further, (((n*10)+y)^2) = (n*10)^2 + 2ny + (y^2).  Since
> int(((n*10)^2 + 2ny) /10 ) is always even, ((n*10)+y)^2 is odd in the
> second digit iff y^2 is odd in the second digit.  This applies for all
> n | 0 <= n (there being a positive number of sheep).
> 
> Hence the number of sheep must have been:
> 	(n*10+y | 0 <= n,  y = 4 or y = 6)
> In either case, the value ends in 6 and the difference is four -
> 
> Now, where is my bottle of champagne?

In reading the above explanation and solution, I agree with the answer.
FOUR.  However, I didn't bother with all the advanced algebra.  If you
step through the first few squares, you will find that 4, 6, and 16 all
produce squares that (1) are odd multiples of 10 and (2) end in 6.
Since the total sale price must be a square (each sheep sold for a price
equal to the total number of sheep), and at least three answers end in 6
(producing a remainder of four), why go on and on and on...

Can I have a glass? (:->

js2j@mhuxt.UUCP (sonntag) (06/03/85)

> I sure am glad I took a minute to work this problem before reading the
> next article (the one this message is a followup to).  Otherwise I
> wouldn't have had the pleasure of discovering the answer for myself.
> *PLEASE, PLEASE, PLEASE*, if you must show off your puzzle-solving ability
> by posting the answer to the net, at least encrypt the solution (and add
> a "(SPOILER)" to the header, for extra warning.)  

    Could I get some feedback from others on this subject?  I always
assume that if the title of an article says 'Re: How to confuse Penguins'
that the article very well might be the *answer* to the 'How to confuse
Penguins' puzzle.  I've seen very few people posting spoiler warnings or
rotating answers to puzzles, and personally have never missed them.  But
then again, I usually *do* take a minute to work out the interesting
puzzles I find here immediately, and usually don't need such warnings 
anyhow.
    Are there more people out there who think solutions to puzzles should
have warnings and be rotated?  Howabout just a warning?
-- 
Jeff Sonntag
ihnp4!mhuxt!js2j
    "Sundown, yellow moon.  I replay the past.
     I know every scene by heart; they all went by so fast." - Dylan

edhall@randvax.UUCP (Ed Hall) (06/05/85)

> <enter mild flame mode>
> 
> I sure am glad I took a minute to work this problem before reading the
> next article (the one this message is a followup to).  Otherwise I
> wouldn't have had the pleasure of discovering the answer for myself.
> *PLEASE, PLEASE, PLEASE*, if you must show off your puzzle-solving ability
> by posting the answer to the net, at least encrypt the solution (and add
> a "(SPOILER)" to the header, for extra warning.)
> -- 
> =Spencer   ({ihnp4,decvax}!utah-cs!thomas, thomas@utah-cs.ARPA)

A simple guide-line: if you want to solve a puzzle yourself, skip over
all the ``Re:'' postings to that subject.  In this group the ``Re:''
is often pronounced ``Spoiler:''.

Maybe the next version of netnews should offer to ROT13 replies to
net.puzzle the same way it offers to ROT13 net.joke submissions.

		-Ed Hall
		decvax!randvax!edhall