Extending Partial Representations of Subclasses
of Chordal Graphs
Abstract
Chordal graphs are intersection graphs of subtrees of a tree . We investigate the complexity of the partial representation extension problem for chordal graphs. A partial representation specifies a tree and some predrawn subtrees of . It asks whether it is possible to construct a representation inside a modified tree which extends the partial representation (i.e, keeps the predrawn subtrees unchanged).
We consider four modifications of and get vastly different problems. In some cases, it is interesting to consider the complexity even if just is given and no subtree is predrawn. Also, we consider three wellknown subclasses of chordal graphs: Proper interval graphs, interval graphs and path graphs. We give an almost complete complexity characterization.
We further study the parametrized complexity of the problems when parametrized by the number of predrawn subtrees, the number of components and the size of the tree . We describe an interesting relation with integer partition problems. The problem 3Partition is used for all NPcompleteness reductions. The extension of interval graphs when the space in is limited is “equivalent” to the BinPacking problem.
1 Introduction
Geometric representations of graphs and graph drawing are important topics of graph theory. We study intersection representations of graphs where the goal is to assign geometrical objects to the vertices of the graph and encode edges by intersections of these objects. An intersectiondefined class restricts the geometrical objects and contains all graphs representable by these restricted objects; for example, interval graphs are intersection graphs of closed intervals of the real line. Intersectiondefined classes have many interesting properties and appear naturally in numerous applications; for details see for example Golumbic (2004); Spinrad (2003); McKee and McMorris (1999).
For a fixed class, its recognition problem asks whether an input graph belongs to this class; in other words, whether it has an intersection representation of this class. The complexity of recognition is wellunderstood for many classes; for example interval graphs can be recognized in lineartime Booth and Lueker (1976); Corneil et al. (2009).
We study a recently introduced generalization of the recognition problem called the partial representation extension Klavík et al. (2011). Given a graph and a partial representation (a representation of an induced subgraph), it asks whether it is possible to extend this partial representation to a representation of the entire graph. This problems falls into the paradigm of extending partial solutions, an approach that has been studied frequently in other circumstances. Often it proves to be much harder than building a solution from scratch, for example for graph coloring Hujter and Tuza (1993); Fiala (2003). Surprisingly, a very natural problem of extending partially represented graphs was only considered recently.
The paper Klavík et al. (2011) gives an algorithm for interval graphs and an algorithm for proper interval graphs. Also, several other papers consider this problem. Interval representations can be extended in time Bläsius and Rutter (2013); Klavík et al. (2012c). Proper interval representations can be extended in time and unit interval representations in time Klavík et al. (2012b). Polynomial time algorithms are also described for function and permutation graphs Klavík et al. (2012a), and for circle graphs Chaplick et al. (2013).
In this paper, we follow this recent trend and investigate the complexity of partial representation extension of chordal graphs. Our mostly negative NPcompleteness results are very interesting since chordal graphs are the first class for which the partial representation problem is proved to be strictly harder than the original recognition problem. Also, we investigate three wellknown subclasses – proper interval graphs, interval graphs and path graphs, for which the complexity results are richer. We believe that better understanding of these simpler cases will provide tools to attack chordal graphs and beyond (for example, from the point of the parameterized complexity). For the conference version of this paper see Klavík et al. (2012d).
1.1 Chordal Graphs and Their Subclasses
A graph is chordal if it does not contain an induced cycle of length four or more, i.e., each “long” cycle is triangulated. The class of chordal graphs, denoted by CHOR, is wellstudied and has many wonderful properties. Chordal graphs are closed under induced subgraphs and possess the so called perfect elimination schemes which describe perfect reorderings of sparse matrices for the Gaussian elimination. Chordal graphs are perfect and many hard combinatorial problems are easy to solve on chordal graphs: maximum clique, maximum independent set, coloring, etc. Chordal graphs can be recognized in time Rose et al. (1976).
Chordal graphs have the following intersection representations Gavril (1974). For every chordal graph there exists a tree and a collection of subtrees of such that if and only if . For an example of a chordal graph and one of its intersection representations, see Fig. 1.
When chordal graphs are viewed as subtreesintree graphs, it is natural to consider two other possibilities: subpathsinpath which gives interval graphs (INT), and subpathsintree which gives path graphs (PATH). For example the graph in Fig. 1 is a path graph but not an interval one. Subpathsinpath representations of interval graphs can be viewed as discretizations of the real line representations. Interval graphs can be recognized in Booth and Lueker (1976); Corneil et al. (2009) and path graphs in time Gavril (1978); Schäffer (1993).
In addition, we consider proper interval graphs (PINT). An interval graph is a proper interval graph if it has a representation for which implies ; so no interval is a proper subset of another one.^{1}^{1}1It is possible to define proper interval graphs differently: If , then is empty or a connected subpath of . In other words, no interval can be placed in the middle of another interval. Our results can be easily modified for this alternative definition. Proper interval graphs can be recognized in time Looges and Olariu (1993); Corneil et al. (1995). From the point of our results, PINT behaves very similar to INT but there are subtle differences which we consider interesting. Also, partial representation extension of PINT is surprisingly very closely related to partial representation extension of unit interval graphs considered in Klavík et al. (2012b); see Section 1.4 for details.
1.2 Partial Representation Extension
For a class , we denote the recognition problem by . For an input graph , it asks whether it belongs to , and moreover we may certify it by a representation. The partial representation extension problem denoted by asks whether a part of the representation given by the input can be extended to a representation of the whole graph.
A partial representation of is a representation of an induced subgraph . The vertices of are called predrawn. A representation extends if for every . The metaproblem we deal with is the following.
Problem:  (Partial Representation Extension of ) 

