kirkman’s schoolgirl problem charlie, law ka kui billy, lai ka hin
TRANSCRIPT
Kirkman’s Schoolgirl Problem
Charlie, Law Ka KuiBilly, Lai Ka Hin
PRESENTATION OUTLINE
Kirkman's schoolgirl problem
Round-robin Tournament Algorithm to find the
solution (Frost method) Algorithm to find the
solution for special cases (n ppl in a group, n days, n prime)
KIRKMAN’S SCHOOLGIRL PROBLEM: Fifteen young ladies in a school walk out three abreast for seven days in succession: it is required to arrange them daily so that no
two shall walk twice abreast.
Day 1
Day 2
Day 3
Day 4
Day 5
Day 6
Day 7
FIRST WE CONSIDER THE CASE WHEN EACH GROUP CONSISTS OF 2 PEOPLE
RULES (2 PEOPLE IN EACH GROUP)
Consider a Big Group of n participants, where n is even
Each day, we divide them into several small groups
Each small group consists of 2 participants
Each participant joins exactly 1 small group each day
No two participants join the same group more than once
2 PARTICIPANTS EACH GROUP
No of Small Groups formed:
No of Groups formed Each Day:
No of Days to exhaust all possibilities:
2
n
nC2
2C2n
n2
n
n!
2!(n 2)!n 1
2 PARTICIPANTS EACH GROUP
Round-robin Tournament Two participants (or groups) compete against
each other once Examples: Football Leagues
Chess Tournament
Go Tournament
2010 FIFA WORLD CUP GROUP A
Four teams:
Uruguay Mexico
South Africa France Number of Matches: Number of Matches Each Day: Number of Days: 3
2
6
22
4
642 C
FIXTUREDate Team Result
11/6(Match1) v.s. 1:1
11/6(Match2) v.s.
16/6(Match3) v.s. 0:3
17/6(Match4) v.s. 0:2
22/6(Match5) v.s. 0:1
22/6 (Match6) v.s. 1:2
0:0
QUESTION
8 people, Andy, Benjamin, Chris, Dorothy, Ewan, Francisca, Greg, Hillary are in a meeting of AA (Alcoholics Anonymous)
The coordinator wants to arrange them into groups of two so that they can share their experience with every other member
Assume that each member meets each other member only once and all of them participate only once each day
QUESTIONS (CONT’D)
What is the number of small groups formed each day?
Ans: 4 How many days do they need to complete
the session? Ans: 7 What is the number of small groups that can
be formed? Ans: 28 Homework (1): Draw the timetable of the
meetings
RULES (3 PEOPLE IN EACH GROUP)
Consider a Big Group of n participants, where n is divisible by 3
Each day, we divide them into several small groups
Each small group consists of 3 participants
Each participant joins exactly 1 small group each day
No two participants join the same group more than once
3 PARTICIPANTS EACH GROUP
Question:
What is the total number of small groups?
3 PARTICIPANTS EACH GROUP
Number of small Groups Each Day:
Number of Days:
Total number of small groups:
3
n
2
1n
6
)1( nn
CHINESE POKER (鬥地主 ) LEAGUE 9 participants (named by 1,2,3,4,5,6,7,8,9) 3 participants in each game 3 games each day The league lasts for 4 days Each participant only plays once a day No two participants meet more than once Question: How can we construct the fixture?
FROST’S METHOD
First, we consider the fixture for player1, WLOG
Each cell in the first row is filled with (1,a1,a2), (1,b1,b2),(1,c1,c2), (1,d1,d2) respectively
Day 1 Day 2 Day 3 Day 4
1, a1, a2 1, b1, b2 1, c1, c2 1, d1, d2
FROST’S METHOD CONT’D
Then, we can think about if it is a, then it is a1 or a2.
FROST’S METHOD CONT’D
Then, we can think about if it is ‘a’, then it is a1 or a2.
FROST’S METHOD CONT’D
If a1=2, a2=3, b1=4…. Solution:
KIRKMAN’S SCHOOLGIRL PROBLEM: Fifteen young ladies in a school walk out three abreast for seven days in succession: it is required to arrange them daily so that no
two shall walk twice abreast.
Day 1
Day 2
Day 3
Day 4
Day 5
Day 6
Day 7
KIRKMAN’S SCHOOLGIRL PROBLEM(2)
15 young ladies (1,2,3,4…15) 3 participants a group 7 days Each lady only walks once a day No two ladies walk abreast more than once
SOLUTION(1)
15 elements
{1, a1,a2, b1, b2, c1, c2, d1, d2, e1, e2, f1, f2, g1, g2}
Using the seven letters a,b, c, d, e, f and g, we form groups of triplets in which each pair of letters occurs exactly once:
{abc, ade, afg, bdf, beg, cdg, cef}
SOLUTION(2)
Sun Mon Tue Wed Thu Fri Sat
1,a1,a2 1,b1,b2 1,c1,c2 1,d1,d2 1,e1,e2 1,f1,f2 1,g1,g2
b, d, f a, d, e a, d, e a, b, c a, b, c a, b, c a, b, c
b, e, g a, f, g a, f, g a, f, g a, f, g a, d, e a, d, e
c, d, g c, d, g b, d, f b, e, g b, d, f b, e, g b, d, f
c, e, f c, e, f b, e, g c, e, f c, d, g c, d, g c, e, f
{abc, ade, afg, bdf, beg, cdg, cef}
SOLUTION(3)----HW (FINISH THE TABLE)
Sun Mon Tue Wed Thu Fri Sat
1,a1,a2 1,b1,b2 1,c1,c2 1,d1,d2 1,e1,e2 1,f1,f2 1,g1,g2
b1, d1, f1 a1, d, e a1, d, e a2, b, c a2, b, c a1, b, c a1, b, c
b2, e1, g1 a2, f, g a2, f, g a1, f, g a1, f1, g a2, d, e a2, d, e
c1, d2, g2 c1, d, g b1, d, f b1, e, g b2, d, f b1, e, g b2, d, f
c2, e2, f2 c2, e, f b2, e, g c1, e, f c2, d, g c2, d, g c1, e, f
SOLUTION(4)
Try to fill out
a1,a2, b1, b2, c1, c2, d1, d2, e1, e2, f1, f2, g1, g2into the box
Substitute 2,3,4…15 into a1,a2….g2
Then, get the solution!!!!
ANOTHER ALGORITHM FOR CHINESE POKER(鬥地主 ) LEAGUE(1)
This method can be used if n2 participants n participants a group n days
*** n must be a prime number ***Example: 25 participants,5 a group,5 gorups each day
49 participants,7 a group,7 groups each day
121 participants, 11 a group, 11 groups each day
ANOTHER ALGORITHM FOR CHINESE POKER(鬥地主 ) LEAGUE(2)
D1 G1 G2 G3
1 2 3
4 5 6
7 8 9
D2 G1 G2 G3
1 2 3
←1 5 6 4
←2 8 9 7
D3 G1 G2 G3
1 2 3
←1 6 4 5
←2 8 9 7
D4 G1 G2 G3
1 4 7
2 5 8
3 6 9
ANOTHER ALGORITHM FOR CHINESE POKER(鬥地主 ) LEAGUE(3)
1 2 3 . . . n
n+1 n+2 . . . . 2n
2n+1 2n+2 . . . . 3n
. . . . . . .
. . . . . . .
. . . . . . .
n2-n+1 . . . . . n2
←0 1 2 3 . . . n
←1 n+2 n+3 . . . . n+1
←2 2n+3 2n+4 . . . . 2n+2
. . . . . . . .
. . . . . . . .
. . . . . . . .
←(n-1) n2 . . . . . n2-1
HOMEWORK
1. Draw the timetable of the meetings in slide 11.
2. Finish the table on slide 24
Extra Credit: Explain why the last algorithm fails when n is not a prime number
ONLINE DISCUSSION
Would you suggest some daily applications?
Which of the following is a better way to organize a contest, a round-robin or knock-off tournament? Why?