Abstract 1 Introduction 2 Basic notation and results 3 Isometric and Fibonacci Dimension of hypercubes avoiding words 4 Conclusions and Future Work References

A Family of Partial Cubes with Minimal Fibonacci Dimension

Marcella Anselmo ORCID Dipartimento di Informatica, Università di Salerno, Italy Giuseppa Castiglione ORCID Dipartimento di Matematica e Informatica, Università di Palermo, Italy Manuela Flores ORCID Dipartimento di Bioscienze e Territorio, Università del Molise, Campobasso, Italy Dora Giammarresi ORCID Dipartimento di Matematica, Università Roma “Tor Vergata”, Italy Maria Madonia ORCID Dipartimento di Matematica e Informatica, Università di Catania, Italy Sabrina Mantaci ORCID Dipartimento di Matematica e Informatica, Università di Palermo, Italy
Abstract

A partial cube G is a graph that admits an isometric embedding into some hypercube Qk. This implies that vertices of G can be labeled with binary words of length k in a way that the distance between two vertices in the graph corresponds to the Hamming distance between their labels. The minimum k for which this embedding is possible is called the isometric dimension of G, denoted idim(G). A Fibonacci cube Γk is the partial cube obtained by deleting all the vertices in Qk whose labels contain word 11 as factor. It turns out that any partial cube can be always isometrically embedded also in a Fibonacci cube Γd. The minimum d is called the Fibonacci dimension of G, denoted fdim(G). In general, idim(G)fdim(G)2idim(G)1. Despite there is a quadratic algorithm to compute the isometric dimension of a graph, the problem of checking, for a given G, whether idim(G)=fdim(G) is in general NP-complete. An important family of graphs for which this happens are the trees. We consider a kind of generalized Fibonacci cubes that were recently defined. They are the subgraphs of the hypercube Qk that include only vertices that avoid words in a given set S and are referred to as Qk(S). We prove some conditions on the words in S to obtain a family of partial cubes with minimal Fibonacci dimension equal to the isometric dimension.

Keywords and phrases:
Isometric sets of words, Hypercubes, Partial cubes, Isometric dimension, Generalized Fibonacci Cubes
Copyright and License:
[Uncaptioned image] © Marcella Anselmo, Giuseppa Castiglione, Manuela Flores, Dora Giammarresi, Maria Madonia, and Sabrina Mantaci; licensed under Creative Commons License CC-BY 4.0
2012 ACM Subject Classification:
Mathematics of computing Combinatorics on words
; Theory of computation Design and analysis of algorithms ; Theory of computation Formal languages and automata theory
Funding:
Partially Supported by INdAM-GNCS Project 2024, FARB Project ORSA240597 of University of Salerno, TEAMS Project and PNRR MUR Project PE0000013-FAIR University of Catania, FFR Fund University of Palermo, MUR Excellence Department Project MatMod@TOV, CUP E83C23000330006, Awarded to the Department of Mathematics, University of Rome Tor Vergata, “ACoMPA – Algorithmic and Combinatorial Methods for Pangenome Analysis” (CUP B73C24001050001) Funded by the NextGeneration EU Programme PNRR ECS00000017 Tuscany Health Ecosystem (Spoke 6).
Editors:
Paola Bonizzoni and Veli Mäkinen

1 Introduction

The hypercube Qk, also known as k-dimensional cube, extends the concept of a cube into higher dimensions. It is an undirected graph with 2k vertices corresponding to the binary strings of length n that describe the corresponding positions in the k-dimensional space. Then, the distances in this graph Qk can be simply calculated by taking the Hamming distance (i.e. the number of bits in which they differ) between the corresponding strings.

A given undirected graph is a partial cube if it can be isometrically embedded into a hypercube. Or, in other words, if it admits a vertex-labeling scheme such that each vertex is labeled by a binary string in such a way that the distance between any two vertices equals the Hamming distance. Partial cubes have been shown to model a large variety of systems, from computational geometry to order theory, interconnection networks, and chemistry [23].

Partial cubes were characterized in 1973 by Djokovic [20] in terms of structural properties; in particular, he proved that partial cubes are bipartite graphs satisfying special properties on some classes of vertices. Later, in 1984, Winkler [35] gave a similar condition based on the existence of a special equivalence relation among the edges of the graph.

Not surprisingly, partial cubes, in general, admit more efficient algorithms than arbitrary graphs for several important problems including shortest paths and graph drawings. A quadratic algorithm for recognizing partial cubes was given by Eppstein [23] and is based on the computation of the Winkler relation’s classes. If the graph is a partial cube, Eppstein’s algorithm outputs one of the minimal length labelings for the vertices. It turns out that such minimal length is in fact the number of the Winkler equivalence classes on the set of graph edges.

In 1993, Hsu [24] introduced the Fibonacci cube Γk as the subgraph of the hypercube Qk that includes only the vertices corresponding to Fibonacci strings (i.e. strings with no factor 11). As a consequence, the number of vertices of Γk is the (k+2)-th Fibonacci number, and the graph itself has a recursive definition. Besides the remarkable combinatorial properties, Γk is also a partial cube, and therefore the distance between any pair of vertices coincides with the Hamming distance of their labels.

The Fibonacci dimension of a graph G was introduced in 2011 by Cabello, Eppstein and Klavzar [14] as the smallest integer d (denoted fdim(G)) such that the graph admits an isometric embedding into the d-dimensional Fibonacci cube Γd. The authors take inspiration from the isometric dimension of a graph G defined as the smallest integer k (denoted idim(G)) such that G can be isometrically embedded in the hypercube Qk. The isometric dimension is finite if and only if G is a partial cube and, in this case, it effectively corresponds to the number of equivalence classes of the Winkler relation. In the same paper, they show that a graph G can be embedded in a Fibonacci Cube if and only if G is a partial cube and proved the relation

idim(G)fdim(G)2idim(G)1.

Besides those bounds, they study which partial cubes have extremal Fibonacci dimension. Partial cubes whose Fibonacci dimension is as large as possible are fully characterized.

The opposite case is difficult to deal with; more precisely it is proved that it is NP-complete to decide whether the isometric and Fibonacci dimensions of a given graph are the same. In addition, they show, however, that if T is a tree with n vertices, then T is a partial cube with idim(T)=fdim(T)=n1.

