Gabriel’s problem

Gabriel box

Gabriel wrote the numbers 1-9 in a 3×3 grid.

He then multiplied together all the numbers in each row and wrote the resulting product next to that row.
He also multiplied the numbers in each
column together, and wrote the product
under that column.
He then rubbed out the numbers 1-9.

Can you work out where Gabriel placed the numbers 1-9?

Did you have more information than you needed?

This puzzle comes directly from this NRich page, with the pdf of the problem available here.

Parable of the Polygons

polygons

Today we looked at this “playable post on the nature of society”. It is a great activity to make you think about how you can positively contribute to society becoming less segregated.

We tried to work out the maths behind the applet. Where does 95% come from in the screenshot from above?? In the javascript for the applet you can see that a measure of “sameness” is used which involves the fraction of neighbours that are the same as you. Can you create/recreate the algorithm used to find the 95%?

91 card game

 

cardsfor91

91 card game

This card game can be played with two or more players. The goal of the game is to collect the most number of points possible. You do this by biding on the diamonds, using your cards.

The game starts with each player having one complete suit, for instance, one player could have the spades. You can use more than one pack if there are more than three players.

The diamonds are mixed up and placed in the middle. These diamonds are turned over one by one and each player throws a card depending on the value of the diamond card. The values for each card are as follows:

King – 13   Queen – 12   Jack – 11 and the rest of the cards follow as such, Ace being worth 1 point.

The player who’s card has the highest value collects the diamond card. In the picture above, the person who played the King of Clubs would win the Jack of Diamonds.

If there is a tie and two or more people play cards of the same value, then another diamond is added to the middle and all the players bid again for these cards. If the final card played by each player is a tie then no one wins the diamonds in the middle.

The player who wins is the player who collects the most points out of the 91 available after all cards have been played.

Can you find a winning strategy to be able to collect the most points every time?

Taxicab geometry

Taxicab geometry is a form of geometry, where the distance between two points A and B is not the length of the line segment AB but the sum of the shortest horizontal and vertical distances between the two points. Example:

Length

The first challenge is to try to find what a midpoint would be in taxicab geometry. Here is an example to help:

midpointexample

Since the distance between A to the midpoint is the same as the distance between the point B and the midpoint, the midpoint is at the same distance from A and B. Can you spot any more midpoints, if there are any? Can you pick two different points that do not have a midpoint?

The second task is to find what a perpendicular bisector looks like on taxicab geometry.

The third task is to try to draw a circle in the taxicab geometry.

Next, try to draw an equilateral triangle and a rhombus.

If you can do all that, try to draw other geometrical shapes you know on taxicab geometry and post them in the comments.

For more info have a look here.

The second challenge – The Two Eggs Problem

two eggs

You are given two eggs, and access to a 100-storey building. Both eggs are identical. The aim is to find out the highest floor from which an egg will not break when dropped out of a window from that floor. If an egg is dropped and does not break, it is undamaged and can be dropped again. However, once an egg is broken, that’s it for that egg.

If an egg breaks when dropped from floor n, then it would also have broken from any floor above that. If an egg survives a fall, then it will survive any fall shorter than that.

The question is: What strategy should you adopt to minimize the number egg drops it takes to find the solution? (And what is the worst case for the number of drops it will take?)

Alphanumerics

send
The above is probably the most famous example of an alphametric.

A cryptarithm is a type of mathematical puzzle in which the digits in numerical calculations are replaced by letters of the alphabet.

Alphametics are cryptarithms in which letters form meaningful words, often in meaningful phrases. There are only a few simple rules for these puzzles:

1. The same letter always stands for the same digit, and the same digit is always represented by the same letter. So if a P stands for a 2, every P in the puzzle is a 2. If a 3 is represented by a K, every 3 in the puzzle will be a K.

2.The digit zero is not allowed to appear as the left-most digit in any of the numbers in the puzzle. For example, if the word FOOD represents an addend in a puzzle, the F may not be a zero.

3.Most alphametics have unique solutions (there is only one possible answer).

