Sie sind auf Seite 1von 54

A Solution Manual and Notes for:

Puzzles to Puzzle You:


by Devi Shakuntala
John L. Weatherwax

January 26, 2014

wax@alum.mit.edu
1
Text copyright c 2013 John L. Weatherwax
All Rights Reserved
2
To all the future problem solvers.
3
Introduction
This is a great little puzzle book to develop the skills for problem solving. It was written
by the genius Shakuntala in 1979. When the book was published computers were not as
common as they are now and (in my opinion) it would be very dicult to solve some of
these problems by hand. This was apparently not a problem for Shakuntala, who has
been described as a human calculator. This description shows in these problems. In fact
many of the problems have a feel like Project Euler problems
1
in that some of them can be
solved (without as much tedium) by using a programming language to enumerate the very
large number of possible candidates. In fact I would estimate that for these problems most
people would simply give up before being able to nd a solution. This is a shame since in
my view solving problems should be an enterprise where we use everything weve got in
an attempt at a solution. By introducing a modern computer we are able to ooad some
of the work to a machine and get back to the fun part of problem solving. Working on the
computational problems in this book are so much like the Project Euler problems that
studying this book can give you some techniques to be used there.
In this book I provide up-to date detailed solutions to many of the problems posed by
Shakuntala. In addition, in the case where it is prudent to do so I implement python (and
sometimes R) codes to help in the enumeration of the choices and facilitate nding solutions.
Reading these notes and solutions is a good way to learn a bit about the very popular and
powerful programming language python. I hope that this book will help you become a
stronger problem solver and open your eyes to the possibility of using python as a language
to help solve your own problems. These code snippets can be found here:
http://waxworksmath.com/Authors/N_Z/Shakuntala/shakuntala.html
As a nal comment, Ive worked hard to make these notes as good as I can, but I have no
illusions that they are perfect. If you feel that that there is a better way to accomplish
or explain an exercise or derivation presented in these notes; or that one or more of the
explanations is unclear, incomplete, or misleading, please tell me. If you nd an error of
any kind technical, grammatical, typographical, whatever please tell me that, too. Ill
gladly add to the acknowledgments in later printings the name of the rst person to bring
each problem to my attention.
1
http://projecteuler.net
4
Contents
Tall Men Next Door . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Brothers and Sisters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Over the Golden Gate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
The Digits and Square Numbers . . . . . . . . . . . . . . . . . . . . . . . . . 12
Bicycle Thieves . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
The Bus Number . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
The Hour Hand and the Minute Hand . . . . . . . . . . . . . . . . . . . . . 13
To Catch a Thief . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
The Gong . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Something for the Marmalade . . . . . . . . . . . . . . . . . . . . . . . . . . 15
The Counterfeit Note . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Nuts for the Nuts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
The Wedding Anniversary . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Ill Get it for you Wholesale . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
The Broken Glasses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
The Peculiar Number . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Make a Century . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
The Perplexed Postal Clerk . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
The Mystery of the Missing Paisa . . . . . . . . . . . . . . . . . . . . . . . . 19
Walking back to Happiness . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
On the Line . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
The Legacy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
5
The Round Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Down the Escalator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
The Chess Board . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
A Game of Cats and Mice . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
The Wheels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Blow How Blow Cold . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
The Llama Race . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
The Shattered Clock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
The Painted Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Animals on the Farm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Which is the Better Bargain? . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Walking all the Way . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
The Train and the Cyclist . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Something for Prot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
The Digital Game . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
The Faulty Machine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
The Number and the Square . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Squares and Right Angles . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
The Dishonest Merchant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
For the Charities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
The Number Game . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
The Sari and the Blouse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
When was he Born? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
6
The Weight of the Block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Lucrative Business . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
The Old Ship . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
The Three Containers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
On the Way to Market . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
A Matter of Denomination . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Right Foot Foward . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
A Problem of Socks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
A Fair Division . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Mathematics and Literature . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Heads I Win Tails I Loose . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
A Problem from Lilavati . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Up the Ladder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Pigs and Ducks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
The Faulty Watch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
The Egg Vendor and His Eggs . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Some Luck! . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
The Trains and the Falcon . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Which is more Lucrative? . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Little Mammu and the Marbles . . . . . . . . . . . . . . . . . . . . . . . . . 33
The Curious License Plate . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Lose or Gain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
A Problem of Combination . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
7
The Special Number . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
Sawing the Tree Trunk . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
The Bigamist . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
The Split . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
At the Fete . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
At the Store . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
The Counterfeit Coins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Multiplying Bacteria . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
A Puzzling Number . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
What a Coincidence! . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
The Idler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Numbers Game . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
A Bargain in Guavas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
The Mathematical Shepherd . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Father and Son . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
The Six Matches . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
No Change Please! . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
A Date to Reckon With . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
Gold for All Occasions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
The Ink-Spot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
Spade for a Heart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
The Number Puzzle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
A Problem of Coins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
8
The Squirrel and the Post . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
Hearts Apart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
The Curfew . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
A Problem of Age . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
The Passenger Train and the Goods Train . . . . . . . . . . . . . . . . . . . 39
The Circular Numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
Rice for the Festival . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
Threes to Make Thirty-one . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Swarm of Bees . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Story of the Three Farmers . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
What Were You Doing When the Lights Went Out? . . . . . . . . . . . . . . 42
Sta and the Steeple . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
The Dotted Square . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
Up the Stream Down the Stream . . . . . . . . . . . . . . . . . . . . . . . 43
Wine and Water . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
The Long Tunnel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
The Horse, the Cow and the Sheep . . . . . . . . . . . . . . . . . . . . . . . 44
The Two Mathematical Men . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
A Question of Mileage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
How Much? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
The Bargain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
Sections of a Necklace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
Age of Demochares . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
9
The Painted Cube . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
Smoking Not Prohibited . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
Mathematical Taxi Driver . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
The Tennis Tournament . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
Dividing the Load Equally . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
Longfellow and His Bees . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
Mr. Portchesters Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
Driving Through the Country . . . . . . . . . . . . . . . . . . . . . . . . . . 49
Dots and Lines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
The Triangles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
The Puzzled Artist . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
The Mystery of Number Eleven . . . . . . . . . . . . . . . . . . . . . . . . . 50
The Rose Garden . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
Squares Within Square . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
The Farmer and the Animals . . . . . . . . . . . . . . . . . . . . . . . . . . 51
The House Where She Lives . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
The Mango Thieves . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
A Matter of Rupees and Paise . . . . . . . . . . . . . . . . . . . . . . . . . . 52
Sawing the Cube . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
The Two Trains . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
The Arithmetical Landlady . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
10
Tall Men Next Door
Let the heights of the men be given by a, b, c, and d, where a b c d. Then the
statement about the average is expressed as
1
4
(a + b + c + d) = 74 . (1)
The statements about the dierences in height are expressed as
b a = 2
c b = 2
d c = 6 .
From these we see that
b = 2 + a
c = 2 + b = 4 + a
d = 6 + c = 10 + a .
Putting each of these expressions into Equation 1 gives one equation for a of
1
4
(a + 2 + a + 4 + a + 10 + a) = 74 .
This gives a = 70. From that we compute that b = 72, c = 74, and d = 80.
Brothers and Sisters
Let b be the number of boys and g the number of girls in the family. Then a given boy will
have g sisters and b 1 brothers. A given girl will have b brothers and g 1 sisters. We are
told that for boys
g = b 1 ,
and for girls
b = 2(g 1) .
Putting the rst equation into the second we get
b = 2(b 1 1) .
Solving this for b gives b = 4, so that g = 3, giving a total of g + b = 7 children.
Over the Golden Gate
Recall that the average speed is dened as the distance traveled over the time to travel that
distance. If we let L be the length of the Golden Gate bridge (in miles) then the total
11
distance traveled is 2L. The time (in hours) it took to travel this distance is the time it took
to travel each leg (across and back) and is given by
L
40
+
L
25
=
13
200
L.
The average speed is then
2L
13
200
L
=
400
13
= 30.76923 ,
in miles per hour.
The Digits and Square Numbers
In the python code digits and square numbers.py we explicitly enumerate all of the pos-
sible integers using the digits 1-9 (in any order that are perfect squares). We get 30 possible
choices. Some sample values are given by
..., 597362481, 615387249, 627953481, 653927184, ...
The smallest of all possible choices is 139854276 and the largest is 923187456.
Bicycle Thieves
We can think of how to solve this problem by considering the various transactions. When
the bicycle owner gives the cheques to his neighbor he gets +400 to which he has to pay 50 to
the tourist leaving him with 350. When the cheques are found to be bad he has to payback
the neighbor all 400 so using the 350 prot from the bicycle sale he has to come up with an
additional 50 and thus he is at a loss of 50. This has to be coupled with the fact that the
bicycle shop owner now no longer has the bike valued at 300 bringing his total losses to 350.
The Bus Number
To start we note that no single digit number is both a perfect square and a square when
ipped and thus we need to consider two and three digit bus numbers. In the python code
bus number.py we explicitly enumerate all of the possible two and three digit numbers that
include the integers {0, 1, 6, 8, 9} (which become valid integers when ipped). From these
we look for the ones that are a perfect squares both directly and when ipped. Note the
problem states that the bus number is a perfect square when the plate was turned upside
down. A better description of that procedure would be when the license plate is rotated
180 degrees. Thus the digits after ipping up-down must be followed by reversing the order
of the digits. Running this code gives the following
12
Looking for a bus number with 2 digits...
Looking for a bus number with 3 digits...
Was the bus number= 196 961
Was the bus number= 961 196
This indicates that now two digit numbers had the required property while only one three
digit number did 196.
The Hour Hand and the Minute Hand
At midnight both hands of the clock point upwards (towards the 12). The minute hand
rotates at one cycle per hour or 2 radians per hour. Thus the angular location of the
minute hand as a function of time is given by

