On the Parikh-de-Bruijn grid

11/16/2017 ∙ by Péter Burcsi, et al. ∙ 0

We introduce the Parikh-de-Bruijn grid, a graph whose vertices are fixed-order Parikh vectors, and whose edges are given by a simple shift operation. This graph gives structural insight into the nature of sets of Parikh vectors as well as that of the Parikh set of a given string. We show its utility by proving some results on Parikh-de-Bruijn strings, the abelian analog of de-Bruijn sequences.

READ FULL TEXT VIEW PDF
POST COMMENT

Comments

There are no comments yet.

Authors

page 1

page 2

page 3

page 4

This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.

1 Introduction

In recent years, interest in so-called abelian stringology has soared. The underlying concept is that of Parikh equivalence or abelian equivalence: two strings are Parikh equivalent if the multiplicity of each character is the same in both. Two Parikh equivalent strings can be transformed into one another by permuting their characters; for example, ENRAGED and ANGERED are Parikh equivalent111source: www.fun-with-words.com. (See Section 2 for precise definitions.)

Many string problems allow parallel formulations when abelian equivalence is substituted for equality, e.g. abelian pattern matching (also known as jumbled pattern matching or histogram matching) 

[12, 10, 11, 36, 35, 17, 5, 14, 26, 13, 33], abelian periods [18, 24, 25, 34], abelian squares, repetitions, and runs [19, 23, 22], abelian pattern avoidance [9], abelian borders [15], common abelian factors [2, 7], abelian problems on run-length encoded strings [6, 27, 4, 20], abelian reconstruction [1, 8], to name just some of the topics that have been treated in recent literature.

In this paper, we present a new model, the Parikh-de-Bruijn grid. The Parikh-de-Bruijn grid is the abelian analogue of the de Bruijn graph; however, as we will see, it has a completely different structure.

De Bruijn graphs [21] have proved immensely useful in improving our understanding of the exact structure of fixed-sized substring sets of a string, among other things yielding a full description of all strings with the same set or multiset of -length substrings [40, 37]. This approach gave rise to algorithms for reconstructing strings from their -length substrings, which in turn led to the development of efficient tools for sequence assembly using NGS data (Next-Generation Sequencing) [38, 41]. The impact of these algorithms on computational biology, and as a consequence, on current research in biology, medicine, and pharmacology, can hardly be overstated: These are the algorithms that have made possible ultra-fast sequence assembly using high-throughput data that has become available with the advent of the new sequencing technologies.

Parikh vectors over an alphabet of size are vectors with non-negative integer components, and can be viewed as equivalence classes of strings: namely, of Parikh equivalent strings. For example, aab, aba, baa all have Parikh vector over the alphabet . The Parikh-de-Bruijn grid (PdB-grid for short) is the abelian analog of the de Bruijn graph. Recall that in the de Bruijn graph of order , the vertex set consists of all -length222There is some inconsistency in the literature as to the order of a de Bruijn graph: if , so that , then some publications refer to this graph as de Bruijn graph of order , and others as order . Throughout this paper, we call this graph the de Bruijn graph of order . strings over the alphabet , and the edge set of the -length strings over . In the PdB-grid, the vertices are -order Parikh vectors, i.e. Parikh vectors whose coordinates add up to . The edges of the PdB-grid are analogous to the de Bruijn graph in that they represent a simple one-character shift. (For details see Section 2.)

As we will see, the PdB-grid has some properties in common with the de Bruijn graph of the same order; however, there are important differences. As in de Bruijn graphs, every string corresponds to a walk in the PdB-grid; however, the converse is not true: for a walk to correspond to a string, it needs to fulfil additional conditions. Moreover, -order Parikh vectors do not correspond to edges, but to certain substructures with incident edges (triangles in the case of , tetrahedra in the case of , etc.). In contrast to de Bruijn graphs, here -order Parikh vectors, too, correspond to unique substructures. For larger alphabets, the PdB-grid even contains corresponding substructures for certain Parikh vectors of higher and lower orders. In fact, the PdB-grid over alphabet size can be identified with a regular simplicial complex of dimension .

The PdB-grid has a different structure from the de Bruijn graph, because the relationships it models, that of Parikh vectors of strings and Parikh vectors of their substrings, is quite different from the substring relationship modeled by de Bruijn graphs. We believe that the PdB-grid may prove to be a powerful tool in improving our understanding of problems in abelian stringology, while giving a common framework for many of the problems in this area. We will demonstrate the utility of the PdB grid by exploring the topic of covering strings and Parikh-de-Bruijn strings: the former are strings which contain, for every Parikh vector of order , a substring with Parikh vector , while the latter contain exactly one substring for every -order Parikh vector . Parikh-de-Bruijn strings are the abelian analog of the well-known de Bruijn sequences [21].

