Archive for the ‘Puzzles’ Category

536 Puzzles: #309: A Maypole Puzzle

Saturday, February 11th, 2017

During a gale a maypole was broken in such a manner that it struck the level ground at a distance of twenty feet from the base of the pole, where it entered the earth. It was repaired, and broken by the wind a second time at a point five feet lower down, and struck the ground at a distance of thirty feet from the base. What was the original height of the pole? In neither case did the broken part become actually detached.

From this you can set up the following equations:

(h-x)^2 - x^2 = 30^2

(h-(x+5))^2 - (x+5)^2 = 20^2

Expanding:

h^2 - 2hx  = 30^2

h^2 - 2h(x+5) = 20^2

Subtracting the second from the first yields:

2h*5 = 30^2 - 20^2

h =50  

Langley’s Adventitious Angles

Tuesday, January 31st, 2017

Research Links

Farmer buys livestock puzzle

Sunday, January 29th, 2017

A farmer has 100 dollars to buy 100 animals.  A cow costs 10, a pig costs 5 and a chicken costs 50 cents.  How many of each does he buy?  He must use all his money and he must buy at least 1 of each type.

10x+5y+0.5z=100 

x+y+z=100 

note Z must be even because otherwise you will get  ddd.5<> 100 in the first equation. Eliminate z by multiplying first equation by 2 and subtracting the second equation

20x+10y+z=200 

x+y+z=100 

yields

19x+9y=100   Here a solution is only found because the solution is specified to be integers

 

Brute force Integer solution

Find a solution for the above and plugging into:  x+y+z=100   now plug in number until you get an even z. Try x=1:

19+9y=100 

9y=81 

y=9 

1+9+z=100 

z=90 

and is even and thus the problem is done

 

Modulus Solution

19x+9y=100 

(19x+9y)mod 9 = 100 mod 9

(19x) mod 9 + (9y) mod 9 = 1 

(19x) mod 9  = 1 

(19 mod 9)  *( x mod 9)  = 1 

 ( x )mod 9 = 1 

Two obvious solutions are 

 x=1    and  x=10    

The first solution is viable.  The second is not because there is no money left over to buy any other type of animal.

536 Puzzles: Problem & Solution #2: Dollar and Cents

Sunday, January 22nd, 2017

A man entered a store and spent one-half ofthe money that was in his pocket. When he came out he found that he had just as many cents as he had dollars when he went in and half as many dollars as he had cents when he went in. How much money did he have on him when he entered?