minute hand
= 2T
hours
.
Here T
hours
is the time from midnight measured in hours. The hour hand rotates one cycle
in 12 hours so its angular location is given by

hour hand
= 2
_
T
hours
12
_
.
We want to know when the two hands are pointing in opposite directions. This will happen
when

minute hand

hour hand
= (2k 1) for k = 1, 2, . . . , 11, 12 .
Here
k = 1 means that the hour hand is between midnight (hour 0) and 1 A.M.
k = 2 means that the hour hand is between and 1 A.M. and 2 A.M.
etc.
k = 11 means that the hour hand is between 10 A.M. and 11 A.M.
k = 12 means that the hour hand is between 11 A.M. and 12 P.M.
Putting in the expressions for
minute hand
and
hour hand
we get
2T
hours
2
_
T
hours
12
_
= (2k 1) .
We can simplify this to get
T
hours
=
6
11
(2k 1) ,
13
the times in hours from midnight when the two hands point in opposite directions. Using
this the location of the minute hand and hour hand (in radians) is then given by

minute hand
= 2
_
6
11
_
(2k 1) =
12
11
(2k 1)

hour hand
=
1
11
(2k 1) .
To convert these to the units of minute from the units of radians we recall that there are 60
minutes in 2 radians thus

hour hand
=
30
11
(2k 1) .
To Catch a Thief
The statement he takes eight steps to every ve of mine means that in one unit of time
the thief takes eight steps while the police ocer takes ve steps. If we let s
t
and s
p
be the
step length (distance traveled in one step) for the thief and the police ocer respectively
then in one unit of time they have traveled 8s
t
and 5s
p
. The statement two steps of mine
are equal to his ve means that
2s
p
= 5s
t
.
As the thief started 27 steps ahead of the ocer his position as a function of time T is given
by
27s
t
+ 8s
t
T .
The position of the police ocer as a function of units of time is given by
5s
p
T .
The ocer will be at the same location (and thus catch the thief) when these two expressions
are equal or
27s
t
+ 8s
t
T = 5s
p
T .
Since we know that s
p
=
5
2
s
t
we can put this into the above to get
27s
t
+ 8s
t
T =
25
2
s
t
T .
Dividing by s
t
and solving for T gives T = 6 units of time which is 5 6 = 30 steps of the
ocer and the thief took 8 6 = 48 steps.
The Gong
The problem statement means that the chime of the clock has its rst strike when the minute
hand hits 12 and then rings six more times (for a total of seven chimes) in seven seconds.
This means that the time between each gong chime is
7
6
seconds. The time needed to chime
ten times total would be nine times this number or
9(7)
6
=
21
2
seconds. This is because the
rst chime starts when the minute hand is at the 12 and we need nine more chimes to make
ten total chimes each one taking
7
6
seconds.
14
Something for the Marmalade
Assume that we start with x oranges then we sell half this amount plus half an orange to
the rst customer or
c
1
=
1
2
x +
1
2
,
leaving us with
x c
1
=
1
2
x
1
2
,
for the next customer. We sell
c
2
=
1
2
_
1
2
x
1
2
_
+
1
2
=
1
4
x +
1
4
,
to the second customer leaving us with
1
2
x
1
2
c
2
=
1
4
x
3
4
.
To the third customer we sell half of this amount plus half an orange or
c
3
=
1
2
_
1
4
x
3
4
_
+
1
2
,
leaving us with none. This means that what we are left with after this sale equals zero or
1
4
x
3
4
c
3
= 0 or
1
4
x
3
4
= c
3
=
1
2
_
1
4
x
3
4
_
+
1
2
.
This last equation can be solved for x to give x = 7. Thus we started with seven oranges.
The Counterfeit Note
As the note turns out to be invalid all transactions would be canceled, i.e. when the
narrator nds that the note is counterfeit he would still demand payment from the woman,
who would then demand payment from the tailor and so on up the chain until we get to the
plumber who would demand another payment from the narrator. This is the same situation
as we started with (before the note was found) and thus there is no value created or lost by
its presence.
Nuts for the Nuts
Removing the 230 peanuts leaves 1000230 = 770 peanuts to split among the three children.
Let the ages of the children be denoted T, R, and J to symbolize their names. Then we are
told that
T + R + J = 17.5 =
35
2
.
15
according to how the nuts are to be distributed we have that Tinku should get
T
T + R + J
=
T
17.5
,
of the 770 and Rinku should get
R
T + R + J
=
R
17.5
,
of the 770 and Jojo should get
J
T + R + J
=
J
17.5
,
of the 770. If we take the number of nuts that Tinku should get and divide it by four this
must equal the number of nuts that Rinku should get divided by three or
_
T
17.5
(770)
_
1
4
=
_
R
17.5
(770)
_
1
3
.
If we take the number of nuts that Tinku should get and divide it by six this must equal the
number of nuts that Jojo should get divided by seven or
_
T
17.5
(770)
_
1
6
=
_
J
17.5
(770)
_
1
7
.
These two equations simplify to
T
4
=
R
3
and
T
6
=
J
7
.
Since the sum of the ages is 17.5 if we write all ages in terms of Tinkus age we get
T +
3
4
T +
7
6
T = 17.5 .
Solving this for T we nd T = 6. Then we have
R =
3
4
T =
18
4
=
9
2
,
and
J =
7
6
T = 7 .
We can now answer the question about how many nuts did each child get. We compute
For Tinku:
T
17.5
(770) =
6
17.5
(770) = 264
For Rinku:
R
17.5
(770) =
9/2
17.5
(770) = 198
For Jojo:
J
17.5
(770) =
7
17.5
(770) = 308 .
16
The Wedding Anniversary
Let M and J be the ages of Mohini and Jayant on their wedding. From the problem we
know that on their wedding M =
3
4
J. Now 12 years later we have that
M + 12 =
5
6
(J + 12) .
Solving these two equations for M and J gives J = 24 and M = 18.
Ill Get it for you Wholesale
This problem has the avor of a problem from Project Euler. While there maybe ways
to solve this problem by hand it is also helpful to be able to automate a solution using a
computer. The approach I took is to greedily add a single coin at a time until all the coins
we have can represent all of the coin values from 1 to 120. At each step, we add the coin that
gives the greatest increase in number of coin sums that we can obtain with the set of coins.
I implemented this in the python code get it wholesale.py. When we run that code we
get the following output
1: 1 ; 1
1: 1 2: 1 ; 3
1: 1 2: 1 4: 1 ; 7
1: 1 2: 1 4: 1 8: 1 ; 15
1: 1 2: 1 4: 1 8: 1 16: 1 ; 31
1: 1 2: 1 4: 1 8: 1 16: 1 32: 1 ; 63
1: 1 2: 1 4: 1 8: 1 16: 1 32: 1 57: 1 ; 120
The output is in the form of X: Y where X is the coin denomination and Y then the
number of coins to have of that denomination at each iteration. This output shows that we
should rst add a coin with value 1 (which can form only one sum), next we add the coin
value of 2 (and then can form sums of 1, 2, 3), next we add the coin value of four (and can
get sums of seven numbers), next we add the coin with a value of 8 (and can get sums of 15
numbers), etc until we end up with the set of coins (one each)
1, 2, 3, 4, 16, 32, 57 .
This is seven coins. These coins will enable us to make change for every amount from 1120.
This is a dierent result than in the back of the book. From numbers in the back of the
book I dont see how one could get a weight of 6 along with other weights. A careful reading
of the problem statement might allow the sum to be within one from the target value (the
statement to the nearest pound) but I still dont see how to get a sum of six. Changes
could be made to the program to incorporate logic like to the nearest pound if desired.
17
The Broken Glasses
Let g be the number of glasses unbroken and b be the number of glasses broken. Then we
know that since we started with 100 glasses that we must have
100 = g + b ,
and that from how much was paid that
3g 9b = 240 .
Solving these two equations gives b = 5 and g = 95.
The Peculiar Number
Lets start by assuming that our number is one digit say d
1
. Then to be our special number
we would have to have d
1
= 3d
1
which implies that d
1
= 0. Thus our number cannot be one
digit. Next assume our number is a two digit number i.e. of the form d
1
d
2
. Then we must
have
3(d
1
+ d
2
) = d
1
10 + d
2
.
This means that
2d
2
= 7d
1
.
If we take d
1
= 2 and d
2
= 7 the above is true. Thus one number with this property is 27.
Make a Century
This problem has the avor of a problem from Project Euler. While there maybe ways
to solve this problem by hand it is also helpful to be able to automate a solution using
a computer. The approach I took was to simply enumerate all possible fractions of the
suggested type and then see which ones evaluated to 100. This is implemented in the python
code make a century.py. When we run that code we get the following output
1 fractions found with 2 initial digits: 91 5742/638
2 fractions found with 2 initial digits: 91 5823/647
3 fractions found with 2 initial digits: 91 7524/836
4 fractions found with 2 initial digits: 94 1578/263
5 fractions found with 2 initial digits: 96 1428/357
6 fractions found with 2 initial digits: 96 1752/438
7 fractions found with 2 initial digits: 96 2148/537
8 fractions found with 2 initial digits: 81 5643/297
9 fractions found with 2 initial digits: 81 7524/396
10 fractions found with 2 initial digits: 82 3546/197
1 fractions found with 1 initial digits: 3 69258/714
18
The Perplexed Postal Clerk
Let n be the number of 2 paisa stamps we would hand over. Then 6n is the number of 1
paisa stamps we would hand over. Next let m be the number of 5 paisa stamps we would
hand over. Then we must have the total cost of all stamps bought equal to 75 paisa or
75 = 2n + 6n + 5m or 75 = 8n + 5m.
The solution to the above equation with both n and m positive integers where n is as large as
possible will be when n = 5 so that 8n = 40 and to satisfy the above we must have 35 = 5m
or m = 7. Thus in summary we should sell 5 two paisa stamps, 30 one paisa stamps, and 7
ve paisa stamps.
The Mystery of the Missing Paisa
The 30 three for one marbles should bring 10 Paise when all sold, while the 30 two for one
marbles should bring 15 Paise when all sold. Thus the total value of these 60 marbles when
combined should be 25 Paise, which means that each marble should cost
25
60
=
5
12
= 0.416666
of a Paise. If we sell all 60 marbles at this price we will indeed get 25 Paise (as the two
women expected). If in fact we sell them at the price suggested ve marbles for two Paise
or
2
5
= 0.4 since
2
5
<
5
12
they are selling them too cheap. The dierence in price (per
marble)
5
12

