weatherwax shakuntala solutions manual

Upload: sriram1212

Post on 12-Oct-2015

59 views

Category:

Documents


3 download

DESCRIPTION

A Solution Manual and Notes for:Puzzles to Puzzle You:by Devi Shakuntala

TRANSCRIPT

  • A Solution Manual and Notes for:

    Puzzles to Puzzle You:

    by Devi Shakuntala

    John L. Weatherwax

    January 26, 2014

    [email protected]

    1

  • Text copyright c2013 John L. WeatherwaxAll 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 writtenby the genius Shakuntala in 1979. When the book was published computers were not ascommon as they are now and (in my opinion) it would be very difficult to solve some ofthese problems by hand. This was apparently not a problem for Shakuntala, who hasbeen described as a human calculator. This description shows in these problems. In factmany of the problems have a feel like Project Euler problems1 in that some of them can besolved (without as much tedium) by using a programming language to enumerate the verylarge number of possible candidates. In fact I would estimate that for these problems mostpeople would simply give up before being able to find a solution. This is a shame since inmy view solving problems should be an enterprise where we use everything weve got inan attempt at a solution. By introducing a modern computer we are able to ooad someof the work to a machine and get back to the fun part of problem solving. Working on thecomputational problems in this book are so much like the Project Euler problems thatstudying 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 byShakuntala. In addition, in the case where it is prudent to do so I implement python (andsometimes R) codes to help in the enumeration of the choices and facilitate finding solutions.Reading these notes and solutions is a good way to learn a bit about the very popular andpowerful programming language python. I hope that this book will help you become astronger problem solver and open your eyes to the possibility of using python as a languageto help solve your own problems. These code snippets can be found here:

    http://waxworksmath.com/Authors/N_Z/Shakuntala/shakuntala.html

    As a final comment, Ive worked hard to make these notes as good as I can, but I have noillusions that they are perfect. If you feel that that there is a better way to accomplishor explain an exercise or derivation presented in these notes; or that one or more of theexplanations is unclear, incomplete, or misleading, please tell me. If you find an error ofany kind technical, grammatical, typographical, whatever please tell me that, too. Illgladly add to the acknowledgments in later printings the name of the first person to bringeach problem to my attention.

    1http://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 Profit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 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

    Staff 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 thestatement about the average is expressed as

    1

    4(a + b+ c+ d) = 74 . (1)

    The statements about the differences in height are expressed as

    b a = 2c b = 2d 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 willhave g sisters and b 1 brothers. A given girl will have b brothers and g 1 sisters. We aretold that for boys

    g = b 1 ,and for girls

    b = 2(g 1) .Putting the first 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 defined as the distance traveled over the time to travel thatdistance. 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 tookto travel each leg (across and back) and is given by

    L

    40+

    L

    25=

    13

    200L .

    The average speed is then2L13200

    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 possiblechoices. 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. Whenthe bicycle owner gives the cheques to his neighbor he gets +400 to which he has to pay 50 tothe tourist leaving him with 350. When the cheques are found to be bad he has to paybackthe neighbor all 400 so using the 350 profit from the bicycle sale he has to come up with anadditional 50 and thus he is at a loss of 50. This has to be coupled with the fact that thebicycle 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 whenflipped and thus we need to consider two and three digit bus numbers. In the python codebus number.py we explicitly enumerate all of the possible two and three digit numbers thatinclude the integers {0, 1, 6, 8, 9} (which become valid integers when flipped). From thesewe look for the ones that are a perfect squares both directly and when flipped. Note theproblem states that the bus number is a perfect square when the plate was turned upsidedown. A better description of that procedure would be when the license plate is rotated180 degrees. Thus the digits after flipping up-down must be followed by reversing the orderof 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 threedigit number did 196.

    The Hour Hand and the Minute Hand

    At midnight both hands of the clock point upwards (towards the 12). The minute handrotates at one cycle per hour or 2pi radians per hour. Thus the angular location of theminute hand as a function of time is given by

    minute hand = 2piThours .

    Here Thours is the time from midnight measured in hours. The hour hand rotates one cyclein 12 hours so its angular location is given by

    hour hand = 2pi

    (Thours12

    ).

    We want to know when the two hands are pointing in opposite directions. This will happenwhen

    minute hand hour hand = pi(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

    2piThours 2pi(Thours12

    )= pi(2k 1) .

    We can simplify this to get

    Thours =6

    11(2k 1) ,

    13

  • the times in hours from midnight when the two hands point in opposite directions. Usingthis the location of the minute hand and hour hand (in radians) is then given by

    minute hand = 2pi

    (6

    11

    )(2k 1) = 12

    11pi(2k 1)

    hour hand =1

    11pi(2k 1) .

    To convert these to the units of minute from the units of radians we recall that there are 60minutes in 2pi radians thus

    hour hand =30

    11(2k 1) .

    To Catch a Thief

    The statement he takes eight steps to every five of mine means that in one unit of timethe thief takes eight steps while the police officer takes five steps. If we let st and sp be thestep length (distance traveled in one step) for the thief and the police officer respectivelythen in one unit of time they have traveled 8st and 5sp. The statement two steps of mineare equal to his five means that

    2sp = 5st .

    As the thief started 27 steps ahead of the officer his position as a function of time T is givenby

    27st + 8stT .

    The position of the police officer as a function of units of time is given by

    5spT .

    The officer will be at the same location (and thus catch the thief) when these two expressionsare equal or

    27st + 8stT = 5spT .

    Since we know that sp =52st we can put this into the above to get

    27st + 8stT =25

    2stT .

    Dividing by st and solving for T gives T = 6 units of time which is 5 6 = 30 steps of theofficer and the thief took 8 6 = 48 steps.

    The Gong

    The problem statement means that the chime of the clock has its first strike when the minutehand 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

    6seconds. The time needed to chime

    ten times total would be nine times this number or 9(7)6

    = 212seconds. This is because the

    first chime starts when the minute hand is at the 12 and we need nine more chimes to maketen total chimes each one taking 7

    6seconds.

    14

  • Something for the Marmalade

    Assume that we start with x oranges then we sell half this amount plus half an orange tothe first customer or

    c1 =1

    2x+

    1

    2,

    leaving us with

    x c1 = 12x 1

    2,

    for the next customer. We sell

    c2 =1

    2

    (1

    2x 1

    2

    )+1

    2=

    1

    4x+

    1

    4,

    to the second customer leaving us with

    1

    2x 1

    2 c2 = 1

    4x 3

    4.

    To the third customer we sell half of this amount plus half an orange or

    c3 =1

    2

    (1

    4x 3

    4

    )+1

    2,

    leaving us with none. This means that what we are left with after this sale equals zero or

    1

    4x 3

    4 c3 = 0 or 1

    4x 3

    4= c3 =

    1

    2

    (1

    4x 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 thenarrator finds 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 theplumber who would demand another payment from the narrator. This is the same situationas we started with (before the note was found) and thus there is no value created or lost byits 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 aretold 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 getJ

    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 thismust 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 thenumber 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

    3and

    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

    4T +

    7

    6T = 17.5 .

    Solving this for T we find T = 6. Then we have

    R =3

    4T =

    18

    4=

    9

    2,

    and

    J =7

    6T = 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 weknow that on their wedding M = 3

    4J . 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 flavor of a problem from Project Euler. While there maybe waysto solve this problem by hand it is also helpful to be able to automate a solution using acomputer. The approach I took is to greedily add a single coin at a time until all the coinswe have can represent all of the coin values from 1 to 120. At each step, we add the coin thatgives 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 weget 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 thenumber of coins to have of that denomination at each iteration. This output shows that weshould first add a coin with value 1 (which can form only one sum), next we add the coinvalue of 2 (and then can form sums of 1, 2, 3), next we add the coin value of four (and canget sums of seven numbers), next we add the coin with a value of 8 (and can get sums of 15numbers), 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 different result than in the back of the book. From numbers in the back of thebook I dont see how one could get a weight of 6 along with other weights. A careful readingof the problem statement might allow the sum to be within one from the target value (thestatement to the nearest pound) but I still dont see how to get a sum of six. Changescould 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 weknow 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 d1. Then to be our special numberwe would have to have d1 = 3d1 which implies that d1 = 0. Thus our number cannot be onedigit. Next assume our number is a two digit number i.e. of the form d1d2. Then we musthave

    3(d1 + d2) = d110 + d2 .

    This means that2d2 = 7d1 .

    If we take d1 = 2 and d2 = 7 the above is true. Thus one number with this property is 27.

    Make a Century

    This problem has the flavor of a problem from Project Euler. While there maybe waysto solve this problem by hand it is also helpful to be able to automate a solution usinga computer. The approach I took was to simply enumerate all possible fractions of thesuggested type and then see which ones evaluated to 100. This is implemented in the pythoncode 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 1paisa stamps we would hand over. Next let m be the number of 5 paisa stamps we wouldhand 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 aspossible will be when n = 5 so that 8n = 40 and to satisfy the above we must have 35 = 5mor m = 7. Thus in summary we should sell 5 two paisa stamps, 30 one paisa stamps, and 7five 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 onemarbles should bring 15 Paise when all sold. Thus the total value of these 60 marbles whencombined 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 twowomen expected). If in fact we sell them at the price suggested five marbles for two Paiseor 2

    5= 0.4 since 2

    5< 5

    12they are selling them too cheap. The difference 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 lossto selling them too cheaply is given by 60

    (160

    )= 1.

    Walking back to Happiness

    Since the man walking saved ten minutes from the total trip time, the point at which thewomen meets him must have been five 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 meetingpoint (which would have taken ten minutes to do). Thus she only needed five more minutesto get to HS where she would have arrived at 6 P.M. like normal and so she meet him at 5:55P.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 ofthe other 24 stations. Since there are 25 total stations there must be 25(24) = 600 totaltickets of different types.

    19

  • The Legacy

    Let m be the amount the mother (our Aunt) receives, d be the amount each daughter shouldreceive, and s the amount that each son should receive. Then from the problem statementwe have that

    d = 2m

    s = 3d = 6m.

    Let nd be the number of daughters and ns be the number of sons that exist in this family.Then the will states that

    1920000 = m+ nd(2m) + ns(6m) = m(1 + 2nd + 6ns) .

    As we are not told values for nd and ns there should be multiple solutions. If we assumethat nd and ns must be such that all numbers are integers (i.e. m is an integer) then both(nd, ns) = (4, 1) and (nd, ns) = (1, 4) have m = 128000. If we assume that nd = ns = 1 thenwe would find 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 statementwe 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 = 23.

    Putting this back into either of the two equations above gives L = 46 steps for the totallength.

    The Chess Board

    This is an impossible task. To show that it is impossible we will assume it is possible tocover the cornerless board with 31 tiles and show that this leads to a contradiction. To dothis first note that whatever color the leftmost corner of the board is the rightmost corner isthe same color. For ease of explanation lets assume that it is black. Since we are assumingthat we can cover the board with 31 tiles consider the state of the board before we placethe last tile. In that case we will have placed 30 tiles and as each individual tile is of lengthtwo it must cover both a black square and a white square. Thus with these 30 tiles we havecovered 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 andone white square and never be able to cover two squares of the same color. Thus it is notpossible to perform the covering suggested.

    20

  • A Game of Cats and Mice

    Let c be the number of cats and let mi be the number of mice killed by the ith cat killed.Then we are told that

    ci=1

    mi = 999919 .

    Now each mi is the same so the above becomes mc = 99919, thus m and c are factors of99919, where we are also told that c 6= 1 and c 6= 999919. Using the UNIX factor commandto 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 wehave m = 1009 and c = 991.

    The Wheels

    From the problem statement we can conclude that

    96

    Cf 4 = 96

    Ch(2)

    96(32

    )Cf

    4 = 96(43

    )Ch

    . (3)

    Where Cf and Ch are the circumference of the fore and hind wheel (in feet) respectively. Wecan solve Equation 2 for 96

    Cfand put this expression into Equation 3 where we get

    2

    3

    (96

    Ch+ 4

    ) 2 = 3

    4

    (96

    Ch

    ).

    Solving the above for Ch gives Ch = 12. Putting this value into Equation 2 and solving forCf gives Cf = 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

    5C + 32 .

    If we look for the value where F = C then we need to solve C = 95C + 32 for C. We find

    C = 40.

    21

  • 0 1 2 3 4

    01

    23

    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 T1, T2, T3,and T4. Then from the problem statement we have that

    T1 + T2 + T3 = 6.75 (4)

    T1 + T2 = T3 + T4 (5)

    T3 = T4 . (6)

    We want to know the value of T1 + T2 + T3 + T4. Putting Equation 6 into 5 we get

    T1 + T2 = T3 + T3 = 2T3 .

    If we put this into Equation 4 we get

    3T3 = 6.75 so T3 = 2.25 .

    Our desired output is then

    (T1 + T2 + T3) + T4 = 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 bottomof 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 42 = 16 as required.

    Animals on the Farm

    To start let n be the number of animals in each of the five droves of animals, and let nd,cow,nd,sheep, and nd,pig be the number of cows, sheep, and pigs respectively that each of the eightdealers d = 1, 2, . . . , 7, 8 bought. Then we are told that we sold all of our animals or

    5n =8

    d=1

    nd,cow +8

    d=1

    nd,sheep +8

    d=1

    nd,pig , (7)

    and how much money we made for the sale

    285 = 178

    d=1

    nd,cow + 28

    d=1

    nd,sheep + 28

    d=1

    nd,pig . (8)

    Now we can use Equation 7 to solve for8

    d=1 nd,sheep +8

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

    285 = 17

    8d=1

    nd,cow + 2

    (5n

    8d=1

    nd,cow

    )= 15

    8d=1

    nd,cow + 10n . (9)

    Thus solving for the sum of the total number of cows we get

    8d=1

    nd,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 thenumerator in the above fraction is divisible by 15. The largest possible value that n couldbe would be when

    8d=1 nd,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 28510 = 28.

    We can print the values of n,8

    d=1 nd,cow and8

    d=1 nd,sheep +8

    d=1 nd,pig with the simplepython 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 first) is a possible solution. To find which one is correct recall thatthe number of animal bought by each dealer was the same. We can use this information towrite Equation 7 by summing over the animals bought by each dealer as as

    5n =

    x{cow,sheep,pig}

    n1,x +

    x{cow,sheep,pig}

    n2,x + +

    x{cow,sheep,pig}

    n8,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 everythingthus far we have that the total number of animals that we had in all was 5(24) = 120 andfrom the python output that the total number of cows was three, and that a constraint onthe total number of sheep and pigs to be that they sum to 117.

    Which is the Better Bargain?

    From the problem statement the first frock is worth(87

    )(35) = 40, while the second frock is

    worth(76

    )(30) = 35. The percent gain we make by buying the first and second frock is then

    given by

    40 3535

    =1

    7= 0.1428

    35 3030

    =1

    6= 0.1666 .

    The better buy is the second frock by 16 1

    7= 0.0238 or almost 2.4%.

    Walking all the Way

    Let the distance I walked from Bangalore be given by Lm (m for me) and the distance myfriend walked from Tumkur as Lf . Let the velocity that I and my friend walked be given byvm and vf . Then at the point we meet each other I have walked four hours and five minutesand my friend has walked two hours and five minutes (since we meet at 4 : 05 P.M.) and

    24

  • thus we have

    Lm = vm

    (45

    60

    )(11)

    Lf = vf

    (25

    60

    ). (12)

    Now let T be the remaining amount of time each person walks till they reach their finaldestination (we are told that this is the same for each person). Then in that time I have towalk Lf and my friend has to walk Lm to get to their destinations. This means that we have

    Lm = vfT (13)

    Lf = vmT . (14)

    If we equate the Equation groups 11 13 and 12 14 we get

    Lm = vm

    (45

    60

    )= vfT so vf =

    1

    T

    (45

    60

    )vm

    Lf = vf

    (25

    60

    )= vmT .

    Putting the expression for vf in the top equation into the bottom equation we get(45

    60

    )(25

    60

    )vm = vmT

    2 so T =175

    60.

    This is two hours and 55 minutes. As T is measured from the meeting time 4:05 they botharrive at their destinations at 7 P.M.

    Something for Profit

    Consider the sequence of dollar amounts in and out during all of the transactions. Forexample, when we first buy we are down 60, when we first sell we get +70 etc. Thissequence is

    60 + 70 80 + 90 = 20 ,i.e. a net profit of 20.

    The Digital Game

    Let the two digit number have the first digit d1 and the second digit d2 so the number willbe d1d2. We are told that d2 = d1 4. Thus the possible number to consider must be oneof 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 seethat the number 84 divided by 12 is 7 as required. Thus the number we are looking for is84.

    25

  • The Faulty Machine

    Assume that F is the weight of a correctly manufactured flywheel. As our first measurementwe first take one flywheel from each machine and weight all ten of them together. From thistotal we subtract 10F . This difference will give the amount by which one of the machinesis making the part too heavy ( > 0) or too light ( < 0). Next we can take one flywheelfrom machine one, two from machine two, three from machine three etc. up to ten flywheelsfrom machine ten. We take all of these flywheels and weight them once. Then all of theseshould 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 allpossible three digit numbers we could have have for the first, second, and third row. Whenwe run that code we get the values

    192 384 576

    219 438 657

    273 546 819

    327 654 981

    The first, second, and third columns are the three digit number in the first row, second, andthird rows respectively. All four of these triples of numbers satisfy the requirements of theproblem.

    Squares and Right Angles

    We can produced the required diagram by drawing a tilted square in a square just as inFigure 1 where we draw the outer square with four lines and then the inner square in anadditional four lines. These eight lines give the desired number of squares and triangles.

    The Dishonest Merchant

    Let n32 and n40 be the number of kilos of the coffee that cost 32 and 40 rupee per kilo thatwe bought. Then we paid

    32n32 + 40n40 ,

    26

  • for the coffee that we sold. Since we bought a total of 100 kilos we have n32+n40 = 100 andthe profit on selling this 100 kilos was 25% more than we paid or

    43(100) = 1.25(32n32 + 40n40) .

    Thus we have two equations and two unknowns which we can solve to find n32 = 70 andn40 = 30.

    For the Charities

    Let p be the amount of money in the purse originally. Then after the boys we have

    p(1

    2p+ 1

    )=

    1

    2p 1 ,

    in our purse. After the women we have

    1

    2p 1

    [1

    2

    (1

    2p 1

    )+ 2

    ]=

    1

    4p 5

    2,

    in our purse. After the religious group I have

    1

    4p 5

    2[1

    2

    (1

    4p 5

    2

    )+ 3

    ]=

    1

    8p 17

    4,

    in our purse. Since this must be equal to one we can solve for p to find p = 42 rupee when Istarted.

    The Number Game

    If we let x be the first 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) = 3x2 + 6x .

    Thus we get the quadratic equation

    3x2 + 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 first gives 2b + 100 = 110 so b = 5. Using this we havethat 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

    4B 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 efficient than the one that Shakuntala produces one couldargue that it would be quite tedious to construct a solution to this problem by hand. Theabove 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 nn+6

    . If we add six to the

    denominator we would get the fraction nn+14

    if this is to equal 13then we have

    n

    n + 14=

    1

    3,

    so solving for n we get n = 7. Thus the original fraction is 713.

    A Problem of Socks

    If we draw two socks we might find that we have two different colors. In that case, if wedraw a third sock it must match one of the two colors from the ones that we have alreadydrawn. 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 donein the situation where she does not die. In that case since the fractions given dont sum toone 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

    47to Rashmi

    1/4

    47/60=

    15

    47to Mala

    1/5

    47/60=

    12

    47to 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 specified as

    1/3

    7/12=

    4

    7to Rashmi

    1/4

    7/12=

    3

    7to Mala .

    Mathematics and Literature

    This problem can readily be solved by considering properties of sets. If we let M representthe event that a person has some training in mathematics and L the event that a personhas some training in literature then we are told that

    N (M L) = 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 literaturerespectively. We are also told that

    N (M) = 70N (L) = 82 .

    Then since by De Morgans Laws we can write M L = (M L) we have that

    N (M L) = 100N (M L) = 90 .

    Putting what we know into the set identity

    N (M L) = N (M) +N (L)N (M L) ,

    gives 90 = 70 + 82N (M L) so N (M L) = 62.

    30

  • Heads I Win Tails I Loose

    Assume at the timestep n the gambler has Vn money in his pocket. Then if he looses a betthe money in his pocket will go to

    Vn+1 =

    (1

    2

    )Vn .

    If he wins the bet the money in his pocket goes to

    Vn+1 =

    (1 +

    1

    2

    )Vn =

    (3

    2

    )Vn .

    Iterating the above difference equations back to the start of the betting (when the gamblerhad V0 money in his pocket) since we know that we must play an even number of games (say2m) and we have an equal number of wins and losses we get

    V2m =

    (1

    2

    )m(3

    2

    )mV0 .

    The first fraction in the product on the right-hand-side of the above represents the gamblerslosses while the second fraction represents his wins. Since the above is equal to

    V2m =

    (3

    4

    )mV0 ,

    and 34< 1 the gambler will suffer a net loss i.e. V2m < V0.

    A Problem from Lilavati

    By following the statements given in the problem when operated on the unknown number xwe would arrive at the following equation[(

    1 13

    ) (17

    ) (1 + 3

    4

    )(3x)

    ]2 52 + 810

    = 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 oflengths 40 and 9. Thus by the Pythagorean theorem we have that the length of the ladderL needs to be

    L =92 + 402 = 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 that50 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 thatsatisfy 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 Rasoolwould 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 sheepwill be 20x. Since this is too low by the amount of 150 we must add this amount to her20x 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 fly back and forth until until the two trains collide. Since the two trains start50 miles apart and are each traveling at 25 miles per hour they are approaching each otherat 25 + 25 = 50 miles per hour. Thus the trains will collide in exactly one hour. All of thistime the falcon is flying at 100 miles per hour. Thus the falcon will fly for 100 miles.

    32

  • First 1/2 Second 1/2 Year Total Cumulative Total1000 1000 2000 20001150 1150 2300 43001300 1300 2600 69001450 1450 2900 9800

    Table 1: The payments received in the 300 rupee per year case

    First 1/2 Second 1/2 Year Total Cumulative Total1000 1100 2100 21001200 1300 2500 46001400 1500 2900 75001600 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 raisewhich is distributed in 150 rupee each half-year. We evaluate the payments received underthis option in Table 1. In the 200 rupee per year case once we have worked half a year weget the 100 rupee raise applied to the next half-year. We evaluate the payments receivedunder this option in Table 2. We see that the total payments are larger in the 200 rupee ayear (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 aretold that

    n 1 = m+ 12(m 1) = n + 1 .

    Solving the above we find 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 flipped representation, whichwe find 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 ,

    and1.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 cancertainly differ in color. If we draw a third we could have drawn three marbles of differentcolors. When we draw the fourth marble however there is no way to not draw a marble witha 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 12x = 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 sayone after the other by only a few minutes. In that case only in the rare case when he arrivedat the station during a time between the two trains would he take the one that came shortlyafter the first one. Most of the time he would take the first train.

    34

  • The Split

    Let the two parts be denoted as p1 and p2. Then we have

    p1 + p2 = 34 and4

    7p1 =

    2

    5p2 .

    From the second relationship we have p1 =710p2. Putting this into to the first equation gives

    7

    10p2 + p2 = 34 .

    Solving for p2 we get p2 = 20 which then gives p1 = 14.

    At the Fete

    From the problem statement we have that

    5writer = 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 givenprofession. We also know how much was spent in total or

    1330 = 25writer + 20 doctor + 18 dentist + 12 banker . (15)

    This is four equations and four unknowns which can be solved. We find

    writer = 14

    doctor = 17.5

    dentist = 23.3333

    banker = 17.5 .

    To find out how much each group spend we would multiply each of the numbers above bythe corresponding coefficient 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 numberof bacteria is given by Nn = 2

    n1 for n 1 where n is the day number. We are told thatthe container is full on day 10 where

    N10 = 29 ,

    The container will be half-full when Nn = 28 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 13x 1

    10x 1

    12x = 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 bythe variables

    a, b, c, d, e, f, g .

    Then according to the problem after the first round where Arun wins each of the playerswill 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 moneythat each person has (excluding Binoy) and subtract that amount from Binoy to get theamount each person has at the end of this round. This algorithm would needed to berepeated as each of the different player wins. This could be done by hand or we can useMathematica to perform the algebra needed at each step. Once we finish with the sevensteps of the game we will end up with seven expressions for the amount of money in eachpersons pocket. Since we are told that this amount of money is equal to 32 rupees we endup with seven equations to solve for the unknowns a, b, c, d, e, f , and g representing theamount 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 file 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 240rupees 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 rupeesper day (notice that this is larger than what he makes per day). If we assume that RamRakhan works only x days then he will not be working for 30x days. Now since no moneychanges hands at the end of the month the amount that should be paid to Ram Rakhan byGulab 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

    3days.

    A Bargain in Guavas

    In this problem let n be the number of guavas we initially bought at 1.2. Then since 1.2n

    isthe 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.4n+2

    . Since we are toldthat the vendor lost 0.1 more with this transaction than in the previous one we must have

    14.4

    n 14.4n + 2

    = 0.1 .

    The above can be simplified to a quadratic equation in n given by

    n2 + 2n 288 = 0 .Solving this we find n = 16 and n = 18. The only acceptable answer is n = 16 as thenumber 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 upinto two (non equal) parts denoted m1 and m2 where we assume that m2 > m1 0. Sincethe different of m2 and m1 must equal the difference of its squares we have that

    m2 m1 = m22 m21 = (m2 m1)(m2 +m1) ,

    37

  • when we factor. Since m2 6= m1 we can divide both sides by m2 m1 to get1 = m2 +m1 .

    Since the numbers m1 and m2 represent sheep we cannot have a fraction number of we musthave m2 = 1 and m1 = 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 and1

    2(f + 30) = s+ 30 ,

    for the two statements given. If we put the first equation into the second equation and solvefor 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 theproduct of the day number and the month number equals the two digit year number. Ratherthan do this computation by hand we let the computer do the hard work. In the pythonscript a date to reckon with.py we find 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 thata b = 3 and a2 b2 = 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 vm and vw be the velocity of the man and women (in miles per hour) respectively. Thenwe are told that vm = 4 and vw = 3. They will meet in T hours after they start walkingwhere

    vmT = 63 vwT 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 d1d2 where d1 and d2 arethe first and second digits in his age i.e. 0 di 9. Then from the problem d2d1 is the ageof the woman. As a base ten number we have that the husbands and wifes ages are

    d1d2 = 10d1 + d2 and d2d1 = 10d2 + d1 .

    The difference in their two ages is then

    10d1 + d2 (10d2 + d1) = 10(d1 d2) + (d2 d1) = 9(d1 d2) .The sum of their two ages is then

    10d1 + d2 + 10d2 + d1 = 10(d1 + d2) + (d2 + d1) = 11(d1 + d2) .

    Since we are told that the difference in their ages is 111

    of the sum of their ages we have

    9(d1 d2) = d1 + d2 or 4d1 = 5d2 .Since d1 and d2 are integer digits to make the above true we need to take d1 = 5 and d2 = 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 ) topass the goods train when both trains are running in the same direction. When both arerunning in the opposite direction the passenger train will pass the goods train in a time T .If we let vp and vg be the velocities of the passenger and the goods trains respectively andLg be the length of the goods train then since they pass in T when running in the samedirection we must have

    (vg + vp)T = 2Lg .

    Notice that the right-hand-side is twice the length of the goods train, since only after thatmuch length have the two trains passed each other). When they are running parallel it takeslonger and we have

    (vp vg)(3T ) = 2Lg .Setting these two expressions for 2Lg equal to each other we get

    (vp + vg)T = 3(vp vg)T .Dividing by T and vg we get

    vpvg

    + 1 = 3

    (vpvg 1).

    Solving for the fraction vpvg

    we getvpvg

    = 2 .

    39

  • The Circular Numbers

    Since in this problem we are simply looking for an ordering of the numbers 1, 2, . . . , 9, 10 thatsatisfy the sum requirement we can have a computer do the searching for us. In the pythoncode the circular numbers.py we enumerate all possible combinations that possess thedesired property. Note that many of these answers would be cyclical permutations of eachother. One would need to remove these duplicates to get just the set of possible numberordering. When we run that code (and look for solutions that have the first and secondlabels 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 = 3nold + 2nyoung +1

    2nchild .

    We want to find integers that make the above equation true. There are many possible valuesthat will work. In python code rice for the festival.py when we find the first ten strictlypositive 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 haveB

    2+8

    9B + 2 = B .

    We can write this as a quadratic equation inB as

    1

    9B 1

    2

    B 2 = 0 .

    Solving this forB (and then squaring) we find 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 unittime and let T be the amount of time the first man has grazed his nine mules. Then in theproblem 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 (anunknown 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 ng represents the number of goats he grazed then we musthave

    500 = 5Tngg .

    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 thethree unknowns mT , cT , and gT or the product of the rate each animal eats grass and thelength of time T . This gives us three equations and three unknowns

    4mT 6cT = 03cT 10gT = 09mT + 24cT = 500 .

    41

  • Solving for these three unknowns gives us

    mT = 20

    cT =40

    3gT = 4 .

    Thus the first man had to pay 9mT = 180, the second man had to pay 24(cT ) = 320, and thenumber of goats that the third man had was such that 500 = 5ng(gT ) = 5(4)ng or ng = 25.

    What Were You Doing When the Lights Went Out?

    Let L be the initial length of both candles. If we let v1 and v2 be the rates at which eachcandle burns then from the problem statement since the first burns in four hours and thesecond in five we have that

    L

    v1= 4 and

    L

    v2= 5 ,

    hours. Since the first candle burns quicker (in four hours vs. five hours) we know thatv1 > v2. Assume that T is the amount of time the lights were out and let L1 and L2 be thelengths of the first and second candle after each had been burning for the amount T . Sincethe first candle burns quicker we would expect L1 < L2 and in fact are told that

    L2 = 4L1 . (19)

    Since each candle started at a length of L and was burning for T time we have

    L1 = L v1T and L2 = L v2T .

    Using the above in Equation 19 and we have that

    L v2T = 4L 4v1T .

    We can solve the above for T to get

    T =3L

    4v1 v2 =3

    4v1L v2

    L

    =3

    4(14

    ) 15

    =15

    4= 3.75 ,

    hours.

    Staff and the Steeple

    This is a problem involving proportional triangles. If we let h be the height of the steeplethen we should have

    h

    120=

    5

    2so h = 300 .

    42

  • Up the Stream Down the Stream

    Let vs be the velocity of the stream and let vb be velocity of the crew boat such that if therewas no stream the boat would move forward at a speed vb. We are told that to row upstream(against the current) takes Tu = 8

    47minutes. Let L be the length of the river. Then since

    we are rowing against the steam this means that

    (vb vs)Tu = L . (20)

    If there was no current the problem specifies that

    vb(Tdrift 7) = L . (21)

    Where the time to drift down the stream in terms of vs is Tdrift =Lvs. We want to find how

    long it would take to row down the stream (with the current) or

    T =L

    vb + vs=

    1vbL+ vs

    L

    .

    To evaluate this we will use Equations 20 and 21 to solve for vbLand vs

    Land then evaluate

    the above for T . To start divide both sides of Equation 20 by L to get

    vbL vs

    L=

    1

    Tu=

    1

    8 47

    . (22)

    Next replace Tdrift in Equation 21 and divide by L to get

    vbL

    (L

    vs 7)= 1 .

    Thus we have two equations and two unknowns to solve for. We can do this as follows. Solvefor vb

    Las a function of vs

    Lin Equation 22 and put this in the equation above to get

    7(vsL

    )2 7Tu

    (vsL

    )+

    1

    Tu= 0 .

    This has two roots. The positive one gives vsL= 0.08333333 and vb

    L= 0.2. Thus the desired

    value for T is given by T = 3.529412 minutes.

    Wine and Water

    After the first pour the amount of spirit in the second bottle is 1/4 ounces so that theproportion of water to wine is then 10

    1/4= 40 as stated in the problem. After the first 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 10Step 1 9.75 0 0.25 10Step 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 ofthe 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 bottleat each of the given steps. Given these amounts of spirit and water in the first bottle theproportion of spirits to water was then

    9.75609

    0.2439= 40. .

    The Long Tunnel

    In the first one minute the train will be inside the tunnel i.e. the front engine car will havepassed through the tunnel and be starting to peak outside. To get the caboose to passthrough the tunnel we will need one more minute of travel time. Thus it takes two minustotal to pass completely through the tunnel.

    The Horse, the Cow and the Sheep

    The vh, vc, and vs be the rates that the horse, cow, and sheep take to eat one pasture wheneating alone. From the problem we are told the rates that combined groups can eat onepasture, namely

    vh + vc =1

    40

    vh + vs =1

    60

    vc + vs =1

    90.

    Given the above we want to know the value of vh+vc+vs. To answer this note that the aboveis three equations and with three unknowns that can be solved with standard methods. The

    44

  • solutions are given by

    vh = 0.01527

    vc = 0.0097

    vs = 0.00138 .

    In terms of in fractions (rather than decimal numbers) we compute

    vh + vc + vs =19

    720=

    172019

    =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 first gives a 1624

    a= 30. This last equation can be

    written as the quadratic equation

    a2 30a 1624 = 0 ,

    which has a = 58 as the only positive root. With this value for a we find that b = 162458

    = 28as 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 for20,000 miles then we have accumulated 80,000 miles of tire ware. If this total amount of tireware is equally distributed among five 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 youhave. We are told that

    4

    5x =

    8

    9y .

    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 640640

    = 0.6

    640 400400

    = 0.6

    400 250250

    = 0.6 ,

    Thus we would expect the next price x to satisfy

    250 xx

    = 0.6 .

    Solving for x in the above we find x = 156.25.

    Sections of a Necklace

    One method (not optimal) is to lay the segments of chain horizontally and to cut (to openthe link) and then to solder (to close the link) one of the links between each segment to jointhe segments together. There are four internal locations that would need to be cut andthe soldered and one end to be cut and soldered to join the chains into a necklace. Thisgives five cuts and five solders for a cost of ten rupees.

    A different strategy is to take one of the five segments (which has four links) and to cuteach of the four links open. Then using each of these (now opened) links we would join thefour remaining segments together into a full chain. This can be done with only four solders(three internal solders and one final to form the necklace). In this way the entire processwould 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 statementwe have that

    1

    4L+

    1

    5L+

    1

    3L+ 13 = L .

    Solving this for L we find L = 60.

    The Painted Cube

    Only the center cube will not have paint on it. Thus the other 27 1 = 26 will have atleast one painted side.

    46

  • Smoking Not Prohibited

    We can take the 36 cigarette butts and create 366= 6 cigarettes. When we smoke these we

    will be left with six cigarette butts. Using these six we can build one more cigarette to smokewhich when smoked will leave one butt. Thus we can get a total of seven cigarettes fromthese 36 cigarette butts.

    Mathematical Taxi Driver

    By sequentially considering multiples of 11 we can check which number has the requiredremainders and stop when we get to the first one (since it will be the smallest of suchnumbers). 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 find 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 leaving15 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 fourpeople.

    From these four people we can form two matches, eliminate two more people leavingtwo 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. Thismakes sense since for every match played we eliminate one player. As we want to eliminateall 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 sameamount we could have each person carry the box for one mile. Since we have two boxeseach person should carry a box for two miles. Thus divide the three mile trip into six halfmile segments. Then have each person carry a box for four of these segments. If we let theporters 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 havethat

    1

    5B +

    1

    3B + 3

    (1

    3B 1

    5B

    )+ 1 = B .

    The left-hand-side is the sum of the expressions for the way the bees scatter. Since this summust be all of the bees it must be equal to B (which is the right-hand-side). We can solvethe above for B to find 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 searchingalgorithm 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 notbe included here. What one can conclude however is that it is possible to obtain three quartsin the five and the four quart containers. It would seem to be quite a feet to come up witha 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 columnof dots (past the last dot some) and then diagonal from upper right to lower left through themiddle dots in the first row and column, and then finally along the bottom row of dots toconnect all dots.

    The Triangles

    There are 12 triangles with sides of length one, six triangles with sides of length two andtwo 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 givendimensions. To have an area of 72 square inches than we must have wh = 72. If the top andbottom border are to be four inches each and the right and left border are to be two incheseach 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

    576h2

    + 4 = 0 .

    Solving this for h gives h = 12 and so w = 72h= 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 incheshigh.

    The Mystery of Number Eleven

    Here is a problem for which we can have python do the searching. Running the codethe mystery of number eleven.py we find the number 987652413.

    The Rose Garden

    For this problem you have to recall the theorem that quadrilaterals with maximal area musthave all four of their vertexes on a circle. In that special case the area of the quadrilateralcan 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 dthen 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 find 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 = 9squares of size two by two, 2 + 2 = 4 squares of size three by three and one square of sizefour 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 Thimmayyabought. 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 solutionsto the above equation where m 1, s 1, g 1 and p 1. In the python codethe farmer and the animals.py we iterate over possible values for each of the variablesand print the first 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 first boy eats one, removes one third of the remaining, and places the remainingback in the basket we will find

    B =2

    3(M 1) ,

    remaining in the basket for the second boy to find. We are told that if we subtract one thisnumber 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 restback in the basket. When the third boy wakes he will find

    B =2

    3

    (2

    3(M 1) 1

    )=

    4

    9M 10

    9,

    mangoes in the basket. Next the third boy wakes, eats one and removes one third leavingthe basket with

    B =2

    3

    (4

    9M 10

    9 1),

    mangoes in the basket. We are told that these remaining numbers of mangoes could bedivided by three or

    2

    3

    (4

    9M 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 different possible values for M . For each of these values of Mto be a solution of this problem we must have Equations 25 and 26 both hold. We can usethe python code the mango thieves.py to consider values of n = 1, 2, 3, and stop whenwe find the first one that satisfies our two requirements. When we do this we find that forn = 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 findn = 400.

    52

  • Sawing the Cube

    The procedure suggested, extracts the center cube (of dimensions 1 by 1) by cutting woodwith the buzz-saw. We can see that it is not possible to extract this center cube using fewerthan six cuts by observing that to produce the center cube we must have to cut at least oncealong 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 distancebetween the cities Bangalore and Mysore. After a time T from when they started, let thetwo trains cross at the distance of xD from Bangalore (where we have 0 < x < 1). Finally,let vbm be the spreed of the train (in miles per hour) traveling from Bangalore to Mysore andvmb 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 = vbmT (27)

    (1 x)D = vmbT . (28)

    Next, as both trains arrive at their destination in one hour and four hours after their crossingat xD. This means that

    vbm(1 + T ) = D (29)

    vmb(4 + T ) = D , (30)

    since they both have traveled a distance D in the respective times. Putting Equation 27 intoEquation 28 we get

    D vbmT = vmbT so D = (vbm + vmb)T .

    Putting the expression for D into Equations 29 and 30 we get

    vbm(1 + T ) = (vbm + vmb)T

    vmb(4 + T ) = (vbm + vmb)T .

    If we solve each of these equations for T we get

    T =vbmvmb

    and T =4vmbvbm

    .

    Setting these two expressions equal to each other gives

    vbmvmb

    = 4

    (vmbvbm

    )so

    vbmvmb

    = 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 aretold that

    2

    3T =

    4

    5(99 T ) .

    Solving the above for T gives T = 54 and so there are 99T = 9954 = 45 years remainingon the lease.

    References

    [1] S. J. Russell and P. Norvig. Artificial Intelligence: A Modern Approach. Pearson Edu-cation, 2 edition, 2003.

    54