Here are a few easier alphametrics to try to solve. You need to find which letter each number represents. A good place to start in the first one is the F of FOOL, as there is only one number it can possibly be:
alphanumerics
Here is an extensive list to try from Bielefeld University.
You can even make up your own ones here!
For example
FlemingGoodman
But there is no guarantee that they will be easy or fun to solve! It may take a lot of brute force.
Finally this is a puzzle from Nrich about an alphanumeric that doesn’t have a unique solution:
kids

Well done on the first challenge

Thank you everyone for your excellent contributions. Well done trying by hand and I hope some of you had a look at trying different numbers on the geogebra applet here.

It seems like finding a long sequence really is a challenge no matter what numbers you use.

However ….

It is technically possible to choose four numbers that make an infinite sequence where you never end up at 0,0,0,0. The solution is very tricky to work with though and using a computer doesn’t even help because computers round numbers to a certain number of decimal places which messes up the result.

For an explanation and how to get to the solution have a look at this blog.

The next official challenge will be launched on Wednesday 19th of April … please enjoy the other puzzles on this site in the meantime.

Estimating Pi for Pi Day!

circle dartboard

As it was Pi Day on Tuesday (14th of March is 3.14 in American style date!) we thought we would try and estimate the value of Pi by simulating throwing darts randomly at a square dartboard like below and seeing how many land inside the circle.

One way to do this is to generate a random point by typing the following in the input bar.

(RandomUniform[-1, 1], RandomUniform[-1, 1])

This will generate a point with x coordinate inbetween -1 and 1 and y coordinate inbetween -1 and 1.

Then right click on the point and select “Trace On”.

In the View menu there is a command called “Recompute All Objects”. The shortcut for this is to hold down Ctrl and press R.

You should see your random point going to different places in the screen. You can do this say 80 times.

Alternatively, you can create 80 points on a spreadsheet with the Random Uniform command and then “Create List of Points”. See here for a working applet with this method.

Either way you can now estimate the value of Pi!!!

Count the number of points inside the circle
Divide this by 80 to get the proportion of points that are inside the circle.
Area of the circle is π * 1² = π
Area of square is 2*2=4
So this proportion should be π/4.
So if we multiply our proportion by 4 we get an estimate for π.

The more points you use the better the estimate will be.

Good luck, and happy Pi Day!

Collatz conjecture

collatz

Think of an positive integer.

If it is equal to 1, stop.

If it is even, divide it by 2.

If it is odd, multiply it by 3 and add 1.

With the new number you get, repeat the instructions above.

If you picked the number 6, your sequence would look like this:

3, 10, 5, 16, 8, 4, 2, 1

Did your sequence end up at 1? Mathematicians have guessed (hypothesised) that all starting choices will eventually end up at 1, but no one has been able to prove this. If you can find just one example that disproves this theory then you could claim a prize of 120 million Japenese Yen!  Here is a fun example of a counterexample that took a long time to find.

Try a few starting numbers by hand. Then you could try and use the power of a spreadsheet such as Geogebra, or by writing some code on Python and let the computer do the hard work for you!

Open up Geogebra.

You will need to use the Mod  command:

Mod[ <Dividend Number>, <Divisor Number> ]

to check if the number is even.

and the If command:

If[ <Condition>, <Then>, <Else> ]

to choose what to do if it is even and what to do if it is odd.

Put together, here is the formula you should put into cell A2, once you have put a starting number in A1.

=If[Mod[A1, 2] == 0, A1 / 2, A1*3 + 1]

Then just hover your mouse pointer in the bottom right corner and click the left button and hold down and drag down lots of cells. You should see the sequence appear.

If you want to be super clever you could try and combine two If statements so that if the cell was equal to 1 it would stop calculating and just say “STOP”.

You could also try this activity on Python, click on the menu bar on the top left to make it full screen.


Good luck!

First challenge – squares in squares puzzle

Deadline – 22nd of March!

Draw a square and choose four numbers to put at each vertex. For example:

diffy1