2
5
=
1
60
,
is where the missing Paise can be found. This is because when we sell 60 marbles the loss
to selling them too cheaply is given by 60
_
1
60
_
= 1.
Walking back to Happiness
Since the man walking saved ten minutes from the total trip time, the point at which the
women meets him must have been ve minutes from HS. This is because (by the man walking)
she avoided having to go from the meeting point to HS and from HS back to the meeting
point (which would have taken ten minutes to do). Thus she only needed ve more minutes
to get to HS where she would have arrived at 6 P.M. like normal and so she meet him at 5:55
P.M. Since the man began walking at 5 P.M. he must have been walking for 55 minutes.
On the Line
At each station a person must be able to buy tickets for travel from that station to any of
the other 24 stations. Since there are 25 total stations there must be 25(24) = 600 total
tickets of dierent types.
19
The Legacy
Let m be the amount the mother (our Aunt) receives, d be the amount each daughter should
receive, and s the amount that each son should receive. Then from the problem statement
we have that
d = 2m
s = 3d = 6m.
Let n
d
be the number of daughters and n
s
be the number of sons that exist in this family.
Then the will states that
1920000 = m + n
d
(2m) + n
s
(6m) = m(1 + 2n
d
+ 6n
s
) .
As we are not told values for n
d
and n
s
there should be multiple solutions. If we assume
that n
d
and n
s
must be such that all numbers are integers (i.e. m is an integer) then both
(n
d
, n
s
) = (4, 1) and (n
d
, n
s
) = (1, 4) have m = 128000. If we assume that n
d
= n
s
= 1 then
we would nd m = 213333.33, which does not match the answer in the back of the book.
Down the Escalator
Let w be the velocity of the escalator in steps per second. Then from the problem statement
we are told that
30w + 26 = L
18w + 34 = L,
where L is the length of the escalator in steps. Solving the above two equations gives w =
2
3
.
Putting this back into either of the two equations above gives L = 46 steps for the total
length.
The Chess Board
This is an impossible task. To show that it is impossible we will assume it is possible to
cover the cornerless board with 31 tiles and show that this leads to a contradiction. To do
this rst note that whatever color the leftmost corner of the board is the rightmost corner is
the same color. For ease of explanation lets assume that it is black. Since we are assuming
that we can cover the board with 31 tiles consider the state of the board before we place
the last tile. In that case we will have placed 30 tiles and as each individual tile is of length
two it must cover both a black square and a white square. Thus with these 30 tiles we have
covered 30 black squares and 30 white squares total. Since the two corner squares are black
(and we are not covering them) we have yet to cover two white squares with the last tile.
This is impossible since no matter how we place the 31st tile it will cover one black and
one white square and never be able to cover two squares of the same color. Thus it is not
possible to perform the covering suggested.
20
A Game of Cats and Mice
Let c be the number of cats and let m
i
be the number of mice killed by the ith cat killed.
Then we are told that
c

i=1
m
i
= 999919 .
Now each m
i
is the same so the above becomes mc = 99919, thus m and c are factors of
99919, where we are also told that c = 1 and c = 999919. Using the UNIX factor command
to get the prime factors of this number we get
$ factor 999919
999919: 991 1009
Since we are also told that m > c i.e. each cat killed more mice than there were cats we
have m = 1009 and c = 991.
The Wheels
From the problem statement we can conclude that
96
C
f
4 =
96
C
h
(2)
96
_
3
2
_
C
f
4 =
96
_
4
3
_
C
h
. (3)
Where C
f
and C
h
are the circumference of the fore and hind wheel (in feet) respectively. We
can solve Equation 2 for
96
C
f
and put this expression into Equation 3 where we get
2
3
_
96
C
h
+ 4
_
2 =
3
4
_
96
C
h
_
.
Solving the above for C
h
gives C
h
= 12. Putting this value into Equation 2 and solving for
C
f
gives C
f
= 8.
Blow How Blow Cold
From the given two points or by remembering the formula for Fahrenheit to Celsius temper-
ature conversion we have that
F =
9
5
C + 32 .
If we look for the value where F = C then we need to solve C =
9
5
C + 32 for C. We nd
C = 40.
21
0 1 2 3 4
0
1
2
3
4
x
y
Figure 1: The painted area (in gray) for the painted window problem.
The Llama Race
If we let the time taken to run each of the quarter miles (in minutes) be given by T
1
, T
2
, T
3
,
and T
4
. Then from the problem statement we have that
T
1
+ T
2
+ T
3
= 6.75 (4)
T
1
+ T
2
= T
3
+ T
4
(5)
T
3
= T
4
. (6)
We want to know the value of T
1
+ T
2
+ T
3
+ T
4
. Putting Equation 6 into 5 we get
T
1
+ T
2
= T
3
+ T
3
= 2T
3
.
If we put this into Equation 4 we get
3T
3
= 6.75 so T
3
= 2.25 .
Our desired output is then
(T
1
+ T
2
+ T
3
) + T
4
= 6.75 + 2.25 = 9 ,
minutes to run the whole mile.
The Painted Window
If the window is painted like shown in Figure 1 then the distance between the top and bottom
of the unpainted window is four feet and the distance between the left and right side of the
22
unpainted window is also four feet. Note that the painted area is
4
_
1
2
(2)(2)
_
= 8 ,
which is one-half of the area of the original window of 4
2
= 16 as required.
Animals on the Farm
To start let n be the number of animals in each of the ve droves of animals, and let n
d,cow
,
n
d,sheep
, and n
d,pig
be the number of cows, sheep, and pigs respectively that each of the eight
dealers d = 1, 2, . . . , 7, 8 bought. Then we are told that we sold all of our animals or
5n =
8

d=1
n
d,cow
+
8

d=1
n
d,sheep
+
8

d=1
n
d,pig
, (7)
and how much money we made for the sale
285 = 17
8

d=1
n
d,cow
+ 2
8

d=1
n
d,sheep
+ 2
8

d=1
n
d,pig
. (8)
Now we can use Equation 7 to solve for

8
d=1
n
d,sheep
+

8
d=1
n
d,pig
and put that into Equa-
tion 8. When we do that we get
285 = 17
8

d=1
n
d,cow
+ 2
_
5n
8

d=1
n
d,cow
_
= 15
8

d=1
n
d,cow
+ 10n. (9)
Thus solving for the sum of the total number of cows we get
8

d=1
n
d,cow
=
285 10n
15
. (10)
We dont know the value of n but we know that n 1 and it must be a number such that the
numerator in the above fraction is divisible by 15. The largest possible value that n could
be would be when

8
d=1
n
d,cow
= 0 since if n were larger then by Equation 9 this sum would
have to be negative. This means we only need to consider n in the range 1 n
285
10
= 28.
We can print the values of n,

8
d=1
n
d,cow
and

8
d=1
n
d,sheep
+

