Dice simulation

When you throw two dice and add the numbers together what number are you most likely to get? What is the smallest number you can get? What is the biggest? Are all numbers equally likely?

We used python to simulate rolling a dice 100 times and plotted the results using pygal. Step by step instructions are here.

A big challenge would be to program the following game on python:

Pig Game

The game of Pig is a two player game played with two six-sided dice. The object of the game is to reach 100 points of more. Play is taken in turns. On each person’s turn that person has the option of either:

  1. Rolling the dice: where a roll of two to six is added to their score for that turn and the player is given the same choice again; or a roll of 1 loses the player’s total points for that turn and their turn finishes with play passing to the nexxt player.
  2. Holding: the player’s score for that round is added to their total and becomes safe from the effects of throwing a 1. The player’s turn finishes with play passing to the next player.

 

Medal Muddle

medal

We really enjoyed working on the following puzzle from Nrich.

Thirteen nations competed in a sports tournament. Unfortunately, we do not have the final medal table, but we have the following pieces of information:

1. Turkey and Mexico both finished above Italy and New Zealand.

2. Portugal finished above Venezuela, Mexico, Spain and Romania.

3. Romania finished below Algeria, Greece, Spain and Serbia.

4. Serbia finished above Turkey and Portugal, both of whom finished below Algeria and Russia.

5. Russia finished above France and Algeria.

6. Algeria finished below France but above Serbia and Spain.

7. Italy finished below Greece and Venezuela, but above New Zealand.

8. Venezuela finished above New Zealand but below Greece.

9. Greece finished below Turkey, who came below France.

10. Portugal finished below Greece and France.

11. France finished above Serbia, who came above Mexico.

12. Venezuela finished below Mexico, and New Zealand came above Spain.

We came up with different strategies to sort out the medal table, and we were largely successful eventually, but we were all impressed by a quick way to solve it!

 

Humble-Nishiyama Randomness Game

cards

We played a two player strategy game today, using all the information from +plus magazine.

The game is played as follows. At the start of a game each player decides on their three colour sequence for the whole game. The cards are then turned over one at a time and placed in a line, until one of the chosen triples appears. The winning player takes the upturned cards, having won that “trick”. The game continues with the rest of the unused cards, with players collecting tricks as their triples come up, until all the cards in the pack have been used. The winner of the game is the player that has won the most tricks. An average game will consist of around 7 “tricks”.

e.g. Player 1 picks RRB, Player 2 picks RBB and see who wins.

The question we thought about was:

  • Is it just a game of chance, or if you are choosing second, could you improve your chance of winning?

There is a related game called Penny’s game, using Heads and Tails of a coin toss instead of playing cards. In this version, you just play until one person has won a “trick”. We worked out some of the odds given in the first table in this article.

We ended up having to sum a geometric series! Great fun!

8 Queens Problem

queens

Welcome back everyone!

Our first puzzle this year was to place 8 queens on a chessboard such that none of the queens could take any of the others. Above is a fail – only 5 queens are on the board and they are no places left to put any more.

Here is H.B.Meyer’s website – try for yourself to fit 8 queens on the board, it is possible!

We then looked at changing the size of the board from an 8 by 8 to smaller sizes, e.g. can you fit 5 queens on a 5 by 5 board? Here is a place to try this. And if so, how many “unique” solutions are there? We defined a unique solution as being one that did not look like any others we had found when we rotated our paper or put it up to the light so it appeared flipped!

There is a great numberphile video  on this puzzle, and all the answers for different size boards on wikipedia.

Chaos Game

On a piece of paper, draw a triangle (any triangle -right angled, equilateral, isosceles, scalene). Colour one of the vertices red, the second blue, and the third green.

Next, take three dice – one red, one blue, and one green.

Now draw a point in the triangle. This point is the seed for the game. Then roll the die. Whichever die shows the highest number (throw again if there is a tie for the highest), draw a point halfway inbetween the seed and the appropriately colored vertex. Now do the same, using your new point as the seed for the next. After a few rolls you might have a drawing like this:

seed

Now continue in this fashion for five rolls of the dice. Then rub out all the points except the most recent seed and the coloured points.

Now carry on but don’t erase any points.

Can you guess what pattern your points are going to make? You might be surprised!

You might want to use technology to help you find out. Here are some instructions for using geogebra.

Jumping Frogs

frogs

The aim of this puzzle is to switch the red frogs with the blue frogs according to the following rules:

  • The left set of frogs can only move right, the right set of frogs can only move left.
  • Frogs can move forward one space, or move two spaces by jumping over another counter.
  • The puzzle is solved when the two sets of frogs have switched positions.

How many moves does this puzzle take?

How about if we change the number of frogs? Can you find a rule for the number of moves it will take based on how many frogs there are?

NRich has an applet with nice graphics here, but you are allowed to go backwards in their version, so it is is best to use this one to help you count the moves.

For interested facilitators extra notes and the solutions are here.

Venn diagram mystery

john venn

Today we solved an intriguing homework riddle with the help of a Venn diagram.  We had clues such as

“Seven students in total have Maths homework but Miya isn’t one of them.”

and

“Rory has more homework than Aidan.”

Using all the clues, which you can find here, we were able to work out which students had which pieces of homework.

It was a nice challenge! The solution can be found here. This activity was originally found on the TES website.

Name that Polynomial

This game is thanks to David Bedford at the BCME Conference in Warwick.

One person writes down a polynomial with positive integer coefficients. Call it f(x) They then choose an integer that it bigger than all their coefficients. Call it n. They then calculate f(n) and give just n and f(n) to the second person.

The second person should be able to name that polynomial! How?

Example:

Given only n=8 and f(n) = 6855 how could you work out that the polynomial was

?

It might help to think about an example when n=10 first.

The third challenge – number spellings

Hello everyone … we hope you will enjoy working on the problem below from the UK and Kenya! Please post your comments below.

First think of an integer written out in letters e.g. sixteen.

Take the number of letters in this number e.g. 7

Write this number out e.g. seven

Take the number of letters in this number e.g. 5

Write this number out e.g. five

Take the number of letters in this number e.g. 4

Write this number out e.g. four

Now we have converged to the number four.

Try this process with other numbers and see what happens.

Is it the same in other languages?

You may want to use the power of Python programming language to explore this further. You can make the Trinket below fullscreen by clicking on the three parallel lines in the top left corner and then clicking fullscreen (and do this again to stop it being fullscreen).