1 Introduction
Let be a set of sequences , . All items are pairwise distinct. Further there is a function which assigns every item with a type . The sequence digraph for a set has a vertex for every type and an arc if and only if there is some sequence in where an item of type is on the left of some item of type .^{1}^{1}1A related but different concept for undirected graphs is the notation of wordrepresentable graphs. A graph is wordrepresentable if there exists a word over the alphabet such that letters and alternate in if and only if ., see [19] for a survey. The contributions of this paper concern graph theoretic properties of sequence digraphs and an algorithm to compute from a given some set on sequences the directed pathwidth of .
This paper is organized as follows. In Section 2 we give preliminaries for graphs and digraphs. In Section 3 we show how to define digraphs form sets of sequences, and vice versa. Further we give methods in order to compute the sequence digraph and also its complement digraph. In Section 4 we consider graph theoretic properties of sequence digraphs. Therefore in Section 4.1 we introduce the class as the set of all sequence digraphs defined by sets on at most sequences that together contain at most items of each type. We show inclusions of these classes and necessary conditions for digraphs to be in . In Section 4.2 we give finite sets of forbidden induced subgraphs for all classes and . It turns out that is equal to the well known class of transitive tournaments. Since only the first and the last item of each type in every are important for the arcs in the corresponding digraph all classes , are equal and can be characterized by one set of four forbidden induced subdigraphs. These characterizations lead to polynomial time recognition algorithms for the corresponding graph classes. Furthermore we give characterizations in terms of special tournaments and conditions for the complement digraph. In Section 4.3 we consider the relations of sequence digraphs to directed cographs (defined in [4]) and their subclass oriented threshold graphs (defined in [9]). In Section 4.4 we consider the closure of the classes with respect to the operations taking the converse digraph and taking the complement digraph. In Section 4.5 we characterize sequences whose defined graphs can be obtained by the union of the graphs for the subsequences which consider only the first or last item of each type.
In Section 5 we consider the directed pathwidth problem on sequence digraphs. We show that for digraphs defined by sequence the directed pathwidth can be computed in polynomial time. Further we show that for sets of sequences of bounded length, of bounded distribution of the items of every type onto the sequences, or bounded number of items of every type computing the directed pathwidth of is NPhard. We also introduce a method which computes from a given set on sequences the directed pathwidth of , as well as a directed pathdecomposition can be computed in time . The main idea is to discover an optimal directed pathdecomposition by scanning the sequences lefttoright and keeping in a state the numbers of scanned items of every sequence and the number of active types.
From a parameterized point of view our method leads to an XPalgorithm w.r.t. parameter . While the existence of FPTalgorithms for computing directed pathwidth is open up to now, there are XPalgorithms for the directed pathwidth problem for some digraph . The directed pathwidth can be computed in time by [20] and in time by [25]. Further in [21] it is shown how to decide whether the directed pathwidth of an semicomplete digraph is at most in time . All these algorithms are exponential in the directed pathwidth of the input digraph while our algorithm is exponential within the number of sequences. Thus our result improves theses algorithms for digraphs of large directed pathwidth which can be decomposed by a small number of sequences (see Table 1 for examples). Furthermore the directed pathwidth can be computed in time , where denotes the vertex cover number of the underlying undirected graph of , by [23]. Thus our result improves this algorithm for digraphs of large which can be decomposed by a small number of sequences (see Table 1 for examples).