Now in the middle of each segment write the positive difference between the two numbers at each end. e.g. the difference between 5 and 6 is 1.

diffy3

Join these new points up with a square

diffy4

Now in the middle of each segment of the new square find the positive difference of the numbers at each end. For example the difference between 15 and 1 is 14. Do this for all the segments and draw another square joining up your four new answers.

diffy5

Keep finding the positive differences and joining these points up into a square until you reach 0,0,0,0.

diffy6

Choose four new starting numbers and follow the instructions above to create your own version of this.

Our first choice of four starting numbers meant drawing 4 squares before we reached 0,0,0,0. How many squares have you drawn with your choice of starting numbers?

Your challenge is now to find the longest sequence of squares you can before the sequence reaches 0,0,0,0 and send us your answer.

An easy way to send sequences would be as lists of numbers. For example the one above could be written as

diffy7

Please write giving us your longest sequence and any other thoughts on the puzzle using the “Leave a comment” button below.

 

Dobble!

dobble card

We started off by playing the card game Dobble. If you haven’t seen it before, the game consists of a set of cards like the one above with 8 symbols on each card. You compete in a small group of people to be the first to spot a common symbol with your topmost card and a card in the middle.

The question is, what is the maximum number of cards you could have in the Dobble pack so that there is always exactly one identical symbol between any two given cards, and this identical symbol is not the same for all the cards (that would be a boring game!).

This is a hard question to answer straight away, try first to create a “Dobble” set of cards with just 2 symbols per card.

Then try and create a set with 3 symbols per card.

Any patterns you spot should help you to answer the hard question!

Here is a nice blog on the maths behind Dobble.

Cribbage

cribbage4

Cribbage

We played a simplified version of Cribbage, and looked at some of the interesting maths behind it.

Rules

Game for up to 8 players. Each person is dealt six cards. Players choose four cards to keep. Then one card is turned up in the centre of the table and counts as part of each player’s hand. Ace is considered the low card, and king high. The scoring is as follows:

Fifteens. Each card is assigned a value. Ace through 10 are the face value of the card, and jack, queen and king have value 10. Each combination that totals fifteen is awarded 2 points.

Pairs. Each pair of cards, ace through king, is awarded 2 points.

Runs. Each run of three or more cards is awarded the number of points equal to the length of the run – a run of three is worth 3 points, a run of four, 4 points, and a run of five, 5 points. In this instance runs are not counted in multiple ways. For example, A ,2, 3, 4, 5 is not counted as one run of five, two runs of four and three runs of three, but only as a single run of five.

The person with the highest score after four rounds is the winner.

Example hand (scores 16 points)

cribbage3

Questions to think about:

What do you think is the minimum and maximum scores possible?

Can you find the maximum hand?

Are there any impossible numbers inbetween?

Are some points totals more common than others?  How could we know for sure?

See this page for some of the answers to these questions.

Here are the full version rules of Cribbage

Quadrilaterals

9 pin board

Find all the different quadrilaterals you can make by joining four dots on a 9-dot grid.

Different in this case means not congruent – i.e. none of your quadrilaterals should be able to be formed by rotating, translating or reflecting one of your other quadrilaterals.

Here is a couple to get you started:

quadrilaterals

How many can you find?

Coin puzzles

coin title

Some of these puzzles are taken from a nice book by Alex Bellos called Can you solve my problems? Alex Bellos does a fun puzzle blog on the Guardian every two weeks.

The Four Stacks

four stacks

Start with eight coins in a row, and create four stacks of two coins in four moves. A move consists of moving one coin to the left or right by hopping over two coins and landing on the third one along. You can hop over single coins or stacks.

Tait’s Teaser

coin - tait

The aim of the puzzle is to start with two different types of coin (or heads and tails of the same coin) in the arrangement above and get to the arrangement below in as few ‘moves’ as possible.

coin - tait2

A move consists of moving two adjacent coins at the same time. You can move them anywhere in the same line, but you can’t switch the two coins around as you do so.

The answer is not five!

