• Nem Talált Eredményt

Improved bounds on the complexity of graph coloring

N/A
N/A
Protected

Academic year: 2022

Ossza meg "Improved bounds on the complexity of graph coloring"

Copied!
9
0
0

Teljes szövegt

(1)

Improved bounds on the complexity of graph coloring

This paper appeared in: Proceedings of the 12th International Symposium on Symbolic and Numeric Algorithms for Scientific Computing, track „Advances in the Theory of Computing”, Timisoara (Romania), 2010, pp. 347-354, IEEE Computer Society

Zoltán Ádám Mann

Department of Computer Science and Information Theory Budapest University of Technology and Economics

Budapest, Hungary e-mail: zoltan.mann@cs.bme.hu

Anikó Szajkó

Department of Computer Science and Information Theory Budapest University of Technology and Economics

Budapest, Hungary e-mail: szajko.aniko@gmail.com

Abstract—The coloring of random graphs has been the subject of intensive research in the last decades. As a result, the asymptotic behaviour of both the chromatic number and the complexity of the colorability problem are quite well understood.

However, the asymptotic results give limited help in predicting the behaviour in specific finite cases.

In this paper, we consider the application of the usual back- track algorithm to random graphs, and analyze the expected size of the search tree as a machine-independent measure of algorithm complexity. With a combination of combinatorial, probabilistic and analytical methods, we derive upper and lower bounds for the expected size of the search tree. Our bounds are much tighter than previous results and thus enable accurate prediction of algorithm runtime.

I. INTRODUCTION AND PREVIOUS WORK

Graph coloring is one of the most fundamental problems in algorithmic graph theory, with many practical applications such as register allocation, frequency assignment, pattern matching, and scheduling [16], [6], [15]. Unfortunately, graph coloring is N P-complete [9].

Although graph coloring is hard in the worst case, it is easier in the average case [19]. The probabilistic analysis of the coloring of random graphs was first suggested in [8]. Subsequent work [10], [4], [12] uncovered the order of magnitude of the expected chromatic number of random graphs. Through more recent work [2], [1], we can determine almost exactly the expected chromatic number of a random graph in the limit: with probability tending to 1 when the size of the graph tends to infinity, the expected chromatic number of a random graph is one of two possible values.

Empirical study of the behaviour of search algorithms and the complexity of graph coloring problem instances [14], [18]

has lead to the discovery of a phase transition phenomenon with an accompanying easy-hard-easy pattern [7], [11].

Briefly, this means that for small values of the edges/vertices ratio (underconstrained case), almost all random graphs are colorable. When the connectivity of the graph is increased, the ratio of colorable graphs abruptly drops from almost 1 to almost 0 (phase transition). After this critical regime,

almost all graphs are uncolorable (overconstrained case). In the underconstrained case, coloring is easy: even the simplest heuristics usually find a proper coloring [19], [5]. In the overconstrained case, it is easy for backtracking algorithms to prove uncolorability because they quickly reach contradic- tion [17]. The hardest instances lie in the critical regime [7].

Summarizing these results, one can state that we have a good quantitative understanding of graph coloring in the limit (when the size of the graph tends to infinity) and a good qualitative understanding of it in the finite case. Our aim in this paper is to study the hardness of graph coloring quantitatively with accurate results for finite graphs.

Specifically, we consider the application of the usual back- track search to the coloring of random graphs. We restrict ourselves to the non-colorable case; extension of our model to the colorable case remains as future work. We use the size of the search tree as a measure of complexity and analyze its expected value as a function of input parameters.

Lower and upper bounds for the expected size of the search tree in a similar model have been presented by Bender and Wilf [3]. Their main focus was on the study of the asymptotic behavior of the search tree. In finite cases, the difference between their lower and upper bounds can be quite large (several orders of magnitude), as shown in Table I.

TABLE I

EXAMPLES OF THE BOUNDS BYBENDER ANDWILF(k= 7)

n= 30 n= 50 n= 50 n= 30

p= 0.5 p= 0.5 p= 0.4 p= 0.7 lower bound 6.41·109 6.45·109 3.26·1012 4.94·106 upper bound 1.81·1012 1.83·1012 1.84·1015 5.27·108

