## 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:

Expanding:

Subtracting the second from the first yields:

Tuesday, January 31st, 2017

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.

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

yields

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:    now plug in number until you get an even z. Try x=1:

and is even and thus the problem is done

Modulus Solution

Two obvious solutions are

and

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?

where a is dollars and b is cents

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

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?

• 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 .  Where a is the dollar amount and b the cents.

Thus the relation detailed in the puzzle can be written

rearranging terms

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

and since a is to be an integer solution:

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

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  and from this we calculate  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 you arrive at the solution

### 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:

Company P&P number of permissible ways to select 3 staff for lunch:

Company R&R number of permissible ways to select 3 staff for lunch:

We are given second phrase is 3x the first phrase

Rearranging yields

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

yielding

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?

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

Sunday, January 15th, 2017

### 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

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.

Since in a right triangle:  and area  we can substitute and get

Now since  we can substitute in

which is rearranged to:

giving

and