binary and ternary investigations - mathematical · pdf filebinary and ternary investigations...

26
BINARY AND TERNARY INVESTIGATIONS Dr Chris Pritchard [email protected] The Mathematical Association Annual Conference 2016 University of Oxford

Upload: hoangtruc

Post on 04-Mar-2018

225 views

Category:

Documents


4 download

TRANSCRIPT

Page 1: Binary and Ternary Investigations - Mathematical · PDF fileBINARY AND TERNARY INVESTIGATIONS ... 11110 11010 10110 10010 01110 01010 00110 00010 11101 11001 ... 4 2 16 8 1 25 25 is

BINARY AND TERNARY

INVESTIGATIONSDr Chris Pritchard

[email protected]

The Mathematical Association Annual Conference 2016

University of Oxford

Page 2: Binary and Ternary Investigations - Mathematical · PDF fileBINARY AND TERNARY INVESTIGATIONS ... 11110 11010 10110 10010 01110 01010 00110 00010 11101 11001 ... 4 2 16 8 1 25 25 is

Binary Application 1: Cuisenaire rods

4

1 + 3Take a 4 rod and make the

same length using a

combination of other rods.

Task 1: Find the other six possibilities? 1 + 1 + 1 + 1

1 + 1 + 2

1 + 2 + 1

2 + 1 + 1

2 + 2

3 + 1

Page 3: Binary and Ternary Investigations - Mathematical · PDF fileBINARY AND TERNARY INVESTIGATIONS ... 11110 11010 10110 10010 01110 01010 00110 00010 11101 11001 ... 4 2 16 8 1 25 25 is

To cut or not to cut,

that is the question!

4

1 + 3

Using a 1 for a cut and a 0

for the lack of a cut we can

produce a binary coding.

100

000

0 0 0 0

0 0 0 1

0 0 1 0

0 0 1 1

0 1 0 0

0 1 0 1

0 1 1 0

0 1 1 1

1 0 0 0

1 0 0 1

1 0 1 0

1 0 1 1

1 1 0 0

1 1 0 1

1 1 1 0

1 1 1 1

0 0 0

0 0 1

0 1 0

0 1 1

1 0 0

1 0 1

1 1 0

1 1 11

0

1 1

0 0

0 1

1 0

Page 4: Binary and Ternary Investigations - Mathematical · PDF fileBINARY AND TERNARY INVESTIGATIONS ... 11110 11010 10110 10010 01110 01010 00110 00010 11101 11001 ... 4 2 16 8 1 25 25 is

0 0 0 0

0 0 0 1

0 0 1 0

0 0 1 1

0 1 0 0

0 1 0 1

0 1 1 0

0 1 1 1

1 0 0 0

1 0 0 1

1 0 1 0

1 0 1 1

1 1 0 0

1 1 0 1

1 1 1 0

1 1 1 1

0 0 0

0 0 1

0 1 0

0 1 1

1 0 0

1 0 1

1 1 0

1 1 11

0

1 1

0 0

0 1

1 0

Length Length Length Length

2 3 4 5

Discuss

Number of

patterns for each

length

Symmetries in rods

and binary codes

Page 5: Binary and Ternary Investigations - Mathematical · PDF fileBINARY AND TERNARY INVESTIGATIONS ... 11110 11010 10110 10010 01110 01010 00110 00010 11101 11001 ... 4 2 16 8 1 25 25 is

Abandon the physical model:

Length 6, i.e. 5 cuts (32 possibilities)

11111 11011 10111 10011 01111 01011 00111 00011

11110 11010 10110 10010 01110 01010 00110 00010

11101 11001 10101 10001 01101 01001 00101 00001

11100 11000 10100 10000 01100 01000 00100 00000

Page 6: Binary and Ternary Investigations - Mathematical · PDF fileBINARY AND TERNARY INVESTIGATIONS ... 11110 11010 10110 10010 01110 01010 00110 00010 11101 11001 ... 4 2 16 8 1 25 25 is