8
d=1
n
d,pig
with the simple
python code
for n in range(1,28+1):
if ( 285 - 10*n ) % 15 == 0 :
print "n= %5d, sum_cows= %4d, sum_sheep + sum_pig= %4d" % (n, (285 - 10*n)/15, 5*n - (285 - 10*n)/15)
Which gives us
23
n= 3, sum_cows= 17, sum_sheep + sum_pig= -2
n= 6, sum_cows= 15, sum_sheep + sum_pig= 15
n= 9, sum_cows= 13, sum_sheep + sum_pig= 32
n= 12, sum_cows= 11, sum_sheep + sum_pig= 49
n= 15, sum_cows= 9, sum_sheep + sum_pig= 66
n= 18, sum_cows= 7, sum_sheep + sum_pig= 83
n= 21, sum_cows= 5, sum_sheep + sum_pig= 100
n= 24, sum_cows= 3, sum_sheep + sum_pig= 117
n= 27, sum_cows= 1, sum_sheep + sum_pig= 134
Each of these (except the rst) is a possible solution. To nd which one is correct recall that
the number of animal bought by each dealer was the same. We can use this information to
write Equation 7 by summing over the animals bought by each dealer as as
5n =

x{cow,sheep,pig}
n
1,x
+

x{cow,sheep,pig}
n
2,x
+ +

x{cow,sheep,pig}
n
8,x
= 8m,
where m is the number of animals bought by each dealer. Thus 5n must be divisible by eight.
The only value of n where that is true is when n = 24 so m = 15. Summarizing everything
thus far we have that the total number of animals that we had in all was 5(24) = 120 and
from the python output that the total number of cows was three, and that a constraint on
the total number of sheep and pigs to be that they sum to 117.
Which is the Better Bargain?
From the problem statement the rst frock is worth
_
8
7
_
(35) = 40, while the second frock is
worth
_
7
6
_
(30) = 35. The percent gain we make by buying the rst and second frock is then
given by
40 35
35
=
1
7
= 0.1428
35 30
30
=
1
6
= 0.1666 .
The better buy is the second frock by
1
6

1
7
= 0.0238 or almost 2.4%.
Walking all the Way
Let the distance I walked from Bangalore be given by L
m
(m for me) and the distance my
friend walked from Tumkur as L
f
. Let the velocity that I and my friend walked be given by
v
m
and v
f
. Then at the point we meet each other I have walked four hours and ve minutes
and my friend has walked two hours and ve minutes (since we meet at 4 : 05 P.M.) and
24
thus we have
L
m
= v
m
_
4
5
60
_
(11)
L
f
= v
f
_
2
5
60
_
. (12)
Now let T be the remaining amount of time each person walks till they reach their nal
destination (we are told that this is the same for each person). Then in that time I have to
walk L
f
and my friend has to walk L
m
to get to their destinations. This means that we have
L
m
= v
f
T (13)
L
f
= v
m
T . (14)
If we equate the Equation groups 11 13 and 12 14 we get
L
m
= v
m
_
4
5
60
_
= v
f
T so v
f
=
1
T
_
4
5
60
_
v
m
L
f
= v
f
_
2
5
60
_
= v
m
T .
Putting the expression for v
f
in the top equation into the bottom equation we get
_
4
5
60
__
2
5
60
_
v
m
= v
m
T
2
so T =
175
60
.
This is two hours and 55 minutes. As T is measured from the meeting time 4:05 they both
arrive at their destinations at 7 P.M.
Something for Prot
Consider the sequence of dollar amounts in and out during all of the transactions. For
example, when we rst buy we are down 60, when we rst sell we get +70 etc. This
sequence is
60 + 70 80 + 90 = 20 ,
i.e. a net prot of 20.
The Digital Game
Let the two digit number have the rst digit d
1
and the second digit d
2
so the number will
be d
1
d
2
. We are told that d
2
= d
1
4. Thus the possible number to consider must be one
of the following
40, 51, 62, 73, 84, 95 .
When we sum the digits in the numbers above and divide each number by that sum we see
that the number 84 divided by 12 is 7 as required. Thus the number we are looking for is
84.
25
The Faulty Machine
Assume that F is the weight of a correctly manufactured ywheel. As our rst measurement
we rst take one ywheel from each machine and weight all ten of them together. From this
total we subtract 10F. This dierence will give the amount by which one of the machines
is making the part too heavy ( > 0) or too light ( < 0). Next we can take one ywheel
from machine one, two from machine two, three from machine three etc. up to ten ywheels
from machine ten. We take all of these ywheels and weight them once. Then all of these
should weight
F + 2F + 3F + + 9F + 10F = 55F .
To the weight we actually get when we weight them we subtract 55F and divide by the
obtained before. The number we get tells us the machine that is making the faulty parts.
The Number and the Square
See the python code the number and the square.py where we explicitly enumerate over all
possible three digit numbers we could have have for the rst, second, and third row. When
we run that code we get the values
192 384 576
219 438 657
273 546 819
327 654 981
The rst, second, and third columns are the three digit number in the rst row, second, and
third rows respectively. All four of these triples of numbers satisfy the requirements of the
problem.
Squares and Right Angles
We can produced the required diagram by drawing a tilted square in a square just as in
Figure 1 where we draw the outer square with four lines and then the inner square in an
additional four lines. These eight lines give the desired number of squares and triangles.
The Dishonest Merchant
Let n
32
and n
40
be the number of kilos of the coee that cost 32 and 40 rupee per kilo that
we bought. Then we paid
32n
32
+ 40n
40
,
26
for the coee that we sold. Since we bought a total of 100 kilos we have n
32
+n
40
= 100 and
the prot on selling this 100 kilos was 25% more than we paid or
43(100) = 1.25(32n
32
+ 40n
40
) .
Thus we have two equations and two unknowns which we can solve to nd n
32
= 70 and
n
40
= 30.
For the Charities
Let p be the amount of money in the purse originally. Then after the boys we have
p
_
1
2
p + 1
_
=
1
2
p 1 ,
in our purse. After the women we have
1
2
p 1
_
1
2
_
1
2
p 1
_
+ 2
_
=
1
4
p
5
2
,
in our purse. After the religious group I have
1
4
p
5
2

_
1
2
_
1
4
p
5
2
_
+ 3
_
=
1
8
p
17
4
,
in our purse. Since this must be equal to one we can solve for p to nd p = 42 rupee when I
started.
The Number Game
If we let x be the rst number the the problem statement means that
x(x + 1)(x + 2)
x
+
x(x + 1)(x + 2)
x + 1
+
x(x + 1)(x + 2)
x + 2
= 74 .
We can simplify the left-hand-side to get
(x + 1)(x + 2) + x(x + 2) + x(x + 1) = 3x
2
+ 6x.
Thus we get the quadratic equation
3x
2
+ 6x 72 = 0 .
This has two roots x = 6 and x = 4, so the three numbers that work are (6, 5, 4) and
(4, 5, 6).
27
The Sari and the Blouse
Let s and b be the cost of the sari and the blouse respectively. Then we have that
s + b = 110 and s = b + 100 .
Putting this second equation in the rst gives 2b + 100 = 110 so b = 5. Using this we have
that s = 105.
The Weight of the Block
From the problem if B is the weight of the block then we must have
B =
3
4
+
3
4
B or B = 3 .
Lucrative Business
We would compute
(1 + 0.5)
18/3
2000 = 22781.25 .
The Three Containers
This is a type of problem that can be formulated as a search problem. See [1] for a de-
scription of these types of problems and how to solve them. I implemented a graph search-
ing algorithm following the above reference in the python code the three containers.py.
When we run that code we get the following output
state= (0, 13, 7); from 1 pour 13 into 0 to get state= (13, 0, 7)
state= (13, 0, 7); from 2 pour 6 into 0 to get state= (19, 0, 1)
state= (19, 0, 1); from 0 pour 13 into 1 to get state= (6, 13, 1)
state= (6, 13, 1); from 1 pour 6 into 2 to get state= (6, 7, 7)
state= (6, 7, 7); from 2 pour 7 into 0 to get state= (13, 7, 0)
state= (13, 7, 0); from 0 pour 6 into 1 to get state= (7, 13, 0)
state= (7, 13, 0); from 1 pour 12 into 0 to get state= (19, 1, 0)
state= (19, 1, 0); from 0 pour 7 into 2 to get state= (12, 1, 7)
state= (12, 1, 7); from 2 pour 7 into 1 to get state= (12, 8, 0)
state= (12, 8, 0); from 0 pour 7 into 2 to get state= (5, 8, 7)
state= (5, 8, 7); from 2 pour 5 into 1 to get state= (5, 13, 2)
state= (5, 13, 2); from 1 pour 13 into 0 to get state= (18, 0, 2)
state= (18, 0, 2); from 2 pour 2 into 1 to get state= (18, 2, 0)
state= (18, 2, 0); from 0 pour 7 into 2 to get state= (11, 2, 7)
28
state= (11, 2, 7); from 2 pour 7 into 1 to get state= (11, 9, 0)
state= (11, 9, 0); from 0 pour 7 into 2 to get state= (4, 9, 7)
state= (4, 9, 7); from 2 pour 4 into 1 to get state= (4, 13, 3)
state= (4, 13, 3); from 1 pour 13 into 0 to get state= (17, 0, 3)
state= (17, 0, 3); from 2 pour 3 into 1 to get state= (17, 3, 0)
state= (17, 3, 0); from 0 pour 7 into 2 to get state= (10, 3, 7)
While this solution seems less ecient than the one that Shakuntala produces one could
argue that it would be quite tedious to construct a solution to this problem by hand. The
above code will solve it for you.
On the Way to Market
If the other people were leaving the market then there is only one person going to the market.
A Matter of Denomination
From the given statements our fraction would have the form
n
n+6
. If we add six to the
denominator we would get the fraction
n
n+14
if this is to equal
1
3
then we have
n
n + 14
=
1
3
,
so solving for n we get n = 7. Thus the original fraction is
7
13
.
A Problem of Socks
If we draw two socks we might nd that we have two dierent colors. In that case, if we
draw a third sock it must match one of the two colors from the ones that we have already
drawn. Thus we must draw three socks to be sure we have a matching pair.
A Fair Division
It will help to understand what to do after Rekha dies to understand what was to be done
in the situation where she does not die. In that case since the fractions given dont sum to
one we would need to compute
1
3
+
1
4
+
1
5
=
47
60
,
29
and so the will would then specify that we give the fraction
1/3
47/60
=
20
47
to Rashmi
1/4
47/60
=
15
47
to Mala
1/5
47/60
=
12
47
to Rekha ,
of the 100 acres to each daughter. If Rekha dies we would then compute
1
3
+
1
4
=
7
12
,
and so the fractions of the 100 acres would now be specied as
1/3
7/12
=
4
7
to Rashmi
1/4
7/12
=
3
7
to Mala .
Mathematics and Literature
This problem can readily be solved by considering properties of sets. If we let M represent
the event that a person has some training in mathematics and L the event that a person
has some training in literature then we are told that
N(M

) = 10 ,
where N represents the operator denoting how many are in the event that follows. Here M