Since every single sequence defines a semicomplete free digraph (cf. Table 2 for the digraphs), we consider digraphs which can be obtained by the union of special semicomplete digraphs which confirms the conjecture of [21] that semicompleteness is a useful restriction when considering digraphs.^{2}^{2}2When considering the directed pathwidth of almost semicomplete digraphs in [21] the class of semicomplete digraphs was suggested to be “a promising stage for pursuing digraph analogues of the splendid outcomes, direct and indirect, from the Graph Minors project”. In Section 6 we give conclusions and point out open questions.
2 Preliminaries
We use the notations of BangJensen and Gutin [2] for graphs and digraphs.
Undirected graphs
We work with finite undirected graphs , where is a finite set of vertices and is a finite set of edges. For a vertex we denote by the set of all vertices which are adjacent to in , i.e. . Set is called the set of all neighbors of in or neighborhood of in . The degree of a vertex , denoted by , is the number of neighbors of vertex in , i.e. . The maximum vertex degree is . A graph is a subgraph of graph if and . If every edge of with both end vertices in is in , we say that is an induced subgraph of digraph and we write . For some undirected graph its complement graph is defined by .
Special Undirected Graphs
By , , we denote a path on vertices and by , , we denote a cycle on vertices. Further by , , we denote a complete graph on vertices and by a complete bipartite graph on vertices.
Directed graphs
A directed graph or digraph is a pair , where is a finite set of vertices and
is a finite set of ordered pairs of distinct
^{3}^{3}3Thus we do not consider directed graphs with loops. vertices called arcs. For a vertex , the sets and are called the set of all outneighbours and the set of all inneighbours of . The outdegree of , for short, is the number of outneighbours of and the indegree of , for short, is the number of inneighbours of in . The maximum outdegree is and the maximum indegree is . The maximum vertex degree is and the maximum semidegree is .A vertex is outdominating (indominated) if it is adjacent to every other vertex in and is a source (a sink, respectively). A digraph is a subdigraph of digraph if and . If every arc of with both end vertices in is in , we say that is an induced subdigraph of digraph and we write . For some digraph its complement digraph is defined by and its converse digraph is defined by .
Let be a digraph.

is edgeless if for all , , none of the two pairs and belongs to .

is a tournament if for all , , exactly one of the two pairs and belongs to .

is semicomplete if for all , , at least one of the two pairs and belongs to .

is (bidirectional) complete if for all , , both of the two pairs and belong to .
Omitting the directions
For some given digraph , we define its underlying undirected graph by ignoring the directions of the edges, i.e. .
Orientations
There are several ways to define a digraph from an undirected graph , see [2]. If we replace every edge of by

one of the arcs and , we denote as an orientation of . Every digraph which can be obtained by an orientation of some undirected graph is called an oriented graph.

one or both of the arcs and , we denote as a biorientation of . Every digraph which can be obtained by a biorientation of some undirected graph is called a bioriented graph.

both arcs and , we denote as a complete biorientation of . Since in this case is well defined by we also denote it by . Every digraph which can be obtained by a complete biorientation of some undirected graph is called a complete bioriented graph.
Special Directed Graphs
We recall some special directed graphs. We denote by , a bidirectional complete digraph on vertices. By , we denote a directed path on vertices and by , we denote a directed cycle on vertices.
The power graph of a digraph is a graph with the same vertex set as . There is an arc in if and only if there is a directed path from to of length at most in .
An oriented forest (tree) is the orientation of a forest (tree). A digraph is an outtree (intree) if it is an oriented tree in which there is exactly one vertex of indegree (outdegree) zero.
A directed acyclic digraph (DAG for short) is a digraph without any , as subdigraph.
3 Sequence Digraphs and Sequence Systems
3.1 From Sequences to Digraphs
Let be a set of sequences. Every sequence consists of a number of items, such that all items are pairwise distinct. Further there is a function which assigns every item with a type . The set of all types of the items in some sequence is denoted by . For a set of sequences we denote . For some sequence we say item is on the left of item in sequence if . Item is on the position in sequence , since there are items on the left of in sequence .
In order to insert a new item on a position in sequence we first move all items on positions to position starting at the rightmost position and then we insert at position . In order to remove an existing item at a position in sequence we move all items from positions to position starting at position .
For hardness results in Section 5.2 we consider the distribution of the items of a type onto the sequences by
For the number of items for type within the sequences we define
Obviously it holds and .
Definition 3.1 (Sequence Digraph)
The sequence digraph for a set has a vertex for every type, i.e. and an arc if and only if there is some sequence in where an item of type is on the left of an item of type . More formally, there is an arc if and only if there is some sequence in , such that there are two items and such that

,

,

, and