Task 3: Consider the rods up to length 5. Identify the patterns arising

from using rods of length 1 and 2 only.

0 0 0 0

0 0 0 1

0 0 1 0

0 0 1 1

0 1 0 0

0 1 0 1

0 1 1 0

0 1 1 1

1 0 0 0

1 0 0 1

1 0 1 0

1 0 1 1

1 1 0 0

1 1 0 1

1 1 1 0

1 1 1 1

0 0 0

0 0 1

0 1 0

0 1 1

1 0 0

1 0 1

1 1 0

1 1 11

0

1 1

0 0

0 1

1 0

Page 7: Binary and Ternary Investigations - Mathematical · PDF fileBINARY AND TERNARY INVESTIGATIONS ... 11110 11010 10110 10010 01110 01010 00110 00010 11101 11001 ... 4 2 16 8 1 25 25 is

0 0 0 0

0 0 0 1

0 0 1 0

0 0 1 1

0 1 0 0

0 1 0 1

0 1 1 0

0 1 1 1

1 0 0 0

1 0 0 1

1 0 1 0

1 0 1 1

1 1 0 0

1 1 0 1

1 1 1 0

1 1 1 1

0 0 0

0 0 1

0 1 0

0 1 1

1 0 0

1 0 1

1 1 0

1 1 11

0

1 1

0 0

0 1

1 0

Fibonacci

Sometimes

presented

as a steps

problem

Page 8: Binary and Ternary Investigations - Mathematical · PDF fileBINARY AND TERNARY INVESTIGATIONS ... 11110 11010 10110 10010 01110 01010 00110 00010 11101 11001 ... 4 2 16 8 1 25 25 is

Length 6: where are the Fibonacci steps now?

00000 00001 00010 00011 00100 00101 00110 00111

01000 01001 01010 01011 01100 01101 01110 01111

10000 10001 10010 10011 10100 10101 10110 10111

11001 11001 11010 11011 11100 11101 11110 11111

Page 9: Binary and Ternary Investigations - Mathematical · PDF fileBINARY AND TERNARY INVESTIGATIONS ... 11110 11010 10110 10010 01110 01010 00110 00010 11101 11001 ... 4 2 16 8 1 25 25 is

Remove any binary codes with consecutive zeros.

00000 00001 00010 00011 00100 00101 00110 00111

01000 01001 01010 01011 01100 01101 01110 01111

10000 10001 10010 10011 10100 10101 10110 10111

11001 11001 11010 11011 11100 11101 11110 11111

01010 01011 01101 01110 01111

10101 10110 10111

11010 11011 11101 11110 11111

13 possibilities

Page 10: Binary and Ternary Investigations - Mathematical · PDF fileBINARY AND TERNARY INVESTIGATIONS ... 11110 11010 10110 10010 01110 01010 00110 00010 11101 11001 ... 4 2 16 8 1 25 25 is

Binary Application 2: Bubbles

Here are two bubbles

drawn in different ways:

Task 4: Jot down the different ways of showing 3 bubbles.

Page 11: Binary and Ternary Investigations - Mathematical · PDF fileBINARY AND TERNARY INVESTIGATIONS ... 11110 11010 10110 10010 01110 01010 00110 00010 11101 11001 ... 4 2 16 8 1 25 25 is

Moving towards binary

Crop top and bottom

Interpret as a sequence o brackets ( ( ) ) ( )

Code an opening bracket as a 0

and a closing bracket as a 1. 0 0 1 1 0 1

Since each such binary string starts

with a 0 and ends with a 1 we

could remove these two digits.

0 1 1 0

Page 12: Binary and Ternary Investigations - Mathematical · PDF fileBINARY AND TERNARY INVESTIGATIONS ... 11110 11010 10110 10010 01110 01010 00110 00010 11101 11001 ... 4 2 16 8 1 25 25 is

Task 5: Now find the binary codes for the other three

configurations to complete the set.

1010 0110 0101 0011

Why does each code have the same number of zeros and ones?

