1 / 48

Box-Rectangular Drawing

Box-Rectangular Drawing. Rida Sadek. Overview. Some definitions and observations Problem: Finding a Box-Rectangular drawing of a graph G Specific Case: given 4 vertices corresponding to corner boxes linear time algorithm General case: no given vertices linear time algorithm

kimo
Télécharger la présentation

Box-Rectangular Drawing

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Box-Rectangular Drawing Rida Sadek

  2. Overview • Some definitions and observations • Problem: Finding a Box-Rectangular drawing of a graph G • Specific Case: • given 4 vertices corresponding to corner boxes • linear time algorithm • General case: • no given vertices • linear time algorithm Note: For simplicity we are going to assume that G has 3 or more vertices and is 2-connected.

  3. Who established these results? • Rahman et al. established: • a necessary and sufficient condition for the existence of a Box-Rectangular drawing of a plane graph, and • a linear time algorithm to find it if it exists.

  4. Definitions and observations: • Multigraph is a graph which may have edges sharing both ends. • In a BRD, a vertex may be drawn as a degenerate box. • A degenerate box is called a point and a non-degenerate box is called a real box. • C0(G) is the outer Rectangle which has exactly 4 corners. • A box D is called a corner box if it contains at least one corner. It can be degenerate.

  5. Facts • Any box-rectangular drawing has either two, three or 4 corner boxes.

  6. Facts (2) • Any corner box contains either one or two corners. • In a box-rectangular drawing D of G, any vertex of degree two or three satisfies one of the following: • Vertex v is drawn as a point containing no corner; • v is drawn as a corner box containing exactly one corner; or • v is drawn as a corner real box containing exactly two corners.

  7. Facts (3) • In any box-rectangular drawing D of G, every vertex of degree five or more is drawn as a real box.

  8. Lemma • If G has a box-rectangular drawing, then G has a box rectangular drawing in which every vertex of degree four or more is drawn as a real box.

  9. Proof of lemma • Assume G has a box rectangular drawing, then by the last fact we know that every vertex of degree five or more in G must be drawn as a real box. • If a vertex v, where d(v) = 4, is drawn as a point in D then modify the drawing D such that v is drawn as follows:

  10. Illustration of proof:

  11. Finding BRD if it exists: 4 designated vertices • Two major operations: • Removal of a vertex of degree two: • Let v be a vertex where d(v)=2, • we replace the 2 edges u1v and u2v incident to v with a single edge u1u2, • and we delete v. • Replacement of a vertex by a cycle:

  12. BRD with designated vertices (contd.) • Idea: Construct G’’ from G using G’ as intermediate. Then make a BRD for G’’. • Construct G’ by removing all non-designated vertices of degree two one by one from G • All vertices of degree 2 in G’ WILL be designated vertices • They must be drawn as corner points in any BRD of G’. • Every designated vertex of degree 3 in G’ must be drawn as a real box since it is a corner. • Every non designated vertex of degree 3 in G’ must be drawn as a point. Result: Using the last Lemma (proved earlier), this implies that: If G’ has a BRD then G’ has a BRD D’ where all designated vertices of degree 3 and all vertices of degree 4 or more in G’ are drawn as real boxes.

  13. BRD with designated vertices (contd.) • Construct G’’ from G’: • Replace by a cycle each of the designated vertices of degree 3 and the vertices of degree four or more. • The replaced cycle corresponding to a designated vertex x of degree 3 or more contains exactly one outer edge ex where x is one of the designated vertices. • Put a dummy vertex x’ of degree 2 on ex. Result: G’’ is a simple graph and has exactly four outer vertices a’, b’, c and d’ of degree 2 and all other vertices are of degree 3.

  14. BRD with designated vertices (contd.)

  15. BRD with designated vertices (contd.) • Theorem: Let G be a plane graph with four designated outer vertices a,b,c and d, and let G’’ be the graph transformed from G as mentioned before. Then, G has a BRD with corner boxes a,b,c, and d IF and only IF G’’ has BRD with designated corners a’,b’,c’, and d’. • Proof: • The necessity:(trivial) From the way G’’ is constructed, if G has a BRD then G’’ will have one. • The Sufficiency: Assume that G’’ has a BRD. • In D’’, each replaced cycle is drawn as a rectangle since it is a face in D’’. PLUS, the 4 outer vertices a’,b’,c’ and d’ of degree 2 in G’’ are drawn as the corners of the rectangle corresponding to C0(G’’)  D’’ immediately gives D’ having the 4 vertices a,b,c and d as corner boxes. • Insert the non-designated vertices of degree 2 on horizontal or vertical line segments in D’, then we obtain the BRD of G having a,b,c, and d as corner boxes.

  16. Time Complexity • Constructing G’’ from G takes linear time. • Removing vertices of degree 2 takes O(n). • Each replacement takes constant time, and • there is at most a linear number of vertices to be replaced. • Replacing the vertices, that need to be replaced, by a cycle takes O(n) • The replacement of a vertex takes O(d) where d is the degree of the vertex. • But the sum of the degrees of the vertices is twice the number of edges since each edge contribute one degree to each vertex at its ends  O(n) overall.

  17. Grid size • The half perimeter of the BRD D of G is bounded by m+2. • Let n2 be the non-designated vertices of degree 2 in G. • Let n’ = |V(G’)| and m’ = |E(G’)|  m’ = m – n2 (because we remove 2 edges and add one for each of the n2 vertices). • We replace some vertices in G’ by cycles and add at most 4 dummy vertices to construct G’’  G’’ has at most 2m’ + 4 vertices.

  18. Grid Size (contd) • By theorem 6.3.8 which states that if all vertices of a plane graph G have degree 3 except the 4 corners, then the sizes of any compact rectangular grid drawing D of G satisfy W + H <= n/2. • In our case, the half perimeter (W+H) of the produced rectangular drawing D’’ is bounded then by: (2m’ + 4)/2 = m’ + 2 • The insertion of each of the n2 vertices of degree 2 back to get D increases the half perimeter at most by one  half perimeter of D is bounded by: m’ + 2 + n2 = m + 2

  19. Finding BRD if it exists: Problem Recall • Case 1: (solved) a set of outer vertices of a plane graph G are designated as corner boxes • Case 2: the general case (to be solved) no designated vertices in advance • Problem definition: • See whether G has some set of outer vertices such that there is a BRD of G having them as the corner boxes. • How to find if they exist.

  20. BRD without designated corners (contd) • First, we will derive a necessary and sufficient condition for a plane graph G with maximum degree Δ ≤ 3 to have a BRD and give a linear time algorithm to find it. • Second, we reduce BRD problem of a plane graph with Δ ≥ 4 to that of a new plane graph J with Δ ≤ 3.

  21. BRD without designated corners (contd) • MAIN RESULT: A plane graph G with Δ ≤ 3 has a BRD (for some set of outer vertices designated as corner boxes) if and only if G satisfies the following 2 conditions: • Every 2-legged or 3-legged cycle in G contains an outer edge; and • 2c2 + c3≤ 4 for any independent set of cycles in G, where c2 and c3 are the numbers of 2-legged and 3-legged cycles respectively.

  22. Fact • In a box-rectangular drawing D of G, • any 2-legged cycle contains at least two corners of the outer rectangle, • any 3-legged cycle of G contains at least one corner, and • any cycle with four or more legs may contain no corner.

  23. Necessity of the main result theorem • First condition: Assume that G has a BRD. • By the previous fact, • any 2-legged or 3-legged cycle contains a corner of the outer rectangle  contains an outer edge. • Second condition: Let S be any independent set of cycles in G. • By the previous fact, • each of the c2 2-legged cycles in S contains at least 2 corners, and • each of the c3 3-legged cycles in S contains at least one corner. • Since the cycles in S are independent (vertex-disjoint with each other) THIS MEANS there are at least 2c2 + c3 corners of the outer rectangle • The outer rectangle has EXACTLY four corners  2c2 + c3≤ 4

  24. Sufficiency of the main result theorem • The proof for the sufficiency is a constructive proof • The proof leads to a linear time algorithm to find a BRD if it exists.

  25. Important Definition • Cubic Graphs: They are connected graphs having the property that each node has degree EXACTLY 3.

  26. Sufficiency of the main result theorem (contd) • Lemma (will not proof it here): • Let G be a plane graph with Δ ≤ 3. • Assume G satisfies the condition of the MAIN RESULT, and that G has at most 3 outer vertices of degree 3. • THEN G has a box-rectangular drawing.

  27. Sufficiency of the main result theorem (contd) • By the previous Lemma, we may assume that G has 4 or more outer vertices of degree 3  we can choose 4 distinct outer vertices of degree 3 as corner boxes. • No vertex v of degree 2 is chosen as corner box,  the edges incident to v are drawn on a common straight line segment in a BRD of G. • So, let G’ be the cubic graph obtained from G by removing all vertices of degree 2 one by one.  we can construct D from D’.

  28. Sufficiency of the main result theorem (contd) • Lemma: • Let G be a plane cubic graph. • Assume that G satisfies: • Condition (i) from the main result (every 2-legged and 3 legged cycles contain an outer edge); and • G has four or more outer vertices; and • there is EXACTLY one C0(G)-component (A C0(G)-component is a subgraph J of G that consists of a single inner edge joining 2 outer vertices). • Then • G has a 3-legged cycle, and • If G has 2 or more independent 3-legged cycles, then the set of all minimal 3-legged cycles in G is independent (A k-legged cycle is minimal if G(C) does not contain any other k-legged cycle of G).

  29. Sufficiency of the main result theorem (contd) • Proof ofpart (a) • Let w be any outer vertex, and • Let e be the inner edge incident to w. • Let x be the other end of e  then x is an inner vertex sinceG has ONE C0(G)-component and 4 or more outer vertices. • e belongs to exactly 2 faces say F1 and F2. • Since G has ONE C0(G)-component and since G is a cubic graph then: The contour of F1 contains 2 outer vertices: w and another say y. The same goes for F2. It has w and say z. • y ≠ z since d(y) = d(z) = 3. •  G has a 3-legged cycle C with leg-vertices x, y and z. Note: the legs of this 3-legged cycle meet at common vertex w.

  30. Sufficiency of the main result theorem (contd) • Proof sketch of part (b) • Assume for contradiction that G has 2 or more 3-legged cycles but 2 minimal 3-legged cycles C and C’ are NOT independent  G(C) and G(C’) share a common vertex (let e1..3 and e’1..3 be the legs of C and C’ respectively). • Claim that G(C) and G(C’) do not share a common face. • Suppose for contradiction that G(C) and G(C’) do share a common face. Get the conclusion that G does not have 2 or more independent 3-legged cycles  contradiction • And then use this with the fact that G is cubic and observe that G(C) and G(C’) share a common edge on C and C’. to contradict with the first assumption by arriving to the conclusion that G has exactly 3 outer vertices contradiction.

  31. Sufficiency of the main result theorem (contd) • NOW, we can prove the following Lemma: • Let G be a planar cubic graph. • Assume that G satisfies the 2 conditions of the MAIN RESULT and that G has four or more outer vertices. • Then G has a box-rectangular drawing.

  32. Sufficiency of the main result theorem (contd) • First lets observe that: If G has a 2-legged cycle C, then G has a pair of independent 2-legged cycles. • By condition (i): C contains an outer edge  the 2 legs of C are outer edges, say (v, v’) and (w, w’). • Let v and w be the leg vertices of C. • It is trivial to say that v’ ≠ w’ •  G has a 2-legged cycle C’ which has v’ and w’ as leg vertices AND C and C’ are independent.

  33. Sufficiency of the main result theorem (contd) • SO, we will consider 2 cases: • Case 1: G has no 2-legged cycle. • Case 2: G has a pair of independent 2-legged cycles.

  34. Case 1: G has no 2-legged cycles. • This case means that G has ONE C0(G)-component, otherwise G would have a 2-legged cycle. •  By the previous Lemma, G has a 3-legged cycle.

  35. Case 1: G has no 2-legged cycles (contd) • Choose the 4 corner boxes as follows: • 2 cases: • G has no pair of independent 3-legged cycles • G has a pair of independent 3-legged cycles

  36. Case 1: G has no 2-legged cycles: sub-case (a) • Choose 4 outer vertices arbitrarily and regard them as the 4 designated vertices for a BRD of G. • Claim: Every 3-legged cycle C in G has at least one designated vertex. • Since C has an outer edge by condition (i) of the main result  EXACTLY 2 of the 3 legs of C are outer edges. Say x and y are the leg vertices of these 2 legs.

  37. Case 1: G has no 2-legged cycles: sub-case (a)(cntd.) • Let P be the path from x to y on C0(G). Then P has exactly one intermediate vertex z: otherwise either G would have more than one C0(G)-component or a pair of independent 3-legged cycles  contradiction. (Remember the NOTE proof (a) of Lemma on slide 28 where we said that these 3 legs meet at one point w and this point is exactly the vertex z we are mentioning). •  We can know that all 3 legs are incident to z •  all outer vertices except z lie on C. •  C contains at least one of the four designated vertices (whether z is one of them or not) •  Claim is proven.

  38. Case 1: G has no 2-legged cycles: sub-case (b) • G has a pair of independent 3-legged cycles. • Let M be the set of all minimal 3-legged cycles in G. • By the Previous Lemma (slide 28), M is independent. • Let k = |M|, then k ≤ 4 by condition (ii) of main result (2c2+c3≤4) that this theorem satisfies. • For each 3-legged cycle Cj; where 1 ≤ j ≤ 4; in M, we arbitrarily choose an outer vertex on Cj. If k<4 we arbitrarily chose 4-k outer vertices which are not chosen so far. •  We have chosen exactly four outer vertices, and we take these vertices to be the 4 designated vertices of a BRD of G.

  39. Illustration • Vertices a, b, c and d are chosen as the designated vertices. • a, b and d are chosen on 3 independent 3-legged cycles AND vertex c is chosen arbitrarily on C0(G).

  40. Illustration (cntd.) • Claim: Every 3-legged cycle C of G has at least one designated vertex: • C has a designated vertex if C is minimal (since C belongs to M and this is how we chose the designated vertices). • If C is not minimal then G(C) contains a minimal 3-legged cycle Cj that belongs to M and that Cj has a designated outer vertex. • SO WE HAVE CHOSEN 4 DESIGNATED OUTER VERTICES

  41. Construction • Replace each designated vertex by a cycle and add a dummy vertex of degree 2 on the edge of the cycle that belongs to the OUTER cycle. • The new graph is G’ where all vertices have degree 3 except the 4 dummy outer vertices. • From chapter 6 there is a theorem that says: • Assume that G is a 2-connected plane graph with Δ≤ 3, and 4 outer vertices of degree 2 are designated as the corners, then G has a rectangular drawing if and only if • Any 2-legged cycle contains 2 or more corners, and • Any 3-legged cycle contains one or more corners

  42. Construction (contd) • G’ satisfies the conditions of that theorem and we can draw a rectangular drawing D’ as shown in the figure. • Replace the four faces in D’ corresponding to the replaced cycles BY BOXES  the resulting graph D is a BRD of G.

  43. Case 2: G has a pair of independent 2-legged cycles • Will not be discussed because of time constraints.

  44. Sufficiency of the main result theorem (contd) • Using these results one can find a box rectangular drawing of G if G satisfies the conditions of the MAIN RESULT (stated at first)  proved constructively the sufficiency of the MAIN RESULT • FINAL RESULT that is a direct result from the discussed proofs: • A plane graph G with Δ≤ 3 has a BRD iff G satisfies the 4 following conditions: • Every 2-legged or 3-legged cycles has an outer edge • At most 2-legged cycles of G are independent of each other • At most four 3-legged cycles are independent of each other • If G has a pair of independent 2-legged cycles C1 and C2, then {C1, C2, C3} is not independent for any 3-legged cycle C3 in G, and neither G(C1) nor G(C2) has more than 2 independent 3-legged cycles of G. (this is actually proven in the proof that we didn’t discuss where there exists a pair of independent 2-legged cycles).

  45. Result of time complexity • Result: • To see if G has a BRD, this takes O(m) where m is the number of edges in G. • To find D if it exists, this takes O(m) where m is the number of edges in G. NOTE: The Proof will not be discussed but it is very clear in the book.

  46. Reducing the problem of Δ≥4 to the one of Δ≤3 (Sketch) • Let G be a plane graph with Δ≥4 • Construct J by replacing each vertex of degree 4 or more by a cycle. • A replaced cycle corresponds to a real box in the BRD of G. • Clearly Δ(J) ≤ 3.

  47. Reducing the problem of Δ≥4 to the one of Δ≤3 (Sketch).

  48. Questions?

More Related