and L

are the events that a person does not have training in mathematics and literature
respectively. We are also told that
N(M) = 70
N(L) = 82 .
Then since by De Morgans Laws we can write M

= (M L)

we have that
N(M L) = 100 N(M

) = 90 .
Putting what we know into the set identity
N(M L) = N(M) +N(L) N(M L) ,
gives 90 = 70 + 82 N(M L) so N(M L) = 62.
30
Heads I Win Tails I Loose
Assume at the timestep n the gambler has V
n
money in his pocket. Then if he looses a bet
the money in his pocket will go to
V
n+1
=
_
1
2
_
V
n
.
If he wins the bet the money in his pocket goes to
V
n+1
=
_
1 +
1
2
_
V
n
=
_
3
2
_
V
n
.
Iterating the above dierence equations back to the start of the betting (when the gambler
had V
0
money in his pocket) since we know that we must play an even number of games (say
2m) and we have an equal number of wins and losses we get
V
2m
=
_
1
2
_
m
_
3
2
_
m
V
0
.
The rst fraction in the product on the right-hand-side of the above represents the gamblers
losses while the second fraction represents his wins. Since the above is equal to
V
2m
=
_
3
4
_
m
V
0
,
and
3
4
< 1 the gambler will suer a net loss i.e. V
2m
< V
0
.
A Problem from Lilavati
By following the statements given in the problem when operated on the unknown number x
we would arrive at the following equation
_
__
1
1
3
_ _
1
7
_ _
1 +
3
4
_
(3x)

2
52 + 8
10
= 2 .
Solving the above for x gives x = 28.
Up the Ladder
The description of the ladder is that it is the hypotenuse of a right triangle with legs of
lengths 40 and 9. Thus by the Pythagorean theorem we have that the length of the ladder
L needs to be
L =

9
2
+ 40
2
= 41 ,
feet long.
31
Pigs and Ducks
Let p and d be the number of pigs and ducks respectively. Then we are told that
2p + 2d = 60 for the count of eyes
4p + 2d = 86 for the count of feet .
Solving these two equations gives p = 13 and d = 17.
The Egg Vendor and His Eggs
Let x be the number of eggs that Rasool had. From the problem statement we know that
50 x 100 and that
x mod 2 = 0
x mod 3 = 0
x mod 5 = 3 .
From this information we can set up a simple python loop to look for the numbers that
satisfy all the above conditions
for ne in range(50,100+1):
if ( ne % 2 == 0 ) and ( ne % 3 == 0 ) and ( ne % 5 == 3 ) : print ne
This loop gives 78 for the number of eggs. If the eggs are worth 50 paise each then Rasool
would have been paid 78(0.5) = 39 rupee.
Some Luck!
Let x be the value of a sheep. Then the money that Radha makes when she sells her sheep
will be 20x. Since this is too low by the amount of 150 we must add this amount to her
20x to get an amount of money worth half of the total sale which is 50x or
20x + 150 =
_
50
2
_
x = 25x.
Thus 5x = 150 so x = 30.
The Trains and the Falcon
The falcon will y back and forth until until the two trains collide. Since the two trains start
50 miles apart and are each traveling at 25 miles per hour they are approaching each other
at 25 + 25 = 50 miles per hour. Thus the trains will collide in exactly one hour. All of this
time the falcon is ying at 100 miles per hour. Thus the falcon will y for 100 miles.
32
First 1/2 Second 1/2 Year Total Cumulative Total
1000 1000 2000 2000
1150 1150 2300 4300
1300 1300 2600 6900
1450 1450 2900 9800
Table 1: The payments received in the 300 rupee per year case
First 1/2 Second 1/2 Year Total Cumulative Total
1000 1100 2100 2100
1200 1300 2500 4600
1400 1500 2900 7500
1600 1700 3300 10800
Table 2: The payments received in the 200 rupee per year case
Which is more Lucrative?
In the 300 rupee per year case we have to work an entire year and then we get the raise
which is distributed in 150 rupee each half-year. We evaluate the payments received under
this option in Table 1. In the 200 rupee per year case once we have worked half a year we
get the 100 rupee raise applied to the next half-year. We evaluate the payments received
under this option in Table 2. We see that the total payments are larger in the 200 rupee a
year (payed each 1/2 year) case.
Little Mammu and the Marbles
Let m and n be the number of marbles that Mammu and Nawal initially have. Then we are
told that
n 1 = m + 1
2(m1) = n + 1 .
Solving the above we nd m = 5 and n = 7.
The Curious License Plate
Rather than perform this search by hand I coded it up in the curious license plate.py.
When we run that script we print our license plate and its ipped representation, which
we nd to be
10968 89601
33
Lose or Gain
Let x and y be the prices paid for each lathe. Then we know that
0.8x = 600 so x = 750 ,
and
1.2y = 600 so y = 500 .
Then on the total sale of both lathes we made
(750 + 600) + (500 + 600) = 150 + 100 = 50 ,
for a net loss.
A Problem of Combination
Consider the worst case when drawing the marbles. If we draw two marbles then they can
certainly dier in color. If we draw a third we could have drawn three marbles of dierent
colors. When we draw the fourth marble however there is no way to not draw a marble with
a color equal to that of one of the already drawn marbles. Thus four is the number.
The Special Number
We are told that our number x is such that
2x
1
2
x = 45 .
Solving for x we have that x = 30.
Sawing the Tree Trunk
To make twelve pieces we need eleven cuts. Thus it should take eleven minutes.
The Bigamist
If the trains were running in such a way that they arrived very close together in time say
one after the other by only a few minutes. In that case only in the rare case when he arrived
at the station during a time between the two trains would he take the one that came shortly
after the rst one. Most of the time he would take the rst train.
34
The Split
Let the two parts be denoted as p
1
and p
2
. Then we have
p
1
+ p
2
= 34 and
4
7
p
1
=
2
5
p
2
.
From the second relationship we have p
1
=
7
10
p
2
. Putting this into to the rst equation gives
7
10
p
2
+ p
2
= 34 .
Solving for p
2
we get p
2
= 20 which then gives p
1
= 14.
At the Fete
From the problem statement we have that
5 writer = 4 doctor
12 doctor = 9 dentist
6 dentist = 8 banker .
Where the variables above represent the amount that was spent by an individual in the given
profession. We also know how much was spent in total or
1330 = 25 writer + 20 doctor + 18 dentist + 12 banker . (15)
This is four equations and four unknowns which can be solved. We nd
writer = 14
doctor = 17.5
dentist = 23.3333
banker = 17.5 .
To nd out how much each group spend we would multiply each of the numbers above by
the corresponding coecient in Equation 15 to get
writers spent = 350
doctors spent = 350
dentists spent = 420
bankers spent = 420 .
35
Multiplying Bacteria
Since the bacteria doubles every day and starts with a single one we have that the number
of bacteria is given by N
n
= 2
n1
for n 1 where n is the day number. We are told that
the container is full on day 10 where
N
10
= 2
9
,
The container will be half-full when N
n
= 2
8
which happens when n = 9 or the ninth day.
A Puzzling Number
From the description if x is the unknown number then we must have
x
1
3
x
1
10
x
1
12
x = 58 .
Solving for x we get x = 120.
What a Coincidence!
To start we will assume that the amount of money each of the men has initially is given by
the variables
a, b, c, d, e, f, g .
Then according to the problem after the rst round where Arun wins each of the players
will now have
a b c d e f g, 2b, 2c, 2d, 2e, 2f, 2g .
After the second round where Binoy wins we would need to double the amount of money
that each person has (excluding Binoy) and subtract that amount from Binoy to get the
amount each person has at the end of this round. This algorithm would needed to be
repeated as each of the dierent player wins. This could be done by hand or we can use
Mathematica to perform the algebra needed at each step. Once we nish with the seven
steps of the game we will end up with seven expressions for the amount of money in each
persons pocket. Since we are told that this amount of money is equal to 32 rupees we end
up with seven equations to solve for the unknowns a, b, c, d, e, f, and g representing the
amount of money each person has initially. When we do that we get the values
a = 112.35
b = 56.25
c = 28.25
d = 14.25
e = 7.25
f = 3.75
g = 2 .
36
See the Mathematica le what a coincidence.nb where steps discussed above are per-
formed.
The Idler
Lets consider how much Ram Rakhan should make if he works each day. Since he gets 240
rupees for 30 days of work we see that he makes
240
30
= 8 ,
rupees per day. For each day that Ram Rakhan does not work he must pay back 10 rupees
per day (notice that this is larger than what he makes per day). If we assume that Ram
Rakhan works only x days then he will not be working for 30 x days. Now since no money
changes hands at the end of the month the amount that should be paid to Ram Rakhan by
Gulab Singh must equal the amount that Ram Rakhan should pay Gulab Singh or
8x = 10(30 x) .
Solving the above for x we get x = 16
2
3
days.
A Bargain in Guavas
In this problem let n be the number of guavas we initially bought at 1.2. Then since
1.2
n
is
the price per guava the price per dozen guava is twelve time that or
14.4
n
. When we added
two more guava the price per dozen now becomes the smaller number
14.4
n+2
. Since we are told
that the vendor lost 0.1 more with this transaction than in the previous one we must have
14.4
n