In this paper, we present a class of graphs (partial cubes) with minimal Fibonacci dimension, namely graphs for which idim and fdim coincide.

To introduce such graphs we do a step back to Fibonacci cubes. Inspired by those cubes in fact, in 2012, generalized Fibonacci cubes Qk(f) were introduced as the subgraphs of Qk that include only the vertices associated to binary words that do not contain the word f as a factor. It was proved that Qk(f) is an isometric subgraph of the hypercube Qk if and only if f satisfies some combinatorial conditions on the overlaps; in this case f is referred to as a good word, later called also an isometric word [26, 28, 29, 32, 33]. The notion of isometric word combines the distance notion with the property that a word does not appear as a factor in other words. Note that this property is important in combinatorics as well as in the investigation on similarities, or distances, on DNA sequences, where the avoided factor is referred to as an absent or forbidden word [13, 16, 17, 18, 22]. The research on isometric words is still very active [9, 12, 21, 30, 31]. Furthermore, some generalizations have been proposed by enlarging the alphabet, by considering different edit distances, and by moving to two-dimensional words as in [1, 2, 5, 6, 7, 8, 10, 11, 4, 15]. Moreover, very recently in [3] the intersection of several graphs Qk(fi) has been investigated in order to establish conditions for being isometric subgraphs of the hypercube Qk. Note that this corresponds to take a set of words S={f1,,fm} and consider the graph Qk(S) obtained from Qk by deleting all the vertices whose labels contain some fiS as factors.

In this paper we prove first that the isometric dimension of the partial cubes of the form Qk(f) is always k, for any isometric word f of length at least 2. Moving on to sets, by definition, isometric sets S generate isometric subgraphs (and, consequently, partial cubes) Qk(S) of Qk, but non-isometric sets act differently from non-isometric words. We present a set S that is not isometric by showing that the graph Q4(S) is not an isometric subgraph of Q4, but it is a partial cube since it can be embedded in Q5 and, more specifically. idim(Q4(f))=fdim(Q4(S))=5.
As the main result of the paper, we present a class of graphs of the form Qk(S) with S={11,f} and give sufficient conditions on f to get partial cubes G such that idim(G)=fdim(G)=k. Finally, this class is compared with the other known family of graphs with minimal Fibonacci dimension, namely the family of trees. It turns out that the two families are incomparable under inclusion and have a non-empty intersection.

We conclude the paper with a glimpse into the future problems we plan to investigate.

2 Basic notation and results

In this section, we collect all the notation together with all the related results needed to present our main theorems, which combine properties on graphs and strings.

Isometric subgraphs and partial cubes

Let G=(V(G),E(G)) be a graph. The distance of two nodes u,vV(G), denoted by distG(u,v), is the length of the shortest path connecting u and v in G. A subgraph G of a (connected) graph G is an isometric subgraph of G if for any u,vV(G), distG(u,v)=distG(u,v).

Let G,G two graphs. An isometric embedding β of G in G is a map β:V(G)V(G) which preserves distances, i.e., for any u,vV(G), distG(u,v)=distG(β(u),β(v)). If an isometric embedding β of G in G does exist, then we say that G can be isometrically embedded into G and write GβG. The symbol is used to indicate that an isometric embedding does exist.

Recall that, given two binary strings x and y, their Hamming distance, distH(x,y) is the number of positions at which x and y differ.

The k-hypercube, or binary k-cube, Qk, is a graph with 2k vertices, each associated to a binary word of length k, called its label. The label map, denoted by λk, of the k-hypercube Qk is based on the Hamming distance, i.e., it is such that two vertices u and v are adjacent if and only if distH(λk(u),λk(v))=1. This implies that the distance between any two vertices u and v is simply given by the Hamming distances between the corresponding labels, i.e. distQk(u,v)=distH(λk(u),λk(v)).

A graph G is a partial cube if G can be isometrically embedded into a hypercube Qk, for some k. The relevant fact is that such isometric embedding makes G inherit from Qk a labeling of its vertices by strings in Σk that makes the distance of the vertices in G equal to the Hamming distance between their corresponding labels. Note that all the isometric subgraphs of the hypercubes are partial cubes by definition.

The Fibonacci cube Γk of order k is the subgraph of Qk whose vertices are all binary words that do not contain the factor 11. It is well known that Γk is an isometric subgraph of Qk (cf. [27]). Therefore, the Fibonacci cubes are partial cubes.

Basic notation on words

Let Σ be a finite alphabet. In this paper, the alphabet is Σ={0,1}, although many of the definitions and results can be stated and hold for a general alphabet. If aΣ, a¯ denotes the opposite of a, i.e. a¯=1 if a=0 and vice versa. A word (or string) w of length |w|=n is w=a1a2an, where a1,a2,,an are symbols in Σ. Then, w¯=a¯1a¯2a¯n is the complement of w, and wR=anan1a1 is the mirror of w. The set of all finite words over Σ is denoted Σ and the set of all words over Σ of length n is denoted Σn.

Let w[i] denote the symbol of w in position i, i.e., w[i]=ai. Then, w[i..j]=aiaj, for 1ijn, is a factor of w that occurs in the interval [i..j]. The prefix (resp. suffix) of w of length , with 1n1 is pre(w)=w[1..] (resp. suf(w)=w[n+1..n]). When pre(w)=suf(w)=u then u is an overlap of w of length .

In the sequel, the notion of overlap with errors is also needed. A word w has a 2-error overlap (2-eo, for short) of length if pre(w) and suf(w) differ in two positions, namely, they have a Hamming distance equal to 2; the two positions are called error positions. We say that w has a 2-error overlap if w has a 2-eo of length for some 1n1.

Given two words w,fΣ, w is f-free if w does not contain f as a factor; we also say that w avoids f.

Isometric words and sets

We now shortly report some recent results on isometric words (originally called good words) that are used to define special isometric subgraphs of the hypercubes (cf. [26, 28, 29, 32]).

Let u,vΣ be words of equal length and distH(u,v)=d. A transformation τ from u to v is a sequence of d+1 words (w0,w1,,wd) such that w0=u, wd=v, and for any k=0,1,,d1, distH(wk,wk+1)=1. Moreover, τ is f-free if for any i=0,1,,d, the word wi is f-free. This is the base for the following definition.