Therefore, our aim is to significantly improve these bounds, in order to enable accurate prediction of the runtime of the algorithm on specific graphs. This is beneficial for example for random restart algorithms to decide when to perform the restart. Also, runtime prediction can be used to decide whether

(2)

it is at all feasible to solve a problem instance with such an exact algorithm.

We use a combination of combinatorial, probabilistic and analytical methods. We show that a simple probabilistic model and some combinatorial considerations yield a first pair of non-trivial upper and lower bounds. As a by-product of our first upper bound, we also obtain a short proof for a theorem of Wilf [20]. We then use Jensen’s inequality to significantly improve our lower bound. In the second half of the paper, we perform a detailed – and quite technical – case analysis to obtain a series of ever sharper (but also increasingly complicated) lower and upper bounds. At the end we show empirically how the bounds are getting closer to each other and how much they improve the bounds of Bender and Wilf.

II. PRELIMINARIES

We consider the decision version of the graph coloring problem, in which the input consists of an undirected graph G= (V, E)and a numberk, and the task is to decide whether the vertices of G can be colored with k colors such that adjacent vertices are not assigned the same color. The input graph is a random graph taken from Gn,p, meaning that it has n vertices and each pair of vertices is connected by an edge with probability p independently from each other. The vertices of the graph will be denoted byv1, . . . , vn, the colors by1, . . . , k. A coloring assigns a color to each vertex; a partial coloring assigns a color to some of the vertices. A (partial) coloring is invalid if there is a pair of adjacent vertices with the same color, otherwise the (partial) coloring is valid.

The backtrack algorithm considers partial colorings. It starts with the empty partial coloring, in which no vertex has a color.

This is the root – that is, the single node on level 0 – of the search tree. Leveltof the search tree contains thektpossible partial colorings ofv1, . . . , vt. The search tree, denoted byT, hasnlevels, with the last level containing the colorings of the graph. LetTt denote the set of partial colorings on levelt. If t < n andw∈Tt, then whas k children in the search tree:

those partial colorings of v1, . . . , vt+1 that assign to the first t vertices the same colors asw.

In each partial coloringw, the backtrack algorithm considers the children ofwand visits only those that are valid. Note that T depends only onnandk, not on the specific input graph.

However, the algorithm visits only a subset of the nodes ofT, depending on which vertices ofGare actually connected. The number of actually visited nodes ofT will be used to measure the complexity of the given problem instance.

III. THE EXPECTED NUMBER OF VISITED NODES OFT For each w∈T, we define the following random variable (the value of which depends on the choice ofG):

Yw=

