1 Shira Zucker Ben-Gurion University of the Negev Advisors: Prof. Daniel Berend Prof. Ephraim Korach Anticoloring for Toroidal Grids.

Slides:



Advertisements
Similar presentations
Completeness and Expressiveness
Advertisements

Incremental Linear Programming Linear programming involves finding a solution to the constraints, one that maximizes the given linear function of variables.
Greedy Algorithms Greed is good. (Some of the time)
Approximation, Chance and Networks Lecture Notes BISS 2005, Bertinoro March Alessandro Panconesi University La Sapienza of Rome.
1 EE5900 Advanced Embedded System For Smart Infrastructure Static Scheduling.
1 Appendix B: Solving TSP by Dynamic Programming Course: Algorithm Design and Analysis.
1 NP-Complete Problems. 2 We discuss some hard problems:  how hard? (computational complexity)  what makes them hard?  any solutions? Definitions 
Outline. Theorem For the two processor network, Bit C(Leader) = Bit C(MaxF) = 2[log 2 ((M + 2)/3.5)] and Bit C t (Leader) = Bit C t (MaxF) = 2[log 2 ((M.
Complexity ©D Moshkovitz 1 Approximation Algorithms Is Close Enough Good Enough?
Polynomial Time Approximation Schemes Presented By: Leonid Barenboim Roee Weisbert.
1 Minimizing Movement Erik D. Demaine, MohammadTaghi Hajiagahayi, Hamid Mahini, Amin S. Sayedi-Roshkhar, Shayan Oveisgharan, Morteza Zadimoghaddam SODA.
Parallel Scheduling of Complex DAGs under Uncertainty Grzegorz Malewicz.
Tirgul 8 Graph algorithms: Strongly connected components.
Combinatorial Algorithms
The number of edge-disjoint transitive triples in a tournament.
Fast FAST By Noga Alon, Daniel Lokshtanov And Saket Saurabh Presentation by Gil Einziger.
Complexity 16-1 Complexity Andrei Bulatov Non-Approximability.
Yangjun Chen 1 Bipartite Graphs What is a bipartite graph? Properties of bipartite graphs Matching and maximum matching - alternative paths - augmenting.
Complexity 15-1 Complexity Andrei Bulatov Hierarchy Theorem.
1 Discrete Structures & Algorithms Graphs and Trees: II EECE 320.
Approximation Algorithms: Combinatorial Approaches Lecture 13: March 2.
An Euler Circuit is a cycle of an undirected graph, that traverses every edge of the graph exactly once, and ends at the same node from which it began.
Vertex Cover, Dominating set, Clique, Independent set
NP-Complete Problems Reading Material: Chapter 10 Sections 1, 2, 3, and 4 only.
Validating Streaming XML Documents Luc Segoufin & Victor Vianu Presented by Harel Paz.
Yangjun Chen 1 Bipartite Graph 1.A graph G is bipartite if the node set V can be partitioned into two sets V 1 and V 2 in such a way that no nodes from.
Contents Introduction Related problems Constructions –Welch construction –Lempel construction –Golomb construction Special properties –Periodicity –Nonattacking.
Polynomial time approximation scheme Lecture 17: Mar 13.
1 Combinatorial Dominance Analysis Keywords: Combinatorial Optimization (CO) Approximation Algorithms (AA) Approximation Ratio (a.r) Combinatorial Dominance.
Coloring Algorithms and Networks. Coloring2 Graph coloring Vertex coloring: –Function f: V  C, such that for all {v,w}  E: f(v)  f(w) Chromatic number.
1 Separator Theorems for Planar Graphs Presented by Shira Zucker.
1 Joint work with Shmuel Safra. 2 Motivation 3 Motivation.
Induction and recursion
Applied Discrete Mathematics Week 9: Relations
Induction and recursion
 Jim has six children.  Chris fights with Bob,Faye, and Eve all the time; Eve fights (besides with Chris) with Al and Di all the time; and Al and Bob.
1 Introduction to Approximation Algorithms. 2 NP-completeness Do your best then.
Lecture 22 More NPC problems
Approximating the Minimum Degree Spanning Tree to within One from the Optimal Degree R 陳建霖 R 宋彥朋 B 楊鈞羽 R 郭慶徵 R
Edge-disjoint induced subgraphs with given minimum degree Raphael Yuster 2012.
 2004 SDU Lecture 7- Minimum Spanning Tree-- Extension 1.Properties of Minimum Spanning Tree 2.Secondary Minimum Spanning Tree 3.Bottleneck.
Approximation Algorithms
5.2 Trees  A tree is a connected graph without any cycles.
1 Rainbow Decompositions Raphael Yuster University of Haifa Proc. Amer. Math. Soc. (2008), to appear.
The Dominating Set and its Parametric Dual  the Dominated Set  Lan Lin prepared for theory group meeting on June 11, 2003.
Connectivity and Paths 報告人:林清池. Connectivity A separating set of a graph G is a set such that G-S has more than one component. The connectivity of G,
Matching Lecture 19: Nov 23.
CSE 589 Part V One of the symptoms of an approaching nervous breakdown is the belief that one’s work is terribly important. Bertrand Russell.
Strings Basic data type in computational biology A string is an ordered succession of characters or symbols from a finite set called an alphabet Sequence.
Graph Algorithms Maximum Flow - Best algorithms [Adapted from R.Solis-Oba]
NP-completeness NP-complete problems. Homework Vertex Cover Instance. A graph G and an integer k. Question. Is there a vertex cover of cardinality k?
Chapter 13 Backtracking Introduction The 3-coloring problem
CompSci 102 Discrete Math for Computer Science March 13, 2012 Prof. Rodger Slides modified from Rosen.
Algorithms for hard problems Parameterized complexity Bounded tree width approaches Juris Viksna, 2015.
 2004 SDU 1 Lecture5-Strongly Connected Components.
C&O 355 Lecture 19 N. Harvey TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A A A A A A A A A.
12. Lecture WS 2012/13Bioinformatics III1 V12 Menger’s theorem Borrowing terminology from operations research consider certain primal-dual pairs of optimization.
Theory of Computational Complexity M1 Takao Inoshita Iwama & Ito Lab Graduate School of Informatics, Kyoto University.
Theory of Computational Complexity Probability and Computing Chapter Hikaru Inada Iwama and Ito lab M1.
Hamiltonian Graphs Graphs Hubert Chan (Chapter 9.5)
Mathematical Foundations of AI
Modeling with Recurrence Relations
Hans Bodlaender, Marek Cygan and Stefan Kratsch
Anticoloring Problems on Graphs
Hamiltonian Graphs Graphs Hubert Chan (Chapter 9.5)
Chapter 5. Optimal Matchings
Computability and Complexity
Enumerating Distances Using Spanners of Bounded Degree
V12 Menger’s theorem Borrowing terminology from operations research
Locality In Distributed Graph Algorithms
Presentation transcript:

1 Shira Zucker Ben-Gurion University of the Negev Advisors: Prof. Daniel Berend Prof. Ephraim Korach Anticoloring for Toroidal Grids

2 The Problem  Anticoloring of a graph: A coloring of some of the vertices in which no two adjacent vertices are colored in distinct colors.  Input: A graph G, positive integers B 1,…,B k.  Output: Yes – if there exists an anticoloring of G such that B j vertices are colored in color j, j=1,…,k. No – otherwise.

3 Black and White Coloring (BWC)  Example:  The Anticoloring Problem is NP-complete, even for two colors.

4 BWC problem  We usually refer to the optimization version of the BWC problem.  We are given a graph G and a positive integer B, and have to color B of the vertices in black, so that there will remain as many vertices as possible which are non-adjacent to any of the B vertices (These vertices are to be colored in white).  W - the maximum possible number of such vertices.

5 History  Hansen, Hertz and Quinodoz proved that the BWC problem is NP-complete.  They also gave an O(n ) algorithm for trees.  Kobler, Korach and Hertz gave a polynomial algorithm for partial k-trees with fixed k (bounded tree width). 3

6 Berge’s Problem: Queens  Berge suggested a special instance of the problem:  Given positive integers n and B, place B black and W white queens on an n × n chessboard, so that no black queen and white queen attack each other, and with W as large as possible.  The complexity of the queens problem is still open.

7 The Rooks Problem  Yahalom investigated an analogous problem to that suggested by Berge, using rooks instead of queens.  She gave a sub-linear algorithm to this problem.  For special cases, in which the ratio between the sides of the board is an integer or close to an integer, she derived an explicit formula for the optimal solution.

8 The Kings Problem  Problem: Given positive integers m, n and B, place B black and W white kings on an m × n toroidal chessboard, so that no black king and white king attack each other, and with W as large as possible.

9 The kings problem – Cont. Remember that we are talking of a toroidal board.

10 Definitions  A black-white coloring (BWC) of a graph G is a function C: V {black, white, uncolored} such that there is no edge between a black and a white vertex.  Notice: C is uniquely determined by the set of vertices colored in black.

11 Definitions – Cont.  Completely full row (column): A row (column) all of whose vertices are black.  Almost completely full row (column): A row (column) all of whose vertices but one are black.  The rows of the toroidal board are enumerated by 1,2,…,n.  The columns are enumerated by 1,2,…,m (m ≥ n).

12 Definitions – Cont.  N(C) – the number of uncolored vertices of a coloring C.  Notice: The problem of maximizing W is equivalent to the problem of minimizing N(C).

13 Theorem – Part 1 An optimal solution may be constructed, depending on the size of B, as follows: : Let Color in black the set

14 Theorem – Part 2 : Let Color in black the set

15 Theorem – Part 3 : Let Color in black the set

16 Before we prove the theorem…  In order to prove the theorem, we will use several auxiliary lemmas.  The lemmas indicate changes which can be performed in order to achieve a better coloring C’, i.e., with N(C’) ≤ N(C).  The idea: In order to prove the optimality of C, it is enough to consider only the “good candidates” exist. Those candidates are to be found by the following lemmas.

17 Lemma 1  Given any coloring C, there exists a coloring C’, which is obtained from C by a permutation of rows (resp. columns), such that all completely and almost completely full rows (resp. columns) are placed in a single block and N(C’) ≤ N(C).

18 Lemma 1 – Example

19 Lemma 2  Given any coloring C with an almost completely full row (resp. column), by replacing the uncolored vertex at that row (resp. column) with any black vertex, we get a new coloring C’ with N(C’) ≤ N(C).

20 Lemma 2 - Proof  There is only one vertex which may become uncolored. On the other hand, the original uncolored vertex which became black, reduced the number of uncolored vertices by 1. Hence, N(C’) = N(C) or N(C’) = N(C) –1.

21 Lemma 3  For any coloring C, if row k contains b k black vertices and row k+1 contains b k+1 black vertices, where max{b k+1,1}≤ b k ≤ m-2, then row k+1 contains at least b k –b k+1 +2 uncolored vertices.

22 Lemma 4  Suppose that a coloring contains black vertices, and that rows n-f+1,…,n are completely full, where f ≤ n-2, but no other rows are such. Let r 1 and r 2 be the rows with the minimal numbers of black vertices where, say, b r 1 ≤ b r 2. Then b r 1 ≤ m-f-2-d and b r 2 ≤ m-f- 2+d for some d ≥ 0.

23 Lemma 4 - Explanation n = m = 10 f = 2 B = 39 ≤ 62 1 ≤ m-f-2 2 ≤ m-f-2

24 Lemma 5  If a coloring C with contains a completely full column, then N(C) ≥ 2n.  The idea of the proof: If each row contains at most m-2 black vertices, then it contains at least 2 uncolored vertices, and altogether we have at least 2n. Otherwise…

25 Lemma 6  If a coloring C with contains an almost completely full column, then N(C) ≥ 2n.  The idea of the proof: Replace the uncolored vertex of an almost completely full column with any black vertex from another column.

26 Lemma 7  If a coloring C with contains a completely or an almost completely full row, then N(C) ≥ 2n.

27 Lemma 7 - Proof  If C contains a completely or an almost completely full column, then, according to Lemmas 5 and 6, N(C) ≥ 2n, and we are done.  Otherwise, C contains no completely or almost completely full column. Since C contains a completely or an almost completely full row, each column of C contains at least two uncolored vertices. Therefore, N(C) ≥ 2m ≥ 2n.

28 Lemma 7 – Proof – Cont.

29 Corrollary 8  If a coloring C with contains less than 2n uncolored vertices, then each of its non-empty rows and columns contains at least two uncolored vertices.

30 Lemma 9  If a coloring C with contains no three adjacent empty columns (or rows), then N(C) ≥ 2n.

31 Lemma 9 - Proof  If C contains a completely or an almost completely full column, then, by Lemmas 5 and 6, N(C) ≥ 2n and we are done.  Assume, therefore, that C contains no completely or almost completely full column.

32 Lemma 9 – Example Two adjacent empty columns

33 Lemma 9 – Proof – Cont.  If C contains no three adjacent empty columns, then each empty column is adjacent to a non-empty column and therefore, contains at least three uncolored vertices.  According to Corollary 8, each non-empty column contains at least two uncolored vertices.  Denote by x the number of non-empty columns in C.  We get that N(C) ≥ 2x + 3(m-x) ≥ 2m ≥ 2n.

34 Lemma 10  Suppose a coloring C contains three empty columns (rows, resp.), of which two are adjacent, say columns j, m-1, m (rows i, n-1, n, resp.). The coloring C’, obtained from C by moving columns j + 1, j +2, …, m-2 (rows i+1, i+2, …, n-2 resp.) one place to the left (up, resp.), and column j immediately to their right (row i immediately under them, resp.), satisfies N(C’) ≤ N(C).

35 Lemma 10 – Cont.

36 Lemma 11 Three kinds of changes in a coloring C, which do not increase N(C).

37 Lemma 12  If a coloring C contains exactly c non-empty columns, which are all adjacent, and exactly r non-empty rows, which are also adjacent, where 1≤ c≤ m-2 and 1≤ r≤ n-2, then N(C) ≥ 2c+2r+4.

38 Lemma 12 Sketch of the proof We build C’ with K rectangles of sizes c i × r i. ∑ c i ≥ c ∑ r i ≥ r

39 Conclusion of the Proof for Small B  Consider.  C 0 – the square configuration of the theorem.  Suppose there exists a coloring C with N(C) < N(C 0 ) (and with the same B).  N(C 0 ) =.  Therefore, according to Lemmas 5, 6 and 7, C does not contain any completely or almost completely full column or row.

40 Small B – Cont.  According to Lemma 9, C contains at least 3 adjacent empty columns and at least 3 adjacent empty rows.  By Lemma 10, we can combine all empty columns and rows into one block, thus get a c × r rectangle, where c ≤ m-3, r ≤ n-3, and each row and column contains at least one black vertex.

41 Small B – Cont.  By Lemma 12, we have N(C) ≥ 2c+2r+4.  Since cr ≥ B, we get which contradicts our assumption.

42 The idea of the Proof for Intermediate B  Consider.  Most lemmas we used in the proof for small B were of the type: if…. then N(C) ≥ 2n.  Here we use the same lemmas, in a similar way, but with N(C) ≥ 2n + “something”, where “something” is equal to 0, 1 or 2.  The proof is more complicated and divided into some parts.

43 Proposition  N(B) – the minimal possible number of uncolored vertices for B black vertices in a graph G.  Proposition: Given a graph G=(V,E) and a number 0 ≤ B ≤ |V|, we have N(|V|-B-N(B)) ≤ N(B).

44 Conclusion of the Proof for Large B  Consider.  C 0 – the co-square configuration of the theorem.  Suppose there exists a coloring C with N(C) < N(C 0 ) (and with the same B).  N(C 0 ) =. Denote B’:=mn-B-N(B).  0 ≤ B’ ≤ mn-B <.  By the proposition, N(B’) ≤ N(B).

45 Large B – Cont.  Assume first that We showed that for those B', N(B') ≥ 2n.  Now,

46 Large B – Cont.  Therefore, and we have a contradiction.

47 Large B – Cont. If then we compare N(B) to N(B’) and get to a contradiction by using the same principle as before, this time with the ‘square configuration’.

48 Union of Components  Input: A graph G=(V,E) where and. A number 1 ≤ B ≤ |V| and an optimal anticoloring C k for each connected component G k with 1 ≤ b ≤ B black vertices.  Output: An optimal anticoloring C For G with B black vertices.

49 Union of Components – Cont.  N(G,B) - the minimal number of uncolored vertices of a graph G with B black vertices.  Our algorithm use a dynamic programming.

50 Basic Algorithm for finding N(G,B) union(G,B) for l=2 to n by l l*2 for i=1 to n-l+1 by i i+l j i+l-1 for b=0 to B for bb=0 to b q m[i,k,bb]+m[k+1,j,b-bb] if q<m[i,j,b] then m[i,j,b] q

51 Complexity of union(G,B)  O(B n), where 1 ≤ B,n ≤ |V|.  Notice: For a constant B, the algorithm is linear. 2

52 Improving the Algorithm  If B ≥ √ (log n), then before calling our algorithm, we sort the components of G by their size.  The complexity of familiar Sort Algorithms is O(nlog n).  The advantage of sorting the components is that, in case where B is greater than the size of some of the connected components, finding a solution for two small components will cost less than B. (In this case, the cost will be the product of the components size.) 2

53 Algorithm for finding an optimal Anticoloring color(B,i,j,num,m[][][]) if j>i for b=0 to B for bb=0 to b if m[i,k,bb]+m[k+1,j,b-bb]=num color(bb,i,k,m[i,k,bb],m) color(B-bb,k+1,j,m[k+1,j,b-bb],m) Where num is equal to N(G,B) that we already have.