The paper is organized as follows: In Section 2, we give all definitions used in the paper, then we briefly recall de Bruijn graphs, introduce PdB-grids and give first results on PdB-grids and Parikh vector sets. In Section 3, we study -covering and PdB-strings over different alphabets, and ask the question (which we answer partially) for which combinations of and PdB-strings exist. In Section 4, we give experimental results about PdB-strings and covering strings for different combinations of and . Finally, in Section 5, we give an outlook and state some open problems.

2 The Parikh-de-Bruijn grid

2.1 Basic definitions

Let be a finite ordered alphabet with . We can write . A string (or word) over is a finite sequence of characters from . Its length is denoted by . For two strings over , we write for their concatenation. If , for (possibly empty) strings, then is called a prefix, a suffix, and a substring or factor of .

A Parikh vector (Pv for short) over is a vector of length with non-negative integer entries. For a string over , the Pv of , denoted , is defined by , for , the number of occurrences of character in . The function induces an equivalence relation on the set of all strings, often called Parikh equivalence or abelian equivalence. The order of a Pv is the sum of its entries, which equals the length of any string for which . We denote the unit vector by .

Let be the set of all Parikh vectors of order over an alphabet of size . It is an easy exercise to show that (see, e.g. [31]). For a string over , the Parikh set of , , is the set of Parikh vectors of all substrings of , and , for , the set of Parikh vectors of -length substrings of . For two Parikh vectors and over , we define: , if for all , ; is given by for ; and, if , then by , for . For a string , we have .

Definition 1 (neighbors, children, parents, meet, join)

Let , , and be Parikh vectors of any order.

  • and are called neighbors if there exist such that .

  • is called a child of , and a parent of , if there exists such that .

  • The meet is defined by , and the join by . (Here denotes the component of Pv .)

Thus are neighbors if and only if they can be the Pv’s of two consecutive -length windows in some string , i.e. if and for some . Pv is a child of Pv if and only if, for some string such that , is the Pv of ’s prefix of length .

Example 1

The neighbors of are , its parents are , and its children are .

Observe that every Parikh vector has parents and children, where equals the number of non-zero components of .

Lemma 1 (Clique-Lemma)

Let be pairwise distinct, . Let and . If for all , is a neighbor of , then, for , exactly one of the following two cases holds, while for , both hold:

Conversely, for any , if is a child of every , or if is a parent of every , then the are pairwise neighbors.

Proof

The converse direction follows easily from the definition. The case is also immediate. For what follows, notice that the common parent and child of two neighbors is unique.

For we identify Parikh vectors with the corresponding vertices in the PdB graph. The proof strategy is the following: we first prove that any 3-clique of vertices share a common parent or a common child but not both. Then we show that two adjacent 3-cliques (i.e. sharing 2 vertices) can only form a 4-clique if they are either both child-sharing, or both parent-sharing. This then implies that within an -clique, all 3-cliques are of the same type, completing the proof.

Let the Parikh vectors of a 3-clique be , and . Then s.t. and , , . The three vertices share a common parent if and only if , and they share a common child if and only if , and these equalities are mutually exclusive. Now suppose neither nor holds, then we distinguish three cases. Case 1: are pairwise distinct: then and differ in 4 coordinates and cannot be neighbors. Case 2: , and are pairwise distinct. Then and differ in 3 coordinates and are not neighbors. Case 3: , . Then and so they are not neighbors. Thus in each case and are not neighbors, so that , , cannot form a clique, a contradiction.

For two adjacent 3-cliques of different type, let the 3-clique with child be and the 3-clique with parent be , and suppose , are the common vertices. Then , thus , . Since is different from all of , the vertices and differ in coordinates , and and cannot be neighbors.

For an -clique with , if all 3-cliques are child-sharing, then this child has to be the same for all vertices of the -clique and we are done. The same is true if all 3-cliques are parent-sharing. If there were both child-sharing and parent sharing 3-cliques within the -clique, then there would also have to be adjacent 3-cliques of different type, which we saw is impossible. ∎

2.2 The undirected Parikh-de-Bruijn grid

Recall that the de Bruijn graph of order over alphabet is defined as a directed graph , where the set of all -length strings over , and . The in-degree and out-degree of every node is , and corresponds to .

We are now ready to define the Parikh-de-Bruijn grid. We will need two different variants, an undirected and a directed one. We start with the undirected variant, and postpone the directed variant until later (Def. 3).

Definition 2 (Undirected Parikh-de-Bruijn grid)

Let . The (undirected) -Parikh-de-Bruijn grid (PdB-grid for short) is a graph such that and .333Here and elsewhere, in slight abuse of notation, we identify Parikh vectors with the vertices representing them.