(1 ifwis valid, 0 else.

Let pw = P r(Yw = 1). Moreover, we define one more random variable (whose value also depends on the choice of G): Y =the number of visited nodes ofT.

Since the algorithm visits exactly the valid partial color- ings, it follows that Y = P

w∈TYw, and thus E(Y) = P

w∈TE(Yw). Moreover, it is clear that E(Yw) = pw. It follows that the expected number of visited nodes in T is:

E(Y) =P

w∈Tpw.

LetQ(w) :={{x, y} ∈V2:x6=y, color(x) =color(y)}, where V2 is the set of unordered pairs of elements of V. Let q(w) := |Q(w)|. Clearly, w is valid if and only if, for all {x, y} ∈ Q(w), x andy are not adjacent. It follows that pw = (1−p)q(w) and thus the expected number of visited nodes ofT is:

E(Y) = X

wT

(1−p)q(w).

Note that computing E(Y) through this formula is not tractable since |T|is exponentially large inn.

IV. SIMPLE LOWER AND UPPER BOUNDS

In the following, we denote by s(w, i) (or simply si if it is clear which partial coloring is considered) the number of vertices ofGthat are assigned coloriin partial coloringw.

Proposition 1. For allw∈Tt,q(w)≤ 2t

.

Proof:

q(w) = Xk i=1

si 2

=1 2

Xk i=1

s2i − Xk i=1

si

!

≤ 1 2

 Xk i=1

si

!2

− Xk i=1

si

= 1

2 t2−t

= t

2

.

As a consequence,P

w∈Tt(1−p)q(w)≥P

w∈Tt(1−p)(2t) = kt ·(1−p)(t2), and thus we obtain the following – easily computable – lower bound:

E(Y) = X

wT

(1−p)q(w)≥ Xn t=0

kt·(1−p)(2t). (1)

Proposition 2. For allw∈Tt,q(w)≥ 12

t2 k −t

. Proof: Since

Pk i=1s2i

k ≥

Pk i=1si

k

!2

= t2 k2, it follows that

q(w) = 1 2

Xk i=1

s2i − Xk i=1

si

!

≥ 1 2

t2 k −t

.

As a consequence, P

w∈Tt(1 − p)q(w) ≤ P

w∈Tt(1 − p)12

t2 kt

= kt·(1−p)12

t2 kt

, and thus we obtain the following – easily computable – upper bound:

E(Y) = X

w∈T

(1−p)q(w)≤ Xn

t=0

kt·(1−p)12

t2 kt

. (2)

(3)

As a by-product, we obtain a simple proof for a theorem of Wilf [20]:

Corollary 3 (Wilf, 1984). The average-case complexity of coloring a random graph with a constant number of colors is O(1).

Proof: According to (2), the complexity of the backtrack- ing algorithm is not more than P

t=0kt·(1−p)12

t2 kt

P =

t=0At·Bt2, whereA = 1k−p andB = 2k

1−p. Since 0 < B < 1, the root test shows that P

t=0At · Bt2 is convergent. This upper bound is independent of n.

Numerical comparison of the lower bound (1) and the upper bound (2) has shown that their difference is quite large in practice (see Section X). This motivates the quest for better lower and upper bounds.

V. REFINED LOWER BOUND USINGJENSENS INEQUALITY

Let q¯ := |T1

t|

P

wTtq(w) denote the mean of the q(w) values inTt.

Lemma 4. q¯= t22kt.

Proof: Since the role of the colors is symmetric, it is easy to see that

X

w∈Tt

q(w) = X

w∈Tt

Xk i=1

s(w, i) 2

=

= Xk i=1

X

wTt

s(w, i) 2

=k X

wTt

s(w,1) 2

.

In order to compute this sum, we should examine for how many w ∈ Tt we have s(w,1) = j. In other words, how many colorings exist for the first t vertices, in which exactly jvertices receive color 1. Since thejvertices can be chosen in

t j

ways and the remainingt−jvertices must receive a color from the remainingk−1colors, there are tj

(k−1)tj such colorings. Hence, the above sum can be written as follows:

X

w∈Tt

q(w) =k Xt j=0

j 2

t j

(k−1)t−j.

The members of the sum corresponding to j = 0 and j = 1 are 0, thus it is enough to start withj= 2. Using that j2 t

j

=

t 2

t2

j2

, we have:

X

wTt

q(w) = k t

2 Xt

j=2

t−2 j−2

(k−1)tj=

= k t

2 Xt−2

ℓ=0

t−2 ℓ

(k−1)t2.

Using the binomial theorem for((k−1) + 1)t2, this can be written as

X

w∈Tt

q(w) =k t

2

kt−2=kt−1 t

2

.

Dividing this by |Tt|=kt leads to the stated formula for q.¯

Theorem 5. E(Y) = P

w∈T(1−p)q(w) ≥ Pn

t=0kt(1 − p)t

2−t 2k .

Proof: Since x 7→ (1 −p)x is convex, thus Jensen’s inequality gives

1

|Tt| X

w∈Tt

(1−p)q(w)≥(1−p)|Tt1|Pw∈Ttq(w)= (1−p)t

2−t 2k ,

yielding exactly the stated bound. (In the last equation, we used Lemma 4.)

Comparing the lower bound of Theorem 5 and the upper bound (2), it can be seen that both have the formPn

t=0kt· (1−p)t2k2+Θ(t). Numerical comparison has shown that they are indeed closer to each other than the bounds (1) and (2), but there is still room for improvement (see Section X).

VI. CALCULATING WITHqminTERM SEPARATELY

In order to improve the bounds, we look at the distribution ofq(w)in more detail. Sincex7→(1−p)x is monotonously decreasing, smaller values of q(w) are more significant than higher values. Moreover, the results of Proposition 1, Propo- sition 2 and Lemma 4 show that the mean of theq(w)values is closer to the minimum than to the maximum, suggesting that small values of q(w) have a high frequency. This is also justified by empirical results, see Fig. 1 for an example.

Therefore, we investigate the smallest values ofq(w).

Proposition 6. Moving a vertex from a color class with A vertices to a color class with B vertices decreases q(w) by A−B−1 (if this is negative, thenq(w)is increased).

Proof: The change in q(w) is A2

+ B2

A1 2

+ B+12

=A21(A−(A−2))+B2(B−1−(B+1)) = A−1−B.

We call such a move a correction move, ifA > B. During a correction move,q either decreases or remains constant.

Proposition 7. If q(w) is minimal in Tt, then in the partial coloring w each color class contains either t

k

or t

k

vertices.

Proof: Since the average size of a color class is tk, the biggest color class has at least t

k

vertices, and the smallest color class has at most t

k

elements. Using proof by contradiction, we assume that the sizes of the biggest and smallest color classes differ by at least 2. Then, it follows from Proposition 6 that moving a vertex from the biggest color class to the smallest color class decreasesq(w) by at least 1. This contradicts the minimality ofq(w).

As can be seen, an arbitrary partial coloringwcan be turned into a partial coloring w with q(w) = qmin by using a sequence of correction moves.

Let t = ck+d where 0 ≤ d ≤ k−1. Then, according to Proposition 7, colorings with minimumq(w) havedcolor classes of sizec+1andk−dcolor classes of sizec. Thus, the

(4)

40 60 80 100 120 140 160 180 0

2 4 6 8 10 12 14 16

x 1010

q values

R (q, t, k)

Fig. 1. The frequency of differentq(w)values fort= 20andk= 4. Here,qmin= 40,q¯= 47.5andqmax= 190. It can be seen that the distribution is concentrated in the lower region of the possibleqvalues.

minimum value ofq(w)is:qmin=d c+12

+ (k−d) c2 . This is sharp for each t and k, and thus a slightly more accurate bound than the one of Proposition 2.

Let R(q, t, k) := |{w ∈ Tt : q(w) = q}| denote the frequency of valueq among theq(w)values of nodes in Tt. Proposition 8. R(qmin, t, k) = kd

· ((c+1)!)dt!(c!)(k−d). Proof: There are kd

possibilities to choose the dcolor classes whose size should be c+ 1. Given the size of each color class ass1, s2, . . . , sk, there are s t!

1!·s2!·...·sk! possibilities to distribute thet vertices among the color classes.

UsingRmin:=R(qmin, t, k), this leads to a more accurate upper bound:

X

w∈Tt

(1−p)q(w)≤Rmin(1−p)qmin+(kt−Rmin)(1−p)qmin+1

and thus E(Y)≤

Xn t=0

Rmin(1−p)qmin+ (kt−Rmin)(1−p)qmin+1. (3) The lower bound can also be improved by separating the term corresponding to qmin:

Theorem 9.

E(Y)≥ Xn t=0

Rmin(1−p)qmin+ (kt−Rmin)(1−p)qb1,

where qb1= ktq¯ktRminRmin·qmin.

Proof: Let Tt(1) := {w ∈ Tt : q(w) = qmin} and Tt(1+) :={w∈ Tt : q(w)> qmin}. Clearly, |Tt(1)| =Rmin

and |Tt(1+)| = kt − Rmin. Moreover, P

wTt(1)q(w) = Rminqmin and P

wTt(1+)q(w) = ktq¯−Rminqmin. Using Jensen’s inequality,

X

w∈Tt(1+)

(1−p)q(w) ≥ Tt(1+)(1−p)

1

|Tt(1+)|

P

w∈T(1+) t

q(w)

=

= (kt−Rmin)(1−p)

kt¯q−Rminqmin kt−Rmin . Together with P

wTt(1)(1−p)q(w)=Rmin(1−p)qmin, this yields the stated bound.

VII. FREQUENCY OFqmin+ 1

In order to further improve our bounds in an analogous way, the frequency ofqmin+ 1should be calculated.

Consider a partial coloringwwithq(w) =qmin+ 1. Since q(w)> qmin, we can perform a correction move: we move a vertex from the biggest color class (containingA vertices) to the smallest color class (containingBvertices). We thus obtain a new partial coloring w with q(w) < q(w), see Fig. 2. It follows thatq(w) =qminand the decrease isA−B−1 = 1, hence in w the two color classes contain the same number of vertices (A−1 =B+ 1). Moreover, sinceq(w) =qmin, all color classes inw containc orc+ 1vertices. From these facts, we can deduce the possible sizes of color classes in w.

(5)

Fig. 2. Number of elements in different color classes.

A. Case d6= 0,d6= 1andd6=k−1:

Inw, there are k−dcolor classes withc elements andd color classes with c+ 1elements. The new color classes with A−1 and B+ 1 elements in w contain either c or c+ 1 elements.

1) If A−1 =B+ 1 =c andc≥1: In this case, inw:

one color class containsc−1 elements

k−d−2 color classes containcelements

d+ 1color classes containc+ 1 elements Hence, the frequency of this case is:

k 1

k−1 d+ 1

t!

((c+ 1)!)d+1(c!)kd2(c−1)! =

= k!t!

(d+ 1)! (k−d−2)!(c+ 1)d+1(c)k1((c−1)!)k. 2) If A−1 =B+ 1 =c+ 1 andd≥2: Then inw:

k−d+ 1 color classes containcelements

d−2color classes containc+ 1 elements (thusd≥2)

1color class containsc+ 2 elements The frequency of this case:

k 1

k−1 d−2

t!

(c+ 2)! ((c+ 1)!)d−2(c!)k−d+1 =

= k!t!

(d−2)! (k−d+ 1)!(c+ 2) (c+ 1)d1(c!)k. B. Case d= 0andc≥1:

Inw, there are exactlycelements in all color classes. Thus inw:

1 color class containsc−1 elements

k−2 color classes containcelements

1color class containsc+ 1 elements The frequency of this case:

k 1

k−1 1

t!

(c−1)!(c+ 1)! (c!)k2 =

= k(k−1)t!

((c−1)!)k(c+ 1)ck−1.

C. Cased= 1 andc≥1:

Inw:

1 color class containsc−1elements

