On The Edge-Graceful and Edge-Magic Maximal Outerplanar Graphs Sin-Min Lee , Medei Kitagaki, Joseph Young Department of Computer Science San Jose State University San Jose, California 95192 U.S.A. William Kocay Department of Computer Science University of Manitoba Winnipeg, Canada R3T 2N2 Definition of edge-graceful Definition 1 An edge-graceful labeling of a graph G with p vertices and q edges is a one-toone correspondence f from E(G) to {1, 2, . . ., q} such that for all vertices v, the vertex sums are distinct, mod p. A graph G is called edge-graceful if there exists an edge-graceful labeling of G. Concept Introduced by: Lo Sheng -Ping A necessary condition of edge-gracefulness is: q(q+1) p(p-1)/2(mod p) This condition may be more practically stated as q(q+1) 0 or p/2 (mod p) depending on whether p is odd or even. Lee proposed the following tantalizing conjectures: Conjecture 1: The Lo condition (2) is sufficient for a connected graph to be edge-graceful. A sub-conjecture of the above that has not yet been proved: Conjecture 2: All odd-order trees are edge-graceful. Lemma Let G be a maximal outerplanar graph with n vertices, n≥3, then (i) there are 2n-3 edges, in which there are n-3 chords; (ii) there are n-2 inner faces. Each inner face is triangular; (iii) there are at least two vertices with degree 2; Theorem. A maximal outerplanar graph with p vertices is edgegraceful if p = 4 and 12. Proof. A maximal outerplanar graph with p vertices has 2p-3 edges. It is edge-graceful if it satisfies the Lo’s condition q(q+1) p(p-1)/2 (mod p) (2p-3)(2p-2) p(p-1)/2 (mod p) (4p-6)(p-1) p(p-1)/2 (mod p) 4p-6 p/2 (mod p) Thus p is even, say p = 2k. We have 7k 6 (mod 2k), i.e. k 6 (mod 2k). From which we have k = 2 or k = 6. Thus p = 4 or 12. Theorem. The maximal outerplanar graph with 4 vertices is edge-graceful. Our true task: To show there exists an edgegraceful labeling for every maximal outerplanar graph with p = 12 vertices. Bob – There is only 1 unique graph for p = 4, but HOW MANY ARE THERE FOR p = 12? Alice – Just draw every single graph and count. Bob - HOW DO WE ENSURE WE HAVE ALL THE GRAPHS? GENERATING MAXIMAL OUTERPLANAR GRAPHS “The Idea” Notice that given any MOP with n vertices, we can construct a new MOP with n + 1 vertices by simply adding a triangle on one of the outer edges. n=6 n=7 GENERATING MAXIMAL OUTERPLANAR GRAPHS “The Algorithm Skeleton” While(n < 12) { While(more graphs of n vertices) While(i < n - 1) { Add new vertex connected to vertex i and i+1 increment i Store new graph of n+1 } Add a new vertex connecting vertex 1 and n Store new graph of n+1 } *Sort out duplicates from stored set of graphs of n+1 } *The algorithm generates many unnecessary, isomorphic graphs. At each stage in the generation process - for each set of MOP's with n vertices generated - we must some how sort out and eliminate duplicates. Professor William Kocay's 'Groups and Graphs' software exploits Automorphism to sort out from a set of graphs all the duplicates. GENERATING MAXIMAL OUTERPLANAR GRAPHS “The Algorithm Revised” While(n < 12) { While(more graphs of n vertices) While(i < n - 1) { Add a new vertex connected to vertex i and i+1 increment i Store new graph of n+1 } Add a new vertex connecting vertex 1 and n Store new graph of n+1 } *Feed graphs through 'Groups and Graphs' } Now that we have all the graphs we needed, we must find an edge-graceful labeling for each graph. -To find edge-graceful labelings, we search through every permutation of edge-weight labels. -For MOP's with 12 vertices, there are 21 edges. -There are 21! Possible ways to label(weigh) the edges. -There are 733 MOP's with 12 vertices. CONCLUSION: That is a lot of permutations. The task of finding edge-graceful labels becomes a problem of complexity. To minimize overhead time, we use the iterative version of Sedgewick's heap method algorithm to generate permutations. To test every permutation sequentially is unsound, considering the following empirical result: Expected time to find a labeling for a graph: About 3 days. (There are 733 graphs!) Empirical result was inferred from a small data set - some graphs we ran sequentially - but a better method is desirable. Solution: Exploit the nature of our software -The order in which the edges are input matters. -If an edge-graceful label is not found after a few thousand permutations, randomize the input and try again. Theorem. The maximal outerplanar graph with 12 vertices are edge-graceful. v12 v11 5 7 v8 v12 v2 v11 10 13 11 11 v3 12 1 6 15 4 3 0 21 8 17 2 1 20 3 9 10 v10 7 v9 v1 6 v4 16 19 5 8 14 9 v7 2 18 4 v6 v5 M1 4 6 5 20 2 9 9 v10 6 17 v9 v1 v8 11 8 v2 13 21 4 3 1 10 10 v3 12 15 16 7 7 5 3 8 14 1 v7 0 18 2 v6 v4 19 v5 M2 v12 v11 20 3 7 3 v1 6 2 8 13 v10 5 15 v8 10 11 v3 12 16 7 4 6 5 v11 11 17 v9 v2 4 9 v12 1 9 10 14 0 v7 1 18 2 v6 19 v5 M3 v4 7 5 7 20 2 9 0 8 17 15 v2 3 13 21 v10 9 v9 6 v1 1 2 v8 14 1 v7 18 12 6 5 16 8 11 v3 11 4 3 10 10 4 v6 v4 19 v5 M4 v1 v12 v11 20 3 9 10 5 21 v10 7 8 0 13 11 16 v8 1 3 9 14 8 v7 18 5 11 v3 6 2 1 v11 10 4 v6 3 20 3 9 8 v4 19 v5 M5 2 1 0 v2 10 13 10 v3 6 15 17 v9 7 21 8 v10 5 12 2 v1 v12 v2 6 4 15 17 v9 7 11 4 2 1 16 6 v8 9 14 4 v7 18 11 5 v6 12 v4 7 19 v5 M6 v1 v12 v11 20 10 4 1 7 v11 12 11 v3 19 15 5 18 7 5 3 6 0 v8 2 21 11 8 v7 9 6 17 v6 20 v5 M7 6 6 v2 12 18 9 v3 19 15 2 v9 5 7 7 16 v4 13 8 4 v10 1 14 10 v1 v12 v2 3 8 v9 4 1 16 v10 9 2 14 3 21 1 v4 3 0 10 4 13 9 10 8 v8 11 11 v7 5 2 17 v6 v5 M8 v1 v12 v11 20 7 5 8 v11 12 11 v3 19 6 7 3 1 15 1 4 9 v8 11 2 v7 6 0 17 v6 v5 M9 5 5 7 2 v2 12 18 9 v3 15 19 6 14 3 v9 8 8 4 16 v4 13 21 9 3 20 v10 7 14 10 v1 v12 v2 18 4 v9 10 5 8 16 v10 2 10 1 10 9 2 21 v8 11 0 v7 13 1 6 4 11 v4 3 17 v6 v5 M10 v1 v12 v11 20 1 11 2 2 7 7 v2 16 v10 5 15 0 v3 8 6 4 13 10 8 v8 9 3 11 10 v7 1 6 17 v6 11 20 5 8 6 12 18 v5 M11 10 v3 19 4 14 5 v9 v2 6 8 16 v4 3 3 v10 7 14 4 21 9 v11 12 18 19 v9 5 v1 v12 10 21 15 2 2 v4 3 13 9 9 v8 1 1 11 4 v7 0 7 17 v6 v5 M12 v1 v12 v11 20 2 10 5 5 7 v2 2 18 9 v3 15 19 v10 8 v11 12 16 6 1 10 11 9 6 v8 4 3 11 7 v7 8 1 17 v6 v5 M13 10 8 0 2 4 4 19 v2 12 18 11 v3 15 14 5 1 v9 13 6 16 v4 3 20 v10 8 14 21 4 v9 0 v1 v12 3 10 1 v4 3 21 13 9 6 v8 9 7 11 5 v7 2 7 17 v6 v5 M14 The dual concept of edge-graceful graphs was introduced in 1992. Let G be a (p,q) graph in which the edges are labeled 1,2,3,...q so that the vertex sums are constant, mod p. Then G is said to be edge-magic.. Sin-Min Lee, E. Seah and S.K. Tan , On edge-magic graphs, Congressus Numerantium 86 (1992), 179-191. A necessary condition for a (p,q)-graph to be edgemagic is q(q+1) 0 (mod p). However, this condition is not sufficient. Examples: (1) Trees (2) Cycles Theorem. A maximal outerplanar graph with p vertices is edge-magic if p= 6. Proof. A maximal outerplanar graph with p vertices is edge-magic if it satisfies q(q+1)0 (mod p) (2p-3)(2p-2) 0 (mod p) (4p-6)(p-1) 0 (mod p) 4p-6 0(mod p) 6 0(mod p) Thus p is 6. Theorem . All maximal outerplanar graph with 6 vertices are edge-magic. Proof. Up to isomorphism there are three maximal outerplanar graphs of order 6.