Frogs and Toads

frogs and toads

Place six coins as shown above. The white ones represent toads and the grey ones are frogs. Frogs and toads can only move by hopping over one other frog or toad to an empty space. Toads can move to the right, and frogs to the left. Can you rearrange them into the position below?

frogs and toads final

See here for an interactive version of this puzzle created by NRich which allows you to change the number of frogs and toads.

Star Puzzle

Star

Draw a star and try to place 9 coins on any of the black vertices. You can place coins by starting from a vertex which is empty, moving in a straight line and counting 1,2,3. Number 1 is the vertex you start on, number 2 may or may not have a coin on it, and number 3 is where you place your coin.

Two possible opening moves are shown below

Star2Star3

Here is an attempt that has gone wrong! 7 coins have been placed but there is no way to place any more, because you must start on an empty vertex.

Star4

Here is a great little applet coded by Etienne Royer-Gray to play with:

Just one cut

Capture

The first challenge today was to cut a square out of a piece of paper using just one straight cut with a pair of scissors.

square fold

The picture above gives you a hint how to fold it first if you look closely!

Next challenge is to cut out an equilateral triangle by doing some careful folding and just one straight cut.

Here are instructions for making the letters of your name just using one cut!  Click on “Folding Steps” for step by step instructions.

Paper folding and cutting can be taken very far – you can try to make all the number diamond playing cards in this way!!

For hints on this challenge and more activities see this page from the Wild Maths website.

Counting Chickens

chickens

On a special farm chickens live in circular fields, separated by fence posts and straight pieces of fencing

best chickens

Is there a pattern between the number of fence posts and the maximum number of chickens that can be kept?

Are you sure?  How do you know?

Can you explain why?

Hint: The answer when you have 6 posts is not what you might think!

When you have had a play around with this problem you might like to read this article or check out this solution.

Fractals

Exploring the Koch Snowflake (it’s getting cold after all!)

Draw the biggest equilateral triangle you can on a page

On each line/side, cut it in three parts and remove the middle part

Add two sides of a triangle in the gap.

Repeat like so:

362px-KochFlake.svg

What develops is a fractal. If you carry on this pattern for ever the area is bounded but the perimeter is infinite! You can learn how to make the Koch snowflake on Python here.

This site gives the code for a Seirpinski Triangle. You can try it on Trinket here.

Numberphile have an amazing collection of maths videos, one relating to fractals is here. And here is a great TED talk by Benoit Mandelbrot.

Logo Programming

logo2

Logo is a language that was written in 1967, but is still interesting to work with nearly 50 years later!

There is an online version to use or Windows users can download a free copy of FMSlogo. A good free version for Mac users is ACSlogo.

THe basic LOGO commands are:

FD forward          BK backward

LT left                    RT right

PU pen up             PD pen down

HT hide turtle      ST show turtle

CS clear screen    CT clear text

The following challenges are adapted from the brilliant monthly puzzle website NRich, try the full set of puzzles after.

Challenge 1

Try drawing these shape on LOGO

starsquare-5

Challenge 2

Draw regular polygons just by using the repeat command.

e.g.  REPEAT 5 [FD 30 RT 72]

Challenge 3

Now trying using nested repeats to create shapes like this!

logo1logo2logo3

Killer Sudoku

Today we looked at strategies for solving a tricky version of a popular puzzle. Usual Sudoku rules apply – numbers 1 to 9 in every row, column and box – but in this version you don’t get any starting numbers, just the total sum of the numbers in each dotted box.

sudoku

Hint: The numbers 1-9 add up to 45, see if you can use that fact and the bottom left square to calculate this number (see how one of the dotted boxes overlaps the squares):

sudoku4

12 + 7 + 16 = 35.  This helps a lot!

Hat puzzles

768.png

Hat puzzles provide endless entertainment! The following ones which accompany the picture above are taken directly this week’s Monday puzzle in the guardian by Alex Bellos , which is an excellent source of maths puzzles.