Definition 1.

A word f is isometric if for any pair of f-free words u and v, with |u|=|v|, there exists an f-free transformation from u to v. It is non-isometric otherwise.

A pair of f-free words (u,v) such that any transformation from u to v is not f-free proves that f is non-isometric and is called a pair of witnesses for f; the positions where u and v differ are called error positions. The minimal length of a word u in a pair of witnesses for f is called the index of f, and denoted by i(f).

Coming back to graphs and hypercubes we recall the following definition of Generalized Fibonacci cubes, or hypercubes avoiding a word, first introduced in [25].

Definition 2.

The k-hypercube avoiding a word f, denoted Qk(f), is the subgraph of Qk obtained by removing those vertices whose labels contain f as a factor.

Note that, using this definition, the Fibonacci cube Γk coincides with Qk(11). Moreover, we assume implicitly that Qk(f) is still a labeled graph keeping the original labels of the hypercube Qk from which it is derived.

Then, one immediately realizes the strict connection between isometric subgraphs of Qk of type Qk(f) and isometric words. It holds that Qk(f) is an isometric subgraph of Qk if and only if f is isometric. Moreover, in [34], it is proved the non-obvious result that if f is not isometric then for all ki(f), Qk(f) is not even a partial cube, i.e., Qk(f) does not isometrically embed into any Qk with ki(f). These considerations lead to the following proposition.

Proposition 3.

The following statements are equivalent:

  1. 1.

    f is isometric

  2. 2.

    for any k|f|, Qk(f) is an isometric subgraph of Qk

  3. 3.

    for any k|f|, Qk(f) isometrically embeds into Qk.

Furthermore, note that if f is a non-isometric word and i(f) is its index, then for any k<i(f), Qk(f)Qk, while for any ki(f), Qk(f) Qk. Finally, remark that if f is isometric, also its complement f¯ and its mirror fR are isometric. Consequently, also the graphs Qk(f¯) and Qk(fR) (that can be also obtained from Qk(f) by, respectively, complementing or reversing all the labels) are isometric subgraphs of Qk.

A further step in the generalization of Fibonacci cubes is done in [3] by introducing the notion of isometric set of words. In what follows, S denotes a finite subset of Σ. Then a word w is S-free, if w does not contain any word in S as a factor.

Definition 4.

Let SΣ be a finite set of words and max be the length of a longest word in S. Then, S is isometric if for any pair (u,v) of S-free words, with |u|=|v|max, there exists a transformation from u to v such that all its intermediate words are S-free.

A set S is non-isometric if it is not isometric. If S is non-isometric, a pair of witnesses for S is a pair (u,v) with |u|=|v|max, such that each transformation from u to v contains a word that is not S-free.

Examples of isometric sets (cf. [3], [19]) are the sets Dh={11,101,10h1}, for any h0. Note that D0={11}. As in the case of a single word (cf. [29] and [28]), it can be shown that the non-isometricity of a set S is again connected to some properties on overlaps defined on a pair of (possible) different words in S.

Definition 5.

Let f,gΣ with |g|=m, |f|=n. Then, g has a 2-error overlap (or 2-eo) on f of shift r and length , with 0rn2, =min(m,nr), if distance distH(g[1..],f[r+1..r+])=2.

Note that the existence of a 2-eo of f on g does not imply the existence of a 2-eo of g on f. In particular, if g=f Definition 5 coincides with the classical definition of 2-eo of a word (cf. [29]).

Example 6.

Let f=1000 and g=11. Then g has 2-eo on f of shift 1 and length 2 and a 2-eo of shift 2 and length 2. Instead, f has no 2-eo on g.

The following proposition, given in [29], characterizes isometric words.

Proposition 7.

A word f is isometric if and only if f has no 2-error overlap.

The proof of Proposition 7 is constructive. In fact, if f has a 2-error overlap of shift r, then the proof explicitly provides a “standard” pair of witnesses for f. The pair is defined as (αr(f),βr(f)) or (ηr(f),γr(f)), in the case that βr(f) is not f-free. More exactly, it turns out that βr(f) is not f-free if and only if the 2-error overlap of f satisfies the so-called Condition (cf. [29]). Moreover, in [9], it is shown that this construction yields the pairs of witnesses of minimal distance and length. Let us recall the construction (see Fig. 1 for (αr(f),βr(f))).

Definition 8.

Let fΣn have a 2-error overlap of shift r and error positions i,j, with 1i<jnr. Then,

  • f(i) is the word obtained from f replacing f[i] by f[r+i].

  • if r is even and t=j+r/2, then f(j,t) is the word obtained from f replacing f[j] with f[r+j], and f[t] by f[i].

The words αr(f), βr(f), ηr(f), and γr(f) corresponding to the 2-error overlap of f of shift r are

  • αr(f)=prer(f)f(i) and βr(f)=prer(f)f(j).

  • if r is even, ηr(f)=prer(f)f(i)sufr/2(f) and γr(f)=prer(f)f(j,t)sufr/2(f).

Figure 1: The words αr(f) and βr(f) corresponding to the 2-error overlap of f of shift r.

The following theorem generalizes to any set SΣ an analogous result for sets of words of equal length in [3]. Its proof rephrases the other one and is here sketched for the sake of completeness.

Theorem 9.

Let SΣ. If S is non-isometric, then there exist s1,s2S (possibly s1=s2) such that s1 has a 2-eo on s2.

Proof.

Let S be a non-isometric set. Consider a pair (u,v) of witnesses for S of minimal distance and its error positions, i.e. the positions where u and v differ. The minimality implies that the word obtained by changing any error position in u contains the occurrence of a word of S covering that error position and another one, since v is S-free. Therefore, there exist two error positions i and j that are covered by both the words of S, say s1 and s2, occurring after their change in u. This gives the thesis.

The following definition extends Definition 2 from a single word to a set. The graphs will be referred to as generalized Fibonacci cubes, yet.

Definition 10.

The k-hypercube avoiding a set S, denoted Qk(S), is the subgraph of Qk obtained by removing those vertices that contain a word in S as a factor.

