Discrete Applied Mathematics 258 (2019) 269–275
Contents lists available at ScienceDirect
Discrete Applied Mathematics journal homepage: www.elsevier.com/locate/dam
Note
Graph extensions, edit number and regular graphs Ghurumuruhan Ganesan Institute of Mathematical Sciences, Chennai, India
article
info
Article history: Received 1 April 2018 Received in revised form 23 October 2018 Accepted 26 October 2018 Available online 23 November 2018 Keywords: Graph extensions Edit number of graphs Connected regular graphs
a b s t r a c t A graph G on n vertices is said to be extendable if G can be modified to form a new graph H on more than n vertices, while preserving the degrees of the vertices common to G and H . The added vertices all have the same degree and we study conditions under which such extensions are possible. We then define edit numbers to quantify the amount of modification needed to obtain the extended graph and characterize graphs with least possible edit numbers. In particular, graphs with zero edit number can be extended using regular graphs and we describe iterative algorithms to construct connected regular graphs on arbitrarily large vertex sets, starting from the complete graph on a fixed set of vertices. © 2018 Elsevier B.V. All rights reserved.
1. Introduction The process of transforming one graph into another with additional vertices and satisfying desirable properties has been studied before in many contexts. Erdös and Kelly [7], Akiyama et al. [1] estimated the minimum number of additional vertices needed to convert a given graph into a regular graph. Bodlaender et al. [2] determine the time needed to construct such a regular supergraph. In many applications, it is also important to obtain the transformed graph with as few edit operations as possible, typically comprising vertex addition/deletion and/or edge addition/deletion. For example, Bulian and Dawar [4] study various versions of graph edit distances via the notion of fixed parameter tractability. Fischer et al. [8] use matching algorithms to approximate the distance between two handwriting graphs for pattern recognition. For a survey of literature on graph edit distance, we refer to Gao et al. [9]. In these above applications, the degree sequence of the resulting graph is often very different from the original graph. In this paper, we consider a slightly different problem: we are interested in extending a given graph to include more vertices, while forcing the extended graph to preserve the degree sequence of the original graph. Let G = (V (G), E(G)) be a graph with vertex set V (G) = {1, 2, . . . , n} and edge set E(G). Edges between vertices i and j are denoted as (i, j) and i and j are said to be the endvertices of the edge (i, j). Two vertices u and v are said to be adjacent in G if the edge (u, v ) ∈ E(G) and two edges are said to be adjacent if they share a common endvertex. The degree dG (v ) of a vertex v denotes the number of vertices adjacent to v in G. A path P = (v1 , . . . , vt ) in the graph G is a sequence of distinct vertices such that vi is adjacent to vi+1 for 1 ≤ i ≤ t − 1. The vertices v1 and vt are connected by the path P in G. The graph G is said to be connected if any two vertices in G are connected by a path in G [3]. In what follows, we study extensions of graphs that are obtained by adding new vertices. Definition 1. For integers r , k ≥ 1 we say that the graph G is (r , k)-extendable or simply extendable if there exists a graph H with the following properties: E-mail address:
[email protected]. https://doi.org/10.1016/j.dam.2018.10.042 0166-218X/© 2018 Elsevier B.V. All rights reserved.
270
G. Ganesan / Discrete Applied Mathematics 258 (2019) 269–275
Fig. 1. The graph G and the corresponding extensions H1 , H2 and H3 .
(a1) The vertex set of H is {1, 2, . . . , n + r }. (a2) The degree sequence of H is (dG (1), . . . , dG (n), k, . . . , k), where the vertex i has degree dG (i) for 1 ≤ i ≤ n and the vertex n + j has degree k for 1 ≤ j ≤ r .
∑n
If there exists a graph H satisfying (a1)–(a2), then r · k is even, since the sum i=1 dG (i) is even. Therefore we assume henceforth that r · k is always even. The graph H in Definition 1 is defined to be an (r , k)-extension or simply, an extension of the graph G. For example, if G is the graph consisting of the single edge (1, 2) with endvertices {1, 2}, then G is (1, 2)extendable and the graph H1 with two edges (1, 3) and (2, 3) is a (1, 2)-extension of G (see Fig. 1). The graph G is also (2, 1)-extendable and the graph H2 with two edges (1, 3) and (2, 4) is a (2, 1)-extension of G. The graph H3 with two edges (1, 2) and (3, 4) is also a (2, 1)-extension of G but there are no edges in H3 that has one endvertex in the (original) vertex set of G and the other endvertex in added vertex set {3, 4}. Thus H3 can be obtained without any modifications to the edge set of G and we denote such extensions to be trivial. In general, an (r , k)-extension H of a graph G is to be nontrivial if there exists at least one cross edge having one endvertex in {1, 2, . . . , n} and other endvertex in {n + 1, . . . , n + r }. In the example in Fig. 1, the edges (1, 3) and (2, 3) of the graph H1 are both cross edges and so H1 is a nontrivial extension of G. Regarding trivial extensions and extensions obtained by adding one or two vertices, we have the following result. Proposition 1. Let G be any graph with vertex set {1, 2, . . . , n} and let k ≥ 1 be any integer. (a) Suppose the degree of each vertex in G is at least k. If k is even then G is (1, k)-extendable and if k is odd then G is (2, k)extendable. (b) If r ≥ k + 1 is such that r · k is even, then G is trivially (r , k)-extendable. Any extension in (a) is necessarily nontrivial and in the proof of (a) in Section 2, we first identify a long path P ⊂ G containing at least k edges (such a path exists since the minimum degree of G is at least k) and then modify P to obtain the desired extension. Proposition 1(b) is true because if F is an r-regular graph on k vertices, i.e., F contains k vertices each with degree r , then the union F ∪ G is a trivial (r , k)-extension of G. In fact, as a consequence of (a), we can iteratively construct regular graphs on arbitrarily large vertex sets starting from the complete graph on a fixed set of vertices, by adding one or two vertices at a time. For completeness, we provide the construction of connected regular and nearly regular graphs in the proof of Proposition 3. For k ≥ r , the graph G has no trivial extensions and so it becomes necessary to modify the edge and vertex set of G to obtain the desired extension H . We begin the study of such nontrivial extensions with a couple of preliminary definitions. Let Kn be the complete graph on n vertices so that G is a subgraph of Kn . The complement graph of G, denoted by G, has vertex set V (G) and edge set E(Kn ) \ E(G) so that an edge e ∈ Kn belongs to G if and only if e is not present in G. A walk P = (v1 , . . . , vt ) in Kn is a subgraph of Kn with vertex set V (P) = {v1 , . . . , vt } and edge set E(P) = {(v1 , v2 ), (v2 , v3 ), . . . , (vt −1 , vt )}. The set {v1 , vt } is said to be the endvertex set for P . If all the vertices in P are distinct, then P is said to be a path. The walk P is said to be G-alternating if t is even, the edge (vj , vj+1 ) ∈ G for all odd 1 ≤ j ≤ t − 1 and (vj , vj+1 ) ∈ G for all even 1 ≤ j ≤ t . Any G-alternating walk necessarily has odd number of edges and the first and last edges belong to G. A set of G-alternating walks {P1 , . . . , Pq } is said to be edge disjoint if Pi and Pj have no edge in common for any i ̸ = j.
G. Ganesan / Discrete Applied Mathematics 258 (2019) 269–275
Fig. 2. (a) Example of a graph satisfying the (r , t)-property for r = t = 2. (b) An (r , k)-extension of the graph in (a) with k = 3 so that t =
271
1 r(k 2
− r + 1).
Definition 2. For integers q ≥ p ≥ 1 the graph G is said to satisfy the (p, q)-property if there is a set of q edge disjoint Galternating walks {Pi }1≤i≤q and vertex sets Vi = {ai , bi }, 1 ≤ i ≤ q such that Vi is the endvertex set for Pi and any v ∈ ∪1≤i≤q Vi belongs to at most p of the q sets Vi , 1 ≤ i ≤ q. The following is the main result of the paper. Theorem 1. Let G be a graph with vertex set {1, 2, . . . , n} and let k ≥ r ≥ 1 be integers such that r · k is even. The graph G is (r , k)-extendable if and only if G satisfies the (r , t)-property for t = 12 r(k − r + 1). In Fig. 2(a), we have provided an example of a graph G satisfying the (r , t)-property for r = 2, k = 3 and t = 21 r(k−r +1) = 2. The dotted edges belong to the complement G and the paths P1 = (1, 2, 3, 4) and P2 = (1, 6, 5, 4) satisfy (b1)–(b2) in Definition 2. The corresponding (r , k)-extension is shown in Fig. 2(b). To quantify the amount of modifications needed to obtain the nontrivial extensions, we introduce the concept of edit numbers. Edit number For integers r , k ≥ 1 and a graph G, the (r , k)-edit number or simply edit number of G is denoted by Nr ,k (G) and is defined as follows. If G is not (r , k)-extendable, then we set Nr ,k (G) = ∞. Else we set Nr ,k (G) := min # ((E(G) \ E1 (H)) ∪ (E1 (H) \ E(G))) ,
(1.1)
H
where E1 (H) ⊂ E(H) denotes the set of edges of H with an endvertex in {1, 2, . . . , n} and the minimum is taken over all (r , k)extensions H of G. For example, if G is the graph formed by the edge (1, 2), then the only possible (1, 2)-extension of G is the graph H1 with edge set {(1, 3), (2, 3)} and so N1,2 (G) = 3. On the other hand, there are two possible (2, 1)-extensions of G: the graph H2 = {(1, 3), (2, 4)} and the trivial extension formed by the graph H3 = {(1, 2), (3, 4)}. For the trivial extension, E(G) = E1 (H3 ) and so N2,1 (G) = 0. In general for any r , k ≥ 1, the edit number Nr ,k (G) = 0 if and only if G is trivially (r , k)-extendable. For 1 ≤ k ≤ r − 1, we therefore deduce from Proposition 1(b) that Nr ,k (G) = 0. For k ≥ r ≥ 1, the edit number is nonzero and bounded above using (1.1) as Nr ,k (G) ≤ #E(G) + #E(H) =
n 1∑
2
i=1
( dG (i) +
n 1∑
2
i=1
dG (i) +
1 2
) r ·k
(1.2)
since dH (i) = dG (i) for 1 ≤ i ≤ n and dH (j) = k for n + 1 ≤ j ≤ n + r (see Definition 1). We would like to study graphs with low edit numbers based on the following interpretation of Nr ,k (G). Suppose H is a nontrivial (r , k)-extension of G and we want to construct H from the graph G ∪ {n + 1, . . . , n + r } formed by the union of G and the isolated vertices {n + 1, . . . , n + r }. This can be done in two steps as follows: In the first step, add the edges of E1 (H) \ E(G) and remove the edges of E(G) \ E1 (H). In the second step, add the edges of E(H) \ E1 (H). If adding or removing an edge with one endvertex in {1, 2, . . . , n} constitutes an edit operation on G, then from (1.1) we conclude that at least Nr ,k (G) edit operations are needed to obtain H . Moreover, there exists an extended graph Hopt that can be obtained from G after exactly Nr ,k (G) edit operations. To classify graphs with least possible edit number, we have the following definition. For integers p, q ≥ 1, a subgraph W of a graph G is said to be a (p, q)-subgraph of G if it contains q edges and the minimum degree of W is one and the maximum
272
G. Ganesan / Discrete Applied Mathematics 258 (2019) 269–275
degree of W is p. In other words, the edge set E(W ) of W contains q edges and the vertex set V (W ) of W is simply the set of all endvertices of E(W ) and every vertex of W is adjacent to at most p other vertices in W . The following result is a corollary of Theorem 1. Corollary 2. Let G be a graph with vertex set {1, 2, . . . , n} and let k ≥ r ≥ 1 be integers such that r · k is even. The edit number Nr ,k (G) ≥
3 2
r(k − r + 1)
(1.3)
with equality if and only if G contains an (r , t)-subgraph for t =
1 r(k 2
− r + 1).
A graph G for which equality holds in (1.3) is clearly (r , k)-extendable and is defined to be optimally (r , k)-extendable or simply optimally extendable. From Corollary 2, we therefore get that G is optimally (r , k)-extendable if and only if G contains an (r , t)-subgraph for t = 21 r(k − r + 1). The following proposition gives sufficient conditions for G to be optimally extendable in terms of matchings. A matching of size l or a l-matching of a graph G is a set of l vertex disjoint edges of G. Two matchings M1 and M2 are said to be disjoint if M1 and M2 contain no edge in common. Proposition 2. Let G be a graph with vertex set {1, 2, . . . , n} and let r , k ≥ 1 be integers such that r · k is even. (1) If r = 1 and k is even, then G is optimally (1, k)-extendable if and only if G contains a 2k -matching. (2) If k = r is even, then G is optimally (k, k)-extendable if and only if G contains
k 2
(3) If k − r ≥ 1 is odd, then G is optimally (r , k)-extendable if G contains r disjoint
edges.
( k−r +1 ) 2
-matchings.
(4) If k − r ≥ 1 is even, then G is optimally (r , k)-extendable if G contains r disjoint matchings, each of size 12 (k − r) + 1.
(5) Suppose dG (i) ≥ k for all 1 ≤ i ≤ n. If k is even, then G is optimally (1, k)-extendable and if k is odd, then G is optimally (2, k)extendable. Finally, we briefly discuss regular graphs. For integers n, k ≥ 1, a graph G with vertex set {1, 2, . . . , n} is said to be kregular if the degree of each vertex in G is exactly k. The graph G is nearly k-regular if n − 1 vertices of G have degree k and one vertex has degree k − 1. If G is k-regular, then the product n · k is the sum of degrees of the vertices in G, which in turn is twice the number of edges in G. Therefore it is necessary that either n or k is even. For completeness, we state and prove the following proposition. Proposition 3. The following statements hold. (a) For all even integers k ≥ 2 and all integers n ≥ k + 1, there is a connected k-regular graph with vertex set {1, 2, . . . , n}. (b) For all odd integers k ≥ 3 and all even integers n ≥ k + 1, there is a connected k-regular graph with vertex set {1, 2, . . . , n}. (c) For all odd integers k ≥ 3 and all odd integers n ≥ k + 2, there is a connected nearly k-regular graph with vertex set {1, 2, . . . , n}. Though it is possible to use the Erdős–Gallai Theorem (see Erdös and Gallai [6], Edmonds [5], Tripathi and Vijay [12] and references therein) or the Havel–Hakimi criterion [10,11] to determine the existence of k-regular graphs, we provide a deterministic iterative algorithm to alternately construct connected k-regular graphs on n vertices for all permissible values of n ≥ k + 1, starting from the complete graph Kk+1 . The paper is organized as follows. In Section 2, we prove Propositions 1 and 3. In Section 3, prove Theorem 1 and finally, in Section 4, we prove Corollary 2 and Proposition 2. 2. Proof of Propositions 1 and 3 We recall that a walk P = (v1 , . . . , vt ) in a graph G is said to be a path if all the vertices v1 , . . . , vt in P are distinct and vi is adjacent to vi+1 for 1 ≤ i ≤ t − 1. The following fact is used throughout. (p1) If the minimum degree of a vertex in G is δ ≥ 2, then there exists a path in G containing δ edges. Proof of (p1). Let P = (v1 , . . . , vt ) be the longest path in G; i.e., P is a path containing the maximum number of edges. Since P is the longest path, all the neighbours of v1 in G belong to P . Since v1 has at least δ neighbours in G, we must have t ≥ δ + 1 and so P has at least δ edges. ■ We prove Proposition 1(a) and then obtain Proposition 3 as a corollary. Finally, we prove Proposition 1(b). Proof of Proposition 1(a). Suppose G is a graph with minimum degree at least k and using property (p1), let P = (u1 , . . . , uk+1 ) be a path in G containing k edges. If k is even, the edges ei = (u2i−1 , u2i ), 1 ≤ i ≤ 2k are vertex disjoint and so removing the edges ei , 1 ≤ i ≤ extension of G.
k 2
and adding k new edges
⋃ 2k
i=1
{(n + 1, u2i−1 )}
⋃ {(n + 1, u2i )}, we get the desired (1, k)-
G. Ganesan / Discrete Applied Mathematics 258 (2019) 269–275
273
If k is odd, we remove the k − 1 edges {(ui , ui+1 )}1≤i≤k−1 and add the following edges: (i) For 1 ≤ i ≤ k − 1, i odd, we add the edges {(n + 1, ui ), (n + 1, ui+1 )}. (ii) For 1 ≤ i ≤ k − 1, i even, we add the edges {(n + 2, ui ), (n + 2, ui+1 )}. (iii) Finally, we add the edge (n + 1, n + 2). Since k is odd, the total number of edges added in step (i) is k − 1 and so there are k − 1 edges with n + 1 as an endvertex after step (i). Similarly, after step (ii) there are k − 1 edges with n + 2 as an endvertex. Finally, the resulting graph after step (iii) is the desired (2, k)-extension of G. ■ Proof of Proposition 3. The proof of (a) and (b) follows from induction and the proof of Proposition 1(a). Indeed let Gn (k) be a connected k-regular graph on n ≥ k + 1 vertices. Following the construction in the proof of Proposition 1 (a), we then get a connected k-regular graph Gn+1 (k) on n + 1 vertices. The proof for k odd is analogous. To prove (c), we let k ≥ 2 and n ≥ k + 2 be odd and let Gn−1 (k) be a connected k-regular graph with vertex set {1, 2, . . . , n − 1}. From property (p1), the graph Gn−1 (k) contains a path Sn−⋃ 1 (k) consisting of k edges. Since k is odd, there are k−2 1 vertex disjoint edges fi = (xi , yi ), 1 ≤ i ≤ k−2 1 in Sn−1 (k); i.e., the set 1≤i≤ k−1 {xi , yi } has k − 1 distinct vertices. Removing the edges fi , 1 ≤ i ≤
k−1 2
2
and adding k − 1 new edges
k−1 2 ⋃
{(n, xi )}
⋃ {(n, yi )},
i=1
the resulting graph Gn (k) is connected, the vertex n has degree k − 1 and the rest of all the vertices have degree k.
■
Proof of Proposition 1(b). Letting F be any k-regular graph on r vertices, we get that G ∪ F is a trivial (r , k)-extension of G. ■ 3. Proof of Theorem 1 We proceed in two steps. In the first step, we let G be any (r , k)-extendable graph and prove that G necessarily satisfies the (r , t)-property for t = 21 r(k − r + 1). In the second step, we let G be any graph satisfying the (r , t)-property and construct an (r , k)-extension of G, completing the proof of Theorem 1. Step 1: For an (r , k)-extension Q of G, we recall from the discussion following Definition 1 that a cross edge in Q contains one endvertex in V (G) = {1, 2, . . . , n} and another endvertex in {n + 1, . . . , n + r }. The number of such cross edges is always even because of the following reason: By definition, the degrees dQ (j) = dG (j) for vertices 1 ≤ j ≤ r and dQ (j) = k for n + 1 ≤ j ≤ n + r and so if qj , n + 1 ≤ j ≤ n + r is the number of cross edges containing j as an endvertex, we have that n+r ∑
qj =
j=n+1
n+r ∑
dQ (j) −
j=1
=
n ∑
dQ (j) −
j=1
n+r ∑
dQ (j) −
j=1
n ∑
n+r ∑
(dQ (j) − qj )
j=n+1
dG (j) −
j=1
∑n+r
n+r ∑
(dQ (j) − qj ).
j=n+1
∑n
dQ (j) and The first two terms j=1∑ j=1 dG (j) being the sum of degrees of vertices in the graphs Q and G, respectively, n+r are even. The final term j=n+1 (dQ (j) − qj ) is the sum of degrees of vertices in the induced subgraph of Q with vertex set {n + 1, . . . , n + r } and is therefore also even. Let Vcross ⊆ V (G) be the set of all endvertices of the cross edges of Q present in V (G). To see that G satisfies the (r , t)property, we use an iterative colouring procedure on the edges of E1 (Q ) \ E(G) and E(G) \ E1 (Q ) (recall that E1 (Q ) is the set of all edges of Q containing an endvertex in V (G)). In the first iteration, we find a cross edge (x0 , x1 ) ∈ E1 (Q ) \ E(G) with x0 ∈ {n + 1, . . . , n + r } and x1 ∈ Vcross and colour it green. In the next iteration, we find an edge (x1 , x2 ) ∈ E(G) \ E1 (Q ) and colour it red. Such an edge must exist since the vertex x2 ∈ V (G) has the same degree in both the graphs G and Q . For all vertices v ∈ V (G) \ {x2 } the number of uncoloured edges in (2) E1 (Q ) \ E(G) containing v as an endvertex after the second iteration, denoted by fQ (v ), equals the number of uncoloured (2)
(2)
(2)
edges in E(G) \ E1 (Q ) containing v as an endvertex, denoted by fG (v ). Also fQ (x2 ) is one more than fG (x2 ) since (x1 , x2 ) ∈ E(G) \ E1 (Q ) was coloured red. Thus there exists an uncoloured edge (x2 , x3 ) ∈ E1 (Q ) \ E(G) containing x2 as an endvertex. Colour (x2 , x3 ) green and proceed to the next step. After a finite number of steps colouring edges red and green alternately, we necessarily colour an edge (xd−1 , xd ) ∈ E(G) \ E1 (Q ) red where xd ∈ Vcross is the endvertex of an uncoloured cross edge (xd , xd+1 ) (such an edge must exist since the number of cross edges is even). We colour (xd , xd+1 ) green and terminate the iteration. The resulting sequence of edges (x0 , x1 ), (x1 , x2 ), . . . , (xd , xd+1 )
is a walk which we denote by C1 . The edges of C1 obtained in even iterations belong to G and the edges obtained in odd iterations (apart from the first and last iterations) belong to G, the complement of G. The walk P1 = (x1 , x2 , . . . , xd ) has
274
G. Ganesan / Discrete Applied Mathematics 258 (2019) 269–275
endvertex set V1 = {x1 , xd } and for every vertex v ∈ V (G), the remaining number of uncoloured edges in E(G) \ E1 (Q ) containing v as an endvertex equals the remaining number of uncoloured edges in E1 (Q ) \ E(G) containing v as an endvertex. We now pick a new (uncoloured) cross edge, repeat the above procedure and get a new walk C2 and the corresponding subwalk P2 with endvertex set V2 . Continuing this way until all cross edges are coloured, the final set of walks Ci , Pi , 1 ≤ i ≤ w obtained satisfies the following properties: (w0) For every vertex v ∈ V (G), there are an equal number of red and green edges containing v as an endvertex. Moreover, every edge of (E1 (Q ) \ E(G)) ∪ (E(G) \ E1 (Q )) is a coloured edge of some walk in {Ci }1≤i≤w . (w1) For 1 ≤ i ≤ w, the first and last edges of Ci are the only cross edges of Ci and are coloured green. The first and the last edges of Pi are red, all the red edges of Pi belong to G and all the green edges of Pi belong to G, the complement of the graph G. Consequently Pi is G-alternating. (w2) The walks {Ci }1≤i≤w are edge disjoint and the total number of walks is
w≥
1 2
r(k − r + 1) = t .
(w3) The union of all endvertex sets
(3.1)
⋃
1≤i≤w
Vi = Vcross and any u ∈ Vcross belongs to at most r of the sets {Vi }1≤i≤w .
In other words, the graph G satisfies the (r , t)-property in Definition 1. The first statement of property (w0) is true by construction. The second statement of (w0) is proved by contradiction as follows. If there exists an uncoloured edge (y1 , y2 ) ∈ E1 (Q ) \ E(G), colour (y1 , y2 ) blue. Since the degrees of y2 in G and Q are the same, there exists an uncoloured edge (y2 , y3 ) ∈ E(G) \ E1 (Q ), which we colour as black. Continuing this way for a finite number of steps, there are two possibilities both of which lead to a contradiction: (I) we colour an edge (yf −1 , yf ) ∈ E1 (Q ) \ E(G) blue and there is no uncoloured edge in E(G) \ E1 (Q ) containing yf as an endvertex or (II) we colour an edge (yf −1 , yf ) ∈ E(G) \ E1 (Q ) black and there is no uncoloured edge in E1 (Q ) \ E(G) containing yf as an endvertex. Property (w1) is true by construction. To prove (w2), we recall that any vertex v ∈ {n + 1, . . . , n + r } is adjacent to at most r − 1 other vertices of {n + 1, . . . , n + r } and so v is adjacent to at least k − r + 1 vertices of G. Therefore, the total number of cross edges in Q is at least r(k − r + 1). From the construction above, the first and last edges of the walk Ci , 1 ≤ i ≤ w are the only two (distinct) cross edges in Ci . Using the fact that {Ci } are edge disjoint, we then get (w2). The first statement of (w3) is true by construction and if u ∈ Vcross belongs to δ of the w sets {Vi }1≤i≤w , then by construction u is the endvertex of δ green cross edges and is therefore adjacent to δ ≤ r vertices in {n + 1, . . . , n + r }. Step 2: Suppose G satisfies the (r , t)-property with t = 21 r(k − r + 1) edge disjoint G-alternating walks {Pi }1≤i≤t and corresponding endvertex sets {Vi }1≤i≤t . We construct an (r , k)-extension of G as follows. Let
⋃
Vi = {v1 , . . . , vx }
1≤i≤t
where vi , 1 ≤ i ≤ x belongs to li ≤ r sets in {Vi }1≤i≤t . Defining vi (j) = vi for 1 ≤ j ≤ li , the vector V = (v1 (1), . . . , v1 (l1 ), v2 (1), . . . , v2 (l2 ), . . . , vx (1), . . . , vx (lx )) has 2t entries, which we relabel as v1 (1) = z1 , v1 (2) = z2 and so on, so that V = (z1 , . . . , z2t ). ( ) r Remove all edges belonging to G and add all edges belonging to G in {Pi }1≤i≤t . Also add the 2 edges between vertices in {n + 1, . . . , n + r } and call the resulting graph as Htemp . For the case k − r + 1 is even, perform the following additional connection procedure on the graph Htemp . In the first step, connect the vertices zi and zr +i to the vertex n + i, for 1 ≤ i ≤ r . In the second step, connect the vertices z2r +i and z3r +i to n + i for 1 ≤ i ≤ r and so on. Thus for example, the vertex n + 1 would be connected to the vertices z1 , zr +1 , z2r +1 and z3r +1 after the first two steps. Since each vertex in V is repeated at most r times, the vertices z1 , zr +1 , z2r +1 and z3r +1 are all distinct. 2t The above procedure terminates after exactly 2r = 21 (k − r + 1) steps and in the resulting final graph Hfin , each vertex in {n + 1, . . . , n + r } has degree exactly k. Also the degree of each vertex with {1, 2, . . . , n} is the same as the original graph G. For all vertices not in {v1 , . . . , vx }, this is true by construction. If a vertex v ∈ {v1 , . . . , vx } is the endvertex of lv walks in{Pi }1≤i≤t , then lv edges of G adjacent to v have been removed in obtaining Htemp and by the connection procedure above, lv new cross edges with one endvertex as v have been added. So Hfin is the desired (r , k)-extension of G. If k − r + 1 is odd, then r is even since the product r · k is even and we perform the connection procedure in a slightly different way after obtaining the graph Htemp . In the first step of the connection procedure, we connect vertices zi and zr +i to vertex n + i for 1 ≤ i ≤ 2r . In the second step of the procedure, we connect vertices z r +i and vertices z 3r +i to vertex n + i 2
2
for 2r + 1 ≤ i ≤ r . In the third step of the procedure, we again connect vertices zr +i and z2r +i to vertex n + i for 1 ≤ i ≤ 2r . This procedure is continued for k − r steps after which r vertices z2t −r +1 , . . . , z2t are left out. Connect vertex z2t −r +i to vertex n + i for 1 ≤ i ≤ r . As before, we obtain the desired extended graph Hfin . ■ 4. Proof of Corollary 2 and Proposition 2 Proof of Corollary 2. We use (1.1) and let Q be an (r , k)-extension of G such that Nr ,k (G) = #(E1 (Q ) \ E(G)) + #(E(G) \ E1 (Q )).
(4.1)
G. Ganesan / Discrete Applied Mathematics 258 (2019) 269–275
275
From the construction of the walks {Ci }1≤i≤w and {Pi }1≤i≤w in the proof of Theorem 1, we have that all the green edges in Ci , 1 ≤ i ≤ w belong to E1 (Q ) \ E(G) and all the red edges of Ci belong to E(G) \ E1 (Q ). Moreover, every edge of (E1 (Q ) \ E(G)) ∪ (E(G) \ E1 (Q )) belongs to some walk in {Ci }1≤i≤w and each walk Ci contains at least two green (cross) edges and a red edge. Therefore if #Ci denotes the number of edges of Ci , we have from (4.1) that Nr ,k (G) =
w ∑
#Ci ≥ 3w ≥
i=1
3 2
r(k − r + 1),
(4.2)
using (3.1). If Nr ,k (G) = 32 r(k − r + 1), then each walk Ci , 1 ≤ i ≤ w is a path containing exactly two green edges and one red edge and the number of paths equals w = 21 r(k − r + 1) = t . Moreover each walk Pi consists of a single red edge and so the walks {Pi }1≤i≤w , satisfying the (r , t)-property (see Definition 2), form the desired (r , t)-subgraph of G. Suppose now that G contains an (r , t)-subgraph W consisting of t edges e1 , . . . , et . Each such edge is a G-alternating walk and so the walks {e1 , . . . , et } satisfy the (r , t)-property of Definition 2. From the construction of the extended graph Hfin described in Step 2 of Theorem 1, we estimate the edit number of the original graph G as follows. First, to obtain the graph Htemp from G we removed the t edges e1 , . . . , et with an endvertex in G. Since no edge with an endvertex in G was removed in obtaining Hfin from Htemp , we have #E(G) \ E1 (Hfin ) = t .
(4.3)
In the connection procedure used to obtain Hfin from Htemp , we added 2t edges to Htemp , each containing an endvertex in G. No edge with an endvertex in G was added in obtaining Htemp from G and so #E1 (Hfin ) \ E(G) = 2t . From (1.1), (4.3) and (4.4), we therefore get that Nr ,k (G) ≤ 3t =
(4.4) 3 r(k 2
−r +1). But from (4.2), this means that Nr ,k (G) = 3t .
■
Proof of Proposition 2. The proof of (1) follows from the fact that any (1, t)-subgraph of G with t = 2k is a 2k -matching and vice versa. Property (2) is true since if W is any collection of 2k edges of G, then each vertex in W is adjacent to at most k edges of W and so W is a (k, t)-subgraph of G with t = 2k . ( ) We prove property (3) and the proof of (4) is analogous. To prove property (3), let M1 , . . . , Mr be r disjoint k−2r +1 matchings of G. It suffices to see that the collection of edges in {M1 , . . . , Mr } form an (r , t)-subgraph with t = 21 r(k − r + 1). The total number of edges in {M1 , . . . , Mr } is t . Also if v is an endvertex of some edge in {M1 , . . . , Mr }, then v is adjacent to at most r edges in {M1 , . . . , Mr }, because otherwise two edges of some matching would both contain v as an endvertex, a contradiction. To prove property (5), we use property (p1) in the proof of Proposition 3 and obtain a path P of length k in G. If k is even, then the alternate edges of P form a 2k -matching in G and so G is optimally (1, k)-extendable ( by )property (1). If k is odd, the alternate edges of the first k − 1 edges of P and the remaining k−2 1 edges form two disjoint k−2 1 -matchings in G and so the result follows from property (3). ■ Acknowledgements I thank Professors Rahul Roy, Thomas Mountford, Federico Camia and the referees for crucial comments that led to an improvement of the paper. I also thank Professors Rahul Roy, Thomas Mountford and Federico Camia for my fellowships. References [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12]
J. Akiyama, H. Era, F. Harary, Regular graphs containing a given graph, Elem. Math. 83 (1983) 15–17. H.L. Bodlaender, R.B. Tan, J. van Leeuwen, Finding a ∆-regular supergraph of minimum order, Discrete Appl. Math. 131 (2003) 3–9. B. Bollobás, Modern Graph Theory, Springer, 2002. J. Bulian, A. Dawar, Fixed-parameter tractable distances to sparse graph classes, Algorithmica 79 (2017) 139–158. J. Edmonds, Existence of k-edge connected ordinary graphs with prescribed degrees, Nat. Bur. Stand-B. Math. Math. Phys. 68B (1964) 73–74. P. Erdös, T. Gallai, Gráfok előírtfokszámú pontokkal, Mat. Lapok 11 (1960) 264–274. P. Erdös, P. Kelly, The minimal regular graph containing a given graph, Amer. Math. Monthly 70 (1963) 1074–1075. A. Fischer, Y.C. Suen, V. Frinken, K. Riesen, H. Bunke, A fast matching algorithm for graph-based handwriting recognition, in: Graph-Based Representations in Pattern Recognition, Lecture Notes in Computer Science, Vol. 7877, 2013, pp. 194–203. X. Gao, B. Xiao, D. Tao, X. Li, A survey of graph edit distance, Pattern Anal. Appl. 13 (2010) 113–129. S.L. Hakimi, On realizability of a set of integers as degrees of the vertices of a linear graph, I, J. Soc. Ind. Appl. Math. 10 (1962) 496–506. V. Havel, A remark on the existence of finite graphs, Cas. pěstování Mat. 80 (1955) 477–480. A. Tripathi, S. Vijay, A note on a theorem of Erdős and Gallai, Discrete Math. 265 (2003) 417–420.