Archive for the ‘Math’ 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  

Solve System of Equations X+YZ=6 Y+XZ=6 Z+XY=6

Tuesday, February 7th, 2017

Research LInks

Find the solution for the system of equations:

        X+YZ=6            Y+XZ=6             Z+XY=6  

Multiply each equation by the term missing to make each second term a triple

 X^2+XYZ=6X             Y^2+XYZ=6Y             Z^2+XYZ=6Z  

So now subtract the second equation from the first: 

 X^2 -Y^2=6(X-Y)    

(X+Y)(X -Y)=6(X-Y)    

(X+Y)=6   

Since the equations are symmetric we should have

(X+Y)=6        (X+Z)=6           (Y+Z)=6 

Subtracting the 3rd from the 1st:

X - Z =0   or 

 X = Z     and again since the equations are symmetric  X = Y = Z  

—————

The very first equation at the top  X+YZ=6   becomes

 X^2+X - 6=0  

 X^2+X - 6=0  

 (X+3)(X-2)=0   giving the solutions

 X = 2,-3 

Euclidean Algorithm for Greatest Common Denominator

Tuesday, January 31st, 2017

Research Links

A 24-by-60 rectangle is covered with ten 12-by-12 square tiles, where 12 is the GCD of 24 and 60. More generally, an a-by-b rectangle can be covered with square tiles of side-length c only if c is a common divisor of a and b. So the task is to find the largest square that tiles the rectangle completely.  See below:

Subtraction-based animation of the Euclidean algorithm. The initial rectangle has dimensions a = 1071 and b = 462. Squares of size 462×462 are placed within it leaving a 462×147 rectangle. This rectangle is tiled with 147×147 squares until a 21×147 rectangle is left, which in turn is tiled with 21×21 squares, leaving no uncovered area. The smallest square size, 21, is the GCD of 1071 and 462.

So the example compiled down to arithmetic steps would be as follows:

1071 = 2*462 + 147

462 = 3*147 + 21 

147 = 7*21 + 0   Thus 21 is the GCD of 1071 & 462

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.

Polynomial Root Solver with Root Map in Complex Plane and Graph of Function

Friday, January 27th, 2017

Research Links

Eulers Theorem

Friday, January 27th, 2017

Research Links

 

Eulers theorem is very similar to Fermat's little theorem.  It is not restricted to prime number p.  It is restricted to relatively prime a & p.  It states:

a^ {psi(p)} mod p = 1  

Where psi(p)    is the Euler totient function which is the number of integers less than and coprime to p.  If you followed the proof for Fermat's little theorem then you can understand this generalization rapidly.  As before when the integer a is coprime to p you get the jumble of all the integers 1,2,3…p-1.  This was guaranteed by p being prime in Fermat's little theorem.  When you relent on that condition then you have some integers a that are not coprime to p and they will not give you a full contingent of integers. See the spread sheet clips below

:  

2 is coprime to 15 and thus all values 0 through 14 are cycled through.  3 is not coprime to 15 and thus the gearing does not cycle through all values. 

In the spread sheet example clipped above the totient {psi(15)} = 8 

The following spread sheet snip contains the value of the modulus 1 to p-1 where p=15 in this case and the modulus of a*remainder.  As before with Fermat's little theorem the modulus values come in different order but contain identical values.

Thus:

m_1 * m_2 ...m_{psi(p)}  = am_1 * am_2 ...am_{psi(p)}  

m_1 * m_2 ...m_{psi(p)}  = a^{psi(p)}*[ m_1 * m_2 ...m_{psi(p)}]  mod p

a^{psi(p)} mod p  = 1

Flash Mind Reader

Friday, January 27th, 2017

Click on the image to go there.

The flash mind reader has you compute a number in your head.  You note the symbol next to the number you compute.  You then click the crystal ball and it returns the symbol you were thinking of.  This is a classic "force card" trick. Let's compute the number:

When you pick 10a+b    you pick   a & b

Then they have you calculate 

10a+b -(a+b) = 9a   Thus your result will be limited to 1,9,18….99   They got lazy and did not go to 100 ah ha!  They could have as easily just told you to take the tens digit and multiply by 9.  But then you would have seen immediately that your end result is limited to only 10 values.

So when the page comes up these values all have the same symbol next to them. The rest of the numbers will never be arrived at so they can obscure their subterfuge by allowing the symbols associated with those numbers to be random.  When you click on the crystal ball it pops up the symbol next to the 9a force numbers and the illusion is complete.

Euler Fermat Theorem – Fermats Little Theorem

Tuesday, January 24th, 2017

Fermat's little theorem states that if p is a prime number, then for any integer a, the number a p − a is an integer multiple of p. In the notation of modular arithmetic, this is expressed as

a^{p} = a mod {p}

For example, if a = 2 and p = 7, 27 = 128, and 128 − 2 = 7 × 18 is an integer multiple of 7.

If a is not divisible by p, Fermat's little theorem is equivalent to the statement that a p − 1 − 1 is an integer multiple of p:

a^{p-1} mod p = 1

Research Links

The quickest proof follows.  Take the series below:

 [a * 2a * 3a *4a * .... (p-1)a] mod p

= (a) mod p  * (2a) mod p * (3a) mod p * (4a) mod p  * .... (p-1)mod p   

Using an example of a=3 and p=17 is shown in the table below.  Note the jumble of all values 1 through (p-1) in column D.  All the values 1 through 16 are there once and only once just not in the order you are accustomed to.

So the value is equal to: 1*2*3*4*....*(p-1) = (p-1)!

= (a) mod p  * (2a) mod p * (3a) mod p * (4a) mod p  * .... (p-1)mod p = 1*2*3*4*....*(p-1) = (p-1)! 

= a^p  * (p-1)! mod p= (p-1)! mod p

= a^p mod p  = 1     It is in the above paragraph of mathematics that you can see that all the numbers 1,2,3....p-1 must be relatively prime to p in order for the derivation to work and the relation to hold.

Which leads to the interesting phrase

= (a^p-1) mod p  = 0   Below is an example of the values of this phrase with p=5

Fermat's Little Theorem Spreadsheet

Observation: Relationship of the Roots of the Polynomial

Using the example x^4-1 assuming p=5 you get the following root map:

x^4-1 = (x-1)(x-i)(x+1)(x+i) 

for x=2:

x^4-1 = (1)(2-i)(2+1)(2+i)=(1)(3)(5)= 15 and this relationship works for all the coprimes. 

for x=3:

x^4-1 = (2)(3-i)(3+1)(3+i)=(2)(4)(10)=80 

Modulus of a Product

Monday, January 23rd, 2017

If you have the product of two numbers and want to calculate the modulus of said product

(A*B)mod C    Where A,B and C are integers

let A=mC+a  B=nC+b  where a & b are the modulus of A & B respectively and m & n are integers

Substituting:

(mC+a)(nC+b)mod C 

[ mnC^2+(an+bm)C+ab ]mod C   and because everything is an integer

[ mnC^2+(an+bm)C ]mod C=0   and thus

(A*B)mod C = (ab)mod C = ab   since a & b are already the modulus of A & B. Now if this product is larger than C the modulus function will need be reapplied as in the following example:

Example:  A=8 B=8 C=5

8^2 mod 5 =64 mod 5 = 4 

(8 mod 5)* (8 mod 5)= 9 

9 mod 5 = 4    which is the same as above