This graph is analogous to the de Bruijn graph in that the edges represent single-character shifts. However, it is undirected, and, as opposed to the de Bruijn graph, the PdB-grid is not regular. In particular, the degree of a vertex is , where is the number of non-zero coordinates of . This is because we can choose one character and a different second character for a neighbor . A second important difference to the de Bruijn graph of order is that there is no correspondence between edges and -order Pv’s. What we do find is a more intricate correspondence, for which we will need a different view of the PdB-grid.

Let us consider the case . Lemma 1 tells us that any triangle in the PdB-grid of order will have one common child or one common parent. Consider the drawing of in Fig. 1 (left). We find that every triangle which points downward consists of a clique with a common parent, e.g. , with common parent , while every upward-pointing triangle consists of one with a common child, e.g. , with common child . We have marked the Pv’s in different colors; note that those -order Pv’s which have fewer than children are not enclosed by vertices, so they cannot be identified with a triangle, but they are drawn as incident to their children (which still form a clique).

Figure 1: The PdB-grid for and (left) resp.  (right). -order Pv’s are denoted in green (vertices), -order Pv’s in yellow (downward triangles resp. tetrahedra), and -order Pv’s in blue (upward triangles resp. tetrahedra).

For , the - and -order Parikh vectors correspond to downward- resp. upward-pointing tetrahedra (Fig. 1, right). For , they will correspond to -cells or pentachora: a pentachoron is a 4-simplex, i.e. the convex hull of 5 affinely independent points in , and has five facets, which are pairwise adjacent tetrahedra, sharing a facet (a triangle) each.

In general, we can identify the PdB-grid with a simplicial complex

in the following way. Consider the hyperplane

through the point set . The intersection of with , where denotes the set of non-negative integers, consists exactly of the points in : these are the vertices of our PdB-grid, and the -simplices of . The -simplices are given by the edges of the graph, while in addition, we also have -simplices given by the -cliques in the graph. (By definition, the lower-dimension faces, e.g. triangles for , are also elements of , but they are not needed for our purposes. For basic definitions on simplicial complexes, see [3]). Since all points lie in , which has dimension , we can embed in . See Fig. 2 for an illustration.

Figure 2: The diagonal section of the integer grid with the hyperplanes (green), (blue), and (yellow), for and .

In the following, we will not distinguish between the PdB-grid as an abstract graph and the geometric simplicial complex .

2.3 The directed Parikh-de-Bruijn grid

We now turn to strings in the PdB-grid. For this, we need a directed variant of the PdB-grid which will also include loops. We will call these loops bows due to the fact that in their geometric realization, they will have a different form from the classic loop.

Definition 3 (Labeled Parikh-de-Bruijn grid with loops)

Let . The directed -Parikh-de-Bruijn grid (directed PdB-grid for short) is a directed edge-labeled multigraph , where

  • there are two anti-parallel edges between each pair of neighboring vertices , where ; edge is labeled , and edge is labeled ;

  • for every vertex , and every non-zero entry of , there is an edge labeled ; we call these edges bows.

Note that is the underlying undirected unlabeled simple graph without loops. In , every edge is labeled by the exchange of characters that happens when moving a window of size along a string from one Pv to the next. When the two Pv’s are distinct, there is only one way to do this, hence the unique directed edge from ; when the two consecutive Pv’s are the same, then there are as many ways of doing this as there are characters occurring in it.

We need a definition which connects strings and walks in , analogously to de Bruijn graphs. Note that we identify a walk in the directed PdB-grid with its sequence of vertices, disregarding the edges. This definition allows using different edges whenever there are consecutive occurrences of the same vertex (since these are the only cases of multiple parallel edges).

Definition 4

Let be a string over and a walk in . Then spells if and only if and for every , . In particular, if spells , then, for every , there is an edge with label . A walk is called realizable if it spells some string.

Example 2

Let . Consider the string . The walk it induces in the -PdB-grid is shown in Fig. 3. Notice that each shift by one in the string corresponds to a step along an edge. If this edge connects two distinct vertices, then the - and -order Pv’s are given by the two triangles incident to the edge. This is the case in the first and last step in our example (marked in blue, resp. brown). If the edge connects a vertex with itself, then the induced - and -order Pv’s are given by triangles at the opposite direction w.r.t. . This is the case in our example in the second (red) and third (green) steps.

211

202

301

310

220

121

112

b

c

a

b

c

a

201

210

111

311

221

212
a 3 3 2 2 b 1 1 2 2 c 1 1 1 1 a a b a c a b b a 3 2 2 2 1 b 1 1 1 1 2 c 0 1 1 1 1 a 2 1 2 1 b 1 1 0 1 c 0 1 1 1
Figure 3: Left: The part of the -PdB-grid being visited by the string . We marked each step of the walk in a different colour (blue-red-green-brown). Right: We list vertically the corresponding -order Pv’s (top), -order Pv’s (center), and -order Pv’s, each at its beginning position.