k−3color classes containc elements

2 color classes containc+ 1 elements The frequency of this case is:

k k−1

2

t!

(c−1)! ((c+ 1)!)2(c!)k−3 D. Cased=k−1:

Inw:

2 color classes containcelements

k−3color classes containc+ 1 elements

1 color class containsc+ 2elements The frequency of this case is:

k k−1

2

t!

(c+ 2)! ((c+ 1)!)k3(c!)2

As a consequence, the frequency of qmin + 1 can be calculated as a function oft andk (using the proper case).

VIII. FREQUENCY OFqmin+ 2

The bounds can be further improved by calculating the value and the frequency of the third smallest q. Similarly to the previous section, we start from a partial coloringw with q(w) =qmin+ 2, and we move to another partial coloringw with q(w) = qmin. There are two different ways: by using either one or two correction moves.

A. Using one correction move

In this case, in accordance with Proposition 6, q(w) − q(w) = A −B −1 = 2, and with Proposition 7, in w Amax=c+ 2andBmin=c−1. Therefore, in w:

1 color class containsc−1elements (thus c−1≥0)

k−d−1color classes containc elements

d−1 color classes containc+ 1 elements (thus d≥1)

1 color class containsc+ 2elements The frequency of this case is:

k k−1

1

k−2 d−1

t!

(c−1)! (c!)kd1((c+ 1)!)d1(c+ 2)!

B. Using two correction moves

After the first correction move q(w′′) = qmin+ 1. In this caseq(w)−q(w′′) =q(w′′)−q(w) = 1. Hence, after each correction move, the color classes with the changed number of elements contain equal number of elements.

Proposition 10. Inw, there is no color class with more than c+ 2elements.

Proof: Using contradiction we assume, that there is a color class with at least c + 3 elements. Hence in both correction moves a vertex should be moved from this color class to another. Meanwhile there should not arise a color class with more than c+ 1 elements. Then in the first correction moveq(w)−q(w′′)>1.

