ringing the changes - mathematical and statistical...

33
Ringing the Changes

Upload: others

Post on 26-Jun-2020

7 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Ringing the Changes - Mathematical and Statistical Sciencesmath.ucdenver.edu/~wcherowi/courses/m5793/ringing1.pdf · Triples 8 40,320 24 hrs.* Major 9 362,880 9 days Caters 10 3,628,800

Ringing the Changes

Page 2: Ringing the Changes - Mathematical and Statistical Sciencesmath.ucdenver.edu/~wcherowi/courses/m5793/ringing1.pdf · Triples 8 40,320 24 hrs.* Major 9 362,880 9 days Caters 10 3,628,800

An old pastime

http://www.youtube.com/watch?v=DK8uMRT01wA

Page 3: Ringing the Changes - Mathematical and Statistical Sciencesmath.ucdenver.edu/~wcherowi/courses/m5793/ringing1.pdf · Triples 8 40,320 24 hrs.* Major 9 362,880 9 days Caters 10 3,628,800

The mechanics of change ringing

http://www.cathedral.org/wrs/animation/rounds_on_five.htm

Page 4: Ringing the Changes - Mathematical and Statistical Sciencesmath.ucdenver.edu/~wcherowi/courses/m5793/ringing1.pdf · Triples 8 40,320 24 hrs.* Major 9 362,880 9 days Caters 10 3,628,800

Some TerminologySince you can not rapidly change which bells are rung, it is almost impossible to have church bells create a “tune” (with rope pulling ... you can create tunes with hammers on church bells – but that is a totally different thing).

The church bells are arranged in tonal order with the highest pitched bell first (the treble) and the lowest pitched bell last (the tenor). The order in which the bells are rung can be modified in a very restricted way.

Change ringing involves ringing the bells in all possible orders (with no repeats), and this is called an extent. Going from one order to another is called a change (or sometimes a row).

Page 5: Ringing the Changes - Mathematical and Statistical Sciencesmath.ucdenver.edu/~wcherowi/courses/m5793/ringing1.pdf · Triples 8 40,320 24 hrs.* Major 9 362,880 9 days Caters 10 3,628,800

Some terminologyn n! Approximate Time Name3 6 15 secs. Singles4 24 1 min. Minimus5 120 5 mins. Doubles6 720 30 mins. Minor7 5,040 3 hrs. Triples8 40,320 24 hrs.* Major9 362,880 9 days Caters

10 3,628,800 3 months Royal11 39,916,800 3 years Cinques12 479,001,600 36 years Maximus

* July 27,28 1963 – Loughborough Bell Foundry, England – actually took 17 hrs. 58 min.

Page 6: Ringing the Changes - Mathematical and Statistical Sciencesmath.ucdenver.edu/~wcherowi/courses/m5793/ringing1.pdf · Triples 8 40,320 24 hrs.* Major 9 362,880 9 days Caters 10 3,628,800

A small example

1 2 3 4 1 3 4 2 1 4 2 32 1 4 3 3 1 2 4 4 1 3 22 4 1 3 3 2 1 4 4 3 1 24 2 3 1 2 3 4 1 3 4 2 14 3 2 1 2 4 3 1 3 2 4 13 4 1 2 4 2 1 3 2 3 1 43 1 4 2 4 1 2 3 2 1 3 41 3 2 4 1 4 3 2 1 2 4 3 1 2 3 4

Plain Bob Minimus

(with treble plain hunting depicted)

Page 7: Ringing the Changes - Mathematical and Statistical Sciencesmath.ucdenver.edu/~wcherowi/courses/m5793/ringing1.pdf · Triples 8 40,320 24 hrs.* Major 9 362,880 9 days Caters 10 3,628,800

A little historyPrior to the fourteenth century, church bells in Europe were usually hung on a spindle and chimed by pulling a rope attached to the spindle. The next two centuries saw the development, in England, of a more sophisticated method of hanging a bell, to improve the control that a ringer had over it. In the seventeenth century, the development of the slider and stay, which prevents a bell from going beyond a 360o turn, gave ringers enough control over the bells to make change ringing possible.

During WW II, church bells were needed in civil defense activities, so church bell change ringing was not allowed. This led to the rise of using hand bells for change ringing. This has remained popular even after church bells were again available.

Page 8: Ringing the Changes - Mathematical and Statistical Sciencesmath.ucdenver.edu/~wcherowi/courses/m5793/ringing1.pdf · Triples 8 40,320 24 hrs.* Major 9 362,880 9 days Caters 10 3,628,800

The Rules