Page 13: Binary and Ternary Investigations - Mathematical · PDF fileBINARY AND TERNARY INVESTIGATIONS ... 11110 11010 10110 10010 01110 01010 00110 00010 11101 11001 ... 4 2 16 8 1 25 25 is

Task 6: There are two more such codes. Find them,

draw the bubbles diagrams and interpret your answers.

1001 ( ) ( ( ) )

1100 ( ) ) ( ( )

Now we can go on to generate all possible patterns

with 4, 5, 6, … bubbles starting with full sets of binary

codes of the correct length.

Page 14: Binary and Ternary Investigations - Mathematical · PDF fileBINARY AND TERNARY INVESTIGATIONS ... 11110 11010 10110 10010 01110 01010 00110 00010 11101 11001 ... 4 2 16 8 1 25 25 is

Binary Application 3: Folds and creases

Reference: ATM’s Points of Departure 1 (1997).

Take a strip of paper and fold it repeatedly over from right to left.

0 0 1

0

After folding once there is

an ‘in fold’, coded 0.

After folding twice there are

three folds (in, in, out),

coded 001

Page 15: Binary and Ternary Investigations - Mathematical · PDF fileBINARY AND TERNARY INVESTIGATIONS ... 11110 11010 10110 10010 01110 01010 00110 00010 11101 11001 ... 4 2 16 8 1 25 25 is

Task 7: Jot down the binary code we get after 3 folds. Is there

an easy way of generating the next binary code each time?

0 0 1 0 0 1 1

For the next design each time, put in a new pivot at the end

and then reflect the previous sequence changing all creases

(like taking complements). In folding on the pivot each 0 hits a

1 and vice versa, each out fold tucks into an in fold.

0 0 1 0 0 1 1 0 0 0 1 1 0 1 1

Page 16: Binary and Ternary Investigations - Mathematical · PDF fileBINARY AND TERNARY INVESTIGATIONS ... 11110 11010 10110 10010 01110 01010 00110 00010 11101 11001 ... 4 2 16 8 1 25 25 is

Work in progress: folding in two directions

Page 17: Binary and Ternary Investigations - Mathematical · PDF fileBINARY AND TERNARY INVESTIGATIONS ... 11110 11010 10110 10010 01110 01010 00110 00010 11101 11001 ... 4 2 16 8 1 25 25 is

UNDER-UNDER

UNDER-OVER

OVER-UNDER

OVER-OVER

UL UR DL DR LU RU LD RD

Page 18: Binary and Ternary Investigations - Mathematical · PDF fileBINARY AND TERNARY INVESTIGATIONS ... 11110 11010 10110 10010 01110 01010 00110 00010 11101 11001 ... 4 2 16 8 1 25 25 is

1

0

0

0

0010

Example: over-over up left

Page 19: Binary and Ternary Investigations - Mathematical · PDF fileBINARY AND TERNARY INVESTIGATIONS ... 11110 11010 10110 10010 01110 01010 00110 00010 11101 11001 ... 4 2 16 8 1 25 25 is

Binary Application 4: Nim

Nim is an ancient game, probably originating in China and

coming into Europe in the early sixteenth century.

In its standard form, there are three piles of counters or

stones or matches. Players take turns to remove any

number of the objects from one pile, with the winner being

the player who takes the last.

Page 20: Binary and Ternary Investigations - Mathematical · PDF fileBINARY AND TERNARY INVESTIGATIONS ... 11110 11010 10110 10010 01110 01010 00110 00010 11101 11001 ... 4 2 16 8 1 25 25 is

The name ‘Nim’ was assigned by Harvard mathematician,

Charles Leonard Boulton (1869-1922).

In 1901, he analysed the game using binary.

Example: begin with piles of size 9, 12 and 11

which in binary are 1001, 1100 and 1011.

1001

1100

1011

1110

Sum without carrying

Winning strategy is to always reduce the sum to zeros.

Page 21: Binary and Ternary Investigations - Mathematical · PDF fileBINARY AND TERNARY INVESTIGATIONS ... 11110 11010 10110 10010 01110 01010 00110 00010 11101 11001 ... 4 2 16 8 1 25 25 is

1001

1100

1011

1110

1001

10

1011

0000

Reduce the middle row from

12 to 2 by removing ten

matches from the middle pile.

Example of a move in a winning strategy:

Page 22: Binary and Ternary Investigations - Mathematical · PDF fileBINARY AND TERNARY INVESTIGATIONS ... 11110 11010 10110 10010 01110 01010 00110 00010 11101 11001 ... 4 2 16 8 1 25 25 is

From Binary to Ternary: Weighing

Task 7: We have a pan balance which we intend using to

weigh some object. The object is placed on one pan

while the weights go only on the other pan. The smallest

weight is of 1 unit and there is only one such weight. All

other weights are multiples of the basic unit weight and

there is only one of each. Which weights should we

choose to produce an efficient system of weighing?

We need a 1 and a 2, but not a 3 because 3 = 2 + 1 …

Page 23: Binary and Ternary Investigations - Mathematical · PDF fileBINARY AND TERNARY INVESTIGATIONS ... 11110 11010 10110 10010 01110 01010 00110 00010 11101 11001 ... 4 2 16 8 1 25 25 is

1 = 1

2 = 2

3 = 2 + 1

4 = 4

5 = 4 + 1

6 = 4 + 2

7 = 4 + 2 + 1

8 = 8

9 = 8 + 1

1 x 1

1 x 2

1 x 2 + 1 x 1

1 x 4

1 x 4 + 1 x 1

1 x 4 + 1 x 2

1 x 4 + 1 x 2 + 1 x 1

1 x 81 x 8 + 1 x 1

1

10

11

100

101

110

111

1000

1001

Binary

Page 24: Binary and Ternary Investigations - Mathematical · PDF fileBINARY AND TERNARY INVESTIGATIONS ... 11110 11010 10110 10010 01110 01010 00110 00010 11101 11001 ... 4 2 16 8 1 25 25 is

4 2

181625

25 is 11001 in binary

But what if we were allowed to place weights on both pans?

We could also weigh 25 by moving the 1 onto the left-hand

pan and adding the 2 to the right-hand pan.

A binary weights system is not now the most efficient.

Task 8: What is the best system now?

Page 25: Binary and Ternary Investigations - Mathematical · PDF fileBINARY AND TERNARY INVESTIGATIONS ... 11110 11010 10110 10010 01110 01010 00110 00010 11101 11001 ... 4 2 16 8 1 25 25 is

1 = 1

2 = 3 – 1

3 = 3

4 = 3 + 1

5 = 9 – 3 – 1

6 = 9 – 3

7 = 9 – 3 + 1

8 = 9 – 1

9 = 9

10 = 9 + 1

11 = 9 + 3 – 1

1 = 1

2 + 1 = 3

3 = 3

4 = 3 + 1

5 + 3 + 1 = 9

6 + 3 = 9

7 + 3 = 9 + 1

8 + 1 = 9

9 = 9

10 = 9 + 1

11 + 1= 9 + 3

1 x 1 1

1 x 3 + (-1) x 1 1 11 x 3 1 0

1 x 3 + 1 x 1 1 1

1 x 9 + (-1) x 3 + (-1) x 1 1 1 1

1 x 9 + (-1) x 3 1 1 0

1 x 9 + (-1) x 3 + 1 x 1 1 1 1

1 x 9 + (-1) x 1 1 0 11 x 9 1 0 0

1 x 9 + 1 x 1 1 0 1

1 x 9 + 1 x 3 + (-1) x 1 1 1 1

Signed ternary

Page 26: Binary and Ternary Investigations - Mathematical · PDF fileBINARY AND TERNARY INVESTIGATIONS ... 11110 11010 10110 10010 01110 01010 00110 00010 11101 11001 ... 4 2 16 8 1 25 25 is

Chris Pritchard ‘A balanced approach to number bases’,

Mathematics in School, May 2016

[email protected]

£14.99 to MA members