(6)

Proposition 11. Inw, there are at most two color classes with c+ 2 elements.

Proof: Similarly, at least three correction moves would be needed otherwise.

We further split this case by the number of color classes containing c+ 2elements.

1) If there are two color classes withc+ 2elements: Inw:

k−d+ 2 color classes containcelements

d−4color classes containc+ 1elements (thus d≥4)

2color classes containc+ 2elements The frequency of this case is:

k 2

k−2 d−4

t!

((c+ 2)!)2((c+ 1)!)d−4(c!)k−d+2 2) If there is one color class withc+ 2elements: The same way as earlier, in w:

1 color class containsc−1 elements (thusc≥1)

k−d−1 color classes containcelements

d−1color classes containc+ 1elements (thus d6= 0)

1color class containsc+ 2 elements The frequency of this case is:

k k−1

1

k−2 d−1

t!

(c−1)! (c!)k−d−1((c+ 1)!)d−1(c+ 2)!

3) If there is no color class withc+ 2 elements: Inw:

2 color classes containc−1elements (thus c≥1)

k−d−4color classes containcelements (thusd≤k−4)

d+ 2color classes containc+ 1elements The frequency of this case is:

k 2

k−2 d+ 2

t!

((c+ 1)!)d+2(c!)k−d−4((c−1)!)2 Using the proper case, the value ofRmin+2 can always be calculated. Care needs to be taken though as two correction moves might be substituted with a single one. Specifically, the case in Subsection VIII-A is equivalent to the case of Subsubsection VIII-B2. Otherwise, the cases are disjoint.

IX. PUTTING THE PIECES TOGETHER

Let Rmin+1 := R(qmin+1, t, k) and Rmin+2 :=

R(qmin+2, t, k). The best lower and upper bounds are:

E(Y)≤ Xn t=0

Rmin(1−p)qmin+

+Rmin+1(1−p)qmin+1+Rmin+2(1−p)qmin+2+ + (kt−Rmin−Rmin+1−Rmin+2)(1−p)qmin+3. and

Theorem 12.

E(Y)≥ Xn t=0

Rmin(1−p)qmin+

+Rmin+1(1−p)qmin+1+Rmin+2(1−p)qmin+2+ + (kt−Rmin−Rmin+1−Rmin+2)(1−p)qb3

whereqb3=ktq¯Rminqminkt−RRminmin+1−R(qmin+1min+1)−Rmin+2Rmin+2(qmin+2). Proof: Let Tt(1) := {w ∈ Tt : q(w) = qmin}, Tt(2) := {w ∈ Tt : q(w) = qmin + 1}, Tt(3) := {w ∈ Tt : q(w) = qmin + 2} and Tt(3+) := {w ∈ Tt : q(w) > qmin + 2} on the analogy of Theorem 9. Hence,

|Tt(1)| = Rmin, |Tt(2)| = Rmin+1, |Tt(3)| = Rmin+2 and

|Tt(3+)|=kt−Rmin−Rmin+1−Rmin+2. Clearly, X

w∈Tt(1)∪Tt(2)∪Tt(3)

q(w) =

Rminqmin+Rmin+1(qmin+ 1) +Rmin+2(qmin+ 2) and

X

wTt(3+)

q(w) =

ktq¯−Rminqmin−Rmin+1(qmin+ 1)−Rmin+2(qmin+ 2).

Using Jensen’s inequality, X

w∈Tt(3+)

(1−p)q(w)≥Tt(3+) (1−p)

1

|Tt(3+)|

P

w∈T(3+) t

q(w)

=