Notice in particular that the sequence of edges used by the walk in the PdB-grid of order determines not only the vertices touched (the -order Pv’s), but also which - and -order Pv’s are visited: those are the ones which are incident to the edges of the walk. For higher , even lower and higher order Pv’s have corresponding substructures. For example, for , the octahedra which are enclosed by 6 -order Pv’s correspond to their common ”grandchildren”.

Proposition 1

Let be a string over and . Then there is a walk in which spells . On the other hand, not every walk spells a string.

Proof

If is a string, then the definition of neighbor means that there is a walk in . To see that the other direction does not hold, consider the walk , which does not spell any string. ∎

The following characterization of realizable walks follows directly from the definitions. As we will see, it restricts very strongly which walks are realizable and which are not.

Theorem 2.1 (Characterization of realizable walks)

A walk in is realizable if and only if, for all , there is a character s.t. there is an edge labeled from to and an edge labeled from to , where and are arbitrary characters from .

The following lemma concerns walks that do not use bows, i.e. walks for which for all :

Lemma 2 (Bowfree walks)

Let be a realizable walk in which does not use any bows.

  1. Then, if is a string spelled by then for every , .

  2. If for some , then, for , it follows that , i.e.  lies on the opposite face of to the corner .

Proof

1. Let . Then , so the bow at labeled with character is used by the walk .

2. Let be a word spelled by . Since , it follows that . Assume that contains a character , say at position . Then , in contradiction to not using any bows. ∎

2.4 Realizable sets

Definition 5 (realizable sets)

A set of -order Parikh vectors is called realizable if there is a string such that .

Clearly, every singleton set is realizable.

Lemma 3

Let . Then is realizable if and only if and are neighbors.

Proof

If is realizable, then there is a string such that . Then there must be a position in such that, w.l.o.g.  and . Let and . Since , we have and . Conversely, let , , and any string with . Then the string realizes . ∎

Theorem 2.2

A set of -order Parikh vectors is realizable if and only if the induced subgraph of the PdB-grid is connected.

Proof

Given a walk , denote by the bowfree walk obtained by replacing all consecutive multiple occurrences of the same vertex by a single occurrence (the itinerary of ). We will show that for any bowfree walk , there is a walk and a string such that spells and . This proves the theorem, since in a connected induced subgraph there always exists a bowfree walk covering all vertices of this subgraph.

The proof goes by induction on the length of , the base case being trivial. Now suppose a string exists with itinerary . Thus the final letters of have Parikh vector . Let and be such that , so the suffix of length of contains , say with . Append the string to . The new Parikh vectors obtained this way are several more copies of (using bows by repeating the letters from positions before) and a in the last suffix, giving the desired itinerary. ∎

Next we turn to strings which realize all of .

Definition 6 (-covering strings, -PdB-strings)

Let be positive integers and let be a string over with . The string is called

  • -covering, if, for every Parikh vector of order , there is a substring of such that , and

  • -PdB-string (Parikh-de-Bruijn string of order ) if, for every Pv , there is exactly one substring of such that .

If is clear from the context, we also say -covering and -PdB word.

PdB-strings are the abelian equivalent of de Bruijn sequences of order : these are strings with the property that every string of length appears exactly once as a substring of . De Bruijn sequences exist for every combination of and , since there is a one-to-one correspondence between de Bruijn sequences of order and Hamiltonian paths in the de Bruijn graph of order ; and they can be constructed efficiently using the fact that Eulerian paths in the -order de Bruijn graph correspond to de Bruijn sequences of order .

Every PdB-string of order corresponds to a Hamiltonian path in the PdB-grid. However, the converse is not true, because not every Hamiltonian path is realizable. In general, PdB-strings do not exist for every pair . In the next section, we study some necessary and sufficient conditions for their existence.

3 Covering words and Parikh de Bruijn words

Below, we will use the convention that the first letters of the alphabet are , unless otherwise stated.

Observation 1

A -covering word has length at least , with equality if and only if the word is a PdB word.

This holds because a word of length contains at most substrings of length , and thus at most Parikh vectors of order . For a -covering word of length , we refer to as the excess of . For , the words of the form are PdB-words, and indeed they have excess .

A classical de Bruijn word contains all possible strings of length and thus necessarily all possible strings of shorter lengths: , etc. This is not always true for Parikh de Bruijn words: for example, the word

is a -PdB word that is not -covering: it has no substring with Pv . The following two statements show how the -covering property relates to the -covering property.

Proposition 2

If or , then a -covering word is also -covering.

Proof

