An empty table of 7 slots puts in 12, 5, 19 and 6, in that order. How many probes do the four puts make in all?
the answer, and why
the answer is D
12, 5 and 19 have home 5; 6 has home 6. 12 takes slot 5, 1 probe. 5 walks to slot 6, 2 probes. 19 walks slots 5 and 6 to slot 0, 3 probes. 6 finds slot 6 taken by 5, then slot 0 by 19, and takes slot 1, 3 probes. That is 9.
step 11 of 15
6 leaves 6 when divided by 7, so its home is slot 6.
slots looked at: 0
step 12 of 15
Slot 6 holds 5, not 6.
slots looked at: 1
step 13 of 15
Slot 0 holds 19, not 6.
slots looked at: 2
step 14 of 15
Slot 1 is free, so put 6 there.
slots looked at: 3
Operation 4 puts 6 in. Its home, slot 6, already holds 5, and slot 0 holds 19. 3 probes, though 6 shares its home with no number.
if you chose another
AThat counts 1 probe a put, as if every home were free.
BThat counts 6 as 1 probe, as if its home were free, but 5 took slot 6 on its walk.
CThat leaves out 6's put, which makes 3 probes.
2question 2
An empty table of 7 slots puts in 17, 24 and 38, then 31. Which slot does 31 go in?
the answer, and why
the answer is C
All four have home 3. 17 takes slot 3, 24 slot 4, 38 slot 5, so 31 walks 3, 4 and 5 to slot 6.
if you chose another
ASlot 3 is 31's home, but 17 already holds it.
BThat stops at the first slot after its home, two too early; slot 4 holds 24.
DThat walks one slot too far; slot 6 is free.
3question 3
25, 32 and 39, all home 4, fill slots 4, 5 and 6. Then 32 is taken out, but say its slot were cleared, with no marker. What would a search for 39 report?
the answer, and why
the answer is D
The search looks at slot 4, 25, then slot 5, now empty, and stops there. So it reports 39 missing, though 39 sits in slot 6. A marker in slot 5 keeps the walk going.
AA put probes 1 slot only when its home is free; with one home, the 4th put probes 4.
BA walk never looks at more than the 7 slots, so the 20th put probes 7 and is turned away.
DThe free slot is 1 to 7 probes away, 4 on average.
pen and paper
5question 5about 6 minutes
In a table of 7 slots, every slot holds a number except slot 2. A put of a new number has its home at any of the 7 slots, each as likely.
For each home, 0 to 6, how many probes does the put make?
What is the average?
Check it against , the formula of section 4, with the 7 slots.
a hint
The put walks from its home to slot 2, round to the start if it must.
a worked answer
Home 2 makes 1 probe, home 1 makes 2, home 0 makes 3, home 6 makes 4, home 5 makes 5, home 4 makes 6 and home 3 makes 7. They add to 28, and 28 over 7 is 4. The formula with 7 slots gives 8 over 2, also 4.
home
its walk
probes
2
2
1
1
1, 2
2
0
0, 1, 2
3
6
6, 0, 1, 2
4
5
5, 6, 0, 1, 2
5
4
4, 5, 6, 0, 1, 2
6
3
all 7
7
Each home a different distance from slot 2, 1 to 7.
Here let count slots, not numbers put in. A table of slots has one free slot. How many probes does a put of a new number make, on average over its home?5 of 5 shown
1the move: walk to the free slot
the line:
home
its walk
probes
5
5
1
4
4, 5
2
3
3, 4, 5
3
2
2 to 5
4
1
1 to 5
5
0
0 to 5
6
6
6, 0 to 5
7
7 slots, only slot 5 free. Each home gives a different number of probes, 1 to 7.
why it is allowed: It looks at its home, then the next slots, round to the start, and stops at the one free slot. Its home is any of the slots, each as likely, and each home is a different distance away.
2the move: average over the homes
the line:
why it is allowed: is the probes averaged over the homes. By line 1, the homes give 1 up to , one each. For 7, 28 over 7.
guess it, then
3the 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 shows that 1 up to a last number adds to that number times one more, halved. Here the last number is . For 7, 7 times 8, halved, is 28.
guess it, then
4the move: halve and divide at once
the line:
why it is allowed: Halved, then over , is over twice . For 7, 7 times 8 over 14 is 4.
guess it, then
5the move: tidy
the line:
why it is allowed: The on top and below cancel. For 7 slots, 8 over 2 is 4, section 3's average for the 7th put, which finds 6 numbers in 7 slots.
guess it, then
try it with a small : at , line 2 gives , which you can work out by hand
An empty table of 7 slots puts in 9, 16 and 23, takes 16 out, then puts in 30.
Where does each of 9, 16 and 23 go?
What does taking 16 out leave?
Which slot does 30 go in, and after how many probes?
a hint
All four have home 2. A put notes the first marker it passes, but walks on to a free slot first.
a worked answer
9 takes slot 2, 16 slot 3 and 23 slot 4. Taking 16 out leaves a marker in slot 3. 30 looks at slot 2 (9), slot 3 (the marker, noted), slot 4 (23) and slot 5, free: 4 probes. 30 is nowhere further along, so it goes in slot 3, where the marker was.
step 15 of 20
30 leaves 2 when divided by 7, so its home is slot 2.
slots looked at: 0
step 16 of 20
Slot 2 holds 9, not 30.
slots looked at: 1
step 17 of 20
Slot 3 holds a marker left by a number taken out. Note it: 30 can go here if it is nowhere further along.
slots looked at: 2
step 18 of 20
Slot 4 holds 23, not 30.
slots looked at: 3
step 19 of 20
30 is nowhere further along, so put it in slot 3, where the first marker was.
slots looked at: 4
Operation 5 puts 30 in. It notes the marker in slot 3, walks on to the free slot 5, then goes in slot 3. 4 probes.