14.4
n + 2
= 0.1 .
The above can be simplied to a quadratic equation in n given by
n
2
+ 2n 288 = 0 .
Solving this we nd n = 16 and n = 18. The only acceptable answer is n = 16 as the
number of guavas bought originally.
The Mathematical Shepherd
Let the total number of sheep the shepherd has be denoted as m and we split his sheep up
into two (non equal) parts denoted m
1
and m
2
where we assume that m
2
> m
1
0. Since
the dierent of m
2
and m
1
must equal the dierence of its squares we have that
m
2
m
1
= m
2
2
m
2
1
= (m
2
m
1
)(m
2
+ m
1
) ,
37
when we factor. Since m
2
= m
1
we can divide both sides by m
2
m
1
to get
1 = m
2
+ m
1
.
Since the numbers m
1
and m
2
represent sheep we cannot have a fraction number of we must
have m
2
= 1 and m
1
= 0 so the shepherd has only one sheep.
Father and Son
If we let f and s be the fathers and sons ages respectively we get
f = 4s and
1
2
(f + 30) = s + 30 ,
for the two statements given. If we put the rst equation into the second equation and solve
for s we get s = 15 and f = 60.
A Date to Reckon With
This is a problem where we want to count the number of days in a given year where the
product of the day number and the month number equals the two digit year number. Rather
than do this computation by hand we let the computer do the hard work. In the python
script a date to reckon with.py we nd that in 1924 and 1960 we have seven such dates.
There are several years with six such dates: 1912, 1930, 1936, 1948, and 1972.
The Number Puzzle
If we let the two numbers be a and b then from the problem statement we are told that
a b = 3 and a
2
b
2
= 51. Factoring this second expression we get
(a b)(a + b) = 51 ,
But since we know that a b = 3 the above is equal to a + b =
51
3
= 17. Solving these two
equations for a and b we get a = 10 and b = 7.
Hearts Apart
Let v
m
and v
w
be the velocity of the man and women (in miles per hour) respectively. Then
we are told that v
m
= 4 and v
w
= 3. They will meet in T hours after they start walking
where
v
m
T = 63 v
w
T or T = 9 .
Thus the man must have traveled 4(9) = 36 miles and the women 3(9) = 27 miles.
38
A Problem of Age
Let the age of the husband be denoted by the two digit number d
1
d
2
where d
1
and d
2
are
the rst and second digits in his age i.e. 0 d
i
9. Then from the problem d
2
d
1
is the age
of the woman. As a base ten number we have that the husbands and wifes ages are
d
1
d
2
= 10d
1
+ d
2
and d
2
d
1
= 10d
2
+ d
1
.
The dierence in their two ages is then
10d
1
+ d
2
(10d
2
+ d
1
) = 10(d
1
d
2
) + (d
2
d
1
) = 9(d
1
d
2
) .
The sum of their two ages is then
10d
1
+ d
2
+ 10d
2
+ d
1
= 10(d
1
+ d
2
) + (d
2
+ d
1
) = 11(d
1
+ d
2
) .
Since we are told that the dierence in their ages is
1
11
of the sum of their ages we have
9(d
1
d
2
) = d
1
+ d
2
or 4d
1
= 5d
2
.
Since d
1
and d
2
are integer digits to make the above true we need to take d
1
= 5 and d
2
= 4.
The husbands age is then 54 and the wifes age is then 45.
The Passenger Train and the Goods Train
I took the problem to mean that the passenger train takes three times as long (or 3T) to
pass the goods train when both trains are running in the same direction. When both are
running in the opposite direction the passenger train will pass the goods train in a time T.
If we let v
p
and v
g
be the velocities of the passenger and the goods trains respectively and
L
g
be the length of the goods train then since they pass in T when running in the same
direction we must have
(v
g
+ v
p
)T = 2L
g
.
Notice that the right-hand-side is twice the length of the goods train, since only after that
much length have the two trains passed each other). When they are running parallel it takes
longer and we have
(v
p
v
g
)(3T) = 2L
g
.
Setting these two expressions for 2L
g
equal to each other we get
(v
p
+ v
g
)T = 3(v
p
v
g
)T .
Dividing by T and v
g
we get
v
p
v
g
+ 1 = 3
_
v
p
v
g
1
_
.
Solving for the fraction
vp
vg
we get
v
p
v
g
= 2 .
39
The Circular Numbers
Since in this problem we are simply looking for an ordering of the numbers 1, 2, . . . , 9, 10 that
satisfy the sum requirement we can have a computer do the searching for us. In the python
code the circular numbers.py we enumerate all possible combinations that possess the
desired property. Note that many of these answers would be cyclical permutations of each
other. One would need to remove these duplicates to get just the set of possible number
ordering. When we run that code (and look for solutions that have the rst and second
labels 7 and 1) we get
python ../Code/the_circular_numbers.py | grep "(7, 1"
(7, 1, 8, 4, 10, 2, 6, 3, 9, 5)
(7, 1, 8, 5, 9, 2, 6, 3, 10, 4)
(7, 1, 9, 3, 10, 2, 6, 4, 8, 5)
(7, 1, 9, 5, 8, 2, 6, 4, 10, 3)
(7, 1, 10, 3, 9, 2, 6, 5, 8, 4)
(7, 1, 10, 4, 8, 2, 6, 5, 9, 3)
(7, 10, 1, 4, 5, 8, 9, 2, 3, 6)
(7, 10, 1, 6, 3, 8, 9, 2, 5, 4)
(7, 10, 3, 2, 5, 8, 9, 4, 1, 6)
(7, 10, 3, 6, 1, 8, 9, 4, 5, 2)
(7, 10, 5, 2, 3, 8, 9, 6, 1, 4)
(7, 10, 5, 4, 1, 8, 9, 6, 3, 2)
Notice that the sixth entry is the same as that provided in the back of the book.
Rice for the Festival
We are told that
100 = 3n
old
+ 2n
young
+
1
2
n
child
.
We want to nd integers that make the above equation true. There are many possible values
that will work. In python code rice for the festival.py when we nd the rst ten strictly
positive solutions look like
1 1 190
1 2 186
1 3 182
1 4 178
1 5 174
1 6 170
1 7 166
1 8 162
40
1 9 158
1 10 154
1 11 150
Many other solutions are possible.
Swarm of Bees
If we let B be the number of bees from the problem statement we would have
_
B
2
+
8
9
B + 2 = B.
We can write this as a quadratic equation in

B as
1
9
B
1

B 2 = 0 .
Solving this for

B (and then squaring) we nd B = 72.


Story of the Three Farmers
Let m, c, and g be the amount of pasture a mule, cow, and a goat respectively eat per unit
time and let T be the amount of time the rst man has grazed his nine mules. Then in the
problem statement we are told that
6c = 4m (16)
10g = 3c . (17)
The second man grazed his twelve cows for 2T and the third man grazed his goats (an
unknown number of them) for 2
1
2
(2T) =
5
2
(2T) = 5T. Since the third man payed 1/2 of the
cost he payed 500 rupees and if n
g
represents the number of goats he grazed then we must
have
500 = 5Tn
g
g .
The other two farmers must have payed the rest of the cost or
9mT + 12(2T)c = 500 . (18)
Notice that by multiplying by T in Equations 16 and 17 we can get two equations in the
three unknowns mT, cT, and gT or the product of the rate each animal eats grass and the
length of time T. This gives us three equations and three unknowns
4mT 6cT = 0
3cT 10gT = 0
9mT + 24cT = 500 .
41
Solving for these three unknowns gives us
mT = 20
cT =
40
3
gT = 4 .
Thus the rst man had to pay 9mT = 180, the second man had to pay 24(cT) = 320, and the
number of goats that the third man had was such that 500 = 5n
g
(gT) = 5(4)n
g
or n
g
= 25.
What Were You Doing When the Lights Went Out?
Let L be the initial length of both candles. If we let v
1
and v
2
be the rates at which each
candle burns then from the problem statement since the rst burns in four hours and the
second in ve we have that
L
v
1
= 4 and
L
v
2
= 5 ,
hours. Since the rst candle burns quicker (in four hours vs. ve hours) we know that
v
1
> v
2
. Assume that T is the amount of time the lights were out and let L
1
and L
2
be the
lengths of the rst and second candle after each had been burning for the amount T. Since
the rst candle burns quicker we would expect L
1
< L
2
and in fact are told that
L
2
= 4L
1
. (19)
Since each candle started at a length of L and was burning for T time we have
L
1
= L v
1
T and L
2
= L v
2
T .
Using the above in Equation 19 and we have that
L v
2
T = 4L 4v
1
T .
We can solve the above for T to get
T =
3L
4v
1
v
2
=
3
4v
1
L