Note that if S={w1,w2,,wn}, then Qk(S)=Qk(w1)Qk(w2)Qk(wn), that is the intersection of the hypercubes avoiding each word in the set, respectively. Furthermore, also in this case we assume that vertices of the subgraph Qk(S) keep the labels they had in the whole hypercube Qk. This immediately establishes the following correspondence between isometric sets of words and subgraphs of the hypercubes that avoid a set that are also isometric subgraphs.

Proposition 11.

Let SΣ and let max be the length of a longest word in S. The set S is an isometric set of words iff for any kmax, Qk(S) is an isometric subgraph of Qk.

We conclude with an example of a non-isometric set that will be referred to in the results of the next section.

Example 12.

Let S={11,1000}. S is a non-isometric set. In fact, (u,v) with u=1001 and v=1010 is a pair of witnesses for S because any transformation from u to v meets either 11 or 1000. According to Proposition 11, Q4(S) is not an isometric subgraph of Q4. Let x be the vertex in Q4(S) labeled 1001 and y be the one labeled 1010. Referring to Fig. 2, one can see that distQ4(S)(x,y)=4, whereas distH(1001,1010)=2.

Figure 2: (a) Q4({11,1000}) and (b) hypercube Q4 with Q4({11,1000}) in red.

Isometric and Fibonacci dimensions of a graph

In this last part of the section, we report some results from Cabello et al. [14] where Fibonacci dimension of a graph is first introduced and investigated. The isometric dimension of a graph G, denoted by idim(G), is the smallest integer k such that G admits an isometric embedding into Qk. If no such k exists, idim(G)=. Therefore idim(G) is finite if and only if G is a partial cube.

Let β:V(G)V(Qk) be an isometric embedding of a graph G into the hypercube Qk. The embedding β is redundant if there exists i{1,2,,k} such that the labels of all vertices in β(V(G)) have the same i-th coordinate. It is irredundant otherwise. If an embedding is redundant, another embedding can be found into a lower-dimensional hypercube by omitting the redundant coordinate.

Let us recall the following result that will be largely used in the sequel.

Proposition 13.

Let G be a graph. An isometric embedding β:V(G)V(Qk) is irredundant if and only if k=idim(G).

The authors then introduce the Fibonacci dimension of a graph G, fdim(G), as the smallest integer d such that G admits an isometric embedding into the Fibonacci cube Γd, and set fdim(G)= if there is no such d. This is strictly related to the isometric dimension since it is shown that a graph isometrically embeds in some hypercube Qk iff it isometrically embeds in some Fibonacci cube Γd. Note that in general dk. They established upper and lower bounds as stated in the following proposition.

Proposition 14.

Let G be a graph. Then fdim(G) is finite if and only if idim(G) is finite. Moreover, idim(G)fdim(G)2idim(G)1.

In [14], graphs G with maximal Fibonacci dimension 2idim(G)1 have been fully characterized. While the algorithm to compute the isometric dimension of a graph is quadratic (cf. [23]), it is proved, instead, that deciding for a given graph G whether or not idim(G)=fdim(G) is an NP-hard problem. In general, it is difficult to find graphs with “small” Fibonacci dimension. An important family of graphs with this property is the set of trees, for which they prove the following result.

Theorem 15.

For any tree T, fdim(T)=idim(T)=|E(T)|.

Note that trees are very special partial cubes since they have the maximal possible isometric dimension, namely equal to the number of edges. This property derives from the acyclicity and it is the one exploited to compute the Fibonacci dimension.

3 Isometric and Fibonacci Dimension of hypercubes avoiding words

The main result of this section is to present a new family of graphs with minimal Fibonacci dimension. We start by investigating the isometric and Fibonacci dimension of the graphs that are hypercubes avoiding a word or a set of words introduced previously. It is worth to note that any subgraph of the k-hypercube can be trivially viewed as the hypercube avoiding the set of all the k-length words that label the omitted vertices. Then, in principle, any partial cube is isometric to a hypercube that avoids a set S of words. Here we restrict to the case when S has one or two elements.

Let us introduce some notation. For a set S of words, let Lk(S) be the set of words of length k avoiding S, that is, Lk(S)=ΣkΣSΣ. In the case of S={f}, we will simply write Lk(f). The set Lk(S) is redundant at position i, for some i{1,2,,k}, if all the strings in Lk(S) have the same symbol at position i. It is redundant if there exists i{1,2,,k} such that Lk(S) is redundant at position i. It is irredundant otherwise.

 Remark 16.

Note that if Qk(S) is an isometric subgraph of Qk, then the identity function is an isometric embedding of Qk(S) into Qk and, moreover, it is irredundant if an only if Lk(S) is irredundant. In fact, note that Lk(S)=λk(V(Qk(S))).

Let us first consider hypercubes avoiding a single word f.

Proposition 17.

Let fΣ, k|f|. If |f|=1 then Qk(f) is a partial cube with idim(Qk(f))=fdim(Qk(f))=0. If |f|=2 then Qk(f) is a partial cube with idim(Qk(f))=fdim(Qk(f))=k.

Proof.

Let Gk=Qk(f). Consider the two different cases. If |f|=1 then either f=1 or f=0. If f=1 (f=0, resp.) Gk has a single vertex v labeled 0k (1k, resp.). Then Gk isometrically embeds in Q0=Γ0 and then idim(Gk)=fdim(Gk)=0. Let |f|=2. If f=11 then Gk=Γk isometrically embeds in Qk and in Γk, and idim(Gk)=fdim(Gk)=k. The same holds for f=00=11¯. If f=01 then Lk(01)={1i0ki0ik} and the edges connect nodes with labels 1i0ki and 1i+10ki1, for any i=0,,k1, respectively. Therefore, Gk is a chain of k+1 nodes, i.e. a special case of a tree, and by Theorem 15 idim(Gk)=fdim(Gk)=k. The same result holds for f=10=01¯.

Proposition 17 shows the isometric and Fibonacci dimensions of Qk(f) for |f|=1,2. In what follows, the other cases are considered, i.e. words f of length at least 3.

The hypercube avoiding an isometric word in Qk isometrically embeds in Qk, but, in principle, its isometric dimension could be smaller than k. Nevertheless, the following proposition shows that this is never the case.

Proposition 18.

Let f be a word with |f|3. If f is an isometric word, then, for any k0, Qk(f) is a partial cube with idim(Qk(f))=k.

Proof.

Let Gk=Qk(f). Suppose f isometric and let |f|=n3. If k<n, then Gk=Qk and therefore idim(Gk)=idim(Qk)=k.