Page 9: Ringing the Changes - Mathematical and Statistical Sciencesmath.ucdenver.edu/~wcherowi/courses/m5793/ringing1.pdf · Triples 8 40,320 24 hrs.* Major 9 362,880 9 days Caters 10 3,628,800

Following the Blue LineThere are many rules that change ringers follow and one of them is that no visual aids are allowed while an extent is being rung. Ringers do not memorize thousands of permutations in order to ring extents, rather they memorize the “path” that their particular bell takes through the various permutations. Visually, if the permutations are listed one below the other, this path of any particular bell is called the “blue line” for that bell. So, for instance, if the treble bell ringer knows that the treble will be plain hunting (a typical blue line for the treble) throughout the extent, the ringer knows what to do at every change without having to know what the other bells are doing.

Page 10: Ringing the Changes - Mathematical and Statistical Sciencesmath.ucdenver.edu/~wcherowi/courses/m5793/ringing1.pdf · Triples 8 40,320 24 hrs.* Major 9 362,880 9 days Caters 10 3,628,800

Following the Blue LineCanterbury Minimus:

1 2 3 4 3 1 2 4 4 3 1 22 1 4 3 3 2 1 4 4 3 2 12 4 1 3 3 2 4 1 3 4 2 12 4 3 1 2 3 4 1 3 4 1 24 2 3 1 2 3 1 4 3 1 4 24 2 1 3 2 1 3 4 1 3 2 44 1 2 3 1 2 4 3 1 2 3 41 4 3 2 1 4 2 31 3 4 2 4 1 3 2

Treble is plain hunting. Bells 2 and 3 are doing the same work, but Tenor is not.

Page 11: Ringing the Changes - Mathematical and Statistical Sciencesmath.ucdenver.edu/~wcherowi/courses/m5793/ringing1.pdf · Triples 8 40,320 24 hrs.* Major 9 362,880 9 days Caters 10 3,628,800

The Mathematics

From the mathematical point of view change ringing amounts to generating all permutations in a systematic way according to certain restricting rules.

We will approach the mathematical question in stages, getting closer and closer to acceptable solutions. Our first steps will be to satisfy rules 1) – 3) and not worry about the others until these are satisfied.

Page 12: Ringing the Changes - Mathematical and Statistical Sciencesmath.ucdenver.edu/~wcherowi/courses/m5793/ringing1.pdf · Triples 8 40,320 24 hrs.* Major 9 362,880 9 days Caters 10 3,628,800

Generating PermutationsThere are several algorithms for generating permutations. In some cases one wants to generate all permutations (without repetition), or generate some special permutations, or random permutations, etc.

Algorithms for generating all permutations are only of limited use, since for permutations even on a small number of elements (12-14) the amount of time or storage needed to generate them becomes prohibitive.

However, there are some circumstances (ours in particular) in which this is necessary. Since the number of permutations is large, one wants algorithms which can produce them efficiently on a computer.

Page 13: Ringing the Changes - Mathematical and Statistical Sciencesmath.ucdenver.edu/~wcherowi/courses/m5793/ringing1.pdf · Triples 8 40,320 24 hrs.* Major 9 362,880 9 days Caters 10 3,628,800

Lexicographical Order

One well known algorithm produces permutations in lexicographical order (alphabetical except using numbers).

Letting k1k

2...k

n represent a permutation on n letters. To

obtain the next permutation in lexicographical order we: 1) Find the largest i so that k

i-1 < k

i.

2) For this fixed i find the largest j so that ki-1

< kj.

3) Interchange ki-1

and kj.

4) Reverse the order of the digits kik

i+1...k

n.

Page 14: Ringing the Changes - Mathematical and Statistical Sciencesmath.ucdenver.edu/~wcherowi/courses/m5793/ringing1.pdf · Triples 8 40,320 24 hrs.* Major 9 362,880 9 days Caters 10 3,628,800

Lexicographical OrderExample: With n = 4, the next permutation after 2 4 3 1 in this order is obtained in four steps: 1) i = 2 2) j = 3 3) Interchange k

1 with k

3 to obtain 3 4 2 1

4) Reverse k2...k

4 to obtain 3 1 2 4

for another example start with 1 2 3 4: 1) i = 4 2) j = 4 3) Interchange k

3 with k

4 to obtain 1 2 4 3

4) Reverse k4...k

4 to obtain 1 2 4 3

Page 15: Ringing the Changes - Mathematical and Statistical Sciencesmath.ucdenver.edu/~wcherowi/courses/m5793/ringing1.pdf · Triples 8 40,320 24 hrs.* Major 9 362,880 9 days Caters 10 3,628,800