.
Sequence digraphs have successfully been applied in order to model the stacking process of bins from conveyor belts onto pallets with respect to customer orders, which is an important task in palletizing systems used in centralized distribution centers [14]. In this paper we show graph theoretic properties of sequence digraphs and their relation to special digraph classes.
In our examples we will use type identifications instead of item identifications to represent a sequence . For not necessarily distinct types let denote some sequence of pairwise distinct items, such that for . We use this notation for sets of sequences as well.
Example 3.2 (Sequence Digraph)
Figure 2 shows the sequence digraph for with sequences , , and .
In Example 3.2 all sequences of contain consecutive items of the same type. This is obviously not necessary to obtain digraph . Let be the subsequence of which is obtained from by removing all but one of consecutive items of the same type for each type and .
Observation 3.3
Let be a set of sequences, then .
Next we give methods in order to compute the sequence digraph and also its complement digraph. Therefore we define the position of the first item in some sequence of some type by and the position of the last item of type in sequence by . For technical reasons, if there is no item for type contained in sequence , then we define , and .
Lemma 3.4
Let be some set of one sequence, the defined sequence digraph, its complement digraph, and two vertices of .

There is an arc , if and only if .

There is an arc , if and only if .

If , then .

There is an arc and an arc , if and only if .
Proof

By the definition of the arcs of sequence digraphs.

It holds if and only if . Further by (1) and it holds if and only if .

If , then our result (2) implies which implies that .
Lemma 3.5
Let be some set of sequences, the defined sequence digraph, its complement digraph, and two vertices of .

There is an arc , if and only if there is some such that .

There is an arc , if and only if for every it holds .
Proof

By the definition of the arcs of sequence digraphs.

It holds if and only if . Further by (1) and we have if and only if for every it holds .
Properties (3) and (4) of Lemma 3.4 can not be shown for sequences, since an arc can be obtained by two types and from two different sequences and such that and . In such situations it is not necessary to have .
By Lemma 3.5(1) only the first and the last item of each type in every are important for the arcs in the corresponding digraph. Let be the subsequence of which is obtained from by removing all except the first and last item for each type and .
Observation 3.6
Let be a set of sequences, then .
Alternatively to Lemma 3.5 the sequence digraph can be obtained as follows.
Proposition 3.7
Given a set of sequences, the sequence digraph can be computed in time .
Proof Digraph can be computed in time by the algorithm Create Sequence Digraph shown in Figure 3. A value is added to vertex set or arc set only if it is not already contained. To check this efficiently in time we have to implement and as boolean arrays. Therefore we need some preprocessing phase where we run through each sequence and seek for the types. This can be done in time . To implement list efficiently, we have to use an additional boolean array to test membership in . The inner loop sums up to steps. Since , lines 68 will run in time , so the overall running time is .
3.2 From Digraphs to Sequences
Definition 3.8 (Sequence System)
Let be some digraph and its arc set. The sequence system for is defined as follows.

There are items .

Sequence for .