For kn, since f is isometric, the identity function β is an isometric embedding of Gk into Qk. Therefore, from Proposition 13, it suffices to show that β is irredundant or, equivalently, in view of Remark 16, that Lk(f) is irredundant. Then we proceed by induction on k.

For the basis, if k=n, then Lk(f)=Σk{f} and, therefore, |Lk(f)|=2k1. Since k=n3, it holds 2k1>2k1; hence, there is no i{1,2,,k} such that all the strings in Lk(f) have the same symbol at position i, i.e. Lk(f) is irredundant.

Suppose now that Lk(f) is irredundant and let us prove that Lk+1(f) is irredundant. Let f=awb, with a,bΣ and wΣ. Now, for any i=1,,k, consider two words, say ui,viLk(f), such that ui[i]vi[i]. Then, the words xi=uib¯ and yi=vib¯ are in Lk+1(f) and xi[i]yi[i] , for any i=1,,k. Moreover, the words x=a¯uk and y=a¯vk are in Lk+1(f) and x[k+1]y[k+1]. Hence Lk+1(f) is irredundant.

 Remark 19.

Note that, if f is a non-isometric word, with |f|3 and index i(f), then the equality idim(Qk(f))=k, proved in the previous proposition, is still valid for any k<i(f). Indeed, for any k<i(f), the identity function is an isometric embedding of Qk(f) into Qk and a reasoning, similar to the one used in Proposition 18, shows that Qk(f) is a partial cube and idim(Qk(f))=k.

After having determined the isometric dimension of a hypercube avoiding an isometric word, let us consider its Fibonacci dimension. Recall that the computation of fdim of a partial cube is a NP-hard problem in the general case. By definition, Qk({11,f})=Qk(11)Qk(f)=Γk(f). Nevertheless, there is no evident relation between the idim(Qk({11,f})) and the fdim(Qk(f)) that indeed can be strictly greater than idim(Qk(f)), as in the next example.

Example 20.

Let f=1000 and consider the graph Q4(1000). Since f is isometric, then, by Proposition 18, idim(Q4(1000))=4. In order to compute fdim(Q4(1000)) we need to find the minimum k such that Q4(1000) can be embedded into the Fibonacci cube Γk. Recall that the number of vertices of Γk is the (k+2)-th Fibonacci number. Note that Q4(1000) has 15 vertices; then it surely cannot be embedded in Γ4 that has only 8 vertices. More precisely, the smallest Fibonacci cube to be considered is Γ6 that has 21 vertices, then fdim(Q4(1000))6.

We experimentally checked that the same argument based on counting vertices can be applied also to all graphs Qk(1000) with k15. Then, we expect that idim(Qk(1000))<fdim(Qk(1000)) for all k4.

In the next example we come back to Example 12 where the word f=1000 is considered together with 11.

(a)
(b)
(c)
Figure 3: Q4({11,1000}) with (a) its labeling λ4, (b) an isometric embedding β in Q5 and (c) an isometric embedding γ in Γ5.
Example 21.

Let S={11,1000} and consider the graph Q4(S). In Example 12 it is proved that Q4(S) cannot be isometrically embedded in Q4. Nevertheless, it is a partial cube. In fact Eppstein’s algorithm in [23] produces the isometric embedding β of Q4(S) in Q5 shown in Fig. 3(b), yielding idim(Q4(S))=5. Moreover, also fdim(Q4(S))=5 since the map γ shown in Fig. 3(c) is an isometric embedding of G4 in Γ5. Then, for this partial cube, we have that idim(Q4(S))=fdim(Q4(S))=5.

The previous example is emblematic. The set S={11,1000} is non-isometric; then the graph Q4(S) does not isometrically embed in Q4, but it isometrically embeds in Q5. This proves that “sets” and “single words” have different properties regarding the non-isometricity. (Recall that in [32] it is shown that a word f is isometric if and only if Qk(f) is a partial cube). Another interesting fact is that idim(Q4(S))=fdim(Q4(S)). In the next section we will introduce a family of sets S={11,f} for some word f for which this always holds.

3.1 Main results

In this section we investigate the isometric and Fibonacci dimensions of hypercubes avoiding a set of words S in the special case that 11S. Afterwards, the analysis is restricted to the sets of cardinality 2, namely S={11,f}, for some word f.

Theorem 22.

Let SΣ, with 11S. Let max be the length of a longest word in S and let kmax. If S is an isometric set then Qk(S) is a partial cube with idim(Qk(S))fdim(Qk(S))k; moreover, idim(Qk(S))=k iff Lk(S) is irredundant.

Proof.

Let Gk=Qk(S). Since 11S, then V(Gk)V(Γk) and this implies that, for any u,vGk, distGk(u,v)distΓk(u,v).

Moreover, both Gk and Γk are isometric subgraphs of Qk. Hence, distGk(u,v)=distQk(u,v) and distΓk(u,v)=distQk(u,v). So distQk(u,v)=distGk(u,v)distΓk(u,v)=distQk(u,v). Therefore, for any u,vGk, distGk(u,v)=distΓk(u,v), i.e., Gk is an isometric subgraph of Γk and fdim(Gk)k.

Moreover, the claim idim(Gk)=k if and only if Lk(S) is irredundant, follows from Remark 16 and Proposition 13.

Corollary 23.

Let S be a set with 11S. If S is isometric and idim(Qk(S))=k, then fdim(Qk(S))=k.

Let us now show a characterization of sets S={11,f} which are isometric (Theorem 24) and a characterization of sets S={11,f} for which Lk(S) is irredundant (Theorem 25).

Theorem 24.

A set S={11,f} is isometric if and only if

  1. 1.

    11 is a factor of f or

  2. 2.

    f000ΣΣ000Σ0000Σ and f is isometric or

  3. 3.

    f000ΣΣ000Σ0000Σ, f is non-isometric and any pair (u,v) of witnesses of minimal distance for f is such that 11 is a factor of u or v.

Proof.

Let S={11,f} be an isometric set and suppose, by contradiction, that f is 11-free and, moreover, f000ΣΣ000Σ0000Σ or f is non-isometric and any pair of witnesses (u,v) for f of minimal distance is such that u and v are 11-free.