Lexicographical OrderThe permutations on 4 symbols in this order are:

1234 2134 3124 4123 1243 2143 3142 4132 1324 2314 3214 4213 1342 2341 3241 4231 1423 2413 3412 4312 1432 2431 3421 4321

We can see that this ordering will not satisfy rule 3 of change ringing (look at the second transition), so we must investigate other orderings of these permutations.

Page 16: Ringing the Changes - Mathematical and Statistical Sciencesmath.ucdenver.edu/~wcherowi/courses/m5793/ringing1.pdf · Triples 8 40,320 24 hrs.* Major 9 362,880 9 days Caters 10 3,628,800

Factorial RepresentationThe lexicographical ordering of permutations is so common that it is hard to even visualize any other ordering.

Any non-negative integer m can be written uniquely in the following “factorial form”: m = a

11! + a

22! + ... + a

n-1(n-1)!

where 0 ≤ ai ≤ i. The a

i's are called factorial digits and we

can write m = (a1, a

2, ..., a

n-1).

Thus, 0 = (0,0,...,0) and 2000 = (0,1,1,3,4,2).

For fixed n, the largest integer represented is (1,2,...,n-1) = n! - 1.

Page 17: Ringing the Changes - Mathematical and Statistical Sciencesmath.ucdenver.edu/~wcherowi/courses/m5793/ringing1.pdf · Triples 8 40,320 24 hrs.* Major 9 362,880 9 days Caters 10 3,628,800

Factorial RepresentationThe factorial representation using the n-1 digits a

1,a

2,...,a

n-1

can represent all the integers from 0 to n!-1, that is, n! integers. Any bijection between these representations and the set of permutations on n symbols will give an “ordering” of the permutations.

There are many ways to set up these bijections, here we give one method due to Marshall Hall Jr. The permutations are written on the symbols 0,1, ..., n-1. Given a permutation π, set a

i as the number of symbols less than i which

actually follow i in π. (Note that we have 0 ≤ ai ≤ i)

1 3 0 2 → (1,0,2) = 13 3 2 0 1 → (0, 2, 3) = 22

Page 18: Ringing the Changes - Mathematical and Statistical Sciencesmath.ucdenver.edu/~wcherowi/courses/m5793/ringing1.pdf · Triples 8 40,320 24 hrs.* Major 9 362,880 9 days Caters 10 3,628,800

InverseThe easiest way to show that this is a bijection is to produce the inverse function. To form the permutation on the symbols 0,...,n-1 from the factorial representation (a

1, a

2, ..., a

n-1), we fill the n

positions of the permutation in the following way: Work with the symbols starting with the largest (n-1) and going down to 0. Place symbol i in position a

i where one

counts only unoccupied positions, going from right to left and starting the count at 0. Put 0 in the last empty space. Thus, (1,0,2) would give us the following steps: . 3 . . . 3 . 2 13 . 2 1302

Page 19: Ringing the Changes - Mathematical and Statistical Sciencesmath.ucdenver.edu/~wcherowi/courses/m5793/ringing1.pdf · Triples 8 40,320 24 hrs.* Major 9 362,880 9 days Caters 10 3,628,800

Johnson-Trotter AlgorithmIndependently, Johnson and Trotter came up with an algorithm for generating all permutations where each new permutation differs from the last one by only a switch of two adjacent symbols. This algorithm produces a list of permutations which would satisfy rule 3.

The algorithm is based on the idea that if you already have a permutation on n-1 symbols, to get a permutation on n symbols you only have to “put in” the symbol n.

1 2 3 4 1 2 4 3 all come from “expanding” 123 1 4 2 3 4 1 2 3

Page 20: Ringing the Changes - Mathematical and Statistical Sciencesmath.ucdenver.edu/~wcherowi/courses/m5793/ringing1.pdf · Triples 8 40,320 24 hrs.* Major 9 362,880 9 days Caters 10 3,628,800

Johnson-Trotter AlgorithmThis idea can be used to recursively generate the permutations, but we can actually generate the next permutation in this order knowing only the last one. This algorithm for generating the permutations in the Johnson-Trotter order is due to Even.

To each symbol in the permutation we will associate a direction, either left or right, by writing an arrow above the symbol. A symbol is called mobile if its arrow points to a smaller symbol adjacent to it. So, in

263 154(no arrow = left arrow) only 3, 5 and 6 are mobile.

Page 21: Ringing the Changes - Mathematical and Statistical Sciencesmath.ucdenver.edu/~wcherowi/courses/m5793/ringing1.pdf · Triples 8 40,320 24 hrs.* Major 9 362,880 9 days Caters 10 3,628,800

