Cube-complements of generalized Fibonacci cubes

Cube-complements of generalized Fibonacci cubes

Discrete Mathematics 342 (2019) 1139–1146 Contents lists available at ScienceDirect Discrete Mathematics journal homepage: www.elsevier.com/locate/d...

350KB Sizes 0 Downloads 41 Views

Discrete Mathematics 342 (2019) 1139–1146

Contents lists available at ScienceDirect

Discrete Mathematics journal homepage: www.elsevier.com/locate/disc

Cube-complements of generalized Fibonacci cubes Aleksander Vesel Faculty of Natural Sciences and Mathematics, University of Maribor, SI-2000 Maribor, Slovenia

article

info

Article history: Received 23 April 2018 Received in revised form 3 December 2018 Accepted 7 January 2019 Available online 19 January 2019 Keywords: Generalized Fibonacci cube Cube-complement Connectivity Partial cube Median graph Daisy cube

a b s t r a c t The generalized Fibonacci cube Qh (f ) is the graph obtained from the h-cube Qh by removing all vertices that contain a given binary string f as a substring. If G is an induced subgraph of Qh , then the cube-complement of G is the graph induced by the vertices of Qh which are not in G. In particular, the cube-complement of a generalized Fibonacci cube Qh (f ) is the subgraph of Qh induced by the set of all vertices that contain f as a substring. The questions whether a cube-complement of a generalized Fibonacci cube is (i) connected, (ii) an isometric subgraph of a hypercube or (iii) a median graph are studied. Questions (ii) and (iii) are completely solved, i.e. the sets of binary strings that allow a graph of this class to be an isometric subgraph of a hypercube or a median graph are given. The cube-complement of a daisy cube is also studied. © 2019 Elsevier B.V. All rights reserved.

1. Introduction The study of induced subgraphs of the hypercube Qh is a well-investigated field of research. Since a hypercube is a popular interconnection scheme for multicomputers, its isometric subgraphs, i.e. its induced subgraphs that preserve distances, are of particular importance. An intensively studied subclass of this class are median graphs [14]. Very recently, another concept which led to the class of graphs called daisy cubes has been proposed in [13]. Daisy cubes have already found an application in chemical graph theory [23]. Inspired by the study of interconnection topologies in the area of parallel or distributed systems, some other interesting classes of graphs have emerged. Besides hypercubes, very well known graphs which can be also applied for this purpose are Fibonacci cubes [4,6]. The Fibonacci cube Γh , h ≥ 1, is defined as follows. The vertex set of Γh is the set of all binary strings b1 b2 . . . bh containing no two consecutive 1’s. Two vertices are adjacent in Γh if they differ in precisely one bit. Several structural properties and applications including different metric aspects such as recursive construction, hamiltonicity, degree sequence and other enumeration have been investigated [1,2,9,11,12]. For an extensive survey of Fibonacci cubes see [10]. Some other graphs inspired by Fibonacci cubes which can serve as interconnection topologies are Lucas cubes [2,20], graphs that can be described as a generalization of Fibonacci cubes where k consecutive ones are forbidden proposed in [5] and Fibonacci (p, r)-cubes introduced in [3]. Another generalization of Fibonacci cubes was introduced in [7] as follows. Suppose f is an arbitrary binary string and h ≥ 1. The generalized Fibonacci cube Qh (f ) is the graph obtained from Qh by removing all vertices that contain (the forbidden string) f as a substring [7,8]. In this notation the Fibonacci cube Γh is Qh (11). The question for which strings f , a generalized Fibonacci cube Qh (f ) is an isometric subgraph of Qh is raised and answered in [7] for some small lengths of f . For a given large length of f , the proportion of f such that Qh (f ) is an isometric subgraph of Qh is investigated in [15], see also [21,22]. E-mail address: [email protected]. https://doi.org/10.1016/j.disc.2019.01.008 0012-365X/© 2019 Elsevier B.V. All rights reserved.

1140

A. Vesel / Discrete Mathematics 342 (2019) 1139–1146

Fig. 1. Q5c (111) (left) and Q5c (101) (right).