v
2
L
=
3
4
_
1
4
_

1
5
=
15
4
= 3.75 ,
hours.
Sta and the Steeple
This is a problem involving proportional triangles. If we let h be the height of the steeple
then we should have
h
120
=
5
2
so h = 300 .
42
Up the Stream Down the Stream
Let v
s
be the velocity of the stream and let v
b
be velocity of the crew boat such that if there
was no stream the boat would move forward at a speed v
b
. We are told that to row upstream
(against the current) takes T
u
= 8
4
7
minutes. Let L be the length of the river. Then since
we are rowing against the steam this means that
(v
b
v
s
)T
u
= L. (20)
If there was no current the problem species that
v
b
(T
drift
7) = L. (21)
Where the time to drift down the stream in terms of v
s
is T
drift
=
L
vs
. We want to nd how
long it would take to row down the stream (with the current) or
T =
L
v
b
+ v
s
=
1
v
b
L
+
vs
L
.
To evaluate this we will use Equations 20 and 21 to solve for
v
b
L
and
vs
L
and then evaluate
the above for T. To start divide both sides of Equation 20 by L to get
v
b
L

v
s
L
=
1
T
u
=
1
8
4
7
. (22)
Next replace T
drift
in Equation 21 and divide by L to get
v
b
L
_
L
v
s
7
_
= 1 .
Thus we have two equations and two unknowns to solve for. We can do this as follows. Solve
for
v
b
L
as a function of
vs
L
in Equation 22 and put this in the equation above to get
7
_
v
s
L
_
2

7
T
u
_
v
s
L
_
+
1
T
u
= 0 .
This has two roots. The positive one gives
vs
L
= 0.08333333 and
v
b
L
= 0.2. Thus the desired
value for T is given by T = 3.529412 minutes.
Wine and Water
After the rst pour the amount of spirit in the second bottle is 1/4 ounces so that the
proportion of water to wine is then
10
1/4
= 40 as stated in the problem. After the rst pouring
the fraction of spirit in the second bottle (by volume) is
0.25
10.25
= 0.02439024 .
43
Bottle 1 (Spirit) Bottle 1 (Water) Bottle 2 (Spirit) Bottle 2 (Water)
Step 0 10 0 0 10
Step 1 9.75 0 0.25 10
Step 2 9.75609 0.2439 0.2439024 9.756098
Table 3: The amount of spirit and water in each of the two bottles (in ounces) at each of
the three stages of the problem. See the text for details.
Thus when we extract back 1/4 oz of liquid from the second bottle we are actually getting
0.25
_
0.25
10.25
_
= 0.006097561 ,
ounces of spirit and
0.25
_
10
10.25
_
= 0.2439024 ,
ounces of water. In Table 3 we keep track of how much spirit and water is in each bottle
at each of the given steps. Given these amounts of spirit and water in the rst bottle the
proportion of spirits to water was then
9.75609
0.2439
= 40. .
The Long Tunnel
In the rst one minute the train will be inside the tunnel i.e. the front engine car will have
passed through the tunnel and be starting to peak outside. To get the caboose to pass
through the tunnel we will need one more minute of travel time. Thus it takes two minus
total to pass completely through the tunnel.
The Horse, the Cow and the Sheep
The v
h
, v
c
, and v
s
be the rates that the horse, cow, and sheep take to eat one pasture when
eating alone. From the problem we are told the rates that combined groups can eat one
pasture, namely
v
h
+ v
c
=
1
40
v
h
+ v
s
=
1
60
v
c
+ v
s
=
1
90
.
Given the above we want to know the value of v
h
+v
c
+v
s
. To answer this note that the above
is three equations and with three unknowns that can be solved with standard methods. The
44
solutions are given by
v
h
= 0.01527
v
c
= 0.0097
v
s
= 0.00138 .
In terms of in fractions (rather than decimal numbers) we compute
v
h
+ v
c
+ v
s
=
19
720
=
1
720
19
=
1
37.89
,
or all three animals together can eat one pasture in 37.89 days.
The Two Mathematical Men
Let the two mens ages be denoted a and b. Then we are told that a b = 30 and ab = 1624.
Putting this second equation into the rst gives a
1624
a
= 30. This last equation can be
written as the quadratic equation
a
2
30a 1624 = 0 ,
which has a = 58 as the only positive root. With this value for a we nd that b =
1624
58
= 28
as the other mans age.
A Question of Mileage
When four tires run for one mile we accumulate four miles of tire ware. If the car has run for
20,000 miles then we have accumulated 80,000 miles of tire ware. If this total amount of tire
ware is equally distributed among ve tires we have that each tire contributes
80000
5
= 16000
miles of tire ware.
How Much?
Let x be the amount I have, so that x = 2(10) = 20 paise and let y be the amount that you
have. We are told that
4
5
x =
8
9
y .
Solving for y in the above we get y = 18 paise.
45
The Bargain
Notice that the costs changing at a constant rate as observed by the following calculations
1024 640
640
= 0.6
640 400
400
= 0.6
400 250
250
= 0.6 ,
Thus we would expect the next price x to satisfy
250 x
x
= 0.6 .
Solving for x in the above we nd x = 156.25.
Sections of a Necklace
One method (not optimal) is to lay the segments of chain horizontally and to cut (to open
the link) and then to solder (to close the link) one of the links between each segment to join
the segments together. There are four internal locations that would need to be cut and
the soldered and one end to be cut and soldered to join the chains into a necklace. This
gives ve cuts and ve solders for a cost of ten rupees.
A dierent strategy is to take one of the ve segments (which has four links) and to cut
each of the four links open. Then using each of these (now opened) links we would join the
four remaining segments together into a full chain. This can be done with only four solders
(three internal solders and one nal to form the necklace). In this way the entire process
would cost 4 + 4 = 8 rupees.
Age of Demochares
If we let L (for lifetime) be the age we seek to determine. Then from the problem statement
we have that
1
4
L +
1
5
L +
1
3
L + 13 = L.
Solving this for L we nd L = 60.
The Painted Cube
Only the center cube will not have paint on it. Thus the other 27 1 = 26 will have at
least one painted side.
46
Smoking Not Prohibited
We can take the 36 cigarette butts and create
36
6
= 6 cigarettes. When we smoke these we
will be left with six cigarette butts. Using these six we can build one more cigarette to smoke
which when smoked will leave one butt. Thus we can get a total of seven cigarettes from
these 36 cigarette butts.
Mathematical Taxi Driver
By sequentially considering multiples of 11 we can check which number has the required
remainders and stop when we get to the rst one (since it will be the smallest of such
numbers). We can do this with the following python code
num = 11
while True :
remainder_1_when_div_by_2_N_3 = ( num % 2 == 1 ) and ( num % 3 == 1 )
remainder_1_when_div_by_4_N_5 = ( num % 4 == 1 ) and ( num % 5 == 1 )
if remainder_1_when_div_by_2_N_3 and remainder_1_when_div_by_4_N_5 and ( num % 6 == 1 ) :
print num
break
num += 11
where we nd that the number is 121.
The Tennis Tournament
We would proceed sequentially as follows
From the 30 original people we can form 15 matches, eliminating 15 people and leaving
15 people.
From these 15 people we can form 7 matches, eliminate 7 more people leaving 30
15 7 = 8 people.
From these eight people we can form 4 matches, eliminate 4 more people leaving four
people.
From these four people we can form two matches, eliminate two more people leaving
two people.
From these two people we can form one match and determine our winner.
Thus in total we have 15+7+4+2+1 = 29 matches. Note this is one less than thirty. This
makes sense since for every match played we eliminate one player. As we want to eliminate
all but one player we must play 30 1 = 29 matches.
47
Dividing the Load Equally
If there was only one box and three miles to walk in order that each person work the same
amount we could have each person carry the box for one mile. Since we have two boxes
each person should carry a box for two miles. Thus divide the three mile trip into six half
mile segments. Then have each person carry a box for four of these segments. If we let the
porters be denoted as A, B, and C then the following is a schedule that does this
First half-mile (A, B) carry
Second half-mile (C, B) carry
Third half-mile (C, A) carry
Fourth half-mile (B, A) carry
Fifth half-mile (C, B) carry
Sixth half-mile (A, C) carry
In the above schedule each porter walks two miles as needed.
Longfellow and His Bees
If we let B be the total number of bees in the hive. From the problem statement we have
that
1
5
B +
1
3
B + 3
_
1
3
B
1
5
B
_
+ 1 = B.
The left-hand-side is the sum of the expressions for the way the bees scatter. Since this sum
must be all of the bees it must be equal to B (which is the right-hand-side). We can solve
the above for B to nd B = 15.
Mr. Portchesters Problem
This is another type of problem that can be formulated as a search problem see [1] for a de-
scription of these types of problems and how to solve them. I implemented a graph searching
algorithm following the above reference in the python code mr portchesters problem.py.
When we run that code we get an output that is somewhat lengthy (64 steps) and will not
be included here. What one can conclude however is that it is possible to obtain three quarts
in the ve and the four quart containers. It would seem to be quite a feet to come up with
a solution by hand.
48
Driving Through the Country
We can write a simple python program to compute the needed sum. We have
n_days = 1
n_miles_today = 7
n_miles_total = n_miles_today
print "n_days= %5d; n_miles_today= %5d for a total of %5d" % (n_days,n_miles_today,n_miles_total)
while n_miles_today != 51 :
n_days += 1
n_miles_today += 4
n_miles_total += n_miles_today
print "n_days= %5d; n_miles_today= %5d for a total of %5d" % (n_days,n_miles_today,n_miles_total)
When we run that code we get
n_days= 1; n_miles_today= 7 for a total of 7
n_days= 2; n_miles_today= 11 for a total of 18
n_days= 3; n_miles_today= 15 for a total of 33
n_days= 4; n_miles_today= 19 for a total of 52
n_days= 5; n_miles_today= 23 for a total of 75
n_days= 6; n_miles_today= 27 for a total of 102
n_days= 7; n_miles_today= 31 for a total of 133
n_days= 8; n_miles_today= 35 for a total of 168
n_days= 9; n_miles_today= 39 for a total of 207
n_days= 10; n_miles_today= 43 for a total of 250
n_days= 11; n_miles_today= 47 for a total of 297
n_days= 12; n_miles_today= 51 for a total of 348
Thus in twelve days we drove 348 miles.
Dots and Lines
We draw a diagonal line from the upper left to the lower right then up the right hand column
of dots (past the last dot some) and then diagonal from upper right to lower left through the
middle dots in the rst row and column, and then nally along the bottom row of dots to
connect all dots.
The Triangles
There are 12 triangles with sides of length one, six triangles with sides of length two and
two triangles with sides of length three. This gives twenty triangles.
49
The Puzzled Artist
Let w and h be the width and height of the picture we want to place in a frame of the given
dimensions. To have an area of 72 square inches than we must have wh = 72. If the top and
bottom border are to be four inches each and the right and left border are to be two inches
each then the area of the entire canvas (the picture plus the border) would be given by
(w + 4)(h + 8) .
Expanding the left-hand-side of this and using the fact that wh = 72 we get
8w + 4h + 104 .
It is this expression that we want to minimize subject to the constraint that wh = 72.
Solving this last equation for w and putting it into the above gives
8
_
72
h
_
+ 4h + 104 .
Taking the derivative with respect to h and setting the result equal to zero gives