Now, if f is 11-free, f is non-isometric and any pair of witnesses (u,v) for f of minimal distance is such that u and v are 11-free, then (u,v) is also a pair of witnesses for S contradicting S isometric.

If f is 11-free, and f000ΣΣ000Σ0000Σ, three different cases must be considered: f=000x or f=x000 or f=x0000y, for some x,yΣ. We will show that, in any case, a pair of witnesses for S can be constructed, contradicting S isometric.

If f=000x with xΣ, then the pair (100x,010x) is a pair of witnesses for S. In fact, 100x and 010x are f-free, since they have the same length as f, but differ from it, and they are 11-free, since f is 11-free. Moreover, no S-free transformation exists from 100x to 010x. In fact, if the 1 in the first position is changed into 0, then f occurs as a factor, if the 0 in the second position is changed into 1, then 11 occurs as a factor. Similar arguments can be used to obtain a pair of witnesses for S in the case f=x000 or f=x0000y.

For the converse, if 11 is a factor of f, then Qk(S)=Γk(f)=Γk. Since Γk isometrically embeds into Qk, S is isometric.

Suppose, now, that condition 2. of the statement holds and that, by contradiction, S is non-isometric. Note that S non-isometric implies that f is 11-free.

Let (u,v) be a pair of witnesses of minimal distance for S and consider s1,s2S as in the proof of Theorem 9. Since f is isometric, it cannot be s1=s2=f. Moreover, the case s1=s2=11 cannot happen. If s1s2, we have three cases and we will show, in any case, a contradiction with the hypothesis f000ΣΣ000Σ0000Σ. Indeed, if the 2-error overlap involves the first two characters of f, then f=00z with zΣ. Moreover z=0y otherwise u would be not 11-free. Then f=000y: a contradiction. If the overlap involves the last two positions of f, for the same reason f=x000: a contradiction. If the overlap involves two consecutive characters inside of f, then f=z100z2 and, as before, z1 cannot end by 1 (otherwise u is not 11-free) and z2 cannot begin by 1 (otherwise v would not be 11-free). Then f=x0000y with x,yΣ is a contradiction again.

At last, suppose that condition 3. of the statement holds and that, by contradiction, S is non-isometric. As before, let (u,v) be a pair of witnesses of minimal distance for S and consider s1,s2S as in the proof of Theorem 9. If s1=s2=f, let (u,v) be the pair of witnesses of minimal distance for f constructed on this 2-error overlap as in Definition 8. Then u (v, resp.) is a factor of u (v, resp.) and then u and v are 11-free. This contradicts the hypothesis on the witnesses of minimal distance for f. The case s1=s2=11 can not happen. Moreover, the case s1s2 gives a contradiction with the hypothesis f000ΣΣ000Σ0000Σ, as shown before.

Theorem 25.

Let S={11,f}, with |f|3, and k3. Then, Lk(S) is redundant if and only if f=010.

Proof.

Let |f|3, and k3.

If f=010 then Lk(S)={0k,10k1,0k11,10k21} and it is redundant at position i=2.

Conversely, suppose that Lk(S) is redundant at position i, for some i=1,,k. Consider Lk(11) and partition it in Lk(11)=Lki,0(11)Lki,1(11) where Lki,0(11)={x1xkLk(11)xi=0} and Lki,1(11)={x1xkLk(11)xi=1}. Our goal is to prove that if Lk(S)Lki,0(11) or Lk(S)Lki,1(11) then f=010. Note that Lk(S)Lki,0(11) if and only if any word in Lki,1(11) has f as a factor; analogously for the symmetric case.

Let us first prove that the case Lk(S)Lki,1(11) cannot hold. In fact, the only factor shared by all words in Lki,0(11) is 0 against the hypothesis that |f|3. Then, Lk(S)Lki,0(11).

Let us now show that i1 and ik. Indeed, the only factor shared by all words in Lki,1(11) when i=1 (i=k, resp.) is 10 (01, resp.) against the hypothesis that |f|3.

Finally, let us show that when 2ik1, the only factor f shared by all words in Lki,1(11) is f=010. First observe that 010 occurs in all words in Lki,1(11) at position i1. Further, no other factor is shared by words in Lki,1(11). In fact, Lki,1(11) contains the word 0i110ki whose factors of length greater than or equal 3 contain two consecutive 0, whereas no such factor occurs in the word of Lki,1(11) which belongs to (01)(10). The next example considers the case of the word 010 that is involved in the previous theorem.

Example 26.

Consider the word f=010 and the set S={11,010}. For any k3, the subgraph Qk(S) has 4 vertices which form a cycle. Their labels are in Lk(S)={0k,10k1,0k11,10k21}. Hence, for any k3, Qk(S) is a partial cube with idim(Qk(S))=2 and fdim(Qk(S))=3.

The characterizations shown in Theorems 24 and 25 allow to specify Theorem 22 and provide a family of partial cubes with minimal Fibonacci dimension, i.e., equal to the isometric dimension.

Theorem 27.

Let f be a word such that f010 and f satisfies conditions 1., 2., or 3. of Theorem 24. Then, for any k|f|, Qk({11,f}) is a partial cube with idim(Qk({11,f}))=fdim(Qk({11,f}))=k.

Note that the previous Example 21 showed the graph Qk({11,1000}) that does not satisfy the hypotheses of Theorem 27 and it is a partial cube with idim(Qk({11,1000}))=fdim(Qk({11,1000})) but idim(Qk({11,1000}))k.

Let us apply Theorem 27 and show in the next example a graph Qk({11,f}) which is a partial cube with idim(Qk({11,f}))=fdim(Qk({11,f}))=k.

Example 28.

Let S={11,1001}, k=4, and consider G4=Q4({11,1001}), as in Figure 4. According to Theorem 27, G4 is a partial cube with idim(G4)=fdim(G4)=4 because f010 and f satisfies the condition 2. in Theorem 24.
More specifically, by Theorem 24, S is isometric. In fact, f=1001000ΣΣ000Σ0000Σ and f is non-isometric. Moreover, the pairs of witnesses for f of minimal distance are (10001,11011) and (100001,101101), and both pairs contain a word that is not 11-free. Furthermore, f010 and then, according to Theorem 25, L4(S)={0101,0100,0001,0000,0010,1000,1010} is irredundant.