Input:  A graph with a partial representation . 
Output:  Does have a representation that extends ? 
In this paper, we study complexity of the partial representation extension problems for the classes CHOR, PATH, INT, and PINT in the setting of subtreesintree representations. Here a partial representation fixes subtrees belonging to and also specifies some tree in which these subtrees are placed. A representation is placed in a tree which is created by some modification of . We consider four possible modifications and get different extension problems:

Fixed – the tree cannot be modified at all, i.e, .

Sub – the tree can only be subdivided, i.e., is a subdivision of .^{2}^{2}2Let an edge be subdivided (with a vertex added in the middle). Then also predrawn subtrees containing both and are modified and contain as well. So technically in the case of subdivision, it is not true that for every predrawn interval, but from the topological point of view the partial representation is extended.

Add – we can add branches to the tree, i.e., is a subgraph of .

Both – we can both add branches and subdivide, i.e, a subgraph of is a subdivision of . In other words is a topological minor of .
We denote the problems by where denotes the type. See Fig. 2.
Constructing a representation in a specified tree is interesting even if no subtree is predrawn, i.e., is empty; this problem is denoted by . Clearly, the hardness of the problem implies the hardness of the corresponding RepExt problem.
For PINT and INT classes, the types Add and Sub behave as follows. The type Add allows to extend the ends of the paths. The type Sub allows to expand the middle of the path. The difference is that if an endpoint of the path is contained in some predrawn subpath, it remains contained in it after the subdivision. The type Both makes the problems equivalent to the Recog and RepExt problems for the real line.
1.3 Our Results
We study the complexity of the and RepExt problems for all four classes and all four types. Our results are displayed in Fig. 3.

All NPcomplete results are reduced from the 3Partition problem. The reductions are very similar and the basic case is Theorem 3.2 for and .