Let denote the -covering word. If , then , meaning and occur in , implying that and also occur in and thus . By the convexity property444Also referred to as interval property or continuity property: For a binary string , if for some , , then also for every . Rediscovered many times, can be referred to as “folklore”. of Parikh sets over a 2-letter alphabet, contains all possible Parikh vectors of order .

For general alphabets, the case of is trivial. If , then by symmetry, it is enough to show that occurs in and that either or occurs in . Since is -covering, occurs in it of which is a factor. Also, one of , , occurs, meaning that a neighboring and are present. ∎

Proposition 3

If and , then there exist words which are -covering, but are not -covering.

Proof

We will show that a -covering word exists that avoids the Parikh vector . Consider the -PdB grid, in which corresponds to a simplex whose vertices are the parents of . Our goal is to construct a string so that the walk in the grid corresponding to visits every vertex in the grid, but avoids edges of the simplex representing . Note that this includes in particular bows corresponding to . We will do this by first constructing a walk that avoids even the vertices of this simplex, and then modifying it so that it visits these vertices, but does so in a “safe” way: whenever the walk visits a vertex of this simplex, in the next step it immediately turns away from it. In particular, it does not use any bows incident to .

If we remove the parent vertices of (together with incident edges and bows) from the PdB grid, then the remaining graph is still connected and contains all bows in all remaining vertices, thus by Theorem 2.2 there exists a word that visits the remaining vertices. This word is almost -covering, except for the vertices of the removed simplex. We now show how to modify so that it visits all vertices of the grid without using edges of the simplex corresponding to . Observe that for each , already contains as a factor. We obtain a new string from by replacing, for every , one factor by the string , specified below for each . This way it is ensured that any new Parikh vector can only appear within these replacement strings.

Notice that the simplex corresponding to lies on a side of the PdB-grid. The vertices of this simplex can be categorized into three types: (1) the parent where the first coordinate is increased as compared to , (2) the two parents where the second or third coordinate is increased, and (3) those where any other coordinate is increased. We will define differently for the three types of parents, namely:

  1. ;

  2. and ;

  3. for all .

It is straightforward to check that the word obtained in this way really visits the parents of in the desired manner. ∎

This only implies that at least one Parikh vector of order can be avoided. One could ask to what extent a -covering word can fail to be -covering.

Question 1

Consider the minimum proportion of visited -order Parikh vectors among -covering words, that is

(1)

Can we determine the exact value of ? Is the actually a limit?

Question 2

Consider . Which finite sets are realizable as for some ? For these are exactly sets of the form . For , we have by Proposition 2 that two necessary conditions are and . It seems possible that these conditions are also sufficient, but a simple proof of this has eluded us so far.

3.1 Shortest covering words

We now turn our attention to shortest -covering words.

The classic concept of a universal cycle is defined as follows [16]: Given a set of combinatorial objects with the property that each object can be represented by a (not necessarily unique) string of length over alphabet ; a universal cycle for is a cyclic string over of length s.t. there is a one-to-one correspondence between elements of and substrings of length of , where addition is modulo . In particular, necessarily .

Recall that classical de Bruijn sequences come in two flavours, linear or cyclic sequences. One can similarly define cyclic PdB-strings: these have exactly one substring for each Pv of order , where the last positions are viewed as continuing with the beginning of the string. Thus, cyclic de Bruijn sequences of order are universal cycles for , while cyclic -PdB-words are universal cycles for . It is easy to see that there is a one-to-one correspondence between and -size multisets over a ground set of size (also called multicombinations), therefore cyclic PdB-strings can also be viewed as universal cycles for multicombinations. There are some known results about these and closely related universal cycles [16, 30, 28, 39, 29, 32].

A universal cycle viewed as a cyclic string always gives rise to a PdB word: simply append the first letters of at the end. But PdB words can also be constructed that do not come from such a cycle: an example is , which is a PdB word for . Theorem 3.1 below implies that in fact no -PdB word comes from a universal cycle.

The following necessary condition is known from the literature on universal cycles. The proof, translated into the language of Parikh vectors, goes by counting occurrences of letters and the contribution of each occurrence to individual coordinates of Parikh vectors.

Theorem 3.1

[16] If a universal cycle on multisets exists, then is an integer.

Slightly modifying the argument from the proof in [16], we obtain some lower bounds for the length of -covering words.

Theorem 3.2

A shortest -covering word has length at least

(2)

In particular, a -PdB-word can only exist if .

Proof

Consider occurrences of the letter . Count all pairs where the letter at position is and is covered by a substring of length with Parikh vector exactly . Each occurrence of is counted at most times, thus the number of such pairs is at most , where is the number of occurrences of in the string. If the word is covering, then all possible Parikh vectors occur somewhere, each covering some occurrences (possibly 0) of letters . The number of ’s in all Parikh vectors is . From this we have