Figure 4: Q4({11,1001}).

Theorem 27 shows a new family of subgraphs of the hypercube with minimal Fibonacci dimension, i.e., equal to the isometric dimension. Recall that also the family of trees shares the same property. Let us compare these two families in the following remark. Let Tk be the tree composed of a root with k children.

 Remark 29.

Consider the family of partial cubes Gk=Qk({11,f}) with idim(Gk)=fdim(Gk)=k, coming from Theorem 27, and compare it with the family of trees. First, neither of the two families is included in the other one. In fact, Q4({11,1001}) in Example 28 is not a tree, whereas the tree T4 cannot be described as a graph of the form G4=Q4({11,f}); recall that idim(T4)=fdim(T4)=4. In fact, there is no f such that T4 coincides with Γ4(f). The only vertex of degree 4 in Γ4 is the one labeled 0000, but the vertices at distance 2 from it do not share any factor that is not shared by some other vertex. Finally, the tree T3 is an example of graph belonging to both families, because it coincides with Q3({11,101}).

The considerations made for k=4 can be generalized to any higher k. Therefore, one has that the trees Tk, with k4, cannot be described as Qk({11,f}). However, considering sets with more than two words, the following result holds.

Proposition 30.

For any k0, let Dk={11,101,,10k1}. Then, Qk(Dk2)=Tk and idim(Qk(Dk2))=fdim(Qk(Dk2))=k.

Proof.

It suffices to note that, by removing from Qk the vertices whose labels contain words in Dk2, the only remaining vertices are those whose labels contain, at most, one occurrence of the symbol 1, i.e. Qk(Dk2)=Tk. Therefore, idim(Qk(Dk2))=fdim(Qk(Dk2))=k.

4 Conclusions and Future Work

In this paper, generalized Fibonacci cubes are studied in the context of the computation of their isometric and Fibonacci dimensions. It is proved that, if f is an isometric word, then the isometric dimension of the graph Qk(f) is always equal to k. Moreover, we conjecture that for this type of graphs, the Fibonacci dimension never equals the isometric dimension.

By considering subgraphs of the hypercube of type Qk(S), where S is a set of words, the study has been restricted to the special case of graphs Qk({11,f}) and it is shown that when they isometrically embed in Qk then they have minimal Fibonacci dimension, namely equal to their isometric dimension, except for f=010. The main results provide sufficient conditions on f for Qk({11,f}) to be a partial cube and, accordingly, characterize the announced family. Finally, this family is compared with the family of tree graphs with which it shares the property of minimal Fibonacci dimension.

Also an emblematic example is given, namely the graph Q4({11,1000}), that has several peculiarities. In fact, it does not isometrically embed into Q4; therefore, it does not belong to the above-defined family. Nevertheless, it isometrically embeds in Q5 and Γ5; therefore, it is a partial cube with equal isometric and Fibonacci dimension, equal to 5. We believe that this kind of graphs deserves to be investigated in this setting of understanding properties of graphs with minimal Fibonacci dimension.