The polynomial cases for INT and PINT are based on the known algorithm for recognition and extension. But since the space in is limited, we adapt the algorithm for the specific problems.
Every interval graph has a realline representation in which all endpoints are at integer positions. But the result that is NPcomplete can be interpreted in the way that extending such representations is NPcomplete. (Here, we require that also the nonpredrawn intervals have endpoints placed at integer positions.) On the other hand, our lineartime algorithm for shows that integerposition proper interval representations can be extended in linear time.
For a subpathsinpath partial representation, we assume that an input gives the endpoints of the predrawn subpaths sorted by the input from left to right. This allows us to construct algorithms in time which do not depend on the size of the path .
Parameterized Complexity. We study the parameterized complexity of these problems with respect to three parameters: The number of predrawn subtrees, the number of components and the size of the tree . In some cases, the parametrization does not help and the problem is NPcomplete even if the value of the parameter is zero or one. In other cases, the problems are fixedparameter tractable (FPT), W[1]hard or in XP.
The main result concerning parametrization is the following. The BinPacking problem is a wellknown problem concerning integer partitions; more details in Section 3.4. For two problems and , we denote by polynomial reducibility and by weak truthtable reducibility. (Roughly speaking, to solve we may use a number of oraculum questions which is bounded by a computable function.)
Theorem 1.1
For the number of bins and predrawn subtrees, we get
The weak truthtable reduction needs to solve instances of BinPacking.
1.4 Two Related Problems
We describe two problems which are closely related to our results.
The problem of simultaneous representations Jampani and Lubiw (2009) asks whether there exist representations of graphs which are the same on the common part of the vertex set for all . It is noted in Klavík et al. (2011) that the partial representation extension is closely related to the simultaneous representations. For instance, using simultaneous representations of interval graphs, we can solve their partial representation extension Bläsius and Rutter (2013). As we show in this paper, this is not the case for chordal graphs since RepExt of chordal graphs is NPcomplete but their simultaneous representations are solvable in polynomialtime Jampani and Lubiw (2009).
The partial representation extension problem of proper interval graphs described here is closely related to partial representations and the bounded representation problem of unit interval graphs Klavík et al. (2012b). In all these problems, one deals with interval representations in a limited space. So the techniques initially developed for unit interval graphs are easily used here for proper interval graphs. We note that the problems concerning unit interval graphs are more difficult since they involve computations with rational number positions.
2 Preliminaries
In this section, we describe the notation used in this paper. Also, we deal with two common concepts of the partial representation extension problems: Located and unlocated components, and groups of indistinguishable vertices.
Notation. We consider finite undirected simple graphs, i.e., graphs without loops and multiedges. As usual, we reserve for the number of the vertices and for the number of the edges of the main considered graph . The set of its vertices is denoted by and the set of its edges by . For a vertex , we let denote the open neighborhood of , and the closed neighborhood of .
By , we denote the path of the length with vertices. For a tree, we call the vertices of degree larger than two branch vertices and the vertices of degree at most two nonbranch vertices, and of course the vertices of degree one are called leaves.
The Type Lattice. The four types Fixed, Sub, Add, and Both form the lattice depicted in Fig. 4. For a type , we denote by the set of all trees which we can generate from using the modifications of the type . In addition, if contains predrawn subtrees, the trees in contain these (possibly subdivided) predrawn subtrees as well. The ordering of the types given by the lattice has this property: If , then .
Whether a given instance is solvable depends on the set ; so if this set contains more trees, it only helps in solving the problem. Let . If an instance of or RepExt is solvable for the type , then it is solvable for the type as well. Equivalently, if it is not solvable for , it is also not solvable for .
For the types Add and Both (and Sub for PINT and INT), the set contains a tree having an arbitrary tree as a subtree. Therefore, the problem for these types is equivalent to the standard Recog problem, and we can use the known polynomialtime algorithms.
Topology of Components. The following property works quite generally for many intersectiondefined classes of graphs, and works for all classes studied in this paper. The only required condition is that the sets are connected subsets of some topological space, for example . (As a negative example, this property does not hold for interval graphs. A graph is a interval graph if each is a union of two closed intervals.) Let be a connected component of . Then the property is that for each representation , the set is a connected subset of the space, and we call this subset the area of . Clearly, the areas of the components are pairwise disjoint.
For the classes PINT and INT, the areas of the components have to be ordered from left to right. Let us denote this ordering by , so we have . For different representations , we can have different orderings . When no restriction is posed on , it is possible to create a representation in every of the possible orderings.
Types of Components. For the partial representation extension problem, the graph contains two types of components. A component is called a located component if it has at least one vertex predrawn, i.e., is nonempty. A component is called an unlocated component if no interval is predrawn, i.e., . For located components, we have a partial information about their position. For unlocated components, we are much freer in their placement.
For the classes of interval graphs, the located components are ordered from left to right. An obvious necessary condition for an extendible partial representation is that the predrawn intervals of each component appear consecutively in . Indeed, if and are two distinct components, , and is between and , then the partial representation is clearly not extendible. For every representation extending , the ordering has to extend the ordering of the located components in .
For many of the considered problems the unlocated components are irrelevant. For instance for , we can extend the path far enough to the right and place the unlocated components there, without interfering with the partial representation at all. On the other hand, for problems involving the types Fixed and Sub, the space in is limited and the unlocated components have to be placed somewhere. In many cases, the existence of unlocated components is not only used for NPcompleteness proofs but also necessary for the problems to be NPcomplete.
Indistinguishable Vertices. Let and be two vertices of such that . These two vertices are called indistinguishable since they can be represented exactly the same, i.e., . (This is a common property of indistinguishable vertices for all intersection representations). From the structural point of view, groups of indistinguishable vertices are not very interesting. The goal is to construct a pruned graph where each group is represented by a single vertex. For that, we need to be little careful since we cannot prune predrawn vertices.
For an arbitrary graph, its groups of indistinguishable vertices can be located in time Rose et al. (1976). We prune the graph in the following way. If and are indistinguishable and is not predrawn, we eliminate from the graph (and for the representation, we can put ). In addition, if two predrawn intervals are the same, we eliminate one of them. The resulting pruned graph has the following property: If two vertices and indistinguishable, they are both predrawn and represented by distinct intervals. For the rest of the paper, we expect that all input graphs are pruned.
Maximal Cliques. It is well known that subtrees of a tree possess the Helly property, i.e., every pairwise intersecting collection of subtrees has a nonempty intersection (which is again a subtree). Hence the following holds true for all classes of graphs considered. If is a maximal clique of , the common intersection is a subtree of . This subtree is not intersected by any other for (otherwise would not be a maximal clique). Thus the subtrees corresponding to different maximal cliques are pairwise disjoint. For example, if is smaller than the number of maximal cliques of , the graph is clearly not representable in .
3 Interval Graphs
In this section, we deal with the classes PINT and INT. The results obtained here are used as tools for PATH and CHOR in Section 4.
Let be the vertices of the path . For a located component , we say that a vertex is taken by if there exists a predrawn subpath of containing .
3.1 Structural Results
We describe two types orderings: Endpoint orderings for proper interval graphs and clique orderings for interval graphs. Also, we introduce an important concept called the minimum span of a component.
Endpoint Orderings of PINT. Each proper interval representation gives some ordering of the intervals from left to right. This is the ordering of the left endpoints from left to right, and at the same time the ordering of the the right endpoints. The following lemma of Deng et al. (1996) states that is well determined:
Lemma 1 (Deng et al.)
For a component of a proper interval graph, the ordering is uniquely determined up to a local reordering of the groups of indistinguishable vertices and the complete reversal.
So for a connected graph, we have a partial ordering in which exactly the indistinguishable vertices are incomparable, and each is a linear extension of either , or its reversal. Corneil et al. Corneil et al. (1995) describes how this ordering can be constructed in time . Since the graphs we consider are pruned, all incomparable vertices in are ordered by their positions in the partial representation. Thus we have at most two possibilities for for each component . (And two possibilities only if all predrawn vertices are indistinguishable.)
Minimum Spans of PINT. For the types Fixed and Add, the space on the path is limited. So it is important to minimize the space taken by each component . We call the minimum space required by the minimum span of , denoted by . Let be a proper interval representation of extending , and let be the leftmost vertex of taken by and the rightmost one. Then
A representation of is called smallest if it realizes the minimum span of .
Lemma 2
For every component , the value can be computed in time , together with a smallest representation of .
Proof
First, we deal with unlocated components, and later modify the approach for the located ones.
Case 1: An Unlocated Component. Since there are no indistinguishable vertices, we compute in time using the algorithm of Corneil et al. (1995) any ordering for which we want to produce a representation as small as possible.
Let denote the left endpoint and the right endpoint of the interval . From the ordering , we want to compute the common ordering of both the left and the right endpoints from left to right. The starting point is the ordering of just the left endpoints . Into this ordering, we insert the right endpoints onebyone. A right endpoint is inserted right before where is the leftmost nonneighbor of on the right in ; if such does not exist, we append to the end. For an example of , see Fig. 5.
We build a smallest representation using as follows. Let be the vertices of the tree . We construct an assignment which maps the endpoints of the intervals of into . Then for a vertex we put
The mapping is constructed for the endpoints onebyone, according to . Suppose that the previous endpoint in has assigned a vertex . If the current endpoint is a right endpoint and the previous endpoint is a left endpoint, we assign to the current endpoint. Otherwise we assign to it. For an example, see Fig. 5.
In total, the component needs vertices of where denotes the number of changes from a left endpoint to a right endpoint in the ordering ; in other words, is the value of . The total complexity of the algorithm is clearly .
To conclude the proof, we need to show that we construct a correct smallest representation of . A property of is that the closed neighborhood of every vertex is consecutive in . If and , then , and so intersects (between and ). If , then . Thus is placed on the left of in , and as required.
Concerning the minimality notice that in a pruned graph, and hold for every . We argue that we use gaps as small as possible. Only a right endpoint following a left endpoint can be placed at the same position. The other case of a right endpoint followed by a left endpoint requires a gap of size one; otherwise would intersect but . So the gaps are minimal, we construct a smallest representation, and give the value correctly.
Case 2: A Located Component. We modify the above approach slightly to deal with located components. We already argued that there are at most two possible orderings (since the indistinguishable vertices are ordered by the partial representation), and we just test both of them. Both orderings can be used if and only if all predrawn vertices belong to one group of indistinguishable vertices. Then these two orderings give the same but the minimum representations might be differently shifted, and we are able to construct both of them. If the predrawn intervals do not belong to one group, the ordering is uniquely determined. (If it is compatible with the ordering of the predrawn intervals at all.)
We compute the common ordering exactly as before and place the endpoints in this ordering. The only difference is that the endpoints of the predrawn intervals are prescribed. So we start at the position of the leftmost predrawn endpoint . We place the endpoints smaller in than on the left of as far to the right as possible. (We approach them in the reverse order exactly as above.) Then we proceed with the remaining endpoints in the order given by . If the current endpoint is predrawn, we keep it as it is. Otherwise, we place it in the same way as above. The constructed representation is smallest and gives .∎
Clique Orderings of INT. Recall the properties of maximal cliques from Section 2. For a component , we denote by the number of maximal cliques of . Let be a representation of . Since the subtrees corresponding to the maximal cliques are pairwise disjoint, they have to be ordered from left to right. This ordering has the following wellknown property Fulkerson and Gross (1965):
Lemma 3 (Fulkerson and Gross)
A graph is an interval graph if and only if there exists an ordering of the maximal cliques such that for each vertex the cliques containing appear consecutively in this ordering.
We quickly argue about the correctness of the lemma. Clearly, in an interval representation, all maximal cliques containing one vertex appear consecutively. (Otherwise the clique in between would be intersected by in addition.) On the other hand, having an ordering of the maximal cliques from the statement, we can construct a representation as follows. Assign a vertex of to each clique , respecting the ordering . For each vertex , we assign . Since the maximal cliques containing appear consecutively, each is a subpath.
Minimum Spans of INT. We again consider the minimum span defined exactly as for proper interval graphs above. Clearly, . We show:
Lemma 4
For an unlocated component of an interval graph, . We can find a smallest representation in time .
Proof
We start by identifying maximal cliques in time , using the algorithm of Rose et al. Rose et al. (1976). To construct a smallest representation, we find an ordering from Lemma 3, using the PQtree algorithm Booth and Lueker (1976) in time . If such an ordering does not exist, the graph is not an interval graph and no representation exists. If the ordering exists, we can construct a representation using exactly vertices of the path as described above, by putting .∎
We note that this approach does not translate to located components, as in Lemma 2 for proper interval graphs. We prove in Corollary 1 that finding the minimum span for a located component is an NPcomplete problem. (We prove this in the setting that the problem is NPcomplete. In the reduction, we ask whether a connected interval graph has the minimum span at most for some integers and .)
3.2 The Polynomial Cases
First we deal with all polynomial cases.
Fixed Type Recognition. We just need to use the values of minimum spans we already know how to compute.
Proposition 1
Both and can be solved in time .
Proof
Add Type Extension, PINT. Again, we approach this problem using minimum spans and Lemma 2.
Proposition 2
The problem can be solved in time .
Proof
Since the path can be expanded to the left and to the right as much as necessary, we can place unlocated components far to the left. So we only need to deal with located components, ordered from left to right. We process the components from left to right. When we place , it has to be placed on the right of . We have (at most) two possible smallest representations corresponding to two different orderings of . We test whether at least one of them can be placed on the right of , and pick the one minimizing the rightmost vertex of taken by (leaving the maximum possible space for ). If neither of the smallest representations can be placed, the extension algorithm outputs “no”.
If the algorithm finishes, it constructs a correct representation. On the other hand, we place each component as far to the left as possible (while restricted by the previous components on the left). So if cannot be placed, there exists no representation extending the partial representation.∎
Nonfixed Type Recognition. The only limitation for recognition of interval graphs inside a given path is the length of the path. In the three types Sub, Add and Both, we can produce a path as long as necessary. (With the trivial exception for Sub for which the instance is solvable if and only if .) For a subpathsinpath representation, the order of the endpoints of the subpaths from left to right is the only thing that matters, not the exact positions. In a tree with at least vertices, every possible ordering is realizable.
Thus the problems are equivalent to the standard recognition of interval graphs on the real line. The recognition can be solved in time ; see Looges and Olariu (1993); Corneil et al. (1995) for PINT, and Booth and Lueker (1976); Corneil et al. (2009) for INT.
Both Type Extension. This extension type is equivalent with the partial representation extension problems of interval graphs on the real line. Again only the ordering of the endpoints is important. The only change here is that some of the endpoints are already placed. By subdividing, we can place any amount of the endpoints between any two endpoints (not sharing the same position). Also, the path can be extended to the left and to the right which allows to place any amount of endpoints to the left of the leftmost predrawn endpoint and to the right of the rightmost predrawn endpoint. So any extending ordering can be realized in the Both type.
The partial representation extension problem for interval graphs on the real line was first considered in Klavík et al. (2011). The paper gives algorithms for both classes INT and PINT, and does not explicitly deal with representations sharing endpoints but the algorithms are easy to modify. The results Bläsius and Rutter (2013); Klavík et al. (2012c, b) show that both extension problems are solvable in time .
Sub Type Extension. It is possible to modify the above algorithms for partial representation extension of INT and PINT. Instead of describing details of these algorithms, we simply reduce the problems to the type Both which we can solve in time (as discussed above):
Theorem 3.1
The problems and can be solved in time .
The general idea is as follows. The difference between between Sub and Both is that for the Sub type, we cannot extend the path at the ends. Suppose that some predrawn subpath contains say the left endpoint of . Then contains this endpoint also in . So we are going to modify the graph in such a way, that every representation of the Both type has to place everything on the right of .
Suppose first that the graph contains some unlocated components, and we show how to deal with them. We want to find one edge of which we can subdivide many times and place all unlocated components in between of and in . We call an edge expandable if no located component takes and such that .
Lemma 5
Let have at least one unlocated component, and let be the graph constructed from by removing all unlocated components. Then is extendible to if and only if contains at least one expandable edge and is extendible to of .
Proof
Let be extendible to and let be one unlocated component placed in such that it takes a vertex in between of and of . Clearly is extendible to . And is expandable since if there would be a located component taking and , then would split , contradicting existence of in ; recall the definition of in Section 2.
For the other implication, we subdivide the expandable edge many times such that we can place all unlocated components in this area. For located components, some of them have to be placed on the left of the unlocated components, and some on the right. We can subdivide all edges of enough to place the endpoints in the same order as in . Thus we get extending .∎
Proof (Theorem 3.1)
We describe the reduction for INT, and then we slightly modify it in the last paragraph for PINT. We deal with unlocated components using Lemma 5. We just need to check existence of an expandable edge for which we first compute the ordering of the located components (if it doesn’t exist, the partial representation is clearly not extendible). If there is exactly one located component , then at least one of and is not taken by , and say for we obtain an expandable edge . And if there are at least two located components , let be the rightmost vertex taken by . Then is clearly expandable. It remains to deal with located components.
Let us consider the endpoint of . In Both, we can attach in a path of any length on the left of . If is not taken by , we can create in the same path by subdividing . But if is taken by , we have to forbid to be used in the construction of . We modify both the path and the graphs , and we show that any representation extending is realized in in between of and .
The modification is as follows. Let be all predrawn subpaths such that . First, we extend the path by one by adding attached to . We introduce an additional predrawn vertex adjacent exactly to in . We put and we modify . See Fig. 6. Indeed, we proceed exactly the same on the other side of ; if is taken by , we introduce and .
We use the described algorithm for for the modified graph and the modified path, which runs in time . We obtain a representation extending if it exists. If does not exist, then the original problem is clearly not solvable. It remains to argue that if exists, then we can either construct a solution for the original Sub type problem, or we can prove that it is not solvable.
We deal only with the left side of ; for the right side the argument is symmetrical. If is not modified on the left side, then the edge can be subdivided as necessary and we are equivalent with the Both type. Suppose that is added. There are no unlocated components, and so everything with the exception of has to be represented on the right of which is placed on .
We need to argue the issue that the newly added edge can be subdivided in . There are the following two cases:

Case 1. If for each , i.e, and belong to each , the subdivision of is equivalent to the subdivision of which is correct in the original Sub type problem. So nothing needs to be done.

Case 2. Let for some , so . Then has to form a complete subgraph of , otherwise the starting partial representation having would not be extendible. We revert the subdivision of by modifying as follows. Let be the new vertices of created by the subdivision of . For each , we set , and we remove by contractions. Clearly, the resulting representation is correct and still extends .
By removing and the vertices attached to it on the left, and the vertices attached to it on the right, and (of course, only if they are added), we obtain a correct representation of inside a subdivision of extending the partial representation .
Concerning PINT, we use almost the same approach. The only difference is that we append two vertices and (resp. and ) to the end of , and we put (resp. ), so the modified partial representation is proper.∎
3.3 The NPcomplete Cases
The basic gadgets of the reductions are paths. They have the following minimum spans.
Lemma 6
For INT, . For PINT and , .
Proof
For INT, the number of the maximal cliques of is . For PINT, the ordering is
There are changes from to and has vertices. So the minimum span equals .∎
We reduce the problems from 3Partition. An input of 3Partition consists of positive integers , and such that for each and . It asks whether it is possible to partition ’s into triples such that the sets of each triple sum to exactly .^{3}^{3}3Notice that if a subset of ’s sums to exactly it has to be a triple due to the size constraints. This problem is strongly NPcomplete Garey and Johnson (1975) which means that it is NPcomplete even when the input is coded in unary, i.e., all integers are of polynomial sizes.
Theorem 3.2
The problems and are NPcomplete.
Proof
We use almost the same reductions for both PINT and INT. For a given input of 3Partition (with ), we construct a graph and its partial representation as follows.
As the fixed tree we choose , with the vertices . The graph contains two types of gadgets as separate components. First, it contains split gadgets which split the path into gaps of the size . Then it contains take gadgets . A take gadget takes in each representation at least vertices of one of the gaps.
For these reductions, the gadgets are particularly simple. The split gadget is just a single predrawn vertex with . The split gadgets clearly split the path into the gaps of the size . The take gadget is for INT, resp. for PINT. According to Lemma 6, . The representation is extendible if and only if it is possible to place the take gadgets into the gaps. For an example, see Fig. 7. The reduction is clearly polynomial.
To conclude the proof, we show that the partial representation is extendible if and only if the corresponding 3Partition input has a solution. If the partial representation is extendible, the take gadgets are divided into the gaps on the path which gives a partition. Based on the constraints for the sizes of ’s, each gap contains exactly three take gadgets of the total minimum span ; thus the partition solves the 3Partition problem. On the other hand, a solution of 3Partition describes how to place the take gadgets into the gaps and construct an extending representation.∎
Corollary 1
The problem is NPcomplete.
Proof
We use the above reduction for INT with one additional predrawn interval attached to everything in . We put , so it contains the whole tree . Since a representation of each take gadget has to intersect , it has to be placed inside of the gaps as before.∎
We note that the above modification does not work for proper interval graphs. Indeed, this is not very surprising since Proposition 2 states that the problem can be solved in time .
3.4 The Parameterized Complexity
In this subsection, we study the parameterized complexity. The parameters are the number of components, the number of predrawn intervals and the size of the path .
By the Number of Components. In the reduction of Theorem 3.2, one might ask whether it is possible to make the reduction graph connected. For INT, it is indeed possible to add a universal vertex adjacent to everything in , and thus make connected as in the proof of Corollary 1. The following result answers this question for PINT negatively (unless ):
Proposition 3
The problem is fixedparameter tractable in the number of components, solvable in time .
Proof
There are possible orderings of the components from left to right, and we test each of them. (The located components force some partial ordering so we need to test less then orderings; see below the proof for details.) We show that for a prescribed ordering of the components, we can solve the problem in time ; thus gaining the total time . We solve the problem almost the same as in the proof of Proposition 2. The only difference is that we deal with all components instead of only the located ones.
We process the components from left to right. When we process , we place it on the right of as far to the left as possible. For the unlocated , we can take any smallest representation. For the located , we test both smallest representations and take the one placing the rightmost endpoint of further to the left. We construct the representation in time . For the correctness of the algorithm see the proof of Proposition 2 for more details.∎
We note that for NPhardness of the problem it is necessary to have some predrawn subpaths. On the other hand, also some unlocated components are necessary. If all the components were located, there would be a unique ordering and we could test it in time as described above. In general, for components and located components, we need to test only different orderings.
By the Number of Predrawn Intervals. In the reduction in Theorem 3.2, we need to have predrawn intervals. One could ask, whether the problems become simpler with a small number of predrawn intervals. We answer this negatively. For PINT, the problem is in XP and W[1]hard with respect to . For INT, we only show that it is W[1]hard.
There are two closely related problems BinPacking and GenBinPacking. In both problems, we have bins and items of positive integer sizes. The question is whether we can pack (partition) these items into the bins when the volumes of the bins are limited. For BinPacking, all the bins have the same volume. For GenBinPacking, the bins have different volumes. Formally:
Problem:  BinPacking 