(3)

and so

(4)

Summing for all letters in the alphabet, we get

The other lower bound comes from Observation 1. ∎

Corollary 1

If then a -PdB word can exist only if divides . As a special case, if and is a prime, then a -PdB word can exist only if does not divide .

Proof

If fails to be an integer, then rounding it increases its value by at least . Thus

if .

Note that if is prime, then is an integer if and only if divides one of the neighboring integers . This is the case if and only if does not divide .

We now give upper bounds for the length of shortest covering words.

Proposition 4

If and then the shortest -covering string has length if

is odd, and

for even. This means that for odd , PdB words always exist, and for even the minimal excess is .

Proof

We use the language of PdB-grids, but an equivalent elementary reasoning is also possible. Consider the grid: this is essentially a complete graph on vertices. The -simplices corresponding to order- Parikh vectors are all outside this grid now, only represented by edges for Parikh vectors containing two s, and loops for Parikh vectors containing a . In order to have a -covering string, we have to visit all of these simplices, that is, we have to find a walk covering all edges in a graph that consists of the complete graph on vertices, , together with a loop at each vertex. If is odd, then a Eulerian walk exists, if is even, then we have to traverse at least edges twice, but this suffices. ∎

Proposition 5

For , PdB words exist if and only if either or is not a multiple of .

Proof

Constructions for universal cycles for not a multiple of 3 are given in [30, 28]. A PdB word is given by (in fact up to reversal and permutations of , this is the only one as one can verify by a computer search). If is a multiple of , then Corollary 1 applies. ∎

Question 3

What is the length of the shortest covering strings for and if is a multiple of ?

For general and large alphabets, it was conjectured in [16] that for large enough, depending on , universal cycles exist if and only if divides . By Corollary 1, this would imply the following statement.

Conjecture 1

For large enough depending on , PdB-words exist if and only if divides .

From personal communication [29], we know that the cases and of these conjectures have been settled. A final result in this section gives an impossibility result for .

Theorem 3.3

No PdB words exist for and .

Proof

Suppose a PdB word exists. Consider the walk corresponding to in the -PdB grid. By symmetry, we may assume that , and occur in the walk in this order, say , , with . We know by Lemma 2 that for every position , , since otherwise there would be bows in the walk contradicting the PdB property. Thus on the positions before and after the occurrence of , we only have letters and , in other words and both lie on the side of the triangular grid opposite . Similarly, lies on the side opposite , and on the side opposite to .

The path of length from to disconnects the grid into two regions. The path from to lies entirely in one of these regions. But the only point in this region lying on the side opposite is meaning that , so . A similar argument shows . The string thus contains the factor . If , then at least letters precede or at least letters follow ; w.l.o.g. assume the latter. This implies that lies on the side opposite , but all of those vertices have already been visited, a contradiction. The case can be excluded by a computer search, or a slightly more intricate analysis of the possible letters preceding and following . ∎

We note that Theorem 3.3 is in line with a conjecture made by Donald Knuth in ”The Art of Computer Programming” [32] (Sec. 7.2.1.3, Problem 109). The conjecture states that a universal cycle on -multisets of a set of size exists if and only if a universal cycle on -sets of a set of size exists. If , then this would mean a cycle of -sets of a sized set, and it was proved in [39] that such cycles do not exist.

4 Experimental results

We searched for shortest covering words for moderate values of and . In some cases, the search was performed via a backtracking brute force algorithm. In other cases (esp. for larger values of with ), for each Parikh vector of order , we carefully planned a candidate factor from that realizes . The ideas we used were similar to the ones appearing in [30, 28]. We give some of our results in Table 1. Recall that the excess of a word equals .

word length PdB (excess)
3 2 aabbcca 7 yes
3 3 abbbcccaaabc 12 yes
3 4 aaaabbbbccccaacabcb 19 no (1)
3 5 aaaaabbbacccccbbbbbaacaaccb 27 no (2)
3 6 aaaabccccccaaaaaabbbbbbcccbbcabbaca 35 no (2)
3 7 aabbbccbbcccabacaaabcbbbbbbbaaaaaaacccccccba 44 no (2)
4 2 aabbcadbccdd 12 no (1)
4 3 aaabbbcaadbdbccadddccc 22 yes
4 4 aabbbbcaacadbddbccacddddaaaabdbbccccdd 38 yes
4 5 aaaaabbbbbcaaaadbbbcccccdddddaaaccdbcbaccaccddbddbadacddbbbb 60 yes
5 2 aabbcadbeccddeea 16 yes
5 3 aaabbbcaadbbeaccbdddcccebededadceeeaa 37 yes
5 4 aaaabbbbcaaadbbbeaaccbbddaaeaebcccadbeeeadddcccceeeeddddbebecbdcdeceacdad 73 yes
Table 1: Examples of shortest -covering words for various values of and .

