AA ring of 5 has no slot 6. Past slot 4, it carries on from slot 0.
BSlot 0 already holds the third number.
CHere 3 is the front's slot and 3 the numbers held. That answer takes 4 away from 3 + 3, which is 6. Counting on instead, past slot 4 and back to slot 0, gives slot 1.
4question 4
Which is true of letting numbers join an empty line, then all leave?
the answer, and why
the answer is A
A leave from numbers moves the behind the front, so the leaves move , then one fewer, down to 0. For 6, 5 + 4 + 3 + 2 + 1 + 0 is 15, which is 5 times 6, halved. The learn page's moving-up lines add this up to . A mark moves no number.
BEach leave gives back one number either way, but moving up also moves every number behind the front.
CMoving the mark is part of the leave, which counts 1 either way. No number moves.
DA leave from numbers moves of them, not 1.
pen and paper
5question 5about 6 minutes
A program keeps a line in a ring of 5 slots, numbered 0 to 4, empty at first. It is given 3, 8, 6, -, -, 1, 4, 9. Each number joins, and each dash lets the front one leave.
In which slot does each number join?
Where is the front at the end, and what does the line hold, front first?
How many numbers move?
a hint
Count on from the front. Past slot 4, carry on from slot 0.
a worked answer
3, 8 and 6 join at slots 0, 1 and 2. 3 and 8 leave, so the front moves to slot 2. 1 and 4 join at slots 3 and 4, and 9 carries on to slot 0. The front is at slot 2, and the line holds 6, 1, 4 and 9, front first. No number moves.
A ring. Past the last slot, the mark and the next join carry on from slot 0.
a number waiting
just joined
just left
an empty slot
the front, next to leave
The eight operations in a ring of 5 slots. 9 joins at slot 0, past the last slot, and no number moves.
Another program keeps the front at slot 0. When the front number leaves, every number behind it moves one slot forward. Let 6 numbers join an empty line, then all 6 leave.
How many moves do the 6 joins make?
And the 6 leaves?
How many joins, leaves and moves in all, and how many for a ring with room for all 6?
a hint
A leave from numbers moves the behind the front.
a worked answer
The joins move none. The leaves find 6, 5, 4, 3, 2 and 1 numbers, so they move 5 + 4 + 3 + 2 + 1 + 0, which is 15. That is at 6. With the 12 joins and leaves that makes 27, which is at 6. A ring with room for all 6 makes the 12, with no moves and no copies.
operations
moves
joins and leaves
6 joins
0
6
6 leaves
5 + 4 + 3 + 2 + 1 + 0, which is 15
6
in all
15
12
a ring of 6 slots
0
12
Moving up, 6 numbers in and out, then a ring with room for all 6.
Keep the front at slot 0 instead, moving every number up on each leave. How many moves do joins, then leaves, make? And how many with the joins and leaves?17 of 17 shown
1the move: a leave moves the rest up
the line:
Moving up. The front stays at slot 0, and a leave moves every number behind it one slot forward.
a number waiting
just joined
moved one slot forward
just left
an empty slot
the front, next to leave
Four join, then four leave, the front kept at slot 0. The leaves move 3, 2, 1 and 0 numbers, 6 moves in all.
why it is allowed: The front stays at slot 0. When its number leaves, each of the numbers behind it moves one slot forward. A join writes after the last number and moves none.
2the move: add the moves
the line:
why it is allowed: is the moves of joins, then leaves. By line 1 the joins move none, and the leaves find numbers, then one fewer each time. For 4, 3 + 2 + 1 + 0.
guess it, then
3the move: turn it round
the line:
why it is allowed: By line 2, added in the other order, which gives the same. For 4, 0 + 1 + 2 + 3.
guess it, then
4the move: leave out the 0
the line:
why it is allowed: By line 3. Adding 0 changes nothing. For 4, 1 + 2 + 3.
guess it, then
5the move: use the page on adding up
the line:
where does this come from?
question 1 of the page adding up Fit two staircases of squares together. What shape do they make?
1the move: draw the sum as a staircase
the line:
why it is allowed: Let be the sum of the whole numbers from 1 to . Draw it as a staircase, a column for each number: 1 square, then 2, and so on up to . For 5, columns of 1, 2, 3, 4 and 5 hold 15 squares.
2the move: take two staircases
the line:
why it is allowed: Two staircases hold twice the squares. Doubling both sides of line 1 keeps it true.
3the move: fit them into a rectangle
the line:
Blue stands, yellow hangs. Two staircases of 1 to 5 squares fill a rectangle 5 wide and 6 tall, 30 squares. So 1 + 2 + 3 + 4 + 5 is 5 times 6, halved, which is 15.
why it is allowed: Stand one staircase with its tallest column on the left. Hang the other upside down from the top, its tallest column on the right, as in the picture. The first column holds standing and 1 hanging. Each column to the right, the standing one loses a square and the hanging one gains one. So every column holds , and the columns fill a rectangle wide and tall.
4the move: halve both sides
the line:
why it is allowed: Halving both sides of line 3 keeps it true and leaves one . For 5, half of 30 is 15.
why it is allowed: The box under this line adds 1 up to a last number with two staircases: the sum is that last number times one more, halved. By line 4, here the last number is , and one more is . For 4, 1 + 2 + 3 is 3 times 4, halved, which is 6.
guess it, then
6the move: tidy
the line:
why it is allowed: By line 5, as is . For 4, 3 times 4, halved, is 6, as the picture counts.
guess it, then
7the move: multiply out
the line:
why it is allowed: By line 6, lots of are less . For 4, 16 less 4, halved, is 6.
guess it, then
8the move: a ceiling
the line:
why it is allowed: Line 7 takes away before halving. Leaving it in gives more. For 4, 6 is at most 8.
guess it, then
9the move: read it as a bound
the line:
why it is allowed: By line 8, with the fixed multiple one half.
guess it, then
10the move: a fact about n
the line:
why it is allowed: is times half of , and half of is at least 1 from 2 on. For 4, 4 is at most 8.
guess it, then
11the move: put line 10 into the top
the line:
why it is allowed: By line 10, is at most half of . So line 7's top, less , is at least less half of , which is half of . For 4, the top 16 less 4 is 12, at least 16 less 8, which is 8.
guess it, then
12the move: halve it
the line:
why it is allowed: By line 11, half of , halved, is a quarter of . For 4, halving 12 and 8 gives 6, at least 4.
guess it, then
13the move: read it as a bound
the line:
why it is allowed: By line 12, from 2 numbers on, with the fixed multiple one quarter.
guess it, then
14the move: ceiling and floor together
the line:
why it is allowed: Lines 9 and 13 bound by the same growth, .
guess it, then
15the move: add the joins and leaves
the line:
why it is allowed: Each join and each leave still counts 1, in all, as with a mark. Add to both sides of line 7. For 4, 6 + 8 is 14.
guess it, then
16the move: one denominator
the line:
why it is allowed: By line 15, is halved, so both parts sit over 2. For 4, 16 less 4, plus 16, is 28, and 28 halved is 14.
guess it, then
17the move: collect the n terms
the line:
why it is allowed: By line 16, less is . For 4, 16 + 12 is 28, and 28 halved is 14.
guess it, then
try it with a small : at , line 2 gives , which you can work out by hand