References

  • [1] Marcella Anselmo, Giuseppa Castiglione, Manuela Flores, Dora Giammarresi, Maria Madonia, and Sabrina Mantaci. Hypercubes and isometric words based on swap and mismatch distance. In Descriptional Complexity of Formal Systems. DCFS23, volume 13918 of Lect. Notes Comput. Sci., pages 21–35. Springer Nature, 2023. doi:10.1007/978-3-031-34326-1_2.
  • [2] Marcella Anselmo, Giuseppa Castiglione, Manuela Flores, Dora Giammarresi, Maria Madonia, and Sabrina Mantaci. Isometric words based on swap and mismatch distance. In Developments in Language Theory. DLT23, volume 13911 of Lect. Notes Comput. Sci., pages 23–35. Springer Nature, 2023. doi:10.1007/978-3-031-33264-7_3.
  • [3] Marcella Anselmo, Giuseppa Castiglione, Manuela Flores, Dora Giammarresi, Maria Madonia, and Sabrina Mantaci. Isometric sets of words and generalizations of the fibonacci cubes. In Computability in Europe. CIE24, volume LNCS 14773 of Lect. Notes Comput. Sci., pages 1–14. Springer, 2024. doi:10.1007/978-3-031-64309-5_35.
  • [4] Marcella Anselmo, Giuseppa Castiglione, Manuela Flores, Dora Giammarresi, Maria Madonia, and Sabrina Mantaci. Characterization of isometric words based on swap and mismatch distance. International Journal of Foundations of Computer Science, 0(0):1–25, 2025. doi:10.1142/S0129054125430051.
  • [5] Marcella Anselmo, Manuela Flores, and Maria Madonia. Quaternary n-cubes and isometric words. In Combinatorics on Words, volume 12842 of Lect. Notes Comput. Sci., pages 27–39, 2021. doi:10.1007/978-3-030-85088-3_3.
  • [6] Marcella Anselmo, Manuela Flores, and Maria Madonia. Fun slot machines and transformations of words avoiding factors. In Fun with Algorithms, volume 226 of LIPIcs, pages 4:1–4:15, 2022. doi:10.4230/LIPIcs.FUN.2022.4.
  • [7] Marcella Anselmo, Manuela Flores, and Maria Madonia. On k-ary n-cubes and isometric words. Theor. Comput. Sci., 938:50–64, 2022. doi:10.1016/j.tcs.2022.10.007.
  • [8] Marcella Anselmo, Manuela Flores, and Maria Madonia. Density of Ham- and Lee- non-isometric k-ary words. In ICTCS’23 Italian Conference on Theor. Comput. Sci., volume 3587 of CEUR Workshop Proceedings, pages 116–128, 2023. URL: https://ceur-ws.org/Vol-3587/3914.pdf.
  • [9] Marcella Anselmo, Manuela Flores, and Maria Madonia. Computing the index of non-isometric k-ary words with Hamming and Lee distance. Computability, IOS press, 13(3-4):199–222, 2024. doi:10.3233/COM-230441.
  • [10] Marcella Anselmo, Manuela Flores, and Maria Madonia. Density of k-ary words with 0, 1, 2 - error overlaps. Theor. Comput. Sci., 1025:114958, 2025. doi:10.1016/j.tcs.2024.114958.
  • [11] Marcella Anselmo, Dora Giammarresi, Maria Madonia, and Carla Selmi. Bad pictures: Some structural properties related to overlaps. In Descriptional Complexity of Formal Systems. DCFS20, volume 12442 of Lect. Notes Comput. Sci., pages 13–25, 2020. doi:10.1007/978-3-030-62536-8_2.
  • [12] Jernej Azarija, Sandi Klavžar, Jaehun Lee, Jay Pantone, and Yoomi Rho. On isomorphism classes of generalized Fibonacci cubes. Eur. J. Comb., 51:372–379, 2016. doi:10.1016/j.ejc.2015.05.011.
  • [13] Marie-Pierre Béal, Filippo Mignosi, and Antonio Restivo. Minimal forbidden words and symbolic dynamics. In STACS 1996, volume 1046 of Lect. Notes Comput. Sci., pages 555–566, 1996. doi:10.1007/3-540-60922-9_45.
  • [14] Sergio Cabello, David Eppstein, and Sandi Klavzar. The Fibonacci dimension of a graph. Electron. J. Comb., 18(1), 2011. doi:10.37236/542.
  • [15] Giuseppa Castiglione, Manuela Flores, and Dora Giammarresi. Isometric words and edit distance: Main notions and new variations. In Cellular Automata and Discrete Complex Systems. AUTOMATA 2023, volume 14152 of Lect. Notes Comput. Sci., pages 6–13. Springer, 2023. doi:10.1007/978-3-031-42250-8_1.
  • [16] Giuseppa Castiglione, Sabrina Mantaci, S. Leonardo Pizzuto, and Antonio Restivo. A comparison between similarity measures based on minimal absent words: an experimental approach. In ICTCS’24 Italian Conference on Theor. Comput. Sci., volume 3811 of CEUR Workshop Proceedings, pages 95–105, 2024. URL: https://ceur-ws.org/Vol-3811/paper140.pdf.
  • [17] Giuseppa Castiglione, Sabrina Mantaci, and Antonio Restivo. Some investigations on similarity measures based on absent words. Fundam. Informaticae, 171(1-4):97–112, 2019. doi:10.3233/FI-2020-1874.
  • [18] Panagiotis Charalampopoulos, Maxime Crochemore, Gabriele Fici, Robert Mercas, and Solon P. Pissis. Alignment-free sequence comparison using absent words. Inf. and Comput., 262:57–68, 2018. doi:10.1016/j.ic.2018.06.002.
  • [19] Pietro Codara and Ottavio M. D’Antona. Generalized Fibonacci and Lucas cubes arising from powers of paths and cycles. Discrete Math., 339(1):270–282, 2016. doi:10.1016/j.disc.2015.08.012.
  • [20] Dragomir Ž. Djoković. Distance-preserving subgraphs of hypercubes. Journal of Combinatorial Theory, Series B, 14(3):263–267, 1973. doi:10.1016/0095-8956(73)90010-5.
  • [21] Chiara Epifanio, Luca Forlizzi, Francesca Marzi, Filippo Mignosi, Giuseppe Placidi, and Matteo Spezialetti. On the k-hamming and k-edit distances. In ICTCS’23 Italian Conference on Theor. Comput. Sci., volume 3587 of CEUR Workshop Proceedings, pages 143–156, 2023. URL: https://ceur-ws.org/Vol-3587/8136.pdf.
  • [22] Chiara Epifanio, Alessandra Gabriele, Filippo Mignosi, Antonio Restivo, and Marinella Sciortino. Languages with mismatches. Theor. Comput. Sci., 385(1):152–166, 2007. doi:10.1016/j.tcs.2007.06.006.
  • [23] David Eppstein. Recognizing partial cubes in quadratic time. J. Graph Algorithms Appl., 15(2):269–293, 2011. doi:10.7155/jgaa.00226.
  • [24] Wen-Jing Hsu. Fibonacci cubes-a new interconnection topology. IEEE Transactions on Parallel and Distributed Systems, 4(1):3–12, 1993. doi:10.1109/71.205649.
  • [25] Aleksandar Ilić, Sandi Klavžar, and Yoomi Rho. Generalized Fibonacci cubes. Discrete Math., 312(1):2–11, 2012. doi:10.1016/j.disc.2011.02.015.
  • [26] Aleksandar Ilić, Sandi Klavžar, and Yoomi Rho. The index of a binary word. Theor. Comput. Sci., 452:100–106, 2012. doi:10.1016/j.tcs.2012.05.025.
  • [27] Sandi Klavžar. Structure of Fibonacci cubes: A survey. J. Comb. Optim., 25(4):505–522, 2013. doi:10.1007/s10878-011-9433-z.
  • [28] Sandi Klavžar and Sergey V. Shpectorov. Asymptotic number of isometric generalized Fibonacci cubes. Eur. J. Comb., 33(2):220–226, 2012. doi:10.1016/j.ejc.2011.10.001.
  • [29] Jianxin Wei. The structures of bad words. Eur. J. Comb., 59:204–214, 2017. doi:10.1016/j.ejc.2016.05.003.
  • [30] Jianxin Wei. Proof of a conjecture on 2-isometric words. Theor. Comput. Sci., 855:68–73, 2021. doi:10.1016/j.tcs.2020.11.026.
  • [31] Jianxin Wei, Yujun Yang, and Guangfu Wang. Circular embeddability of isometric words. Discrete Math., 343(10):112024, 2020. doi:10.1016/j.disc.2020.112024.
  • [32] Jianxin Wei, Yujun Yang, and Xuena Zhu. A characterization of non-isometric binary words. Eur. J. Comb., 78:121–133, 2019. doi:10.1016/j.ejc.2019.02.001.
  • [33] Jianxin Wei and Heping Zhang. Proofs of two conjectures on generalized Fibonacci cubes. Eur. J. Comb., 51:419–432, 2016. doi:10.1016/j.ejc.2015.07.018.
  • [34] Jianxin Wei and Heping Zhang. A negative answer to a problem on generalized fibonacci cubes. Discrete Math., 340(2):81–86, 2017. doi:10.1016/j.disc.2016.07.016.
  • [35] Peter M. Winkler. Isometric embedding in products of complete graphs. Discrete Applied Mathematics, 7(2):221–225, 1984. doi:10.1016/0166-218X(84)90069-6.