5 Conclusion

In this paper we introduced the Parikh-de-Bruijn grid, which we believe could prove a powerful tool in abelian stringology. In accordance with the differences between abelian string problems and their classical counterparts, the PdB-grid has very different properties from the classical de Bruijn graph. We studied realizable Parikh sets, covering words, and Parikh de Bruijn words. Further directions to explore include the connection between combinatorial properties of the walk of a string in the grid and properties of the string itself: can we characterize abelian squares, abelian borders and other concepts using the graph structure or the geometry of the PdB-grid?

References

  • [1] J. Acharya, H. Das, O. Milenkovic, A. Orlitsky, and S. Pan. String reconstruction from substring compositions. SIAM J. Discrete Math., 29(3):1340–1371, 2015.
  • [2] A. Alatabbi, C. S. Iliopoulos, A. Langiu, and M. S. Rahman. Algorithms for longest common abelian factors. Int. J. Found. Comput. Sci., 27(5):529–544, 2016.
  • [3] P. S. Alexandrov. Combinatorial Topology. Dover, 1956.
  • [4] A. Amir, A. Apostolico, T. Hirst, G. M. Landau, N. Lewenstein, and L. Rozenberg. Algorithms for jumbled indexing, jumbled border and jumbled square on run-length encoded strings. Theor. Comput. Sci., 656:146–159, 2016.
  • [5] A. Amir, T. M. Chan, M. Lewenstein, and N. Lewenstein. On hardness of jumbled indexing. In 41st International Colloquium on Automata, Languages, and Programming (ICALP 2014), volume 8572 of Lecture Notes in Computer Science, pages 114–125, 2014.
  • [6] G. Badkobeh, G. Fici, S. Kroon, and Zs. Lipták. Binary Jumbled String Matching for Highly Run-Length Compressible Texts. Inf. Process. Letters, 113:604–608, 2013.
  • [7] G. Badkobeh, T. Gagie, S. Grabowski, Y. Nakashima, S. J. Puglisi, and S. Sugimoto. Longest common abelian factors and large alphabets. In 23rd International Symposium on String Processing and Information Retrieval (SPIRE 2016), volume 9954 of Lecture Notes in Computer Science, pages 254–259, 2016.
  • [8] D. Bartha, P. Burcsi, and Zs. Lipták. Reconstruction of trees from jumbled and weighted subtrees. In 27th Annual Symposium on Combinatorial Pattern Matching (CPM 2016), volume 54 of LIPIcs, pages 10:1–10:13, 2016.
  • [9] F. Blanchet-Sadri, J. I. Kim, R. Mercas, W. Severa, S. Simmons, and D. Xu. Avoiding abelian squares in partial words. J. Comb. Theory, Ser. A, 119(1):257–270, 2012.
  • [10] P. Burcsi, F. Cicalese, G. Fici, and Zs. Lipták. Algorithms for Jumbled Pattern Matching in Strings. International Journal of Foundations of Computer Science, 23:357–374, 2012.
  • [11] P. Burcsi, F. Cicalese, G. Fici, and Zs. Lipták. On Approximate Jumbled Pattern Matching in Strings. Theory of Computing Systems, 50:35–51, 2012.
  • [12] A. Butman, R. Eres, and G. M. Landau. Scaled and permuted string matching. Inf. Process. Lett., 92(6):293–297, 2004.
  • [13] A. Butman, N. Lewenstein, and J. I. Munro. Permuted scaled matching. Theor. Comput. Sci., 638:27–32, 2016.
  • [14] T. M. Chan and M. Lewenstein. Clustered integer 3sum via additive combinatorics. In Proceedings of the Forty-Seventh Annual ACM on Symposium on Theory of Computing (STOC 2015), pages 31–40. ACM, 2015.
  • [15] M. Christodoulakis, M. Christou, M. Crochemore, and C. S. Iliopoulos. Abelian borders in binary words. Discrete Applied Mathematics, 171:141–146, 2014.
  • [16] F. R. K. Chung, P. Diaconis, and R. L. Graham. Universal cycles for combinatorial structures. Discrete Mathematics, 110(1-3):43–59, 1992.
  • [17] F. Cicalese, E. S. Laber, O. Weimann, and R. Yuster. Approximating the maximum consecutive subsums of a sequence. Theoret. Comput. Sci., 525:130–137, 2014.
  • [18] M. Crochemore, C. S. Iliopoulos, T. Kociumaka, M. Kubica, J. Pachocki, J. Radoszewski, W. Rytter, W. Tyczynski, and T. Walen. A note on efficient computation of all abelian periods in a string. Inf. Process. Lett., 113(3):74–77, 2013.
  • [19] L. J. Cummings and W. F. Smyth. Weak repetitions in strings. J. Combinatorial Math. and Combinatorial Computing, 24:33–48, 1997.
  • [20] L. F. I. Cunha, S. Dantas, T. Gagie, R. Wittler, L. A. B. Kowada, and J. Stoye. Faster jumbled indexing for binary RLE strings. In 28th Annual Symposium on Combinatorial Pattern Matching (CPM 2017), 2017.
  • [21] N. G. de Bruijn. A combinatorial problem. Koninklijke Nederlandse Akademie v. Wetenschappen, 49:758–764, 1946.
  • [22] G. Fici, T. Kociumaka, T. Lecroq, A. Lefebvre, and É. Prieur-Gaston. Fast computation of abelian runs. Theor. Comput. Sci., 656:256–264, 2016.
  • [23] G. Fici, A. Langiu, T. Lecroq, A. Lefebvre, F. Mignosi, J. Peltomäki, and É. Prieur-Gaston. Abelian powers and repetitions in Sturmian words. Theor. Comput. Sci., 635:16–34, 2016.
  • [24] G. Fici, T. Lecroq, A. Lefebvre, and É. Prieur-Gaston. Algorithms for computing abelian periods of words. Discrete Applied Mathematics, 163:287–297, 2014.
  • [25] G. Fici, T. Lecroq, A. Lefebvre, É. Prieur-Gaston, and W. F. Smyth. A note on easy and efficient computation of full abelian periods of a word. Discrete Applied Mathematics, 212:88–95, 2016.
  • [26] T. Gagie, D. Hermelin, G. M. Landau, and O. Weimann. Binary jumbled pattern matching on trees and tree-like structures. Algorithmica, 73(3):571–588, 2015.
  • [27] E. Giaquinta and S. Grabowski. New algorithms for binary jumbled pattern matching. Inf. Process. Lett., 113(14–16):538–542, 2013.
  • [28] G. Hurlbert, T. Johnson, and J. Zahl. On universal cycles for multisets. Discrete Mathematics, 309(17):5321–5327, 2009.
  • [29] B. W. Jackson. Universal cycles of 4-subsets and 5-subsets. unpublished manuscript.
  • [30] B. W. Jackson. Universal cycles of -subsets and -permutations. Discrete Mathematics, 117(1-3):141–150, 1993.
  • [31] S. Jukna. Extremal Combinatorics - With Applications in Computer Science. Texts in Theoretical Computer Science. An EATCS Series. Springer, 2011.
  • [32] D. E. Knuth. The Art of Computer Programming, Volume 4, Fascicle 3: Generating All Combinations and Partitions. Addison-Wesley Professional, 2005.
  • [33] T. Kociumaka, J. Radoszewski, and W. Rytter. Efficient indexes for jumbled pattern matching with constant-sized alphabet. Algorithmica, 77(4):1194–1215, 2017.
  • [34] T. Kociumaka, J. Radoszewski, and W. Rytter. Fast algorithms for abelian periods in words and greatest common divisor queries. J. Comput. Syst. Sci., 84:205–218, 2017.
  • [35] L.-K. Lee, M. Lewenstein, and Q. Zhang. Parikh matching in the streaming model. In 19th International Symposium on String Processing and Information Retrieval (SPIRE 2012), volume 7608 of Lecture Notes in Computer Science, pages 336–341. Springer, 2012.
  • [36] T. M. Moosa and M. S. Rahman. Sub-quadratic time and linear space data structures for permutation matching in binary strings. J. Discrete Algorithms, 10:5–9, 2012.
  • [37] P. A. Pevzner. DNA physical mapping and alternating Eulerian cycles in colored graphs. Algorithmica, 13(1/2):77–105, 1995.
  • [38] P. A. Pevzner, H. Tang, and M. S. Waterman. An Eulerian path approach to DNA fragment assembly. Proc. Nat. Acad. of Sciences, 98:9748–9453, 2001.
  • [39] B. Stevens, P. Buskell, P. Ecimovic, C. Ivanescu, A. M. Malik, A. Savu, T. S. Vassilev, H. Verrall, B. Yang, and Z. Zhao. Solution of an outstanding conjecture: the non-existence of universal cycles with k=n-2. Discrete Mathematics, 258(1-3):193–204, 2002.
  • [40] E. Ukkonen. Approximate string matching with -grams and maximal matches. Theor. Comput. Sci., 92(1):191–211, 1992.
  • [41] D. R. Zerbino and E. Birney. Velvet: Algorithms for de novo short read assembly using de Bruijn graphs. Genome Research, 18:821–829, 2008.