(kt−Rmin−Rmin+1−Rmin+2

·(1−p)

kt¯q−RminqminRmin+1(qmin+1)−Rmin+2(qmin+2) kt−RminRmin+1Rmin+2 . Together with the other terms, we get the stated bound.

Because of space constraints, we do not include the calculation of the bounds determined by qmin + 1 (with- out the help of qmin + 2) and for the inherent qb2 =

ktq¯RminqminRmin+1(qmin+1) kt−Rmin−Rmin+1 .

Clearly, we could continue the above procedure and further improve the bounds by also calculating the term ofqmin+ 3, then qmin+ 4 etc. However, it is also clear from the above that the calculation becomes significantly more complex with each step, and on the other hand, the gain is decreasing with every step (see Section X).

X. NUMERICAL COMPARISON OF THE BOUNDS

In order to assess how good the different lower and upper bounds are, we compared them numerically for different values of the control parameters n,k,p. Here, we show the comparison for fix values ofn andk, as a function of p. In order to enhance visibility, we include two figures (note the exponential scale on they axis in both cases): one for small values ofp(Fig. 3) and one for high values ofp(Fig. 4). As can be seen, both the upper bounds and the lower bounds are becoming better and better.

The shown bounds are as follows:

1st upper bound: boundingqmin

2nd upper bound: calculatingqmin term separately

3rd upper bound: calculatingqmin+ 1 term separately

4th upper bound: calculatingqmin+ 2 term separately

5th lower bound: calculatingqmin+ 2term separately

4th lower bound: calculatingqmin+ 1term separately

(7)

0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 102

104 106 108 1010 1012 1014 1016 1018 1020

edge probability: p

expected treesize

1st upper bound 2nd upper bound 3rd upper bound 4th upper bound 5th lower bound 4th lower bound 3rd lower bound 2nd lower bound 1st lower bound

Fig. 3. Comparison of the presented lower and upper bounds for small values ofp, withn= 30andk= 5.

0.4 0.5 0.6 0.7 0.8 0.9 1

101 102 103 104 105 106 107 108

edge probability: p

expected treesize

1st upper bound 2nd upper bound 3rd upper bound 4th upper bound 5th lower bound 4th lower bound 3rd lower bound 2nd lower bound 1st lower bound

Fig. 4. Comparison of the presented lower bounds and upper bounds for high values ofp, withn= 30andk= 5.

3rd lower bound: calculatingqmin term separately

2nd lower bound: using Jensen’s inequality

1st lower bound: boundingqmax

Fig. 5 presents only the best bounds, together with the bounds of Bender and Wilf [3]. As can be seen, the new

bounds are much closer to each other than the original bounds.

(The shape and relative position of the curves are similar for other values of n and k as well.) The exact location of the true expected tree size is currently not known, but a method for determining it is presented in [13].

(8)

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 102

104 106 108 1010 1012 1014 1016 1018 1020 1022

edge probability: p

expected treesize

Bender−Wilf upper bound best upper bound best lower bound Bender−Wilf lower bound

Fig. 5. Comparison of the presented best lower bound and best upper bound with the bounds of Bender and Wilf [3] forn= 30andk= 5.

XI. CONCLUSION AND FUTURE WORK

We have investigated the complexity of a typical backtrack search for coloring random graphs with k colors. Using the expected size of the search tree as the measure of complexity, we derived lower and upper bounds for the complexity. We showed empirical evidence that these bounds are much closer to each other than previously known bounds.

In this paper, we only dealt with uncolorable problem in- stances. Our future work will focus on extending the presented results to colorable problem instances.

Bender and Wilf [3] also presented lower and upper bounds on thejth moment of the number of visited nodes in the search tree. The variance is particularly interesting to better judge the algorithm’s performance. It remains a future research direction to investigate how the methods presented in this paper can be used to improve Bender and Wilf’s bounds on higher moments.

ACKNOWLEDGEMENTS

This work was partially supported by the Hungarian Na- tional Research Fund and the National Office for Research and Technology (Grant Nr. OTKA 67651).

REFERENCES

[1] Dimitris Achlioptas and Assaf Naor. The two possible values of the chromatic number of a random graph. In 36th ACM Symposium on Theory of Computing (STOC ’04), pages 587–593, 2004.

[2] Noga Alon and Michael Krivelevich. The concentration of the chromatic number of random graphs. Combinatorica, 17(3):303–313, 1997.

[3] Edward A. Bender and Herbert S. Wilf. A theoretical analysis of backtracking in the graph coloring problem. Journal of Algorithms, 6(2):275–282, 1985.

[4] Béla Bollobás. The chromatic number of random graphs. Combinator- ica, 8(1):49–55, 1988.

[5] Daniel Brélaz. New methods to color the vertices of a graph. Commu- nications of the ACM, 22(4):251–256, 1979.

[6] Preston Briggs, Keith D. Cooper, and Linda Torczon. Improvements to graph coloring register allocation. ACM Transactions on Programming Languages and Systems, 16(3):428–455, 1994.

[7] Peter Cheeseman, Bob Kanefsky, and William M. Taylor. Where the really hard problems are. In 12th International Joint Conference on Artificial Intelligence (IJCAI ’91), pages 331–337, 1991.

[8] Pál Erd˝os and Alfréd Rényi. On the evolution of random graphs. Magyar Tud. Akad. Mat. Kutató Int. Közl, 5:17–61, 1960.

[9] Michael R. Garey, David S. Johnson, and L. J. Stockmeyer. Some simplified NP-complete graph problems. Theoretical Computer Science, 1:237–267, 1976.

[10] G. R. Grimmett and C. J. H. McDiarmid. On colouring random graphs.

Mathematical Proceedings of the Cambridge Philosophical Society, 77(2):313–324, 1975.

[11] Tad Hogg. Refining the phase transition in combinatorial search.

Artificial Intelligence, 81(1-2):127 – 154, 1996.

[12] Tomasz Luczak. The chromatic number of random graphs. Combina- torica, 11(1):45–54, 1991.

[13] Zoltán Á. Mann and Anikó Szajkó. Determining the expected runtime of exact graph coloring. In Mini-conference on Applied Theoretical Computer Science (MATCOS), 2010.

[14] Zoltán Á. Mann and Tamás Szép. BCAT: A framework for analyzing the complexity of algorithms. In 8th IEEE International Symposium on Intelligent Systems and Informatics, pages 297–302, 2010.

[15] Zoltán Ádám Mann and András Orbán. Optimization problems in system-level synthesis. In 3rd Hungarian-Japanese Symposium on Discrete Mathematics and Its Applications, pages 222–231, 2003.

[16] Nirbhay K. Mehta. The application of a graph coloring method to an examination scheduling problem. Interfaces, 11(5):57–65, 1981.

[17] Rémi Monasson. On the analysis of backtrack procedures for the coloring of random graphs. In E. Ben-Naim, H. Frauenfelder, and Z. Toroczkai, editors, Complex Networks, pages 235–254. Springer, 2004.

[18] Tamás Szép and Zoltán Á. Mann. Graph coloring: the more colors,

(9)

the better? In 11th IEEE International Symposium on Computational Intelligence and Informatics, pages 119–124, 2010.

[19] Jonathan S. Turner. Almost all k-colorable graphs are easy to color.

Journal of Algorithms, 9(1):63–82, 1988.

[20] Herbert S. Wilf. Backtrack: an O(1) expected time algorithm for the graph coloring problem. Information Processing Letters, 18:119–121, 1984.

Hivatkozások

KAPCSOLÓDÓ DOKUMENTUMOK

We can think of a pattern P as the bipartite adjacency matrix of some ordered graph H P of interval chromatic number 2, where the order of the vertices is inherited from the order

The number of edges in the graph is given, determine the maximum number of distances k or paths of length k in the graph, either fixing the number of vertices or not.. Let the

We show that in case of the cycle graph the probability of each opinion to win with the discordant push, pull or oblivious protocol is asymptotically proportionate to the number

(MT++’19) From a complete graph on 10 vertices we delete the edges of two such cycles on 3 vertices which have exactly one vertex in common.. Determine the chromatic number of the

The size of the maximum matching is equal to the size of a minimum vertex cover in a bipartite graph (K˝ onig’s Theorem), and hence for G this number is 50.. (1 points) We will

For this purpose, we devise an algorithm to efficiently compute the expected run- time of an exact graph coloring algorithm as a function of the graph’s size, density, and the number

For this purpose, we devise an algorithm to efficiently compute the expected run- time of an exact graph coloring algorithm as a function of the parameters of the problem instance:

In this paper we initiate the study of the Roman (k, k)-domatic number in graphs and we present sharp bounds for d k R (G).. In addition, we determine the Roman (k, k)-domatic number