a.b = 2[{b/2.a]  where a is dollars and b is cents

100a+b = 2({b/2}*100 + a) 

100a+b = 100b + 2a 

99a = 99b   now since 99 & 98 are relatively prime and there is no offset the solution is 

a=98  &  b=98 

Thus he entered the shop with $99.88

536 Puzzles: Problem & Solution #1: Concerning a Check

Thursday, January 19th, 2017

A man went into a bank to cash a check. In handing over the money the cashier, by mistake, gave him dollars for cents and cents for dollars. He pocketed the money without examining it, and spent a nickel on his way home. He then found that he possessed exactly twice the amount of the check. He had no money in his pocket before going to the bank. What was the exact amount of that check?

Excel Spreadsheet method

  • The first sheet uses a brute force method of stepping through all the values from 00.00 to 99.99 and looking for an integer solution
  • The second sheet uses the relation below to drive towards a less brute force method
  • The third sheet of the spread sheet shows how the solution is periodic like a set of gears.  The constant term added is represented as the column offset number and is analogous to a number of teeth offset from zero position at the start of turning of the gears.
  • The fourth sheet uses 5 and 7 to simplify the problem 

 

Second Sheet Method

Assume a form of the check a.b.  Where a is the dollar amount and b the cents.

Thus the relation detailed in the puzzle can be written

2*(100a+b)=100b+a

rearranging terms

b={199a+5}/98  

Using this you can look for an integer solution using less brute force and this is depicted on the second page of the spreadsheet.

 

Third Sheet – Depiction of the numbers as gearing

           

The right hand image shows gear foot print with no offset and with an offset of 1 tooth.  The modulus showing up in number of teeth out of both gears being at an integer number of turns.   The initial offset=0 7t mod(5) [pmath] sequence is 2,4,1,3,0.  The initial offset [pmath] 7t mod(5) [pmath] sequence is 3,0,2,4,1. Both sequence through all values up to p-1 which is 4 in this case.  It's obvious in order to return to the initial starting position from the offset=1 condition requires 2 turns of the 7-gear.

Looking at the third sheet in the excel file you see how the numbers act as gears with alighment with zero offset showing how many revolutions are required to bring the gears back to point to point alignment.  An example would be column B where there is no offset set up before turning the gears.  For that condition obviously the big gear has to rotate the number times equal to the number of teeth on the small gear and the small gear has to rotate the the number of times equal to the number of teetn on the big gear.  As you can see from this sheet   The integer solutions are highlighted in yellow.  The right most column is the number of turns of the 199 teeth gear.  The value in columns under the offsets is the calculated number of turns of the 98 teeth gear.  As you can see the integer solution moves in equal steps of 33 rotations of the big gear and 67 rotations of the small gear in this specific example. So next we need to be able to calculate what those steps are for an offset=1 so that we can then use 5 steps to find the solution of the original problem.  From before we have the relation with a 1 in place of the 5 so we can use a particular trick:

[pmath] 98b=199a+1      this corresponds to advancing the gear teeth marker 1 tooth 

(98b) mod(199)=(199a+1) mod (199)    and since a is to be an integer solution:

(98b) mod(199)=(1) mod (199)

(98b) mod(199)=1   and thus b will be the modulo multiplicative inverse of 98 in mod 199.  Online calculator here.

b =132  so with 1 tooth of advancement it will require only 132 rotations of the big gear for the dots come back into alignment.  Using this offset 5 times will lead to b =63  and from this we calculate a =31   This method eliminates all the brute force methodology.  

 

Diophantine Equation Approach

Next a solution via the linear Diophantine equation approach.  The equation to solve is: 

  • -199x + 98y = 5

Calculating GCD(-199,98) gives:

98 = (0)*(-199) + 98

-199 = (-3)*98 + 95

98 = 1*95 + 3

95 = 31*3 + 2

3 = 1*2 + 1

2 = 2*1 + 0

Then applying the Extended Euclidean Algorithm:

1 = (1 * 3) + (-1 * 2)
  = (-1 * 95) + (32 * 3)
  = (32 * 98) + (-33 * 95)
  = (-33 * -199) + (-67 * 98)
  = (-67 * 98) + (-33 * -199)
The complete solution is:
x = -165 + 98n
y = -335 + 199n

With n=2 you arrive at the solution x=31, y=63

Research Links

536 Puzzles: Problem & Solution #457: City Luncheons

Tuesday, January 17th, 2017

The clerks attached to the finn of Pilkins and Popinjay arranged that three of them would lunch together every day at a particular table so long as they could avoid the same three men sitting down twice together. The same number of clerks of Messrs. Radson, Robson, and Ross decided to do precisely the same, only with four men at a time instead of three. On working it out they found that Radson's staff could keep it up exactly three times as many
days as their neighbors. What is the least number of men there could have been in each staff?

Number of staff both companies: N

Company P&P number of permissible ways to select 3 staff for lunch:  {N!}/{3!(N-3)!}

Company R&R number of permissible ways to select 3 staff for lunch:  {N!}/{4!(N-4)!}

We are given second phrase is 3x the first phrase

3*{N!}/{3!(N-3)!}  = {N!}/{4!(N-4)!}

Rearranging yields

12*(N-4)!  = (N-3)!

It is relatively easy to see the only way this equation holds is if the right hand set of parenthesis holds the value 12 and thus

(N-3)=12  yielding

N=15

You can see the mathematical easter egg in this problem that allowed for a nice neat integerial solution is fhe rigged factor of 3 with the increment of 1 in group size.  

536 Puzzles: Problem & Solution #92: The Meeting Cars

Sunday, January 15th, 2017

The Crackhams made their first stop at Bugleminster, where they were to spend the night at a friend's house. This friend was to leave home at the same time and ride to London to put up at the Crackhams' house. They took the same route, and each car went at its own uniform speed. They kept a look-out for one another, and met forty miles from Bugleminster. George that evening worked out the following little puzzle: "I find that if, on our respective arrivals, we had each at once proceeded on the return, journey at the same speeds we should meet at forty-eight miles from London. If this were so, what is the distance from London to Bugleminster?

Complete Solution

536 Puzzles: Problem & Solution #84: The Donkey Cart

Sunday, January 15th, 2017

Complete Solution

 

536 Puzzles: Problem & Solution #284: Choosing a Site

Friday, January 13th, 2017

  

This is what the author called a trick question.  The sum of the distances are constant.  To see why draw in lines from the vertices of the original triangles forming subtriangles T1,T2,T3.  

Now the sum of the areas of T1,T2,T3 = area of original equilateral triangle which is constant for this problem.  Since the area of a triangle is Base * Height 

A_T1+A_T2+A_T3 = A_Equilateral

B*H_T1+B*H_T2+B*H_T3 = A_Equilateral

H_T1+H_T2+H_T3 = A_Equilateral/B= H_Equilateral 

So it does not matter where you place the house.

I became curious about other types of triangles.  The solution for a 3-4-5 right triangle.

536 Puzzles: Problem & Solution #282: Those Russian Cyclists Again

Sunday, January 8th, 2017

The solutions giving in the book 536 Puzzles and Curious Problems are quite shorthanded and in order to understand them often you have to dig.

P=(a+b+c)^2

P^2=a^2+b^2+c^2+2ab+2ac+2bc    

Since in a right triangle: c^2=a^2+b^2  and area A=ab=hc we can substitute and get

P^2=2c^2+2ac+2bc+2hc    

P^2=2c(a+b+c)+2hc

c=P^2/(2P+2h)

Now since A=ab=hc=12*25=300 we can substitute in c^2=a^2+b^2 

c^2=a^2+(300/a)^2 which is rearranged to:

a^4-a^2c^2+300^2=0

a^4-625a^2+300^2=0  giving

a=15 and  b=20

 

Additional Links