Graph Coloring Algorithms on Random Graphs
Total Page:16
File Type:pdf, Size:1020Kb
Scholars' Mine Doctoral Dissertations Student Theses and Dissertations Summer 1989 Graph coloring algorithms on random graphs Shi-Jen Lin Follow this and additional works at: https://scholarsmine.mst.edu/doctoral_dissertations Part of the Computer Sciences Commons Department: Computer Science Recommended Citation Lin, Shi-Jen, "Graph coloring algorithms on random graphs" (1989). Doctoral Dissertations. 736. https://scholarsmine.mst.edu/doctoral_dissertations/736 This thesis is brought to you by Scholars' Mine, a service of the Missouri S&T Library and Learning Resources. This work is protected by U. S. Copyright Law. Unauthorized use including reproduction for redistribution requires the permission of the copyright holder. For more information, please contact [email protected]. GRAPH COLORING ALGORITHMS ON RANDOM GRAPHS BY SHI-JEN LIN, 1955- A DISSERTATION Presented to the Faculty of the Graduate School of the UNIVERSITY OF MISSOURI - ROLLA In Partial Fulfillment of the Requirements for the Degree DOCTOR OF PHILOSOPHY in COMPUTER SCIENCE 1989 i i i ABSTRACT The graph coloring problem, which is to color the vertices of a simple undirected graph with the minimum number of colors such that no adjacent vertices are assigned the same color, arises in a variety of scheduling problems. This dissertation focuses attention on vertex sequential coloring. Two basic approaches, backtracking and branch-and-bound, serve as a foundation for the developed algorithms. The various algorithms have been programmed and applied to random graphs. This dissertation will present several variatons of the Korman algorithm, Korw2, Pactual, and Pactmaxw2, which produce exact colorings quicker than the Korman algorithm in the average for some classes of graphs. In addition to exact algorithms, we also look at some heuristic algorithms, limit, epsilon, and branch-and-bound. iii ACKNOWLEDGEMENTS I would like to thank my advisor, Dr. Thomas J. Sager, for his guidance and a great deal of moral encouragement in preparation of this work. I am also grateful for the assistance of the other members of my advisory committee: Dr. Billy E. Gillett, Dr. A. K. Rigler, and Dr. Farroll T. Wright. I especially thank my parents for all their love and their financial assistance. Finally, I would like to thank my wife, Tan Li, and my daughter, I-Shen, for their love and encouragement. Without them, this work would not have been completed. iv TABLE OF CONTENTS Page ABSTRACT .................................................................................................................. ii ACKNOWLEDGEMENTS ............................................................................................iii LIST OF ILLUSTRATIONS ........................................................................................ vii LIST OF TABLES ......................................................................................................... x I. INTRODUCTION ................................................................................ 1 II. PRELIMINARIES .............................................................................. 5 A. GRAPH THEORETIC TERMS .................................................. 5 B. GRAPH COLORING TERMS ..................................................... 7 C. ASYMPTOTIC NOTATION ......................................................... 10 D. RANDOM GRAPH ..................................................................... 11 E. BASIC PROPERTIES ................................................................... 12 III. LITERATURE REVIEW .......................................................................16 A. EXACT ALGORITHMS .................................................................. 16 1. 0-1 Integer Programming Approach ....................................... 16 2. Dichotomous Search Approach ..............................................18 3. Dynamic Programming Approach ........................................... 20 4. Implicit Enumeration Approach ..............................................23 B. HEURISTIC ALGORITHMS .........................................................27 1. Vertex-color Sequential Algorithm ......................................... 29 2. Color-vertex Sequential Algorithm ......................................... 31 3. Vertex-vertex pair scanning.......................................................34 C. APPLICATIONS ..............................................................................36 1. Loading Problem ....................................................................... 36 V 2. Timetable Scheduling ................................................................ 37 3. Resource Allocation .................................................................. 37 IV. VARIATIONS ON THE IMPLICIT ENUMERATION APPROACH ............................................................................................38 A. BACKGROUND ................................................................................ 38 1. Terminology of Trees ................................................................ 38 2. Tree Search Techniques ........................................................... 40 a. Depth-first Search (DFS) ................................................40 b. Breadth-first Search (BFS) ..............................................41 B. BACKTRACKING ........................................................................... 42 C. BRANCH-AND-BOUND ................................................................47 D. PROGRAMMING FRAME OF BACKTRACKING ON THE GCP .....................................................................................................50 E. PROGRAMMING FRAME OF BRANCH-AND-BOUND ON THE GCP ........................................................................................... 54 V. IMPLEMENTATION NOTES ..............................................................59 A. GRAPHS REPRESENTATIONS .................................................. 59 B. MEMORY SWAPPING .................................................................. 62 C. HEAPSORT .......................................................................................64 D. RANDOM NUMBER GENERATOR ........................................... 73 VI. SELECTION FUNCTIONS .................................................................. 77 A. TERMS ................................................................................................77 B. NEXT-UNCOLORED-VERTEX SELECTION FUNCTIONS . 78 C. NEXT-COLORED-VERTEX SELECTION FUNCTIONS___ 80 D. WEIGHTED SCALE ON THE SCORE OF THE NEW COLOR 83 E. SWAPPING BETWEEN THE CORE AND THE PERIPHERY 83 F. HEURISTIC ALGORITHMS ..........................................................88 1. Limit ............................................................................................88 vi 2. Epsilon ...................................................................................... 88 G. COMPUTATIONAL RESULTS .....................................................89 H. DISCUSSION .................................................................................... 93 VII. A BRANCH-AND-BOUND PREFERENCE FUNCTION ..............190 A. CONSTRUCTION OF A PREFERENCE FUNCTION ......... 190 B. COMPUTATIONAL RESULTS ...................................................194 C. DISCUSSION ...................................................................................196 VIII. CONCLUSIONS .................................................................................. 205 A. SUMMARY .....................................................................................205 B. FURTHER RESEARCH TOPICS ................................................ 208 REFERENCES .................................................................................209 VITA ................................................................................................................................213 vii LIST OF ILLUSTRATIONS Figure Page 1 Example of graphs ............................................................................. 6 2 A graph and its subgraphs ................................................................ 7 3 Example of a graph ........................................................................... 9 4 Mycielski's graphs ............................................................................. 13 5 Zykov's Algorithm................................................................................ 20 6 Example of Zykov-tree ...................................................................... 21 7 Christofides's Algorithm....................................................................... 22 8 Implicit Enumeration Approach.......................................................... 25 9 Brown's Algorithm................................................................................ 28 10 Approximately Maximum Independent Set ..................................... 32 11 Leighton's Algorithm ......................................................................... 33 12 Wood's Algorithm................................................................................. 35 13 Dutton-Brigham's Algorithm............................................................... 35 14 Example of tree TS ........................................................................... 39 15 General Backtracking A lgorithm ....................................................... 44 16 Tree representation of the 4-queens problem .................................. 45 17 Backtrack-tree of 4-queens problem