Since Fibonacci cubes are median graphs, it is natural to raise a question of determining which graphs that are inspired by Fibonacci cubes are also median. In particular, this problem is solved for Fibonacci (p, r)-cubes in [19]. In this paper, for a given induced subgraph G of the h-cube Qh its complementary graph in Qh is considered, i.e. we study the induced subgraph of Qh whose set of vertices together with V (G) partition the vertices of Qh . The proposed approach is applied for generalized Fibonacci cubes. The paper is organized as follows. In the next section we introduce cube-complements of generalized Fibonacci cubes; some other basic definitions, concepts and results needed in the sequel are also given. In Section 3, some necessary and sufficient conditions that allow the cube-complement of a generalized Fibonacci cube to be connected are studied. Section 4 completely solves the question whether the cube-complement of a generalized Fibonacci cube is an isometric subgraph of a hypercube as well as the question whether a graph of this class is a median graph. A relation of the proposed concept to the class of daisy cubes is also shown. The paper is concluded with some suggestions for further investigation. 2. Preliminaries If x and y are binary strings of equal length, then the Hamming distance H(x, y) between x and y is the number of positions in which x and y differ. We will use [n] for the set {1, 2, . . . , n} and [k, n] for the set {k, k + 1, . . . , n} in this paper. If s is a string, then |s| denotes the length of s. If |s| = n, then we write s = s1 s2 . . . sn . A substring of a string s is the string si,i+t −1 = si si+1 . . . si+t −1 , where t ∈ [|s|] and i ∈ [|s| − t + 1]. A prefix (resp. suffix) of a string s = s1 s2 , . . . , sn is for all i ∈ [n] a substring s1,i (resp. sn−i+1,n ). The hypercube of order h or simply h-cube, denoted by Qh , is the graph G = (V , E) where the vertex set V (G) is the set of all binary strings u = u1 u2 . . . uh , ui ∈ {0, 1} for all i ∈ [h], and two vertices x, y ∈ V (G) are adjacent in Qh if and only if the Hamming distance between x and y is equal to one. Let X ⊆ V (Qh ) and G the subgraph of Qh induced by the vertices of X . The subgraph of Qh induced by the vertices of V (Qh ) \ X is called the cube-complement of G in Qh and denoted by Gc . In particular, Qhc (f ) is the subgraph of Qh induced by the set of all vertices that contain f as a substring. Since the graphs Qhc (f ) are trivial if h ≤ |f |, we will assume that h > |f | in this paper. As an example, see Q5c (111) and Q5c (101) in the left and right hand sides of Fig. 1, respectively. Note that Q5c (101) is not connected. For a binary string b we denote its (binary) complement with b. For a binary string b = b1 b2 . . . bn let bR = bn bn−1 . . . b1 denote its reverse. Let G be an induced subgraph of Qh . The binary complement of G is the subgraph of Qh induced by the set {v : v ∈ V (G)}, i.e. the subgraph of Qh induced by the set of binary complements of the vertices of V (G). Proposition 1. If G is an induced subgraph of the h-cube, then the binary complement of G is isomorphic to G. Proof. The assignment v ↦ → v is an isomorphism between V (G) and the set {v : v ∈ V (G)}.



Proposition 2. Let f be a binary string and d ≥ 1 an integer. Then Qdc (f ) is isomorphic to Qdc (f ) . Proof. Let v ∈ V (Qd ). Clearly, f is a substring of v if and only if f is a substring of v . The assignment v ↦ → v is therefore an isomorphism between V (Qdc (f )) and the set {v : v ∈ V (Qdc (f ))}. □

A. Vesel / Discrete Mathematics 342 (2019) 1139–1146

1141

Fig. 2. Proof of Proposition 6.