Input:  Positive integers , , , and . 
Output:  Does there exist a partition of such that for every . 
Problem:  GenBinPacking 

Input:  Positive integers , , , and . 
Output:  Does there exist a partition of such that for every . 
Lemma 7
The problems BinPacking and GenBinPacking are polynomially equivalent.
Proof
Obviously BinPacking is a special case of GenBinPacking. On the other hand, let , , , and be an instance of GenBinPacking. We construct an instance , , , and of BinPacking as follows. We put , and . The sizes of the first items are the same, i.e, for . The additional items are called large and we put for .
Each bin has to contain exactly one large item since two large items take more space than . After placing large items into the bins, we obtain the bins of the remaining volumes in which we have to place the remaining items. This corresponds exactly to the original GenBinPacking instance.∎
If the sizes of items are encoded in binary, the problem is NPcomplete even for . The more interesting version which we use here is that the sizes are encoded in unary so all sizes are polynomial. In such a case, the BinPacking problem is known to be solvable in time using dynamic programming where is the total size of all items. And it is W[1]hard with respect to the parameter Jansen et al. (2010). The similar holds for :
Proof (Theorem 1.1)
For a given instance of the BinPacking problem, we can solve it by in a similar manner as in the reduction in Theorem 3.2. As , take a path . As , take for each and the predrawn vertices such that . The rest of the argument is exactly as in the proof of Theorem 3.2.
Now, we want to solve using instances of GenBinPacking (which is polynomially equivalent to BinPacking), where is the number of predrawn intervals.
First we deal with located components . For each component, we have two possible orderings and using Lemma 2 we get (at most) two possible smallest representations which might be differently shifted. In total, we have at most possible representations keeping as small as possible leaving maximal gaps for unlocated components. We test each of these representations.
Let be the unlocated components. For each , we compute using Lemma 2. The goal is to place the unlocated components into the gaps between representations of the located components . We can solve this problem using GenBinPacking as follows. We have bins of the volumes equal to the sizes of the gaps between the representations of . We have items of the sizes .
A solution of GenBinPacking tells how to place the unlocated components into the gaps. If there exists no solution, this specific representation of the located components cannot be used. We can test all possible representations of the located components. Thus we get the required weak truthtable reduction.∎
Corollary 2
The problem is W[1]hard and belongs to XP, solvable in time where is the number of predrawn intervals.
Proof
Both claims follow from Theorem 1.1.∎
Proposition 4
The problems and are W[1]hard when parameterized by the number of predrawn intervals.
Proof
By the Size of the Path. We show that the Fixed type problems are fixedparameter tractable with respect to the size of the path . It is easy to find a solution by a bruteforce algorithm:
Proposition 5
For the size of a path , the problems and are fixedparameter tractable with the respect to the parameter . They can be solved in time where
Proof
In a pruned graph, the vertices have to be represented by pairwise different intervals. There are at most possible different subpaths of a path with vertices so the pruned graph can contain at most vertices; otherwise the extension is clearly not possible. We can test every possible assignment of the nonpredrawn vertices to the subpaths, and for each assignment we test whether we get a correct representation extending .∎
4 Path and Chordal Graphs
We present and prove the results concerning the classes PATH and CHOR.
4.1 The Polynomial Cases
The recognition problems for the types Add and Both are equivalent to standard recognition without any specified tree . Indeed, we can modify by adding an arbitrary tree to it. If the input graph is PATH or CHOR, there exists a tree in which the graph can be represented. We produce by attaching to in any way. Then the input graph can be represented in as well, completely ignoring the part .
4.2 The NPcomplete Cases
All the remaining cases from the table of Fig. 3 are NPcomplete. We modify the reduction for INT of Theorem 3.2. We start with the simplest reduction for the Fixed type and then modify it for the other types.
Fixed Type Recognition. For the Fixed type, we can avoid predrawn subtrees, using an additional structure of the tree.
Proposition 6
The problems and are NPcomplete.
Proof
We again reduce from 3Partition with an input and . For technical purposes, let and so for each . We construct a graph and a tree as follows.
The tree is a path (its vertices being denoted by ) with three paths of length two attached to every vertex , for each ; see Fig. 8. Each split gadget is a star, depicted on the left of Fig. 8. When the split gadgets are placed as in , they split the tree into gaps exactly as the predrawn vertices in the proof of Theorem 3.2. Each take gadget is the path exactly as before. The reduction is obviously polynomial.
What remains to argue is the correctness of the reduction. Observe that given a solution of 3Partition, we can construct a subpathsintree representation of as in Fig. 8. For the other direction, let be the central vertices of the split gadgets . We claim that each contains at least one branch vertex. (Actually, exactly one since there are only branch vertices in .) If some contained only nonbranch vertices, then it would not be possible to represent three disjoint neighbors , and of this having each nonempty.
Since each branch vertex is taken by one , the path is split into gaps as before. Since , each can be represented only inside of these gaps. Notice that the total number of the vertices in the gaps has to be equal , and therefore the split gadgets have to be represented entirely in the attached stars as in Fig. 8. The rest of the reduction works exactly as in Theorem 3.2.∎
Sub Type Recognition. By modifying the above reduction, we get:
Theorem 4.1
The problems and are NPcomplete.
Proof
We need to modify the two gadgets from the reduction of Theorem 6 in such a way that a subdivision of the tree does not help in placing them. Subdivision only increases the number of nonbranch vertices. Thus a take gadget requires branch vertices. Similarly, the split gadget is more complicated. See Fig. 9 on top.
The tree is constructed as follows. We start with a path with vertices . To each vertex we attach a subtree isomorphic to the trees in Fig. 9 on bottom. To the remaining vertices of the path, we attach one leaf per vertex. The reduction is again polynomial.
Straightforwardly, for a given solution of 3Partition, we can construct a correct subpathsintree representation in a subdivided tree. On the other hand, we are going to show how to construct a solution of 3Partition from a given tree representation.
Recall the properties of maximal cliques from Section 2. Note that each triangle in each split or take gadget is a maximal clique . Since for each , there has to be a branch vertex in for some and . The gadget contains three triangles, each taking one branch vertex of . In addition, connecting them has to contain another branch vertex. So in total, contains at least four branch vertices. Each gadget contains triangles, and so it requires at least branch vertices. Since the number of branch vertices of is limited, each takes exactly four branch vertices and each takes exactly branch vertices.
Now, if some contained a branch vertex of the subtrees attached to , at least one of its branch vertices would not be used. (Either not taken by , or would require at least branch vertices.) So each has to take the branch vertices of the subtrees attached to for some , and the take gadgets have to be placed inside the gaps exactly as before.∎
Proposition 7
Even with a single predrawn subtree, i.e, , the problems and are NPcomplete.
Proof
We easily modify the above reductions; for the Add type, the reduction of Proposition 6, for the Both type, the reduction of Theorem 4.1. The modification adds into one predrawn vertex adjacent to everything such that . Since spans the whole tree, it forces the entire representation into .
We just deal with the Add type, for Both the argument is exactly the same. Let be the partial tree and let be the tree in which the representation is constructed, so is a subtree of . We claim that we can restrict a representation of each vertex of into and thus obtain a correct representation inside the subtree .
Let . Since , the intersection of and is a nonempty subtree. We put , and we claim that is a representation of in . To argue the correctness, let and be two different vertices from (otherwise trivial). If , then , and so as well. Otherwise is a triangle in , and thus by the Helly property the subtrees , and have a nonempty common intersection, giving that is nonempty.∎
For path graphs, one can use a similar technique of a predrawn universal vertex attached to everything. But there is the following difficulty: To do so, the input partial tree has to be a path. For the type Both, the complexity of remains open. For the type Add, we get the following weaker result:
Proposition 8
The problem is NPcomplete.
Proof
Similarly as in Proposition 7, add a predrawn universal vertex