The type of item is the first vertex of arc and the type of item is the second vertex of arc for . Thus .
Example 3.9 (Sequence System)
For the digraph of Figure 2 the corresponding sequence system is given by , where , , , , , , . The sequence digraph of is .
The definitions of the sequence system and the sequence digraph , defined in Section 3.1, imply the following results.
Observation 3.10
For every digraph it holds .
The related relation is not true in general (e.g. not for from Example 3.2). But if the reduction to different consecutive items contains exactly two items of different types the following equivalence holds true.
Lemma 3.11
For every set of sequences it holds if and only if each sequence contains exactly two items of different types.
Since holds for every set of sequences , in Lemma 3.11 we also can replace condition by condition .
Lemma 3.12
For every digraph with there is a set of at most sequences such that .
Proof For every digraph by Observation 3.10 the sequence system leads to a set of at most sequences such that . If we have two arcs and between two vertices and these can be represented by one sequence .
There are digraphs which even can be defined by one sequence (see Example 4.11(1) and Theorem 4.16) and there are digraphs for which sequences are really necessary (see Lemma 4.12 and Lemma 4.8).
For digraphs of bounded vertex degree the sequence system leads to sets whose distribution and number of items of each type can be bounded as follows.
Lemma 3.13
For every digraph where there is a set with and such that .
In case of complete bioriented digraphs we can improve the latter bounds as follows.
Lemma 3.14
For every complete bioriented digraph where there is a set with and (for even ) such that .
Proof By Lemma 3.13 we obtain and . Since we consider complete bioriented digraphs for every two vertices and we now have two sequences and , which can be combined to only one sequence . This leads to and . For we can show the stated improvement as follows. Obviously for every weakly connected component of there is at most one type such that there are exactly items of type . If there is one type such that there are exactly items of type , then there are less than types such that there are exactly items of type . Thus there is one sequence such that there are at most items of type . If we substitute by we achieve .
4 Properties of Sequence Digraphs
4.1 Graph Classes and their Relations
In order to represent some digraph as a sequence digraph we need exactly types. By Lemma 3.12 every digraph is a sequence digraph using a suitable set of sequences. Thus we want to consider digraphs which can be defined by a given upper bound for the number of sequences. Furthermore the first and the last item of each type within a sequence is the most important one by Observation 3.6, thus we want to analyze the digraphs which can be defined by a given upper bound for the number of items of each type. We define to be the set of all sequence digraphs defined by sets on at most sequences that contain at most items of each type in . By the definition we know for every two integers and the following inclusions between these graph classes.
(1)  
(2) 
Corollary 4.1
Let be a set on sequences and the defined graph with . Then we can assume that and .
Lemma 4.2
Let and be defined by , then digraph is semicomplete and thus graph is the complete graph on vertices.
Proof Let be some set of one sequence which defines the sequence digraph . For every vertex in there is exactly one corresponding type . Since for every two vertices and in there are two items and of type and , respectively, which define the arc or .
Corollary 4.3
Let be a digraph, such that graph has connected components. Then for every and it holds .
The following generalization of Lemma 4.2 to sequences is easy to verify.
Lemma 4.4
Let be some set of sequences, then is connected if and only if there is no set , such that .
Bounds on distribution and number of items for each type in
can be used to classify
into the classes as follows.Lemma 4.5
Let be some set of sequences, then and .
Proof Relation holds by Observation 3.6. The further results hold by definition.
Next we consider the relations of the defined classes for sequence. Since contains only digraphs with exactly one arc between every pair of vertices (cf. Theorem 4.16 for a more precise characterization) and for contains all bidirectional complete graphs we know that for every . Further by (2) and by Observation3.6 it follows that all classes for are equal.
Lemma 4.6
For every two integers it holds .
Corollary 4.7
For the following inclusions hold.
The equalities of Lemma 4.6 can not be generalized for sequences and since removing items from different sequences can change the sequence digraph. In order to give examples for digraphs which do not belong to some of the classes we next show some useful results.
For a set of digraphs we denote by free digraphs the set of all digraphs such that no induced subdigraph of is isomorphic to a member of . If consists of only one digraph , we write free instead of free. For undirected graphs we use this notation as well.
Lemma 4.8
Let be a triangle free graph, i.e. a free graph, with , such that and be an orientation of . Then for it holds but for or it holds .
Proof Let and be as in the statement of the lemma. Further let be a set of sequences such that . If some sequence defines more than one arc of , then has to contain at least three items of pairwise distinct types. This would induce a in , which is not possible by our assumption. Thus we have to represent every arc of by one sequence . Thus can not be defined by less than sequences or less than items for every type.
Since for every and every there is a tree on edges and we know by Lemma 4.8 that for and we have . Further by Observation 3.6 we know that for and it holds .
Corollary 4.9
For the following inclusions hold.
Proposition 4.10
Let , then for every induced subdigraph of it holds .
Proof A set of sequences for an induced subdigraph can be obtained from a set of the original digraph by restricting to the items which are destinated for types corresponding to vertices of .
Graph classes which are closed under taking induced subgraphs are called hereditary. Hereditary graph classes are exactly those classes which can be defined by a set of forbidden induced subgraphs. On the other hand, the classes are not closed under taking arbitrary subgraphs by the following example.
Example 4.11

For every and it holds , which can be verified by set , where
Comments
There are no comments yet.