Swap 2
Swap 3
Swap 4
Swap 5
Swap 6
All the Chelsea Buns are on the LHS and the Bath Buns are on the RHS. Six swaps were needed to find this solution.
Five of each bun:
Start
Swap 1
Swap 2
Swap 3
Swap 4
Swap 5
Swap 6
Swap 7
Swap 8
Swap 9
Swap 10
Having five of each bun requires ten swaps.
Results:
To find the nth term, we must use linear sequence. We insert the number of swaps. Secondly we work out the difference of each number of swaps.
0 1 3 6 10 15 21 28 36 45
1 2 3 4 5 6 7 8 9
There is no ‘common difference’ between the numbers that we can single out so we must find the difference of the second set of numbers, just like we did with the first set of numbers (to gain the second set of numbers).
0 1 3 6 10 15 21 28 36 45
1 2 3 4 5 6 7 8 9
1 1 1 1 1 1 1 1
As you can see, we have now gained the common difference, that is one. We can use this to find our formula.
The formula for the nth term is worked out using another formula, Tn = an2 + bn + c, where a, b and c are all numbers. We then use quadratics to work them out.
0 1 3 6 10 15 21 28 36 45
1 2 3 4 5 6 7 8 9
1 1 1 1 1 1 1 1
We can deduct by looking at the findings above that:
(a+b+c=0)
(3a+b=1)
(2a=1)
2a=1 means that a=½
3a+b=1
=3(½) +b=1
=b=-½
Substitute a into the equation
a+b+c=0
½+ (-½) +c=0
c=0
We can then deduct that:
Tn=½n2+ (-½) n+0
Tn=½n2-½n
We can simplify this to become
Sn=n (n-1), where S is the number of swaps.
2
If this formula is correct for n then it should be correct for all other numbers/ letters. To prove this I shall replace the n with a K which is a constant. The formula would then become
Sk = k (k–1)
2
Now I must prove that the formula can work where n=k+1
RHS: = (k+1) (k+1-1)
2
= k (k+1)
2
We have proven the right hand side of the formula. The left hand side must now match.
LHS: = Sk+1
= Sk + (k)
= k (k-1) + k
2 1
= k (k-1) + 2k
2
= k2 –k+2k
2
= k2+ k
2
= k (k+1)
2
The left hand side is now also proven. Both sides are the same as they equal k (k+1). Therefore the formula is correct.
2
I will now check the formula by inserting a number which we know the answer to (4 of each bun, results in 6 swaps).
Sn=n (n-1) Substitute the numbers in S4= 4x (4-1)
2 2
= 4x 3
2
=12
2
= 6 swaps.
We can see from our table of results that there are six swaps when there are four of each bun meaning that this formula is definitely correct.
In the third question I will add more variations.
The baker’s wife decided to add another type of bun- hot cross bun which from now shall be referred to as H. They are arranged as follows:
This time the baker’s daughter wanted o rearrange the buns to put the Chelsea Buns on the left, the Bath Buns in the middle and the Hot Cross Buns on the right. The above would therefore become:
To find the formula we must again have a table which allows us to see the number of swaps needed with a certain amount of buns.
One of each bun:
Start
No swaps are needed because the buns are already in order.
Two of each bun:
Start
Swap 1
Swap 2
Swap 3
There are three swaps needed to rearrange the buns.
Three of each bun:
Start
Swap 1
Swap 2
Swap 3
Swap 4
Swap 5
Swap 6
Swap 7
Swap 8
Swap 9
The number of swaps for nine buns is nine.
Four of each bun:
Start
Swap 1
Swap 2
Swap 3
Swap 4
Swap 5
Swap 6
Swap 7
Swap 8
Swap 9
Swap 10
Swap 11
Swap 12
Swap 13
Swap 14
Swap 15
Swap 16
Swap 17
Swap 18
There are 18 swaps needed when there is four of each bun.
We now have sufficient information to draw up another table.
To find the nth term, we must again use linear sequence. We insert the number of swaps. Secondly we work out the difference of each number of swaps.
0 3 9 18
3 6 9
We have not yet found a common difference so we will have to continue to subtract the numbers, until we do.
0 3 9 18
3 6 9
3 3
We have our common rule Tn = an2 + bn + c again.
2a = 3
a = 1.5
3a + b = 3
3 x 1.5 + b = 3
4.5 + b = 3
b = -1.5
a + b + c = 0
1.5+ (-1.5) + c =0
0+ c= 0
c = 0
Therefore we know that: Tn = 1.5n2 – 1.5n
We will now try to prove this formula by substitution.
Tn = 1.5n2 – 1.5n
Tn = 1.5 x 32 – 1.5 x 3
Tn = 13.5 - 4.5
Tn = 9
Nine swaps are correct for three of each bun, which has been shown above by diagrams and in the table. Therefore this formula is correct and has been proven.
The second variation I will use is that the Chelsea Buns and Bath Buns are arranged in a different order that is:
It will have to be rearranged to form:
One pair of each bun:
No swaps have to be made as this is already in order.
Two pairs of each bun:
Start
Swap 1
Swap 2
Swap 3
Swap 4
Only four moves are needed to sort out eight buns.
3 pairs of each bun:
Start
Swap 1
Swap 2
Swap 3
Swap 4
Swap 5
Swap 6
Swap 7
Swap 8
Swap 9
Swap 10
Swap 11
Swap 12
There are twelve swaps needed when there are three pairs of each bun.
We have enough information to draw up another table.
We must use a linear sequence. The common difference is 4 as we can see below.
0 4 12 24
4 8 12
4 4
To work out the formula we must use the rule Tn = an2 + bn + c.
2a = 4
a = 2
3a+ b= 4
3 x 2 +b = 4
6 + b = 4
b= -2
a + b + c = 0
2 + (-2) + c = 0
1 + c = 0
c = 0
Tn = 2n2 – 2n
Substitution can be used once again.
Tn = 2n2 – 2n Tn = 2n² - 2n
Tn = 2 x 4 – (2 x 2) Tn = 2 x 16 – (2 x 4)
Tn = 8 – 4 Tn = 32 - 8
Tn = 4 Tn = 24 Four is also right.
This is correct as for 2 pairs of buns there are four swaps.