Download presentation

Presentation is loading. Please wait.

Published byVincent Chandler Modified over 9 years ago

1
Computing the chromatic number for block intersection graphs of Latin squares Ed Sykes CS 721 project McMaster University, December 2004 Slide 1

2
A Latin square is a combinatorial structure that plays a large role in the combinatorial design theory. A Latin square is a square matrix of positive integers so that the sum of each column and each row gives the same number: 0 1 2 3 4 1 3 0 4 2 2 4 1 0 3 3 2 4 1 0 4 0 3 2 1 Slide 2 10

3
Slide 3 A block of a Latin square is formed by a triple {i,j,a ij } where i is the row index, j is the column index, and a ij the entry at that position. For the purpose of creating the block intersection graph, we make sure that the set of row indexes and the set of column indexes are disjoint:

4
Slide 4 a b c e d A 0 1 2 3 4 B 1 3 0 4 2 C 2 4 1 0 3 D 3 2 4 1 0 E 4 0 3 2 1 {A,a,0} {A,b,1} {A,c,2} {A,d,3} {A,e,4} {B,a,1} {B,b,3} {B,c,0} {B,d,4} {B,e,2} {C,a,2} {C,b,4} {C,c,1} {C,d,0} {C,e,3} {D,a,3} {D,b,2} {D,c,4} {D,d,1} {D,e,0} {E,a,4} {E,b,0} {E,c,3} {E,d,2} {E,e,1}

5
Slide 5 The block intersection graph of a Latin square is formed by the blocks as the vertices and two blocks form an edge if their intersection is non-empty.

6
Slide 6 {C,a,2} {C,b,4} {C,c,1} {C,d,0} {C,e,3} {D,a,3} {D,b,2} {D,c,4} {D,d,1} {D,e,0} {E,a,4} {E,b,0} {E,c,3} {E,d,2} {E,e,1} {A,a,0} {A,b,1} {A,c,2} {A,d,3} {A,e,4} {B,a,1} {B,b,3} {B,c,0} {B,d,4} {B,e,2} See some edges:

7
0111110100100101000111000 1011111000011000101001001 1101100101101000110000110 1110101010000111001000110 1111000011010010010110001 1100001111101001001010001 0101010111010011100001100 1010011011001100010101100 0001111101010100011010010 0010111110100010100100011 1010010001011111100010010 0100101010101110110011000 0110010100110110011000101 1001000110111010001101010 0001101001111101000100101 1001011000100010111110100 0110001001110001011101010 0010100110011001101110100 0101010010001101110100011 1000100101000111111001001 1000110010110001010001111 1100001100010100100110111 0011001100001011010011011 0011000011100100101011101 0100110001001010001111110 Slide 7 A complete adjacency matrix for the graph is shown here:

8
Slide 8 A colouring of a graph is an assignment of colours to vertices so that no two adjacent vertices get the same colour: For our block intersection graph:

9
Slide 9 {A,b,1} gets colour 1 {A,c,2} gets colour 2 {A,d,3} gets colour 3 {A,e,4} gets colour 4 {B,a,1} gets colour 2 {B,b,3} gets colour 4 {B,c,0} gets colour 3 {B,d,4} gets colour 5 {B,e,2} gets colour 1 {C,a,2} gets colour 4 {C,b,4} gets colour 2 {C,c,1} gets colour 5 {C,d,0} gets colour 1 {C,e,3} gets colour 0 {D,a,3} gets colour 5 {D,b,2} gets colour 3 {D,c,4} gets colour 0 {D,d,1} gets colour 4 {D,e,0} gets colour 2 {E,a,4} gets colour 3 {E,b,0} gets colour 5 {E,c,3} gets colour 1 {E,d,2} gets colour 0 {E,e,1} gets colour 6

10
Slide 10 The chromatic number of a graph is the smallest number of colours one can use to colour the graph. Thus computing the chromatic number of a graph is a combinatorial problem of finding the smallest colouring among all colourings. Prof. Franek asked me to design and implement a simple bound-and-branch backtracking program in C++ to compute chromatic numbers of block intersection graphs of various Latin squares.

11
The input into the program is a line that represents row by row format of a Latin square. Slide 11 1.The “real” Latin square is computed and displayed 2.The blocks are computed and displayed. 3.The block intersection graph is computed in the form of the adjacency matrix and displayed.

12
Slide 12 4.The maximum degree (=number of adjacent vertices to a given vertex) is computed, for it is well-known that the chromatic number <= max. degree. 5.The first N blocks are assigned fixed colours (for a Latin square N x N), for they must have different colours as the first N blocks are all connected by edges (form a clique). 6.A simple recursive implementation of backtracking is used for generating all possible colourings.

13
Slide 13 7.When the number of colours used reaches the current minimum (that starts with the max. degree), this line of search is abolished. 8.On each recursive call all so-far used colours are tried and the first new colour is tried as well. 9.When all colourings are found and the minimum is established, it is displayed and the last minimal colouring is displayed as well.

14
Slide 14 latin square number 1: 0123413042241033241040321 abcde A01234 B13042 C24103 D32410 E40321 {A,a,0} {A,b,1} {A,c,2} {A,d,3} {A,e,4} {B,a,1} {B,b,3} {B,c,0} {B,d,4} {B,e,2} {C,a,2} {C,b,4} {C,c,1} {C,d,0} {C,e,3} {D,a,3}

15
Slide 15 {D,b,2} {D,c,4} {D,d,1} {D,e,0} {E,a,4} {E,b,0} {E,c,3} {E,d,2} {E,e,1}

16
Slide 16 0111110100100101000111000 1011111000011000101001001 1101100101101000110000110 1110101010000111001000110 1111000011010010010110001 1100001111101001001010001 0101010111010011100001100 1010011011001100010101100 0001111101010100011010010 0010111110100010100100011 1010010001011111100010010 0100101010101110110011000 0110010100110110011000101 1001000110111010001101010 0001101001111101000100101 1001011000100010111110100 0110001001110001011101010 0010100110011001101110100 0101010010001101110100011 1000100101000111111001001 1000110010110001010001111 1100001100010100100110111 0011001100001011010011011 0011000011100100101011101 0100110001001010001111110

17
Slide 17 max degree=12 chromatic number=7 minimum colouring:{A,a,0} gets colour 0 {A,b,1} gets colour 1 {A,c,2} gets colour 2 {A,d,3} gets colour 3 {A,e,4} gets colour 4 {B,a,1} gets colour 2 {B,b,3} gets colour 4 {B,c,0} gets colour 3 {B,d,4} gets colour 5 {B,e,2} gets colour 1 {C,a,2} gets colour 4 {C,b,4} gets colour 2 {C,c,1} gets colour 5 {C,d,0} gets colour 1 {C,e,3} gets colour 0 {D,a,3} gets colour 5 {D,b,2} gets colour 3 {D,c,4} gets colour 0 {D,d,1} gets colour 4 {D,e,0} gets colour 2 {E,a,4} gets colour 3 {E,b,0} gets colour 5

18
Slide 18 {E,b,0} gets colour 5 {E,c,3} gets colour 1 {E,d,2} gets colour 0 {E,e,1} gets colour 6 In conclusion: The program performed well for Latin squares of size 5, 6, and 7. However, for Latin squares of size 8 the combinatorial explosion occurred and to compute just one chromatic number took over 12 days. For even larger Latin squares the problem is not computationally feasible.

Similar presentations

© 2024 SlidePlayer.com Inc.

All rights reserved.

To make this website work, we log user data and share it with processors. To use this website, you must agree to our Privacy Policy, including cookie policy.

Ads by Google