Johnson-Trotter (Even)The algorithm: Begin with 123...n (all arrows pointing left).

While there is a mobile symbol do the following:

(1) Find the largest mobile symbol m. (2) Swap m and the adjacent symbol to which it points. (3) Switch the direction of all the arrows above the symbols larger than m.

The algorithm stops when there are no mobile symbols.

Page 22: Ringing the Changes - Mathematical and Statistical Sciencesmath.ucdenver.edu/~wcherowi/courses/m5793/ringing1.pdf · Triples 8 40,320 24 hrs.* Major 9 362,880 9 days Caters 10 3,628,800

Johnson-Trotter (Even)Examples:

3 214 3 is largest mobile 2314 swap 3 and 2 231 4 change direction on symbols greater than 3

⋯⋯

4 31 2 2 is largest mobile 4 321 swap 2 and 1 43 21 change direction on symbols greater than 2

Page 23: Ringing the Changes - Mathematical and Statistical Sciencesmath.ucdenver.edu/~wcherowi/courses/m5793/ringing1.pdf · Triples 8 40,320 24 hrs.* Major 9 362,880 9 days Caters 10 3,628,800

Johnson-TrotterThe output for n = 4 is:

1 2 34 43 211 2 43 34 211 4 23 3 2414 1 23 3 2144132 23 1414 32 23 411 342 2 4311 3 24 4 2313 1 24 4 2133 1 42 24133 4 12 2 1434 3 12 2 134

Page 24: Ringing the Changes - Mathematical and Statistical Sciencesmath.ucdenver.edu/~wcherowi/courses/m5793/ringing1.pdf · Triples 8 40,320 24 hrs.* Major 9 362,880 9 days Caters 10 3,628,800

Fibonacci SequencesHow many ways (ordered) can one write a non-negative integer as a sum of 1's and 2's?

For the non-negative integer n, let F(n) = Fn be the answer

to this question. We have: F

2 = 2 since 2 = 2 = 1+1 (2 ways)

F3 = 3 since 3 = 2+1 = 1+2 = 1+1+1 (3 ways)

F4 = 5 since 4 = 2+2 = 2+1+1 = 1+2+1 = 1+1+2 =

= 1+1+1+1 (5 ways)

Clearly, F1 = 1 and it makes sense to define F

0 = 1, since

there is only one way to write 0 this way (use no 1's and no 2's).

Page 25: Ringing the Changes - Mathematical and Statistical Sciencesmath.ucdenver.edu/~wcherowi/courses/m5793/ringing1.pdf · Triples 8 40,320 24 hrs.* Major 9 362,880 9 days Caters 10 3,628,800

Fibonacci SequencesLet n ≥ 2. Any of these expressions for n must end in either a 1 or a 2. For those that end in a 1, the earlier digits must add up to n-1 (and are just 1's and 2's) and any expression for n-1 consisting of just 1's and 2's with an additional 1 added at the end will give an expression for n (which ends in a 1). Similarly, those expressions that end in a 2 have earlier terms that add up to n-2. So, we must have F

n = F

n-1 + F

n-2 for n ≥ 2.

This is known as the Fibonacci recursion relation and with the initial conditions that F

0 = F

1 = 1, the sequence of

integers {Fn}

n≥ 0 is known as the Fibonacci sequence.

Page 26: Ringing the Changes - Mathematical and Statistical Sciencesmath.ucdenver.edu/~wcherowi/courses/m5793/ringing1.pdf · Triples 8 40,320 24 hrs.* Major 9 362,880 9 days Caters 10 3,628,800

Fibonacci Sequences

We wish to obtain an explicit formula for the nth Fibonacci number.

Since the recursion relation is linear, any linear combination of solutions to the recursion is also a solution to the recursion. If the number of terms in such a linear combination equals the number of initial conditions, the coefficients of the linear combination can be determined.

There are two common methods for “solving” linear recursion relations and we will look at both of them as applied to our situation.

Page 27: Ringing the Changes - Mathematical and Statistical Sciencesmath.ucdenver.edu/~wcherowi/courses/m5793/ringing1.pdf · Triples 8 40,320 24 hrs.* Major 9 362,880 9 days Caters 10 3,628,800

Fibonacci SequencesMethod 1: Start with the recursion relation: F

n = F

n-1 + F

n-2

Make the subscripts exponents:(a nonsense move) Fn = Fn-1 + Fn-2

Factor out any common factors and solve the resulting polynomial equation (for F). F2 – F – 1 = 0.The solutions of this polynomial raised to the nth power are particular solutions of the recursion relation.

f 1= 1 52

n

and f 2= 1− 52

