Solving Hard Computational Problems Efficiently: Asymptotic Parametric Complexity 3-Coloring Algorithm

Many practical problems in almost all scientific and technological disciplines have been classified as computationally hard (NP-hard or even NP-complete). In life sciences, combinatorial optimization problems frequently arise in molecular biology, e.…

Authors: H. Jose Antonio Martin

Solving Hard Computational Problems Efficiently: Asymptotic Parametric   Complexity 3-Coloring Algorithm
Solving Hard Computational Problems E ffi ciently: Asymptotic Parametric Complexity 3-Coloring Algorithm Jos ´ e Antonio Mart ´ ın H. Computer Ar chitectur es and A utomation, Complutense University of Madrid, Spain Abstract Many practical problems in almost all scientific and technological disciplines have been classified as computation- ally hard (NP-hard or e v en NP-complete). In life sciences, combinatorial optimization problems frequently arise in molecular biology , e.g., genome sequencing; global alignment of multiple genomes; identifying siblings or disco very of dysregulated pathways. In almost all of these problems, there is the need for proving a hypothesis about certain property of an object that can be present only when it adopts some particular admissible structure (an NP-certificate) or be absent (no admissible structure), howe ver , none of the standard approaches can discard the hypothesis when no solution can be found, since none can provide a proof that there is no admissible structure. This article presents an algorithm that introduces a novel type of solution method to “e ffi ciently” solve the graph 3-coloring problem; an NP-complete problem. The proposed method provides certificates (proofs) in both cases: present or absent, so it is possible to accept or reject the hypothesis on the basis of a rigorous proof. It provides exact solutions and is polynomial-time (i.e., e ffi cient) howe ver parametric. The only requirement is su ffi cient computational power , which is controlled by the parameter α ∈ N . Nevertheless, here it is pro ved that the probability of requiring a v alue of α > k to obtain a solution for a random graph decreases exponentially: P ( α > k ) ≤ 2 − ( k + 1) , making tractable almost all problem instances. Thorough experimental analyses were performed. The algorithm was tested on random graphs, planar graphs and 4-regular planar graphs. The obtained experimental results are in accordance with the theoretical expected results. K e ywor ds: Graph-Coloring, Planar-Graphs, Co-NP, Computational-Comple xity, 3-colorability, automatic theorem proving Introduction Graph Coloring is one of the oldest and among the most popular Constraint Satisfaction Problems (CSPs) [1]. The study of e ffi cient CSP-solving algorithms is a central topic in Computer Science and Artificial Intelligence because of its wide applicability in many engineering projects, e.g., very-large-scale integration (VLSI) testing, planning and scheduling, timetabling, satellite range scheduling, register allocation, printed circuit testing, and frequency assign- ment [2, 3, 4], as well as theoretical physical models, e.g., spin-glasses and the anti-ferromagnetic Potts model [5]. Graph coloring has found application in life sciences as well, for instance, nucleic acid sequence design has been modeled as a graph coloring problem [6], and in general, combinatorial optimization problems frequently arise in molecular biology: genome sequencing; global alignment of multiple genomes; identification of siblings, cousins, or second cousins through comparison of genomes; finding protein modules containing specified types of proteins; or the computational discov ery of dysregulated pathw ays in human diseases are NP-hard or e ven NP-complete problems [7, 8] 1 . Email addr ess: jamartinh@fdi.ucm.es (Jos ´ e Antonio Mart ´ ın H.) 1 The computational complexity terminology and concepts (e.g., P , NP , CoNP , NP-completeness, NP-Hardness, certificate / witness, and reduc- tions) can be consulted in the recent books of Arora and Barak [9] and Goldreich [10]. Pr eprint submitted to Arxiv November 27, 2024 The graph coloring problem in volv es assigning a number c ∈ { 1 , 2 , 3 , . . . , k } (i.e. a color) to each verte x of a graph such that neighboring vertices are assigned di ff erent colors. The problem of deciding whether a given graph can be colored with k or less colors is called the k -colorability problem. For k = 2, the colorability problem can be solved e ffi ciently . Howe ver , for k ≥ 3, in general, there is no known e ffi cient algorithm to determine whether the graph is k-colorable and the problem is NP-complete [11, 12, 13, 14]. Direct methods for NP-complete problems require the determination of simple properties (e.g. triangle freeness) that impose necessary and su ffi cient conditions for determining the class of an instance (Y es / No). For the three-color - problem [15], two examples are as follows: phase-transition studies [16, 17, 18, 19, 5], based on random graphs theory and sharp thresholds [20, 21], and structural-combinatorial approaches based on certain specific parameters such as the existence or absence of particular cycle configurations (see [15, 22, 23, 24, 25]). One of the foundational results of this approach is the Grotzsch’ s 3-color theorem [26]: the triangle-free planar graphs are 3-colorable. On the other hand, gi ven the intractability of NP-complete problems, research on approximation algorithms beg an early (e.g., [27, 28, 29, 2, 30, 31, 32, 33]). Howe ver , ev en for the approximate case graph coloring remains hard [34]. More strictly , it is NP-hard to ev en find a 4-coloring of a 3-chromatic graph [35]. A recently dev eloped alternati ve approach to the classical worst-case computational complexity theory is parame- terized complexity [36, 37]. In parameterized complexity , apart from the problem instance itself, there is a parameter (usually an integer) that may be associated arbitrarily with the problem instance, allo wing one to study a problem’ s complexity with respect to both the size of the input (as in classical computational complexity) and the provided pa- rameter . One of the main virtues of the parametric comple xity approach is the concept of fixed-parameter tractability . Here, instead of fixed-parameter complexity , we present an algorithm with asymptotic parameter complexity . T wo key di ff erences with respect to the past graph coloring approaches are that it is (1) exact and (2) polynomial-time but parametric, while previous algorithms are either e xact b ut lo w-exponential or polynomial-time b ut approximate. A very easy but naive way of coloring a graph is simply sequentially assigning the first av ailable color to each verte x. Such an algorithm is known as a greedy coloring algorithm. The base procedure for the proposed algorithm also follo ws a greedy approach (greedy contraction): sequentially contract two non-neighboring v ertices until either a triangle (representing a le gal 3-coloring) or a graph containing a 4-clique ( K 4 ) subgraph (a non-3-colorable subgraph) is obtained. Howe ver , this greedy algorithm often fails when the graph is 3-colorable since some contractions will unav oidably lead to a K 4 subgraph. The ke y idea of the proposed algorithm is a way of determining which contractions will fail and av oid such a failure by adding a ne w edge uv instead of doing a contraction G / uv so that if the graph is 3-colorable, the greedy contraction algorithm will necessarily conv erge to a triangle, i.e., a legal 3-coloring and if it is non-3-colorable, a 3-uncolorability certificate will be obtained. A 3-uncolorability certificate is defined as a sequence of “unavoidable vertex contractions” leading to a graph containing a K 4 . A verifier can e ffi ciently check whether every contraction is “unav oidable”. The possibility of e ffi - ciently generating 3-uncolorability certificates is of theoretical interest since 3-colorability is NP-complete, and thus 3-uncolorablity is CoNP-complete. Previous works have studied short proof systems for CoNP-complete problems (e.g., [38, 39]). In particular, for graph coloring, there is a recent work [40] that tries to find graph uncolorability proofs on the basis of consistency checks of CSPs. Ho we ver , short 3-uncolorability certificates are not possible in general unless NP = CoNP (which remains unknown). The proposed algorithm has sev eral “good” (desired) ke y features: 1. The proposed algorithm is exact and runs in polynomial-time; howe ver , it is parametric. Its running time can be controlled (bounded) by means of a simple parameter ( α , the maximum recursion level) that determines the order of the bounding polynomial. Hence, its complexity is on-demand. 2. If for a giv en α the algorithm is unable to find a certificate then it returns “undetermined” so that it can be re-run with a higher α until a solution is obtained, taking into account the computational resources available. Self-tuning the α parameter (by using the undetermined return value) gives the algorithm the capability of using only the required computational resources for a particular problem instance, e.g., for almost all planar graphs, it is su ffi cient to hav e a value of α = 0 to obtain the right solution, thus obtaining an O ( n 2 ) algorithm for the 3-coloring problem in almost all planar graphs. 3. It generates certificates for both Y es and No instances, i.e., either a le gal 3-coloring or a 3-uncolorability certifi- cate, and hence, it gi ves stand-alone indubitable results so that it is not necessary to trust neither the correctness 2 of the algorithm itself nor the particular implementation used for recognizing whether the provided solution is correct, since the result can be e ffi ciently verified using only the pro vided solution (the certificate or witness). Moreov er , from the theoretical point of view , the most important result is the classification of all graphs by the number α ( G ): the minimum v alue of the parameter α required by the algorithm to obtain a certificate gi ven a particular instance G of the 3-coloring problem 2 . This results in important consequences and allo ws the development of a thorough analysis. Since for each finite graph G there is a corresponding α ( G ) ∈ N , the algorithm is polynomial-time, and its order depends on α , ∞ \ α = 0 NP \ P = ∅ , (1) since P also depends on α . Howe ver , for both practical and theoretical results, the most important thing to be deter- mined is the “speed” of this con ver gence. Here, as the main theoretical result, it is proved, the non-tri vial and highly significant fact, that the probability of requiring a value of α > k for obtaining a solution for a random graph decreases exponentially as a function of k . This result is formalized as Theorem 1 giv en belo w: Theorem 1. Let G be a random graph; if P ( α = k ) is the pr obability that α ( G ) = k and P ( α > k ) is the pr obability that α ( G ) > k then for all k ∈ N : P ( α = k ) ≥ P ( α > k ) , (2) P ( α > k ) ≤ 2 − ( k + 1) . (3) In the experimental part of this article, the algorithm was thoroughly ev aluated using significant samples pertaining to three di ff erent graph distributions: 1. Random planar graphs [41, 42]. 2. Random 4-regular planar graphs [43, 44, 45]. 3. Erd ˝ os-R ˝ enyi connected random graphs [20]. An interesting experimental finding is that in all the test cases for planar graphs, it was found that fixing the maximum recursion level to α = 1 was su ffi cient to obtain a solution, i.e., exact and e ffi ciently verifiable results were obtained using a polynomial algorithm. This was also the case for 4-regular planar graphs. Furthermore, in the general (random graphs) 3-coloring case experiments, it has been observed that the distribution of α ( G ) conforms to the theoretical decreasing pattern: the majority of graphs are in α ( G ) = 0 or α ( G ) = 1, some in α ( G ) = 2, a few in α ( G ) = 3, v ery fe w in α ( G ) = 4, and so on. Indeed, it w as not possible to obtain a graph with α ( G ) > 4 in the sampled random graphs. Practical applicability The most common methods for dealing with a NP-complete problem when solving a big (intractable by brute force) real problem are: heuristic algorithms, approximate algorithms, randomized algorithms, and fixed-parameter tractability . The presented algorithm introduces a nov el type of solution method and presents many new features that are usually absent from the previous approaches. Suppose that a v ery critical hypothesis about certain phenomenon needs to be prov ed in a molecular biology study and that such a hypothesis depends on testing a property of an object that can be present only when it adopts some particular admissible structure (an NP-certificate) or be absent (no admissible structure for this property) and the problem is not fixed-parameter tractable. Then, 1. None of the standard approaches can discard the hypothesis when no solution is found, since none will giv e a proof that the problem has no solution, i.e., a proof that there is no admissible structure for this property . 2 A rigorous definition assuring that α ( G ) is well-defined is presented in the proof of the main theorem section. 3 Figure 1: Specially named graphs used in the article. (A) Complete graph K 4 . (B) Complete 3-partite graph K 112 . (C) T adpole graph T 31 , which imposes a binary constraint on 3-coloring: either G / xw or G / yw . (D) Path of length two P 2 . (E) C 4 graph that imposes a binary constraint on 3-coloring: either G / xz or G / yw . 2. Even when a solution exists, heuristic as well as randomized algorithms do not guarantee finding a solution ev en with e xtraordinary computational power . 3. Approximate algorithms can giv e, if lucky , an estimated probability of the existence of such a property , possibly including an approximate admissible structure that is only probably correct. Howe ver , the proposed method solves the problem by providing certificates (proofs) in both cases: present or absent; hence, one can accept or reject the hypothesis on the basis of a rigorous proof that will be independent of the algorithm itself and the implementation used. Moreover , the proposed method assures an exact solution. The only requirement is su ffi cient computational power (as in brute force methods). Howe ver , we have pro ven that the amount of required computational resources, i.e., the complexity of a problem for the proposed method, is distributed negati v e exponentially with respect to the problem complexity; hence, the harder a problem is, the lower is its probability of appearance. The exponential reduction in unsolv able instances makes an y in vestment in computing power profitable. Basic terminology This article follows the standard graph theory terminology; for general terms and notation, the book of Jensen and T oft [46] and the recent book on chromatic graph theory by Chartrand and Zhang [47] should be consulted. Howe ver , some special terms and particular notations are defined below . Unless we state otherwise, all graphs in this work are connected and simple (are finite and hav e no loops or parallel edges). The term r andom graph G n , m refers to a graph chosen at random (with equal probability) from among all possible graphs with n vertices and m edges, as defined by Erd ˝ os-R ˝ enyi [20]. W e refer to u , v as a planar preserving edge if uv is not an edge of G and G + uv remains planar . A vertex contraction , also called vertex identification or vertex merging, is denoted by G / uv . V ertex or edge additions and deletions are denoted as follows: G + u or G + uv and G − u or G − uv , respectiv ely . A verte x ordering of a graph G = ( V , E ) is a bijection π : V → { 1 , 2 , ..., | V |} , and thus, a set of n vertices can be ordered in n ! di ff erent ways. The specially named graphs used in the article are as follows (c.f. figure 1): complete graph K 4 , diamond graph, complete 3-partite graph K 112 (a K 4 minus one verte x), tadpole graph T 31 , triangle graph T 3 , path graph P of length two P 2 , and square graph C 4 . A certificate [9] (or witness [10]) is an e ffi ciently verifiable proof of the correctness of an answer for some given decision problem. For instance, giv en a graph G , a legal 3-coloring of G or a short proof that G is not 3-colorable are certificates for the 3-colorability problem. 4 Materials and Methods Definition of the Algorithm Definition 1. Given a graph G and a 3-colorable subgraph H of G, there is an unav oidable vertex contraction 3 u , v ∈ V ( G ) , u , v < E ( G ) if the addition of the new edge uv to H makes H not 3-colorable. Definition 2. Given a non-3-colorable input graph G , a 3 - uncolorability certificate W is a description of a (possibly empty) sequence of unavoidable vertex contractions, G / uv, leading to a graph containing K 4 , such that either of the following two cases apply: 1. u , v are the non-complete vertices of a complete 3 -partite K 112 diamond subgraph of G or; 2. a nested 3-uncolorability certificate for the gr aph G + uv is pr ovided. Hence, in order to design an algorithm for obtaining a 3-uncolorability certificate, a method for obtaining such nested certificates should be provided. The proposed algorithm is recursive and uses a parameter α to limit the recursion depth. A very simple sketch of this algorithm is as follo ws: Algorithm: 1 is-3-colorable( G , α ): 1 Contract ev ery u , v of a diamond subgraph until no other diamond subgraph exists or until the graph becomes the K 3 or it contains a K 4 subgraph. 2 If the graph becomes the K 3 graph then return the current contraction sequence (i.e., a legal 3-coloring). 3 If K 4 is found then return the current contraction sequence (i.e., a 3-uncolorability certificate). 4 If the current recursion le vel α = 0 then return “undetermined for the current value of α . ” 5 For each non-edge u , v , 5.1 If not is-3-colorable( G + uv , α − 1) then 5.1.1 Contract u , v . 5.1.2 Append the nested certificate for G + uv . 5.1.1 Break and continue at step 1. 6 Return “undetermined for the current v alue of α . ” END. Now , let us define a greedy 3-coloring algorithm that will serve as the baseline for the deriv ation of the proposed coloring algorithm. Definition 3. The g 3 ( G ) algorithm is a “greedy-contr action” 3-coloring algorithm that sequentially , and at each step, selects two non-adjacent vertices x and y of a graph G and contracts them to obtain the graph G / xy, while maintaining a list S of the vertices that have been contracted thus far so that if the resulting graph is a triangle (or even a K 2 ) and S contains at most thr ee independent sets, these ar e three (or less) color classes of G and hence, a le gal 3-coloring of G . The justification for using such a simple approach in combination with a more sophisticated w ay of detecting (and av oiding) verte x contraction that unav oidably leads to an non-3-colorable graph is deri ved from the follo wing lemma (lemma 1): 3 Many works define the same relation between such a pair of vertices, e.g., “two nodes u , v of a giv en graph G are 3-color bound (or simply bound) if u and v must be assigned the same color in any 3-coloration of G ” [48]. “T wo vertices of a graph are said to be 3-chromatically connected if they are assigned the same color in any 3-coloring of the graph” [15]. Culberson and Gent [17] also use the term “frozen pair”. Moreover , the same relation for u , v is called “implicit identity” by the current author, who presents [49] a thorough study of this subject for the general case (k-chromatic and non-planar graphs). 5 Lemma 1. Given an e xact algorithm W ( G ) 0 of comple xity O ( n k ) to obtain a 3-uncolorability certificate for any non- 3-colorable graph, ther e is an exact algorithm W ( G ) 1 of complexity O ( n k + 1 ) to obtain a 3-coloring of any 3-color able graph. Pr oof. Assume W ( G ) 0 exists. Then, giv en a 3-colorable graph G , apply the greedy g 3 ( G ) algorithm but a voiding the contraction of ev ery { x , y } such that G / xy is not 3-colorable, which can be determined in O ( n k ) by W ( G / x y ) 0 . Since G is 3-colorable, it will conv er ge (at most) to a triangle graph. Since g 3 ( G ) is of complexity O ( n ) (at ev ery step, at least one verte x will get colored), we obtain a 3-coloring of G in O ( n ) O ( n k ) = O ( n k + 1 ) Corollary 1. Hence, if W ( G , α ) 0 is an exact parametric algorithm, of complexity O ( n f ( α ) ) , to obtain a 3-uncolorability certificate for any non-3-colorable graph, there is an exact parametric algorithm W ( G , α ) 1 of complexity O ( n f ( α ) + 1 ) to obtain a 3-coloring of any 3-colorable gr aph. Hence, the basic complete coloring algorithm can be described as follows: Algorithm: 2 general-3-COL( G , α ): 1 If not is-3-colorable( G , α ) then return 0 and the 3-uncolorability certificate. 2 While G has more than three vertices, 2.1 Select two non-neighboring v ertices u , v . 2.2 If not is-3-colorable( G / uv , α ) then G ← G + uv . 2.3 Else, G ← G / uv . 2.4 If K 4 ∈ G , return ∞ , ∅ . 3 Return 1 and a legal 3-coloring as the list of contracted v ertices. END. Finally , an automated algorithm can be dev eloped to eliminate the need for specifying the α parameter . Algorithm: 3 BFS 3COL( G ): 1 For α = 0 t o ∞ 1.1 If general-3-COL( G , α ) = 0, return a 3-uncolorability certificate. 1.2 If general-3-COL( G , α ) = 1, return a legal 3-coloring. END. Some advanced impr ovements and special case handling The algorithm is divided into two parts: the decision problem ( is-3-colorable ) and the coloring algorithms ( general-3COL ). There are two versions of each of these algorithms: one for planar graphs and the other for non- planar graphs. First, the algorithm for the planar graphs case is described, which is better for understanding the key idea behind the algorithms. Then, this description is generalized for the non-planar graph case. 6 Specialization for planar graphs The dev elopment of a special algorithm for planar graphs has two main adv antages: 1. T o take advantage of some special structural constraints of planar graphs (e.g., Gr ˝ otzsch’ s like theorems) that aid the dev elopment of more e ffi cient algorithms. 2. T o formalize an algorithm for planar graphs that preserves planarity at each step, allowing the de velopment of theoretical studies on the the class of planar graphs, e.g., inductiv e proofs and structure-based proofs. Now , lets us consider the ( is-3-colorable ) routine. According to Grotzsch’ s 3-color theorem [26] (triangle-free planar graphs are 3-colorable), ev ery non-3-colorable planar graph should have { x,y ,z,w } -tadpole T 31 subgraphs (cf. Figure 1B). The ke y idea is that T 31 subgraphs impose binary constraints, i.e., either { x , w } or { y , w } must be contracted since T 31 + xw + yw is a K 4 (the same is true for square graphs). Thus, there is no need for Step 5 of Algorithm 1 to check ev ery non-edge but just ev ery T 31 subgraph. Thus, the routine can be performed for each T 31 by contracting G / yw whenever G / x w is not 3-colorable, i.e., when y , w is a unav oidable vertex contraction, as shown in the next algorithm: Algorithm: 4 is-3-colorable-planar( G , α ): 1 Contract ev ery u , v of a diamond subgraph until no other diamond subgraph exists or until the graph becomes the K 3 or it contains a K 4 subgraph. 2 If the graph becomes the K 3 graph then return the current contraction sequence (i.e., a legal 3-coloring). 3 If K 4 is found then return the current contraction sequence (i.e., a 3-uncolorability certificate). 4 If the current recursion le vel α = 0 then return “undetermined for the current value of α . ” 5 For each { x,y ,z,w } -tadpole T 31 subgraph, 5.1 If not is-3-colorable( G / x w , α − 1) then 5.1.1 Contract yw . 5.1.2 Append the nested certificate for G + yw . 5.1.1 Break and continue at Step 1. 6 Return “undetermined for the current v alue of α . ” END. Now , let us show a planarity preserving coloring algorithm for planar graphs. The idea inv olv es reducing G to a planar triangulation by means of the addition / contraction of the planar preserving edges of the planar graph G . At the end, if the triangulation has all degrees ev en, it is 3-colorable [50, 46] and finding a legal 3-coloring is linear-time. Otherwise, the algorithm returns “undetermined, ” meaning that α was not su ffi cient for obtaining a certificate for the input graph. The specialized coloring routine is described next. Algorithm: 5 general-3-COL-planar( G , α ): 1 If not is-3-colorable-planar( G , α ) then return 0 and the 3-uncolorability certificate. 2 While G is not a planar triangulation, 2.1 Select a planar preserving edge u, v . 2.2 If not is-3-colorable-planar( G / uv , α ) then G ← G + uv . 2.3 Else, G ← G / uv . 2.4 If K 4 ∈ G , return ∞ , ∅ . 3 If triangulation G has an odd verte x, return ∞ , ∅ 7 4 Return 1 and a legal 3-coloring of G in linear time. END. As can be seen, the graph remains planar at each step, making valid any assumption or structural property of planar graphs at each iteration. A slight impr ovement of the worst and expected cases in non-planar gr aphs For non-planar graphs, a slight modification can be made to improve the worst and the expected case running time of the algorithm. The key idea in this case is to build a complete verte x, i.e., a verte x joined to all the remaining vertices of the graph so that for testing 3-colorability it is su ffi cient to test 2-colorability of the neighborhood, which can be done in linear time. Algorithm: 6 general-3-COL( G , α ): 1 If not is-3-colorable( G , α ) then return 0 and the 3-uncolorability certificate. 2 Let u be the verte x with the highest degree of G . 3 While u is not a complete verte x 3.1 Select a non-neighbor v of u such that the common neighborhood ( N ( u ) ∩ N ( v )) is minimized. 3.2 If not is-3-colorable( G / uv , α ) then G ← G + uv . 3.3 Else, G ← G / uv . 3.4 If K 4 ∈ G , return ∞ , ∅ . 3.5 If N ( u ) is not bipartite, return ∞ , ∅ . 4 If N ( u ) is not bipartite, return ∞ , ∅ . 5 Return 1 and a legal 3-coloring as the list of contracted v ertices. END. Pr oof of the Main Theorem T o formalize the analysis of the algorithm, let us define the follo wing two algorithm specifications: Definition 4. The A ( G , α ) is a parametric-comple xity algorithm that computes a function that assigns to a given input graph G just one of three possible values: 0 , 1 , or ∞ , when G is, respectively , non-3-colorable, 3-colorable or the algorithm was unable to find a solution for the given value of the α parameter: A ( G , α )          0 , No-instance: G is not 3-colorable; 1 , Y es-instance: G is 3-colorable; ∞ , undetermined for the giv en α (4) Definition 5. The W ( G , α ) is a parametric-comple xity algorithm that computes a function that assigns to a given input graph G just one of three possible values: a 3-uncolorability certificate, a le gal 3-coloring, or a null value, when A ( G , α ) is, respectively , 0 , 1 , or ∞ . W ( G , α )          a 3-uncolorability certificate , A ( G , α ) = 0; a le gal 3-coloring , A ( G , α ) = 1; ∅ , A ( G , α ) = ∞ (5) 8 Since the proposed algorithm is a greedy algorithm, it is a ff ected as the other greedy sequential coloring algo- rithms, by the initial verte x ordering; hence, it is not possible to define a function α ( G ) simply as the minimum k ∈ N required to obtain a certificate for a particular graph G without considering the verte x ordering; for instance, for any 3-colorable graph, it can be shown at least two di ff erent vertex orderings V 1 , V 2 such that for V 1 , a solution can be found for a value of α ( G ) = 0, while for V 2 , a value of α ( G ) > 0 is required. Thus, a solution is to define the func- tion α ( G ) on the basis of the worst-case vertex ordering, and therefore, α ( G ) will imply a computational complexity measure. Definition 6. Given a graph G , the integ er α ( G ) is For G non-3-colorable: The minimum k ∈ N requir ed to obtain a 3-uncolorability certificate, assuming that the or dering of the vertices is the worst case for the is-3-color able ( G , k ) algorithm. For G 3-colorable: The value α ( H ) of the non-3-colorable graph H = G / uv where α ( H ) is the maximum over all H = G / uv requir ed to obtain a solution for G , assuming that the or dering of the vertices is the worst case for the general-3-COL ( G , k ) algorithm. α ( G ) = max  min( k ) s . t . W ( G , k ) , ∅ ∀ π  . (6) Now , let us divide the proof of Theorem 1 into two cases: 1. For non-3-colorable graphs, i.e., χ ( G ) ≥ 4. 2. For 3-colorable graphs, i.e., χ ( G ) ≤ 3. First, it is prov ed that for non-3-colorable graphs the cardinality of the set A of graphs with α ( G ) = k is greater than the set B of graphs with α ( G ) > k . Lemma 2. Let G ∗ be the set of all graphs and assume (with no loss of g enerality) that in particular G ∗ is defined for a maximum number of vertices or edges that exhausts the r epr esentation limit of any computational de vice, i.e ., G ∗ is finite. Let H , A , and B be the sets: H = { G ∈ G ∗ | χ ( G ) ≥ 4 } , (7) A = { G ∈ H | α ( G ) = k } , (8) B = { G ∈ H | α ( G ) > k } , (9) then | B | < | A | . (10) Pr oof. Since H is the set of non-3-colorable graphs, for every graph in B , there is at least a graph in A : simply take any graph in B not in A and join it to the smallest graph in A ; the resulting graph is in A since a 3-uncolorability certificate can be found with α ( G ) = k . Moreover , no graph of A is a subgraph of any graph in B . Hence, the cardinality of B is strictly less than the cardinality of A . Therefore, case 1 is prov ed since A and B are finite sets and a uniform probability distribution ov er C = A ∪ B is well defined. Hence, P ( α = k ) ≥ P ( α > k ) holds for non-3-colorable graphs. Case 2 can be reduced to case 1 since for 3-colorable graphs P ( α = k ) , ≥ P ( α > k ) reduces to P ( α ( H ) = k ) ≥ P ( α ( H ) > k ) for the worst-case non-3-colorable graph H = G / uv by the definition of α ( G ) for 3-colorable graphs. Therefore, on the basis of the lemma 2, Theorem 1 holds for all k since | B | < | A | implies that P ( α = k ) ≥ P ( α > k ), and hence, P ( α > k ) ≤ 2 − ( k + 1) . This completes the proof of the main theorem. Runtime analysis of the algorithm The av erage-case complexity , worst-case complexity , and experimental performance of the algorithm are analyzed. The av erage-case analysis is informally presented as a mean of establishing the theoretically expected behavior ov er di ff erent kinds of instances. The worst-case analysis establishes the order (Big O ) of the algorithm. Finally , the ex- perimental analysis confronts the algorithm with samples from a series of graph distributions to study its performance and contrast it with the theoretical results. 9 A verage-case (e xpected) complexity T able 1 shows the av erage case (expected) performance of the algorithm with respect to the type of the instance (Y es / No) and the density of the graph, i.e., above / belo w the phase transition threshold. In all the cases (except at the phase transition threshold), there is a high probability of a short running time. A priori, it may look that the worst case should occur on the sparse non-3-colorable graphs. This observation is based on the fact that for this class of graphs, it is more complex to obtain a K 4 by random edge additions and vertex contractions; nevertheless, some restrictions apply . Since the proportion of non-3-colorable graphs decreases fast below the threshold and almost all non-colorable graphs contain a K 4 , the probability of obtaining a K 4 -free non-3- colorable graph below the threshold is very small. Moreover , it is kno wn that vertex 3-colorability of a graph with maximum vertex degree three can be determined in polynomial-time [15]. Further , ev ery vertex of maximum degree two can be removed from the graph without a ff ecting the 3-colorability; thus, non-3-colorable sparse graphs are very rare below c . 4 (this follo ws from the sharp-thresholds theory). Hence, in almost all cases, a short running time is expected. By short, I mean significantly shorter than the worst-case upper bound. W orst-case complexity T o determine the computational complexity (g) of the entire algorithm, we will start by analyzing the algorithm from the is-3-colorable routine. This routine admits a special parameter α that controls the level of recursi ve calls. In order to analyze its complexity , the recursion is fixed to α = 0, and once the complexity for α = 0 is obtained, the complexity for α > 0 is established. The is-3-colorable routine depends on the complexity of the contraction step (Step 1). At first sight, the contraction Step 1 has complexity of order O ( n 4 ) since it explores each K 112 subgraph whose number may increase with an increase in the number of combinations of four elements in the vertices of G . Howe ver , a relativ ely in-depth analysis re veals that the algorithm performs a verte x contraction until there is no other K 112 . This means that this operation is bounded by the number of edges of the complement of G , which has a quadratic O ( n 2 ) order in the number of vertices. Steps 2 and 3 are absorbed into Step 1. Hence, for α = 0, g(is-3-colorable) = n 2 ! , (11) = O ( n 2 ) , for α = 0 . (12) For α > 0, the complexity of is-3-colorable routine also depends on recursive calls inside a for loop through ev ery non-edge that has order O ( n 2 ); therefore, for α = 1, we will hav e O ( n 2 ) O ( n 2 ). g(is-3-colorable) = n 2 ! k + 1 , (13) = O ( n 2 ) k + 1 . (14) Thus, on the basis of lemma 1, it can be shown that the complexity of an algorithm that finds a 3-coloring is just one order higher . g( general-3COL ) = O ( n 2 ) k + 2 (15) Experimental Results The problem of ev aluating algorithms experimentally could be very tricky if tests are performed on “artificial instances, ” which may be uncorrelated or isolated from any specific practical application as claimed by Johnson [51] who proposed a methodological approach to the experimental analysis of algorithms. Nev ertheless, there are some lines of research suggesting special distributions of graph instances on which purported NP-complete problem solv ers should be ev aluated in order to appropriately determine their performances (e.g., [52, 17, 53]). 10 In the experimental part of this article, the algorithm w as thoroughly ev aluated ov er significant samples pertaining to three di ff erent graph distributions. Each class, and each distribution, has a good justification: 1. Pseudo-random planar graphs [41, 42]. Planarity imposes some interesting structural properties, i.e., the 3- coloring problem on planar graphs is the only unqualified problem that remains open [15] since 1-coloring is trivial, 2-coloring is well characterized, and the maximum chromatic number on the plane is four [54, 55], and at the same time, the determination of 3-colorability of planar graphs is NP-complete [48, 14]. 2. Random 4-regular planar graphs [43, 44, 45]. Even more, the 3-colorability of four-regular planar graphs still remains NP-complete [56], and most importantly , in this class, the av erage degree is fixed, and hence, the phase-transition phenomenon as defined for random graphs cannot be applied directly in this case. 3. Erd ˝ os-R ˝ enyi connected random graphs [20]. Finally , sampling from the Erd ˝ os-R ˝ enyi (connected) random graphs distribution gi ves the necessary theoretical support for e valuating an algorithm in the general case, vali- dating the theoretical bounds and allo wing one to obtain results that can be compared against other algorithms in the literature, e.g., the best-performing 3-coloring algorithms proposed in the literature [57]. Sample generation details Random planar graphs [41, 42] are complex to generate, and their definitions and sampling methods are more di ffi cult to implement. Instead, we opted for a relatively simple approach of generating “pseudo random planar graphs. ” The procedure inv olves the generation of a maximal planar graph and the uniform selection of edges from this graph at random (i.e., with equal probability) to create another graph called a pseudo random graph. F or this purpose, we used the “Create Random Planar Graph” algorithm implementation used by [58] (Gato - the Graph Animation T oolbox 4 ) for the creation of such random planar graphs. Only one modification was included to av oid generating a considerably large number of graphs containing a K 4 subgraph. The idea in v olves the generation of a K 4 -free planar graph during 100 attempts returning the first encountered K 4 -free graph; otherwise, returning the 100 th -generated graph. Random 4-regular planar graphs are also very complex to generate. Here, the procedures described in Refs. [43], [44] and [45] to generate all the 4-regular planar graphs hav e been used. In particular, Theorem 2 of [45] is used for generating 4-regular planar graphs. Howe ver , there is no theory defining a random 4-regular planar graph, so an ad hoc distribution has been specified to balance the proportion of Y es / No instances. The distribution has been obtained by assigning a probability to each graph transformation (see [45]): P ( φ A ) = . 80, P ( φ B ) = . 05, P ( φ C ) = . 10, and P ( φ F ) = . 05. The Erd ˝ os-R ˝ enyi [20] random graph, is a very well-known model that allows uniform sampling from graphs at random by specifying either a number of vertices and edges or the probability of a number of vertices and the edges. W e followed standard methods to sample from this distribution. The only modification is that the generation of a connected graph is assured by first generating a simple path passing through all the vertices and then adding the remaining random edges. The e xperiments are designed to study the beha vior (not just the performance or running time) of the proposed al- gorithm. For this purpose, there are curves e valuating the algorithm’ s performance o ver a particular graph distrib ution and there is an initial comparativ e plot against the backtracking algorithm. The use of backtracking is restricted to the study of the algorithm’ s scalability since it is not possible to use backtracking consistently beyond the 100 vertex barrier because of its exponential growth. For planar graphs, the planar v ersions were used, while for random graphs, the improv ed versions were used. All experiments were dev eloped in the Python 5 programming language using its standard libraries and the other libraries dev eloped by the current author . Other software includes the planarity library 6 [59] as well as the above men- tioned Gato (the Graph Animation T oolbox) libraries. The e xperiments were realized on common personal computers, and no parallelism was used. All time measurements are done in seconds using Python’ s time.clock() 7 function. 4 CA TBox: http://schliep.org/CATBox , Gato: http://gato.sf.net . 5 http://www.python.org/ 6 http://code.google.com/p/planarity 7 See http://docs.python.org/library/time.html . 11 Experiment 1: scaling factor compar ed against bac ktrac king The first part of the experimental analysis is a comparison between the scaling factor of the proposed algorithm with that of simple backtracking, in order to determine the di ff erences in the behavior of both algorithms. This experiment in v olved the generation of uniformly random planar graph instances from 10 to 100 vertices (incremented by 1 and generating 100 graphs for each number) and solving each instance with both algorithms. T able 2 sho ws the parameters of the sample used in the experiment. For each algorithm, the mean and maximum (max) running times were recorded as well as some other relev ant statistics. T imes labeled as t 1 correspond to the backtracking algorithm, while the t 2 times correspond to the proposed parametric algorithm. Comparativ e plots are sho wn in Figure 2; there are six plots from (a) to (f). Figure 2a sho ws the running times as a function of the number of vertices for both kinds of instance types and for both algorithms. Figure 2b shows the proportion of 3-colorable and non-3-colorable graphs over the total number of graphs per number of vertices. It can be seen that the distrib ution tends to be uniform. Figures 2c and 2d also sho w the running times as a function of the number of vertices but discriminated by the instance types (Y es / No) so that subtle di ff erences can be observed. The general results indicate that there is a crossing point in which backtracking continues to grow exponentially while the proposed algorithm remains polynomial (cf. Figure 2a at around 50 vertices); hence, a clear di ff erence in the beha vior of both algorithms is observed. This di ff erence is clearer in the non-3-colorable instances (cf. Figure 2c) where the maximum running times of the parametric algorithm are relatively low in all the cases. Nev ertheless, for the 3-colorable instances (cf. Figure 2d), the di ff erence starts to be clear around graphs on 50 vertices. Moreov er , when running times are compared as a function of the av erage degree, there is a significant di ff erence in the behavior of both algorithms. For non-3-colorable instances, the parametric algorithm exhibits an almost constant performance (cf. Figure 2e) and a totally uncorrelated curve against backtracking, which on the contrary is very sensitiv e to the av erage degree. This di ff erence, although to a slightly minor degree, can also be observed in the 3-colorable instances as shown in Figure 2f. 12 Figure 2: Backtracking vs. proposed algorithm. Runtime analysis of the backtracking (brute force plus heuristic) ( t 1 ) vs. the proposed parametric algorithm ( t 2 ) ov er random planar graphs between 10 and 100 vertices. Plot (a) shows the running times as a function of the number of vertices for both kinds of instance types and for both algorithms. Plot (b) shows the proportion of 3-colorable and non-3-colorable graphs over the total number of graphs per number of vertices. Plots (c) and (d) also show the running times as a function of the number of vertices discriminated by the instance types (yes-or -no) so that subtle di ff erences can be observed. Plots (e) and (f) also sho w the running times b ut as a function of the av erage degree and instance type. 13 Figure 3: Results for planar graphs. Runtime analysis over random planar graphs between 100 and 1000 vertices (incremented by 100 and generating 1000 graphs for each number). Plot (a) shows the running times as a function of the number of vertices for both kinds of instance types. Plot (b) shows the proportion of 3-colorable and non-3- colorable graphs ov er the total number of graphs per number of vertices. Experiment 2: random planar gr aphs This experiment in volv es the generation of uniformly random planar graph instances from 100 to 1000 vertices (incremented by 100 and generating 1000 graphs for each number) and solving each instance with the parametric algorithm. T able 3 shows the parameters of the sample used in the experiment. It is not possible to compare the results against backtracking because of its exponentially increasing running time. For each instance type (Y es / No), the mean and maximum (max) running times where recorded, as well as some other relev ant statistics. Comparative plots are sho wn in Figures 3 and 4. Figure 3a shows the running times as a function of the number of vertices for both kinds of instance types. Figure 3b shows the proportion of 3-colorable and non-3-colorable graphs o ver the total number of graphs per number of vertices. It can be seen that the distribution is far from uniform. Figures 4a and 4b also show the running times as a function of the number of vertices b ut discriminated by the a verage de gree. The results indicate that there is a di ff erence in running times depending on the instance type (cf. Figure 3a). This di ff erence is expected since the proposed algorithm returns earlier (without entering the main loop) when a 3- uncolorability certificate is found. Even in the case when the average degree is considered, the di ff erence is high (cf. Figures 4a and 4b). 14 Figure 4: Results for planar graphs. Runtime analysis over random planar graphs considering instance type and av erage degree. Plots (a) and (b) also sho w the running times as a function of the number of vertices but discriminated by the av erage degree. Experiment 3: random planar 4-r egular gr aphs In this experiment, graphs were sampled from an ad-hoc distrib ution ov er the 4-regular planar graphs. The samples were used for generating graph instances from 100 to 1000 vertices (incremented by 100 and generating 1000 graphs for each number) and solving each instance with the parametric algorithm. T able 4 shows the parameters of the samples used in the experiment. For each instance type (Y es / No), the mean and maximum (max) running times were recorded, as well as some other relev ant statistics. Comparativ e plots are shown in Figure 5. Figure 5a shows the running times as a function of the number of vertices for both kinds of instance types. Figure 5b shows the proportion of 3-colorable and non-3- colorable graphs over the total number of graphs per number of v ertices; it can be seen that the distribution is far from uniform. These results indicate that there is a very significant di ff erence in running times depending on the instance type (cf. Figure 5a). This di ff erence was expected since the proposed algorithm returns earlier when a 3-uncolorability certificate is found. Again, the observed di ff erence is high. 15 Figure 5: Results for 4-r egular planar graphs. Runtime analysis ov er random 4-regular planar graphs between 100 and 1000 vertices. Plot (a) sho ws the running times as a function of the number of vertices for both kinds of instance types. Plot (b) shows the proportion of 3-colorable and non-3-colorable graphs ov er the total number of graphs per number of vertices. 16 Experiment 4: Er d ˝ os-R ˝ enyi random graphs In the last experiment, graphs were sampled from the well-known Erd ˝ os-R ˝ enyi random graphs distribution. The samples were graph instances of 100 vertices, generating in total 10000 graphs, and solving each instance with the parametric algorithm. T able 5 shows the parameters of the sample used in the experiment. F or each instance type (Y es / No), the mean and maximum (max) running times were recorded, as well as some other relev ant statistics. Comparativ e plots are sho wn in Figure 6. Figure 6a sho ws the quantity of 3-colorable and non-3-colorable graphs as a function of the a verage degree, i.e., a phase transition plot, in this case, occurring at around d = 4 . 74. It should be noted that this phase transition is for the connected random graphs and not standard random graphs, which can contain many components, thus a ff ecting the phase transition threshold. Figure 6b shows the quantity of graphs corresponding to each α ( G ) value. As predicted by the theory , almost all graphs hav e α ( G ) ≤ k for some integer k , and the proportion of graphs decreases exponentially as a function of α clearly below the line of 2 − ( α + 1) . These results confirm the established theoretical bounds. Figures 6c and 6d show the running time as a function of the average degree. It can be observed that in the random graphs case, the di ff erence in running time is not as high as the di ff erence observ ed in the planar graphs case. Further , there is a di ff erence in the location of the harder instances for each kind of instance type: the harder instances for the non-3-colorable case are located around an average degree of d ≈ 5 while, in the 3-coloring case, they are located slightly belo w an av erage degree of d ≈ 4 . 8. Although the numbers seems to be very close, the shapes of the running-time curves are not. The shape of the running-time curve in Figure 6d falls sharply after 5, while the shape of the running-time curve in 6c does not. This may indicate that there is a true di ff erence in the location of the harder instances depending on the type (Y es / No) of the instance, and (to the best of my kno wledge), there are no other w orks identifying a separation of a complexity threshold on the basis of the type of instance. As observed in the experiments, the v alue of α ( G ) was directly correlated with the av erage degree d = 2 m / n ( m = edges, n = v ertices); hence, near the phase transition threshold ( d ∗ ) [18, 19], the probability of a relativ ely high value of α ( G ) increases. d ∗ ≈ ( 4 . 69 , [18]; 4 . 703 , [19] (16) Howe ver , many interesting questions remain open; e.g., • What is the exact distrib ution of α ( G ) in random graphs? • Apart from the av erage degree, what other parameters are related to α ( G )? • Gi ven an arbitrary input graph G , can the α ( G ) value be predicted (exactly or approximately) and what is the best possible approximation to α ( G )? • As for the chromatic number χ ( G ), is there any (e ffi cient) graph construction mechanism that allo ws the gener- ation of graphs with arbitrarily large α ( G )? 17 Figure 6: Runtime analysis of the algorithm for random graphs . The behavior of the proposed algorithm over the well-known Erd ˝ os-R ˝ enyi random graphs distribution. Plot (a) shows the quantity of 3-colorable and non-3-colorable graphs as a function of the av erage degree, i.e., a phase transition plot, in this case, occurring at around d = 4 . 74. Plot (b) sho ws the quantity of graphs corresponding to each α ( G ) value. As predicted by the theory , the proportion of graphs decreases exponentially as a function of α below the line of 2 − ( α + 1) . Plots (c) and (d) show the running times as a function of the av erage degree. 18 Discussion In this article, an asymptotic parametric exact 3-coloring algorithm has been presented. This is (to the best of my knowledge) the first algorithm of its kind for the 3-coloring problem. The maximal complexity of the algorithm is controlled by the parameter ( α ) that bounds the recursion depth and determines its running time. The algorithm relies on the e ffi cient search of 3-uncolorability certificates. Here, a formal definition of the 3-uncolorability certificate has been introduced. This is the central theoretical concept that allowed the dev elopment of the proposed algorithm. The definition of the 3-uncolorability certificate presented here is (to the best of my knowledge) the first one that is formally presented and the most naturally related to the 3-coloring problem. A very significant feature of 3-uncolorability certificates is that it is possible to obtain them from small subgraphs of a particular graph, indeed, as small as four vertices (i.e. by finding a K 4 subgraph). Hence, an interesting theoretical analysis that should follow is to study of the behavior of α ( G ) on 4-critical graphs since in this class, there is no subgraph with chromatic number four , and hence, finding unav oidable vertex contractions may be relativ ely hard (e.g., see Ref. [53] for a good initial de v elopment of this idea). Hence, a classification of 4-critical graphs on the basis of α ( G ) can lead to very significant results. There is an interesting symmetry between coloring and uncolorability certificates: • In order to show that a graph is 3-colorable, it is su ffi cient to encounter just one legal coloring; nevertheless, any legal coloring must assign a color to all the vertices of the graph without violating any constraint since it remains hard to determine if a partial coloring is extensible to all the v ertices of the graph. • Instead, in order to sho w that a graph is not 3-colorable, one needs to verify that none of the possible 3-colorings is a legal one; ne vertheless, for obtaining a 3-uncolorability certificate, it is su ffi cient to encounter just one non- 3-colorable subgraph (e.g., a 4-critical subgraph), i.e., a small graph. Thus, while for considerably large graphs, just verifying a legal 3-coloring can be complex in practice, it remains practical (at least in theory) to determine 3-uncolorability ev en for such graphs. Hence, in principle, finding uncolorability certificates can be assumed to be at least of the same kind as finding colorings. Thus, there should not be any problem in the dev elopment of 3-coloring algorithms on the basis of a search for 3-uncolorability certificates that eventually reach the same level of sophistication and performance as its coloring-based peers. Moreov er , if the algorithm is used as a heuristic, e.g., to test whether a solution can be found quickly (“just by chance”) with a relativ ely low (e ffi cient) α , the algorithm will search for both 3-colorings and 3-uncolorability certificates at the same time, in clear contrast with the use of backtracking, greedy-based, and randomized 3-coloring algorithms. Further , this feature is particularly important as its consideration ensure that it is not necessary to trust the correctness of the algorithm itself or the particular implementation used in order to recognize that the provided solution is correct since the result can be e ffi ciently v erified using just the solution pro vided, i.e., a legal 3-coloring or a 3-uncolorability certificate. The de veloped theoretical analysis guarantees some good features of the proposed algorithm. The most important one, for both practical and theoretical purposes, is that while the algorithm relies on the value of α to be able to find a certificate, the probability that α ( G ) > k decreases at the rate P ( α ( G ) > k ) ≤ 2 − ( k + 1) , e.g., for k = 19, there is less chance than one in a million of not obtaining a solution with the proposed polynomial algorithm (i.e., probability of success = 0.999999), assuming that the input is a random graph. Thus, while certainly be yond some value of α , the running times would become prohibitive given the current state of the computing machinery , the dev eloped algorithm scales polynomially , and the probability of obtaining a solution (success) gro ws exponentially with an increment of α . Hence, any step (i.e., any inv estment) in computing power technology will lead to a huge (exponential) growth of the class of tractable 3-coloring instances, as well as CSPs in general. Perhaps, it could be the case that we can achie ve at least a “technological tractability”?, i.e., a guaranteed number of instances such that almost all computational problems of practical interest could be solved for α ( G ) ∈ [0 , k ] for some integer k . It should also be observed that increasing α as the result of technological progress implies that α , f (input), i.e., α is not a function of the input. Does technological progress imply a polynomial algorithm for 3-colorability? 19 In addition, since 3-colorability is NP-complete and to each graph corresponds a unique α ( G ), a classification based on α ( G ) of all the NP-complete problem instances can be done by a reduction of each problem instance to a 3-coloring instance G such that α ( G ) = k for some k ∈ N . Howe ver , can we define NP as follows? Let us define NP( α ) as the class of problems in NP that are also in P for some particular value of α ( G ) ∈ N . Then, NP = ∞ [ α = 0 NP( α ) , (17) i.e., can then NP be defined as the infinite union of problems in P? Finally , ev en determining the infiniteness of α ( G ), is there, as in the case of the maximal degree four , ( 4 ( G ) ≤ 4); a k ∈ N such that determining 3-colorability over a class of graphs with α ( G ) ≤ k is still NP-complete, i.e., P = NP? In the maximal-degree case, we know that 3-colorability restricted to 4 ( G ) ≤ 4 is still NP-complete. Nev ertheless, the problem is to determine whether a polynomial algorithm exists or not. On the contrary , in the finite- α ( G ) case, we know that 3-colorability restricted to α ( G ) ≤ k is in P . Nev ertheless, the problem is to determine whether it is NP-complete for a class of graphs and finite k ∈ N . Reproducibility note The working source-code of the algorithm and all the software libraries needed to appropriately use and experiment with the algorithm hav e been released and are a vailable at the publisher’ s website. Furthermore, there is a web application that implements the algorithm inside the Google App Engine cloud com- puting framew ork. The users can visit the site and test the algorithm at the following url: • http://graph- coloring.appspot.com The web coloring application just asks for a file where a graph is defined following the plain text version of the simple edge-list according to the DIMA CS standard format specification ( http://mat.gsia.cmu.edu/COLOR/ general/ccformat.ps ), such as the .col files in http://mat.gsia.cmu.edu/COLOR/instances.html . 20 T ables T able 1: A priori expected performance of the algorithm with respect to 3-colorability and graph density pa- rameters. KIND 3-COLORABLE NO T 3-COLORABLE SP ARSE ( d < d ∗ ) High probability of a short running time due to the existence of many legal color- ings. High probability of a short running time since almost all non-3-colorable graphs contain a K 4 and hence the probability of obtaining a K 4 -free non-3-colorable graph decreases rapidly when the av erage degree falls belo w the phase transition threshold. d ∗ Harder instances. Harder instances. DENSE ( d > d ∗ ) High probability of a short running time due to the existence of many K 112 sub- graphs that prune the search, e.g., graphs tend to be uniquely colorable. High probability of a short running time due to the existence of many small 3- uncolorability certificates due to the av er - age degree, e.g., too man y K 4 -subgraphs. A verage case (e xpected) performance of the algorithm with respect to the density of the graph, i.e., abov e / belo w the phase transition threshold ( d ∗ ' 4 . 69) and the type of instance (Y es / No). T able 2: Parameters of the scalability test between backtracking and the proposed algorithm. Sample property V alue Sample type: Random planar graphs. Sample size: 9000 graphs. V ertex number: From 10 to 100 vertices, incremented by 1. A verage de gree: From 2 to 5 edges uniformly distributed. Group size: 100 graphs per number of vertices. Random planar graph instances from 10 to 100 v ertices incremented by 1 and generating 100 graphs for each number of vertices, i.e., 9000 graphs in total. 21 T able 3: Parameters of the sample used in the random planar graphs test . Sample property V alue Sample type: Random planar graphs. Sample size: 10000 graphs. V ertex number: From 100 to 1000 vertices, incremented by 100. A verage de gree: From 2 to 5 edges uniformly distributed. Group size: 100 graphs per number of vertices. Uniformly random planar graph instances from 100 to 1000 vertices incremented by 100 and generating 1000 graphs for each number of vertices, i.e., 10000 graphs in total. T able 4: Parameters of the sample used in the random planar 4-regular graphs test. Sample property V alue Sample type: Random planar 4-regular graphs. Sample distribution: P ( φ A ) = . 80, P ( φ B ) = . 05, P ( φ C ) = . 10 and P ( φ F ) = . 05 Sample size: 10000 graphs. V ertex number: From 100 to 1000 vertices, incremented by 100. Degree: Fixed: 4-regular graphs. Group size: 1000 graphs per number of vertices. Graphs are sampled from an ad-hoc distribution o ver the 4-re gular planar graphs. The sample consist of graph instances from 100 to 1000 v ertices incremented by 100 and generating 1000 graphs for each number of v ertices, i.e., 10000 graphs in total. For the e xact meaning of each graph transformation operation, i.e., φ A , φ B , φ C and φ F see Ref. [45]. T able 5: Parameters of the sample used in the random graphs test. Sample property V alue Sample type: Erd ˝ os-R ˝ enyi random graphs. Sample size: 10000 graphs. V ertex number: Fixed: 100 vertices. A verage de gree: From 3 to 6 edges uniformly distributed. Graphs are sampled from the well-known Erd ˝ os-R ˝ enyi random graphs distrib ution. The sample consist of graph instances for 100 vertices, generating in total 10000 graphs. For each number of vertices, the a verage degree is v aried from 3 to 6. 22 References [1] M. Jones, Artificial Intelligence: A Systems Approach, Computer Science, Jones & Bartlett Publishers, Incorporated, 2008. URL http://books.google.es/books?id=ekUHwvRP7nUC [2] A. Wigderson, Improving the performance guarantee for approximate graph coloring, Journal of the ACM (J ACM) 30 (1983) 729–735. doi:http://doi.acm.org/10.1145/2157.2158 . URL http://doi.acm.org/10.1145/2157.2158 [3] T . P ark, C. Lee, Application of the graph coloring algorithm to the frequency assignment problem, Journal of the Operations Research Society of Japan-Keiei Kagaku 39 (2) (1996) 258–265. [4] A. Ramani, F . Aloul, I. Markov , K. Sakallah, Breaking instance-independent symmetries in exact graph coloring, in: Proceedings of the conference on Design, automation and test in Europe-V olume 1, IEEE Computer Society , 2004, p. 10324. [5] L. Zdeborov ´ a, F . Krzakala, Phase transitions in the coloring of random graphs, Physical Revie w E 76 (3) (2007) 031131. [6] I. Abfalter , Nucleic acid sequence design as a graph colouring problem, Ph.D. thesis, Uni versit ¨ at W ien (Nov ember 2005). URL http://www.tbi.univie.ac.at/papers/Abstracts/ingrid_diss.pdf [7] P . Pevzner , M. W aterman, Open combinatorial problems in computational molecular biology , in: Theory of Computing and Systems, 1995. Proceedings., Third Israel Symposium on the, IEEE, 1995, pp. 158–173. [8] R. Karp, Heuristic algorithms in computational molecular biology , Journal of Computer and System Sciences 77 (1) (2011) 122–128. [9] S. Arora, B. Barak, Computational Complexity: A Modern Approach, 1st Edition, Cambridge University Press, Ne w Y ork, NY , USA, 2009. [10] O. Goldreich, Computational complexity: a conceptual perspective, Cambridge Uni versity Press, 2008. URL http://books.google.es/books?id=EuguvA- w5OEC [11] S. A. Cook, The complexity of theorem-proving procedures, in: Proceedings of the third annual ACM symposium on Theory of computing, STOC ’71, A CM, New Y ork, NY , USA, 1971, pp. 151–158. doi:http://doi.acm.org/10.1145/800157.805047 . URL http://doi.acm.org/10.1145/800157.805047 [12] R. M. Karp, Reducibility among combinational problems, Complexity of Computer Computations (1972) 85–103. [13] L. Levin, Uni versal sequential search problems, Problemy Peredachi Informatsii 9 (3) (1973) 115–116. [14] M. R. Gare y , D. S. Johnson, Computers and Intractability , A Guide to the Theory of NP-Completeness, W .H. Freeman and Co., San Francisco, 1979. [15] R. Steinberg, The state of the three color problem, Annals of discrete mathematics 55 (1993) 211–248. [16] T . Hogg, B. Huberman, C. W illiams, Phase transitions and the search problem, Artificial intelligence 81 (1-2) (1996) 1–15. [17] J. Culberson, I. Gent, Frozen development in graph coloring, Theoretical computer science 265 (2001) 227–264. doi:10.1016/ S0304- 3975(01)00164- 5 . URL http://portal.acm.org/citation.cfm?id=500494.500504 [18] R. Mulet, A. Pagnani, M. W eigt, R. Zecchina, Coloring random graphs, Physical re view letters 89 (26) (2002) 268701. [19] S. Boettcher, A. G. Percus, Extremal optimization at the phase transition of the three-coloring problem, Physical Review E 69 (6) (2004) 066703. doi:10.1103/PhysRevE.69.066703 . [20] P . Erd ˝ os, A. R ˝ enyi, On the e volution of random graphs, Publications of tk e Matkemafical Insfifufe of the Hungarian Academy of Sciences 5. [21] P . Erdos, D. Kleitman, B. Rothschild, Asymptotic enumeration of kn-free graphs, in: Colloquio Internazionale sulle T eorie Combinatorie (Rome, 1973), V ol. 2, Atti dei Conv egni Lincei, 17, Accad. Naz. Lincei, Roma, 1976, pp. 19–27. [22] O. V . Borodin, Structural properties of plane graphs without adjacent triangles and an application to 3-colorings, Journal of Graph Theory 21 (1996) 183–186. doi:10.1002/(SICI)1097- 0118(199602)21:2< 183::AID- JGT7> 3.0.CO;2- N . URL http://portal.acm.org/citation.cfm?id=228780.228793 [23] O. V . Borodin, A. Glebov , A. Raspaud, M. Salavatipour , Planar graphs without cycles of length from 4 to 7 are 3-colorable, Journal of Combinatorial Theory , Series B 93 (2) (2005) 303 – 311. doi:DOI:10.1016/j.jctb.2004.11.001 . URL http://www.sciencedirect.com/science/article/pii/S0095895604001170 [24] W .-f. W ang, M. Chen, Planar graphs without 4,6,8-cycles are 3-colorable, Science in China Series A: Mathematics 50 (2007) 1552–1562, 10.1007 / s11425-007-0106-4. URL http://dx.doi.org/10.1007/s11425- 007- 0106- 4 [25] O. V . Borodin, A. N. Glebov , M. Montassier , A. Raspaud, Planar graphs without 5- and 7-c ycles and without adjacent triangles are 3-colorable, Journal of Combinatorial Theory , Series B. 99 (2009) 668–673. doi:10.1016/j.jctb.2008.11.001 . URL http://portal.acm.org/citation.cfm?id=1537317.1537543 [26] C. Thomassen, Gr ˝ otzsch’ s 3-color theorem and its counterparts for the torus and the projecti ve plane, Journal of Combinatorial Theory , Series B 62 (2) (1994) 268 – 279. doi:DOI:10.1006/jctb.1994.1069 . URL http://www.sciencedirect.com/science/article/pii/S0095895684710690 [27] D. S. Johnson, Approximation algorithms for combinatorial problems, Journal of Computer and System Sciences 9 (3) (1974) 256 – 278. doi:DOI:10.1016/S0022- 0000(74)80044- 9 . URL http://www.sciencedirect.com/science/article/pii/S0022000074800449 [28] D. S. Johnson, W orst case behavior of graph coloring algorithms, in: Proceedings of the Fifth Southeastern Conference on Combinatorics, Graph Theory and Computing (Florida Atlantic Univ ., Boca Raton, Fla., 1974, F . Ho ff man et al., eds.), 1974, pp. 513–527. [29] M. R. Garey , D. S. Johnson, The complexity of near-optimal graph coloring, Journal of the ACM (J A CM) 23 (1976) 43–49. doi:http: //doi.acm.org/10.1145/321921.321926 . URL http://doi.acm.org/10.1145/321921.321926 [30] B. Berger , J. Rompel, A better performance guarantee for approximate graph coloring, Algorithmica 5 (1) (1990) 459–466. [31] M. Halld ´ orsson, A still better performance guarantee for approximate graph coloring, Information Processing Letters 45 (1) (1993) 19–23. [32] A. Blum, New approximation algorithms for graph coloring, Journal of the A CM (J A CM) 41 (3) (1994) 516. [33] S. Arora, E. Chlamtac, New approximation guarantee for chromatic number, in: Proceedings of the thirty-eighth annual A CM symposium 23 on Theory of computing, STOC ’06, ACM, New Y ork, NY , USA, 2006, pp. 215–224. doi:http://doi.acm.org/10.1145/1132516. 1132548 . URL http://doi.acm.org/10.1145/1132516.1132548 [34] D. Karger, R. Motwani, M. Sudan, Approximate graph coloring by semidefinite programming, Journal of the A CM (JA CM) 45 (2) (1998) 246–265. [35] S. Khanna, N. Linial, S. Safra, On the hardness of approximating the chromatic number , Combinatorica 20 (3) (2000) 393–415. [36] R. Downe y , M. Fellows, Parameterized comple xity , V ol. 5, Springer New Y ork, 1999. [37] J. Flum, M. Grohe, Parameterized comple xity theory (texts in theoretical computer science. an eatcs series) (2006). [38] R. B. Boppana, J. Hastad, S. Zachos, Does co-NP hav e short interactive proofs?, Information Processing Letters 25 (2) (1987) 127–132. doi:10.1016/0020- 0190(87)90232- 8 . [39] L. Fortno w , M. Sipser, Are there interacti ve proofs for co-NP languages?, Information Processing Letters 28 (1988) 249–251. [40] J.-N. Bes, P . Jegou, Proving graph un-colorability with a consistency check of CSP, in: T ools with Artificial Intelligence, 2005. ICT AI 05. 17th IEEE International Conference on, 2005, pp. 2 pp. –694. doi:10.1109/ICTAI.2005.102 . [41] A. Denise, M. V asconcellos, D. W elsh, The random planar graph, Congressus numerantium (1996) 61–80. [42] M. Bodirsky , C. Gr ˝ opl, M. Kang, Generating labeled planar graphs uniformly at random, Automata, Languages and Programming (2003) 191–191. [43] P . Manca, Generating all planer graphs regular of degree four , Journal of graph theory 3 (4) (1979) 357–364. [44] J. Lehel, Generating all 4-regular planar graphs from the graph of the octahedron, Journal of graph theory 5 (4) (1981) 423–426. [45] H. Broersma, A. Duijv estijn, F . G ˝ obel, Generating all 3-connected 4-regular planar graphs from the octahedron graph, Journal of graph theory 17 (5) (1993) 613–620. [46] T . R. Jensen, B. T oft, Graph coloring problems, Wile y-Interscience Series in Discrete Mathematics and Optimization, John Wile y & Sons, Chichester-Ne w Y ork-Brisbane-T oronto-Singapore, 1995. [47] G. Chartrand, P . Zhang, Chromatic Graph Theory , 1st Edition, Chapman & Hall / CRC, 2008. [48] L. Stockmeyer , Planar 3-colorability is polynomial complete, SIGACT Ne ws 5 (1973) 19–25. doi:10.1145/1008293.1008294 . [49] J. A. Martin H., Minimal non-extensible precolorings and implicit-relations, CoRR - Computing Research Repository abs / 1104.0510 (2011) 1–10. [50] P . Heawood, On the four-colour map theorem, Quarterly Journal of Pure and Applied Mathematics 29 (1898) 270–285. [51] D. S. Johnson, A theoreticians guide to the experimental analysis of algorithms, in: Data Structures, Near Neighbor Searches, and Methodol- ogy: Fifth and Sixth DIMA CS Implementation Challenges, American Mathematical Society , 2002, pp. 215–250. [52] B. Selman, D. Mitchell, H. Lev esque, Generating hard satisfiability problems* 1, Artificial intelligence 81 (1-2) (1996) 17–29. [53] K. Mizuno, S. Nishihara, Constructive generation of very hard 3-colorability instances, Discrete Applied Mathematics 156 (2) (2008) 218– 229. [54] K. Appel, W . Haken, J. K och, Ev ery planar map is four colorable. Part I: Discharging, Illinois Journal of Mathematics 21 (3) (1977) 429–490. [55] K. Appel, W . Haken, J. Koch, Every planar map is four colorable. Part II: Reducibility , Illinois Journal of Mathematics 21 (3) (1977) 491–567. [56] D. P . Dailey , Uniqueness of colorability and colorability of planar 4-regular graphs are np-complete, Discrete Mathematics 30 (3) (1980) 289 – 293. doi:DOI:10.1016/0012- 365X(80)90236- 8 . URL http://www.sciencedirect.com/science/article/pii/0012365X80902368 [57] E. Malaguti, P . T oth, A survey on vertex coloring problems, International Transactions in Operational Research 17 (1) (2010) 1–34. doi: 10.1111/j.1475- 3995.2009.00696.x . URL http://dx.doi.org/10.1111/j.1475- 3995.2009.00696.x [58] W . Hochst ¨ attler , A. Schliep, CA TBox: An Interactiv e Course in Combinatorial Optimization, 1st Edition, Springer, 2010. doi:10.1007/ 978- 3- 642- 03822- 8 . URL http://www.springer.com/new+%26+forthcoming+titles+%28default%29/book/978- 3- 540- 14887- 6 [59] J. Boyer , W . Myrvold, On the cutting edge: Simplified O(n) planarity by edge addition, Journal of Graph Algorithms and Applications 8 (3) (2004) 241–273. 24

Original Paper

Loading high-quality paper...

Comments & Academic Discussion

Loading comments...

Leave a Comment