Alice, Bob and Charlie are well-known expert logicians; they always tell the truth. They are sat in a row, as illustrated above. In each of the scenarios below, their father puts a red or blue hat on each of their heads. Alice can see Bob’s and Charlie’s hats, but not her own; Bob can see only Charlie’s hat; Charlie can see none of the hats. All three of them are aware of this arrangement.

(i) Their father puts a hat on each of their heads and says: “Each of your hats is either red or blue. At least one of you has a red hat.” Alice then says “I know the colour of my hat.” What colour is each person’s hat?

(ii) Their father puts a new hat on each of their heads and again says: “Each of your hats is either red or blue. At least one of you has a red hat.” Alice then says “I don’t know the colour of my hat.” Bob then says “I don’t know the colour of my hat.” What colour is Charlie’s hat?

(iii) Their father puts a new hat on each of their heads and says: “Each of your hats is either red or blue. At least one of you has a red hat, and at least one of you has a blue hat.” Alice says “I know the colour of my hat.” Bob then says “Mine is red.” What colour is each person’s hat?

(iv) Their father puts a new hat on each of their heads and says: “Each of your hats is either red or blue. At least one of you has a red hat, and at least one of you has a blue hat.” Alice then says “I don’t know the colour of my hat.” Bob then says “My hat is red”. What colour is Charlie’s hat?

(v) Their father puts a new hat on each of their heads and says: “Each of your hats is either red or blue. Two of you who are seated adjacently both have red hats.” Alice then says “I don’t know the colour of my hat.” What colour is Charlie’s hat?

Answers can be found here

Another great puzzle is:

Four prisoners are arrested for a crime, but the jail is full and the jailer has nowhere to put them. He eventually comes up with the solution of giving them a puzzle so if they succeed they can go free but if they fail they are executed.

The jailer seats three of the men into a line. The fourth man is put behind a screen (or in a separate room). He gives all four men party hats. The jailer explains that there are two black hats and two white hats, that each prisoner is wearing one of the hats, and that each of the prisoners see only the hats in front of him but neither on himself nor behind him. The fourth man behind the screen can’t see or be seen by any other prisoner. No communication among the prisoners is allowed.

If any prisoner can figure out what color hat he has on his own head with 100% certainty (without guessing) and tell the jailer, all four prisoners go free. If any prisoner suggests an incorrect answer, all four prisoners are executed. The puzzle is to find how the prisoners can escape, regardless of how the jailer distributes the hats.

Answer is here.

And finally the super tricky one:

100 prisoners are lined up by an executioner, who places a red or blue hat upon each of their heads.

The prisoners can see the hats of the people lined up in from of them, but they cannot look at the hats behind them, or at their own.

Starting at the back of the line, the executioner asks the last prisoner to state the colour of his hat.

In order to live, the prisoner must answer correctly.

The night before the line-up, the prisoners can discuss a strategy to help them survive. How many prisoners can be guaranteed to be saved?

See here for a discussion of the solution.

Project Euler

euler_portrait

The puzzle that we solved this week can be solved by hand, but excel is a very useful tool!

If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23.

Find the sum of all the multiples of 3 or 5 below 1000.

This puzzle was taken from  Project Euler Website, where there are lots more puzzles to try, all designed to be solved with a computer.

Magic tricks

cards
See if you can be the magician …

Deal three piles of three cards. Ask someone to choose a pile and look at the bottom card without showing you the card. Put the three piles together, with the chosen pile on top.

Then count off cards while spelling some words such as “Thomas is clever”. The first word should have at least three letters and a maximum of nine letters, the second word should have two letters, and the third word should have at least five letters and a maximum of nine letters.

For each word, deal the top cards in the deck onto a separate pile, and then put the dealt cards back under the bottom of the deck before proceeding to the next word.

Finally, spell out the word ‘MAGIC’; the chosen card will be the card at ‘C’ – so you can flip this card over and amaze your audience!

This trick also works if you look at the card that is chosen at the start, and then spell it out e.g. TWO OF SPADES MAGIC.

Why does it always work?