n

Page 28: Ringing the Changes - Mathematical and Statistical Sciencesmath.ucdenver.edu/~wcherowi/courses/m5793/ringing1.pdf · Triples 8 40,320 24 hrs.* Major 9 362,880 9 days Caters 10 3,628,800

Fibonacci SequencesMethod 1 (cont.): Now we form the linear combination of these two solutions to get the general solution: F

n = af

1 + bf

2

We solve for the coefficients by using the initial conditions: 1 = F

0 = a + b, and

1 = F 1 = a 152 b 1−5

2 .

To get,a = 51

25 and b = 5−125 ,

Fn = 5125 15

2 n

5−125 1−5

2 n

.

Page 29: Ringing the Changes - Mathematical and Statistical Sciencesmath.ucdenver.edu/~wcherowi/courses/m5793/ringing1.pdf · Triples 8 40,320 24 hrs.* Major 9 362,880 9 days Caters 10 3,628,800

Fibonacci SequencesMethod 2: Form the (ordinary) generating function for the Fibonacci sequence:

G t = ∑n0Fn t

n

We multiply by powers of t to set up a replacement using the recursion relation:

t G t = ∑n0F n t

n1 = ∑n1F n−1 t

n

t 2G t = ∑n0Fn t

n2 = ∑n 2F n−2 t

n

Page 30: Ringing the Changes - Mathematical and Statistical Sciencesmath.ucdenver.edu/~wcherowi/courses/m5793/ringing1.pdf · Triples 8 40,320 24 hrs.* Major 9 362,880 9 days Caters 10 3,628,800

Fibonacci Sequences

G t −t G t − t 2G t = F0F 1 t∑n2F n t

n−F 0 t∑n2F n−1 t

n−∑n2Fn−2 t

n1− t− t 2G t = F 0F 1t−F0 t = 1 so

G t = 11− t− t 2

.

Now we need to write G(t) as a power series and then read off the coefficients which will be the Fibonacci numbers. The steps here involve factoring the denominator and then writing this rational function in its partial fraction form:

G t = 11−t− t 2

= 11− t 1− t

= A1− t

B1− t

Page 31: Ringing the Changes - Mathematical and Statistical Sciencesmath.ucdenver.edu/~wcherowi/courses/m5793/ringing1.pdf · Triples 8 40,320 24 hrs.* Major 9 362,880 9 days Caters 10 3,628,800

Fibonacci SequencesAfter finding the constants, α, β, A and B we would have:

G t = A∑n0

t n B∑n0

t n = ∑n0

AnB n tn

soFn = AnBn .

Since 1 – t – t2 = (1 – αt)(1 – βt), we must have that αβ = -1 and α + β = 1. Thus, α and β are the roots of the quadratic x2 -x – 1. Finding A and B also involves simple manipulations that we have already seen, so

Fn = 5125 1 5

2 n

5−125 1− 5

2 n

.

Page 32: Ringing the Changes - Mathematical and Statistical Sciencesmath.ucdenver.edu/~wcherowi/courses/m5793/ringing1.pdf · Triples 8 40,320 24 hrs.* Major 9 362,880 9 days Caters 10 3,628,800

Special InvolutionsThe Fibonacci numbers arise in quite a few places where you would not expect them.

In change ringing, the transition from one row to the next must either leave a bell fixed or interchange a bell with one that is adjacent to it. When thought of as a permutation, if a transition is repeated, we would fix every bell (that is, get the identity permutation). Such permutations (of order 2) are called involutions.

Not all involutions give transitions (consider an involution which interchanges just two non-adjacent bells) and the identity permutation (which is an involution) does not give a proper transition.

Page 33: Ringing the Changes - Mathematical and Statistical Sciencesmath.ucdenver.edu/~wcherowi/courses/m5793/ringing1.pdf · Triples 8 40,320 24 hrs.* Major 9 362,880 9 days Caters 10 3,628,800

Special InvolutionsLet t(n) be the number of change ringing transitions that are permitted with n bells.

Theorem: For n ≥ 2, t(n) = Fn -1. (F

n is the nth Fibonacci #)

Pf: It is easy to see that t(2) = 1 = F2 -1 and t(3) = 2 = F

3 –1.

We can then assume the result for n < k and consider t(k) with k ≥ 4. There are t(k-1) transitions which fix position k (the last position). Also, there are t(k-2) transitions which interchange positions k and k-1 and at least one other pair. Finally, a single transposition (k-1,k) (not already counted). t(k) = t(k-1) + t(k-2) + 1 = F

k-1 -1 + F

k-2 – 1 + 1

= Fk - 1.