576
h
2
+ 4 = 0 .
Solving this for h gives h = 12 and so w =
72
h
= 6 for the dimensions of the picture. In
addition, we have that the canvas should be w + 4 = 10 inches wide and h + 8 = 20 inches
high.
The Mystery of Number Eleven
Here is a problem for which we can have python do the searching. Running the code
the mystery of number eleven.py we nd the number 987652413.
The Rose Garden
For this problem you have to recall the theorem that quadrilaterals with maximal area must
have all four of their vertexes on a circle. In that special case the area of the quadrilateral
can be computed from the lengths of its sides and is given by Brahmaguptas formula.
This states that if maximal area quadrilateral has edge lengths denoted by a, b, c, and d
then is has an area A given by
A =
_
(s a)(s b)(s c)(s d) , (23)
where s is the semi-perimeter
s =
a + b + c + d
2
. (24)
We can use Brahmaguptas formula to nd the area of the rose garden.
50
Squares Within Square
By direct counting, we see that there are 16 small squares of size one by one, 3 + 3 + 3 = 9
squares of size two by two, 2 + 2 = 4 squares of size three by three and one square of size
four by four giving a total of 30 squares.
The Farmer and the Animals
Let m, s, g, and p be the number of mules, sheep, goats, and pigs that farmer Thimmayya
bought. Then given the cost for each type of animal we know he spent
50m+ 40s + 25g + 10p ,
for an average cost per head of
50m+ 40s + 25g + 10p
m + s + g + p
= 30 .
We can multiply by the denominator on both-sides of the above and simplify to get
20m+ 10s = 5g + 20p .
If we assume that we bought at least one of each type of animal then we seek solutions
to the above equation where m 1, s 1, g 1 and p 1. In the python code
the farmer and the animals.py we iterate over possible values for each of the variables
and print the rst ten possible solutions. When we run that code we get
m= 1, s= 1, g= 2, p= 1
m= 1, s= 2, g= 4, p= 1
m= 1, s= 3, g= 2, p= 2
m= 1, s= 3, g= 6, p= 1
m= 1, s= 4, g= 4, p= 2
m= 1, s= 4, g= 8, p= 1
m= 1, s= 5, g= 2, p= 3
m= 1, s= 5, g= 6, p= 2
m= 1, s= 5, g= 10, p= 1
m= 1, s= 6, g= 4, p= 3
m= 1, s= 6, g= 8, p= 2
The Mango Thieves
Let M be the number of mangoes initially stolen so that M < 100. Then we are told that
(M 1) mod 3 = 0 . (25)
51
When the rst boy eats one, removes one third of the remaining, and places the remaining
back in the basket we will nd
B =
2
3
(M 1) ,
remaining in the basket for the second boy to nd. We are told that if we subtract one this
number is divisible by three or
_
2
3
(M 1) 1
_
mod 3 = 0 . (26)
Next, the second boy takes a mango, removes one third of the remaining, and places the rest
back in the basket. When the third boy wakes he will nd
B =
2
3
_
2
3
(M 1) 1
_
=
4
9
M
10
9
,
mangoes in the basket. Next the third boy wakes, eats one and removes one third leaving
the basket with
B =
2
3
_
4
9
M
10
9
1
_
,
mangoes in the basket. We are told that these remaining numbers of mangoes could be
divided by three or
2
3
_
4
9
M
10
9
1
_
= 3n for n 1 .
If we solve the above for M in terms of n we have
M =
81n + 65
8
.
For possible values of n we get dierent possible values for M. For each of these values of M
to be a solution of this problem we must have Equations 25 and 26 both hold. We can use
the python code the mango thieves.py to consider values of n = 1, 2, 3, and stop when
we nd the rst one that satises our two requirements. When we do this we nd that for
n = 7 we have M = 79.
A Matter of Rupees and Paise
Let n be the number of coins of each type. Converting everything to paise we have that
700(100) = 25n + 50n + 100n,
where we have recalled that a single rupee is equal to 100 paise. Solving for n we nd
n = 400.
52
Sawing the Cube
The procedure suggested, extracts the center cube (of dimensions 1 by 1) by cutting wood
with the buzz-saw. We can see that it is not possible to extract this center cube using fewer
than six cuts by observing that to produce the center cube we must have to cut at least once
along each of its six faces otherwise at least one of the faces would not have been liberated.
Thus we require at least six cuts.
The Two Trains
First we introduce some notation used in the solution of this problem. Let D be the distance
between the cities Bangalore and Mysore. After a time T from when they started, let the
two trains cross at the distance of xD from Bangalore (where we have 0 < x < 1). Finally,
let v
bm
be the spreed of the train (in miles per hour) traveling from Bangalore to Mysore and
v
mb
the speed of the train traveling in the opposite direction (from Mysore to Bangalore).
First, then since they meet at xD after traveling a time T we know that
xD = v
bm
T (27)
(1 x)D = v
mb
T . (28)
Next, as both trains arrive at their destination in one hour and four hours after their crossing
at xD. This means that
v
bm
(1 + T) = D (29)
v
mb
(4 + T) = D, (30)
since they both have traveled a distance D in the respective times. Putting Equation 27 into
Equation 28 we get
D v
bm
T = v
mb
T so D = (v
bm
+ v
mb
)T .
Putting the expression for D into Equations 29 and 30 we get
v
bm
(1 + T) = (v
bm
+ v
mb
)T
v
mb
(4 + T) = (v
bm
+ v
mb
)T .
If we solve each of these equations for T we get
T =
v
bm
v
mb
and T =
4v
mb
v
bm
.
Setting these two expressions equal to each other gives
v
bm
v
mb
= 4
_
v
mb
v
bm
_
so
v
bm
v
mb
= 2 .
Thus one train was twice as fast as the other.
53
The Arithmetical Landlady
Let T be the amount of time that has passed on the lease. Then from the problem we are
told that
2
3
T =
4
5
(99 T) .
Solving the above for T gives T = 54 and so there are 99T = 9954 = 45 years remaining
on the lease.
References
[1] S. J. Russell and P. Norvig. Articial Intelligence: A Modern Approach. Pearson Edu-
cation, 2 edition, 2003.
54

Das könnte Ihnen auch gefallen