Proposition 3. Let f be a binary string and d ≥ 1 an integer. Then Qdc (f ) is isomorphic to Qdc (f R ) . Proof. Let v ∈ V (Qd ). We can see that f is a substring of v if and only if f R is a substring of v R . The assignment v ↦ → v R is therefore an isomorphism between V (Qdc (f )) and the set {v R : v ∈ V (Qdc (f ))}. □ If G is a connected graph, then the distance dG (u, v ) (or simply d(u, v )) between vertices u and v is the length of a shortest path between u and v in G. The set of vertices lying on all shortest u, v -paths is called the interval between u and v and denoted by IG (u, v ) [17]. 3. Connectivity If f is a binary string, h an integer and i ∈ [h − |f | + 1], let Sih (f ) denote the set of vertices of Qh that admits f at the ith coordinate, i.e. Sih (f ) = {u ∈ V (Qh ) : ui ui+1 . . . ui+|f |−1 = f }. Since the vertices of Sih (f ) induce an (h − |f |)-cube in Qhc (f ), it is easy to confirm the following proposition. Proposition 4. Let f be a binary string, h a positive integer, i, j ∈ [h − |f | + 1], u ∈ Sih (f ) and v ∈ Sjh (f ). If Qhc (f ) admits an u, v -path, then Qhc (f ) admits an x, y-path for every pair of vertices x ∈ Sih (f ) and y ∈ Sjh (f ). Proposition 5. Let f be a binary string. If h ≥ 3|f | − 3, then Qhc (f ) is connected. Proof. Let s ∈ [h − |f | + 1] \ {1} and v ∈ Ssh (f ). By Proposition 4, we have to show that Qhc (f ) admits an u, v -path for some u ∈ S1h (f ). If s ≥ |f |, let for all k ∈ [|f |] the vertex v k be formed from v by replacing v1 , . . . , vk by f1 , . . . , fk , respectively. Note that k v and v k+1 can be equal. Obviously, v k ∈ Ssh (f ) for all k ∈ [|f | − 1] and v |f | ∈ S1h (f ). It follows that the vertices of the set {v, v 1 , . . . , v |f | } induce a v |f | , v -path which belongs to Qhc (f ). Thus, the proof is settled for all s ≥ |f |. If s < |f |, let for all k ∈ [|f |] the vertex v k be formed from v by replacing vh , vh−1 , . . . , vh−k+1 by f|f | , f|f |−1 , . . . , f|f |−k+1 , respectively. Since h ≥ 3|f | − 3, we have v k ∈ Ssh (f ) for all k ∈ [|f | − 1] and v |f | ∈ Shh−|f |+1 (f ). Thus, the vertices of the path induced by the set {v 1 , . . . , v |f | } belong to Qhc (f ). In other words, we confirmed the existence of a v |f | , v -path in Qhc (f ). Since we proved above that for some u ∈ S1h (f ) there exists an u, v |f | -path in Qhc (f ), we also confirmed the existence of a u, v -path in Qhc (f ). The assertion completes the proof. □ If x is a binary string, let r(x) = max{k : k < |x|, x1,k = xh−k+1,h = χ k , χ ∈ {0, 1}}, i.e. r(x) denotes the length of the longest prefix p of x such that p is also a suffix of x and either p = 1r(x) or p = 0r(x) . Proposition 6. Let f be a binary string and r(f ) ≥ 1. If h ≥ 3|f | − 2r(f ) − 1, then Qhc (f ) is connected. Proof. Let f admit the prefix and suffix of the form χ r(f ) and let u ∈ S1h (f ). By Proposition 4, we have to show that for any s ∈ [h − |f | + 1] \ {1} the graph Qhc (f ) admits an u, v -path for some v ∈ Ssh (f ). Let s ≥ |f |− r(f ) + 1. If s ≥ |f |, then we can construct a u, v -path analogous as in the first part of the proof of Proposition 5. If |f | − r(f ) + 1 ≤ s < |f |, let for any k ∈ [|f |] the vertex uk be formed from u by replacing us us+1 . . . us+k−1 by f1 f2 . . . fk , respectively. Since |f | − r(f ) + 1 ≤ s < |f |, we have us = us+1 = · · · = u|f | = χ r(f ) . It follows that uk ∈ S1h (f ). Moreover, since u|f | ∈ Ssh (f ) (see the upper part of Fig. 2), the vertices of the set {u, u1 , . . . , u,|f | } induce a u, u|f | -path which belongs to Qhc (f ). Thus, the proposition is settled for all s ≥ |f | − r(f ) + 1. Let 2 ≤ s ≤ |f | − r(f ), w ∈ Shh−|f |+1 (f ) and let for any k ∈ [|f | the vertex w k be formed from w by replacing ws , . . . , ws+k−1 by f1 , . . . , fk , respectively. Since h ≥ 3|f | − 2r(f ) − 1 and wh−|f |+i = fi = f|f |−i+1 = χ for all i ∈ [r(f )], we have w |f | ∈ Ssh (f ) and w k ∈ Shh−|f |+1 (f ) for all k ∈ [|f | − 1] (see the lower part of Fig. 2, where y := w |f | ). It follows that the vertices of the set {w, w1 , . . . , w |f | } induce a w, w|f | -path which belongs to Qhc (f ). Since we proved above that for some u ∈ S1h (f ) there exists a u, w -path in Qhc (f ), we also confirmed the existence of a u, w |f | -path in Qhc (f ). □

1142

A. Vesel / Discrete Mathematics 342 (2019) 1139–1146

Fig. 3. Proof of Proposition 7.

Remark. If r(f ) = 1, then the bound on h given in Proposition 6 is the same as the general bound given in Proposition 5. In order to see that this bound is tight, consider as an example f = 101 and h = 5. We can see in Fig. 1 that the vertices of S25 (101) compose a connected component in Q5c (101). If x is a binary string, let π (x) = max{k : k < |x|, H(x1,k , xh−k+1,h ) = 1}, i.e. π (x) denotes the length of the longest proper prefix of x which is at Hamming distance one from a suffix of x of the same length. Obviously, 1 ≤ π (x) ≤ |x| − 1. For example, π (101100) = 3 and π (11101000) = 1. Proposition 7. Let f be a binary string. If π (f ) = 1 and 2|f | − 2 ≤ h ≤ 3|f | − 4, then Qhc (f ) is not connected. Proof. Let u ∈ S|hf |−1 (f ). Suppose that for some s ∈ [h − |f | + 1] \ {|f | − 1} there exists v ∈ Ssh (f ) adjacent to u. If s < |f | − 1, then we have u|f |−1,|f |+s−1 = f1,s+1 and v|f |−1,|f |+s−1 = f|f |−s,|f | (see Fig. 3). In other words, u|f |−1,|f |+s−1 (resp. v|f |−1,|f |+s−1 ) is equal to the prefix (resp. the suffix) of f of length s + 1 ≥ 2. Since π (f ) = 1, substrings u|f |−1,|f |+s−1 and v|f |−1,|f |+s−1 differ in at least two coordinates. It follows that u and v cannot be adjacent and we obtain a contradiction. Since the proof for s > |f | − 1 is analogous, we showed that the set S|hf |−1 (f ) induces a connected component of G. □ Proposition 8. Let d, t and h be positive integers. If f = 1d 0t , then Qhc (f ) is connected. Proof. Let s ∈ [h − |f | + 1] \ {1} and v ∈ Ssh (f ). By Proposition 4, we have to show that Qhc (f ) admits an u, v -path for some u ∈ S1h (f ). We make the sequence of vertices v 0 , v 1 , . . . , v 2s−2 , such that v 0 := v and for all i ∈ [s − 1] the vertex v i is obtained from v i−1 by setting vii to one, while for all i ∈ [s, 2s − 2] the vertex v i is obtained from v i−1 by setting vdi +2s−i−1 to zero. Note that for any i ∈ [s − 1] the vertex v i admits f that starts at the position s while for any i ∈ [s, 2s − 2] the vertex v i admits f that starts at the position 2s − i − 1. In particular, v 2s−2 ∈ S1h (f ). Since the vertices of the set {v 0 , v 1 , . . . , v 2s−2 } induce a v 2s−2 , v -path which belongs to Qhc (f ), the proof is complete. □ Proposition 9. Let d ≥ t ≥ 1 be integers and f = 1d 01t . Then Qhc (f ) is connected if and only if h ≥ d + 3t + 2. Proof. Assume that h ≥ d + 3t + 2 and let v ∈ Ssh (f ) for any s ∈ [h − |f | + 1] \ {1}. By Proposition 4, we have to show that Qhc (f ) admits an u, v -path for some u ∈ S1h (f ). If s ≥ t + 2, let for all k ∈ [|f |] the vertex v k be formed from v by replacing v1 , v2 , . . . , vk by f1 , f2 , . . . , fk , respectively. Clearly, v |f | ∈ S1h (f ). We have to show that {v, v 1 , . . . , v |f | } induces a v, v |f | -path which belongs to Qhc (f ). If s ≥ d + t + 1, we have v k ∈ Ssh (f ) for all k ∈ [|f |] and the assertion follows. If t + 2 ≤ s ≤ d + t, then for all k ∈ [d], the vertex v k +i+1 +i+1 belongs to Ssh (f ) since vkk = vi = 1 for all i ∈ [s, s + d − 1]. Note that vdd+ = 0 and vdd+ 1 i+1 = 1, for all i ∈ [t ]. Thus, for all k h k k ∈ [d + 1, s − 1], the vertex v belongs to Ss (f ), while for all k ∈ [s, |f |], the vertex v belongs to S1h (f ) and the proposition is settled for s ≥ t + 2. If 2 ≤ s ≤ t + 1, let w ∈ Shh−|f |+1 (f ). Let w k be formed from w by replacing ws , ws+1 , . . . , ws+k−1 by f1 , f2 , . . . , fk , respectively, for all k ∈ [|f |] . We first show that the vertices of the set {w, w 1 , . . . , w |f | } induce a w, w |f | -path which belongs to Qhc (f ). Clearly, w |f | ∈ Ssh (f ). Moreover, if h ≥ s + 2d + 2t + 1, then w k ∈ Shh−|f |+1 (f ) and the existence of a w, w |f | -path in Qhc (f ) is confirmed. Let then d + 3t + 2 ≤ h ≤ s + 2d + 2t. Since h − |f | > s and fi = wh−|f |+i = 1, for all i ∈ [d], we have w k ∈ Shh−|f |+1 (f ), for all k ∈ [d]. Note also that s + d + t < h − t, i.e. the index of bit 0 in the copy of f that starts at the position h − |f | + 1 in w is bigger then the index of the last bit of the copy of f in w |f | . Moreover, since ws+k = 1, for all k ∈ [d + 2, |f |], we have w k ∈ Ssh (f ), for all k ∈ [d + 1, |f |]. It follows that the vertices of the set {w, w 1 , . . . , w |f | } induce a w, w |f | -path which belongs to Qhc (f ). Since we proved above that for some u ∈ S1h (f ) there exists a u, w -path in Qhc (f ), we also confirmed the existence of a u, w |f | -path in Qhc (f ). Assume now that h ≤ d + 3t + 1. If h < d + 2t + 1, let u ∈ S1h (f ). Suppose that for some s ∈ [2, t ] there exists v ∈ Ssh (f ) adjacent to u. Since ut +1 = 0, vt +1 = 1, us+t = 1 and vs+t = 0, vertices u and v differ in at least two positions and we obtain a contradiction. If h ≥ d + 2t + 1, let u ∈ Sth+1 (f ). Note that ut +d+1 = 0. Suppose that for some s ̸ = t + 1 there exists v ∈ Ssh (f ) adjacent to u. We can see that vt +d+1 = 1, since otherwise neither v1,t +d nor vt +d+2,h can admit f . Since s ∈ [h − |f | + 1] \ {t + 1} =

A. Vesel / Discrete Mathematics 342 (2019) 1139–1146

1143

[h − d − t ] \ {t + 1}, we have vi = 0 for some i ∈ C = [d + 1, d + t ] ∪ [d + t + 2, h − t ]. Since h − t ≤ d + 2t + 1, we have ui = 1 for all i ∈ C . It follows that vertices u and v differ in at least two positions and we obtain a contradiction. □ Propositions 5–9 together with Propositions 2 and 3 yield the following theorem. Theorem 1. Let f be a binary string and d, t positive integers. A. Qhc (f ) is connected if f ∈ {1d , 0d , 1d 0t , 0d 1t } or f ∈ {1d 01t , 0d 10t } and h ≥ max{d, t } + 3 min{d, t } + 2 or h ≥ 3|f | − 3 or h ≥ 3|f | − 2r(f ) − 1. B. Qhc (f ) is not connected if f ∈ {1d 01t , 0d 10t } and h ≤ max{d, t } + 3 min{d, t } + 1 or π (f ) = 1 and 2|f | − 2 ≤ h ≤ 3|f | − 4. 4. Partial cubes, daisy cubes and median graphs 4.1. Daisy cubes Let ≤ be a partial order on V (Qh ) defined with u1 . . . uh ≤ v1 . . . vh if ui ≤ vi holds for all i ∈ [h]. For X ⊆ V (Qh ) the graph induced by the set {v ∈ V (Qh ) : v ≤ x for some x ∈ X } is a daisy cube generated by X and denoted by Qh (X ). Let G = (V , E) be a graph. An injective function α : V (G) → V (Qh ) such that for every u, v ∈ V (G) we have dQh (α (u), α (v )) = 1 if and only if u, v ∈ E(G) is an embedding of G into Qh . By a slight abuse of definition, we will say that a graph G is a daisy cube if it is isomorphic to a daisy cube generated by some X ⊆ V (Qh ). More formally, G is a daisy cube if there exists an embedding α of G into Qh such that the image of α equals X ⊆ V (Qh ) and Qh (X ) is a daisy cube generated by X . In the following proposition, we use the concept of the cube-complement of a hypercube in order to characterize daisy cubes. Proposition 10. Let G be an induced subgraph of Qh . Then G is a daisy cube if and only if Qh does not admit a pair of vertices v ∈ V (G), u ∈ V (Gc ) such that u ≤ v . Proof. If G is a daisy cube, then we have Qh (V (G)) = G and the assertion follows. Suppose now that Qh does not admit a pair of vertices v ∈ V (G), u ∈ V (Gc ) such that u ≤ v . Let v ∈ V (G). By the assumption, for every z ∈ V (Qh ) with z ≤ v we have z ∈ V (G). Since this holds for every v ∈ V (G), the proof is completed. □ We will need the following obvious proposition. Proposition 11. Let x, y ∈ V (Qh ). If x ≤ y, then y ≤ x. Theorem 2. Let G be an induced subgraph of Qh . If G is a daisy cube, then the cube-complement of G in Qh is a daisy cube. Proof. Let H be the cube-complement of a daisy cube G. Let also H and G denote the binary complement of H and G, respectively. Note that G is the cube-complement of H in Qh . We first show that H is a daisy cube. Assume to the contrary that Qh admits a pair x ∈ V (H), y ∈ V (G) such that y ≤ x. By Proposition 11, we then have x ≤ y. Since y ∈ V (G), x ∈ V (H) and G is a daisy cube, Proposition 10 leads to a contradiction. It follows that the binary complement of H is a daisy cube. Finally, Proposition 1 yields the assertion. □ 4.2. Partial cubes A subgraph H of a graph G is isometric if dH (u, v ) = dG (u, v ) for any pair of vertices u and v from H. Isometric subgraphs of hypercubes are called partial cubes. As mentioned in Section 1, all generalized Fibonacci cubes are not partial cube, however, Qh (1k ) isometrically embeds into Qh as shown in [7]. We will need the following proposition. Proposition 12 ([13]). Daisy cubes are partial cubes. Proposition 13. Let h and d be positive integers. If f = 1d , then Qhc (f ) is a partial cube. Proof. If X = {u1 . . . uh : ui · ui+1 · . . . · ui+d−1 = 0, i ∈ [h − d + 1]}, then for the corresponding daisy-cube Qh (X ) we have Qh (X ) = Qh (1d ). Since Qh (1d ) is a daisy cube and Qhc (1d ) its cube-complement, Theorem 2 and Proposition 12 yield the assertion. □

1144

A. Vesel / Discrete Mathematics 342 (2019) 1139–1146

If x ∈ V (Qhc (f )), let f (i) (x) denote a copy of f that appears as a factor in x at coordinates [i, i + |f | − 1]. Also, let Fx denote the set of indices such that for any i ∈ Fx there exists f (i) (x). If x, y ∈ V (Qhc (f )), let µ(x, y) = mini∈Fx ,j∈Fy {H(xis ,ie , yis ,ie ); [is , ie ] = [i, i + |f | − 1] ∩ [j, j + |f | − 1]}, i.e. µ(x, y) is the minimum number of indices in which a copy of f that appears as a factor in x and y, respectively, differs. If x, y ∈ V (Qhc (f )), let S(x, y) denote the set of indices in which x and y differ. Proposition 14. Let u, v ∈ V (Qhc (f )). If µ(u, v ) = 0, then Qhc (f ) admits an isometric u, v -path. v

u

Proof. For u, v ∈ V (Qhc (f )), let f (i ) (u) (resp. f (i ) (v )) denote the copy of f in u (resp. v ) that defines µ(u, v ). Suppose w.l.o.g. that iu ≥ iv . Let i1 , . . . , is be an ordering of indices of S(u, v ) such that i1 < i2 < · · · < is−1 < is . Let also for any k ∈ [s] the vertex uk be formed from u by replacing ui1 , . . . , uik by vi1 , . . . , vik , respectively. Note that for ik < iu we have uk ∈ V (Qhc (f )), since uk admits a copy of f that starts at the position iu . Moreover, if ik > iu , then ik ≥ iv + |f | since µ(u, v ) = 0. It follows that for ik > iu the vertex uk admits a copy of f that starts at the position iv , i.e. uk ∈ V (Qhc (f )). Hence, the sequence u, u1 , . . . , us = v is an isometric u, v -path in Qhc (f ). □ Proposition 15. Let d ≥ t ≥ 1 be integers. If f = 1d 0t , then Qhc (f ) is a partial cube if and only if h ≤ 2t + d or t = 1. u

v

Proof. For any u, v ∈ V (Qhc (f )), let f (i ) (u) (resp. f (i ) (v )) denote a copy of f in u (resp. v ), that defines µ(u, v ). We first prove that for any h ≤ 2t + d or t = 1, the graph Qhc (f ) admits an isometric u, v -path. Since the proof for iu = iv is trivial, suppose u v w.l.o.g. that iu > iv . Let also |S(u, v )| = s. Note that for f = 1d 0t , the set of indices in which f (i ) (u) and f (i ) (v ) differ is an u v integer interval, say [ib , ie ]. Moreover, since i > i , we have uj = 1 and vj = 0 for all j ∈ [ib , ie ]. If h ≤ 2t + d, let i1 , . . . , iℓ , iℓ+1 , . . . , ip , ip+1 , . . . , is be an ordering of indices of S(u, v ) such that {iℓ+1 , . . . , ip } = [ib , ie ] and {i1 , . . . , iℓ } = S(u, v ) \ [ib , h]. Let also iℓ+1 > iℓ+2 > · · · > ip−1 > ip , e.g. iℓ+1 = ie and ip = ib . Since h ≤ 2t + d, we have ib = iv + d and ie = iu + d − 1 For all k ∈ [s], let uk be formed from u by replacing ui1 , . . . , uik by vi1 , . . . , vik , respectively. Since uk admits a copy of f that starts at iu for any k ≤ ℓ, the path u, u1 , . . . , uℓ is isometric in Qhc (f ). For all j ∈ [iv , iu + d − 1] we have uℓj = 1 and for every j ∈ [iu + d, iu + d + t − 1] we have uℓj = 0. Moreover, because of the ordering of the indices of the sequence iℓ+1 , . . . , ip , for all k ∈ {ℓ + 1, . . . , p}, every uk admits a copy of f that starts at the position iu − k + ℓ. It follows that the path uℓ+1 , . . . , up is also isometric in Qhc (f ). Finally, note that up admits a copy of f that starts at the position iv and that for every index j ∈ {ip+1 , . . . , is } we have j > iv + d + t. Hence, up+1 , . . . , us induce an isometric path in Qhc (f ). Since u and v differ in exactly s coordinates, u, u1 , . . . , us is an isometric u, v -path in Qhc (f ) and this case is settled. If t = 1, then |µ(u, v )| ≤ 1. By Proposition 14, we have to consider only pairs of vertices u, v ∈ V (Qhc (f )) with µ(u, v ) > 0. Let then µ(u, v ) = 1 and let i1 , . . . , ip−1 , ip , ip+1 , . . . , is be an ordering of indices of S(u, v ) such that ip denotes the index in u v which f (i ) (u) and f (i ) (v ) differ and {i1 , . . . , ip−1 } = S(u, v ) \ [iu , h]. Then for all k ∈ [s], let uk be formed from u by replacing ui1 , . . . , uik by vi1 , . . . , vik , respectively. Since uk for any k ≤ p − 1 admits a copy of f that starts at the position iu , the path p−1 u, u1 , . . . , up−1 is isometric in Qhc (f ). Note that uj = 1 for all j ∈ [iv , iu + d − 1]. Note also that ip = iv + d. Since upiv +d = 0, the vertex up admits f that starts at the position iv . Moreover, this holds for every uk where k ∈ {p + 1, . . . , s}. Since u and v differ in exactly s coordinates, it follows that the sequence u, u1 , . . . , us = v is an isometric u, v -path in Qhc (f ). For the reverse, assume t ≥ 2 and h > 2t + d. Let u = 1h−t 0t and v = 1h−2t −1 0t 10t . Obviously, u, v ∈ V (Qhc (f )). Since it is straightforward to see that NQ c (f ) (u) ∩ IQh (u, v ) = ∅, the proof is complete. □ h

Proposition 16. Let f be a string. If f contains a substring 10d 1, d ≥ 1, then Qhc (f ) is not a partial cube. Proof. Let k := h − |f | − 1. We distinguish two cases. (i) f = α1 . . . αp 10d 11t , p, t ≥ 0. If p = 0, let x = 1k+1 10d 11t and y = 1k 10d 11t +1 . Obviously, x, y ∈ V (Qhc (f )). Note also that x and y differ in exactly two positions: k + 2 and k + d + 2. Since it is not difficult to conclude that IQh (x, y) ∩ NQh (x) does not contain vertices from Qhc (f ), this case is settled. If p > 0, let x = 1k α1 α1 α2 . . . αp 10d 11t and y = 1k α1 α2 . . . αp 10d 11t +1 . Obviously, x, y ∈ V (Qhc (f )). Let n0 denote the number of zeros in f . Note that n0 also equals the number of zeros in y. We can see that S(x, y) ⊆ {k + 2, k + 3, . . . , k + p + 2} ∪ {k + p + d + 2}. Suppose that there exists z ∈ NQ c (f ) (y) ∩ IQh (x, y), i.e. z can be obtained from y by changing the bit at h sj -th position, for some sj ∈ S(x, y). Since z ∈ V (Qhc (f )), let z admits a copy of f that starts at the position iz . If sj = k + p + d + 2, then a suffix of z is of the form 10d+1 1t . It follows that iz ≤ k + p − |f |. But since ziz ,iz +|f |−1 cannot admit n0 zeros, z ̸ ∈ V (Qhc (f )) and we obtain a contradiction. If sj ∈ {k + 2, k + 3, . . . , k + p + 2}, we can see that z cannot admit f that starts at the position iz ≥ sj since |zk+2,h | < |f |. Moreover, since 10d 11t +1 is a suffix of z and iz ̸ = k + 1, we have iz ≤ k + p − |f |. We can see that ziz ,iz +|f |−1 cannot admit n0 zeros and we obtain a contradiction. (ii) f = α1 . . . αp 10d 10t , t ≥ 0. If p = 0, then let x = 0k+1 10d 10t and y = 0k 10d 10t +1 . It is not difficult to conclude that IQh (x, y) ∩ NQh (x) does not contain vertices from Qhc (f ).

A. Vesel / Discrete Mathematics 342 (2019) 1139–1146

1145

If p > 0, then let x = 0k α1 α1 . . . αp 10d 10t and y = 1k α1 . . . αp 10d 10t +1 . Let n1 denote the number of ones in f . Note that n1 also equals the number of ones in y. We can see that S(x, y) ⊆ {k + 2, k + 3, . . . , k + p + 2} ∪ {k + p + d + 2}. Suppose that there exists z ∈ NQ c (f ) (y) ∩ IQh (x, y), i.e. z can be obtained from y by changing y at exactly one position, say sj ∈ S(x, y). h Since we can show analogously as in case (i) that z cannot admit f as a substring, the proof is complete. □ Propositions 13, 15 and 16 together with Propositions 2 and 3 yield the following theorem. Theorem 3. Let f be a binary string and d, t positive integers. The cube-complement Qhc (f ) is a partial cube if and only if f ∈ {1d , 0d , 1d 0, 10d , 0d 1, 01d } or f ∈ {1d 0t , 0d 1t } and h ≤ 2 min{t , d} + max{d, t }. 4.3. Median graphs A median of vertices u, v , w of a graph G is a vertex z that simultaneously lies on a shortest u, v -path, on a shortest u, w -path and on a shortest v, w -path. A graph G is a median graph if every triple of its vertices has a unique median. Since median graphs are partial cubes [18], every median graph G admits an isometric embedding into Qh . For a median graph G, let u, v, z ∈ V (G) be such that u = u1 . . . uh , v = v1 . . . vh and z = z1 . . . zh , ui , vi , zi ∈ {0, 1}. The median w = w1 . . . wh is obtained by the majority rule in every coordinate, in other words, wi is equal to the element that appears at least twice among {ui , vi , zi } (see e.g. [18]). A subgraph H of a graph G is median closed if, for any triple of vertices of H, their median belongs also to H. Proposition 17 ([16]). A graph is a median graph if and only if it is a median-closed induced subgraph of a hypercube. Recall that Qh (1d ) is a median graph only for d = 2 (see, e.g. [7]). Proposition 18. If d ≥ 1, then Qhc (1d ) is median if and only if h ≤ 2d. Proof. Suppose first that h ≤ 2d. Let u, v, z ∈ V (Qhc (1d )). We will show that u, v, z possess a unique median in Qhc (1d ). Let w be the median of u, v, z in Qh , i.e. w is a vertex of V (Qh ) obtained by majority rule with respect to {u, v, z }. Let iu , iv and iz be indices where 1d starts in u, v and z, respectively. We may assume w.l.o.g. that 1 ≤ iu ≤ iv ≤ iz ≤ d + 1. We will show that for every j ∈ {iv , iv + 1, . . . , iv + d − 1} we have uj = 1 or zj = 1 (note that vj = 1). Suppose to the contrary that there exists j ∈ {iv , iv + 1, . . . , iv + d − 1} such that uj = 0 and zj = 0. Clearly, we have then iu < iv < iz . It follows that j ≥ d + 1. Since iz > iv , we must have iz > d + 1 and we obtain a contradiction. For any j ∈ {iv , iv + 1, . . . , iv + d − 1} we have wj = 1 and thus w ∈ V (Qhc (1d )). Note that by Proposition 13, the graph Qhc (1d ) is a partial cube. Thus, w is median in Qhc (1d ) and Proposition 17 yields the assertion. For the reverse assume that h > 2d. Let u = 1d 0h−d , v = 01d 0h−d−1 and z = 0h−d 1d . If w is obtained by majority rule from {v, u, z }, then w = 01d−1 0h−d ̸ ∈ V (Qhc (1d )) and we obtained a contradiction. □ Proposition 19. Let d ≥ t ≥ 1 be integers. The graph Qhc (1d 0t ) is median if and only if h ≤ d + 2t. Proof. Let h ≤ d + 2t and let u, v, z ∈ V (Qhc (1d 0t )). Let w be the median of u, v, z in Qh , i.e. w is a vertex of V (Qh ) obtained by majority rule with respect to {u, v, z }. Let iu , iv and iz be indices where 1d 0t starts in u, v and z, respectively. We may assume w.l.o.g. that 1 ≤ iu ≤ iv ≤ iz ≤ t + 1. We have to show that for every j ∈ {iv , iv + 1, . . . , iv + d − 1} (resp. k ∈ {iv + d, iv + d + 1, . . . , iv + d + t − 1}) we have uj = 1 or zj = 1 (resp. uk = 0 or zk = 0). Note that vj = 1 and vk = 0. Suppose to the contrary that there exists j ∈ {iv , iv + 1, . . . , iv + d − 1} such that uj = 0 and zj = 0. Clearly, we have then iu < iv < iz . It follows that j ≥ t + 1. Since iz > iv , we have iz > t + 1 and we obtain a contradiction. The proof that for any k ∈ {iv + d, iv + d + 1, . . . , iv + d + t − 1} we have uk = 0 or zk = 0 is analogous. Since we showed that w ∈ V (Qhc (1d 0t )) and since by Proposition 15 the graph Qhc (1d 0t ) is a partial cube, w is median in c Qh (1d 0t ) and Proposition 17 yields the assertion. For the reverse assume that h > d + 2t. Let u = 1d 0t 1h−d−t , v = 01d 0t 1h−d−t −1 and z = 1h−d−t 1d 0t . If w is obtained by majority rule from {v, u, z }, then w = 1d+1 0t −1 1h−d−t ̸ ∈ V (Qhc (1d 0t )) and we obtained a contradiction. □ Since median graphs are partial cubes, Propositions 18 and 19 together with Theorem 3 and Propositions 2 and 3 yield the following theorem. Theorem 4. Let f be a binary string and d, t positive integers. Qhc (f ) is a median graph if and only if f ∈ {1d , 0d } and h ≤ 2d or f ∈ {1d 0t , 0d 1t } and h ≤ max{d, t } + 2 min{t , d}.

1146

A. Vesel / Discrete Mathematics 342 (2019) 1139–1146

5. Conclusion The following problem and questions could be of interest for further investigations.

• • • •

Is it possible for a given f to determine the least h with respect to π (f ) and |f | such that Qhc (f ) is connected? Determine all strings f such that Qhc (f ) is connected. For which string f a recognition algorithm for Qhc (f ) could be useful for the recognition of Qh (f )? Are there any other interesting classes of graphs which can be characterized as cube-complements?

Acknowledgments This work was supported by the Slovenian Research Agency under the grants P1-0297, J1-9109 and J1-7110. I am indebted to anonymous reviewers for their careful reading and helpful suggestions which improve and clarify the paper. References [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] [18] [19] [20] [21] [22] [23]

A. Castro, M. Mollard, The eccentricity sequences of Fibonacci and Lucas cubes, Discrete Math. 312 (2012) 1025–1037. E. Dedó, D. Torri, N. Zagaglia Salvi, The observability of the Fibonacciand the Lucas cubes, Discrete Math. 255 (2002) 55–63. K. Egiazarian, J. Astola, On generalized Fibonacci cubes and unitary transforms, Appl. Algebra Eng. Commun. Comput. 8 (1997) 371–377. W.J. Hsu, Fibonacci cubes - a new interconnection topology, IEEE Trans. Parallel Distrib. Syst. 4 (1993) 3–12. W.J. Hsu, M.J. Chung, Generalized Fibonacci cubes, in: IEEE Proceedings of the International Conference on Parallel Processing, 1993, pp. 299–302. W.J. Hsu, J. Liu, Distributed algorithms for shortest-path, deadlock-free routing and broadcasting in a class of interconnection topologies, in: Parallel Processing Symposium, 1992, pp. 589–596. A. Ilić, S. Klavžar, Y. Rho, Generalized Fibonacci cubes, Discrete Math. 312 (2012) 2–11. A. Ilić, S. Klavžar, Y. Rho, The index of a binary word, Theoret. Comput. Sci. 452 (2012) 100–106. S. Klavžar, On median nature and enumerative properties of Fibonacci-likes cubes, Discrete Math. 299 (2005) 145–153. S. Klavžar, Structure of Fibonacci cubes: a survey, J. Comb. Optim. 25 (2013) 505–522. S. Klavžar, M. Mollard, Wiener index and hosoya polynomial of Fibonacci and Lucas cubes, MATCH Commun. Math. Comput. Chem. 68 (2012) 311–324. S. Klavžar, M. Mollard, Asymptotic properties of Fibonacci cubes and Lucas cubes, Ann. Comb. 18 (2014) 447–457. S. Klavžar, M. Mollard, Daisy cubes distance cube polynomial, European J. Combin. (2019) http://dx.doi.org/10.1016/j.ejc.2018.02.019, in press. S. Klavžar, M. Mulder, Median graphs: characterizations, location theory and related structures, J. Combin. Math. Combin. Comput. 30 (1999) 103–127. S. Klavžar, S. Shpectorov, Asymptotic number of isometric generalized Fibonacci cubes, European J. Combin. 33 (2012) 220–226. H.M. Mulder, The structure of median graphs, Discrete Math. 24 (1978) 197–204. H.M. Mulder, The Interval Function of a Graph, Vol. 132, Mathematical Centre tracts, Amsterdam, 1980. H.M. Mulder, n-Cubes andmedian graphs, J. Graph Theory 4 (1980) 107–110. L. Ou, H. Zhang, Fibonacci (p, r)-cubes which are median graphs, Discrete Appl. Math. 161 (2013) 441–444. A. Taranenko, A new characterization and a recognition algorithm of Lucas cubes, Discrete Math. Theor. Comput. Sci. 15 (2013) 31–39. J. Wei, H. Zhang, Proofs of two conjectures on generalized Fibonacci cubes, European J. Combin. 33 (2012) 220–226. J. Wei, H. Zhang, Solution to a conjecture on words that are bad and 2-isometric, Theoret. Comput. Sci. 562 (2015) 243–251. P. Žigert Pleteršek, Resonance graphs of kinky benzenoid systems are daisy cubes, MATCH Commun. Math. Comput. Chem. 80 (2018) 207–214.