The Neighborhood Polynomial of Chordal Graphs

We study the neighborhood polynomial and the complexity of its computation for chordal graphs. The neighborhood polynomial of a graph is the generating function of subsets of its vertices that have a common neighbor. We introduce a parameter for chordal graphs called anchor width and an algorithm to compute the neighborhood polynomial which runs in polynomial time if the anchor width is polynomially bounded. The anchor width is the maximal number of different sub-cliques of a clique which appear as a common neighborhood. Furthermore we study the anchor width for chordal graphs and some subclasses such as chordal comparability graphs and chordal graphs with bounded leafage. the leafage of a chordal graphs is the minimum number of leaves in the host tree of a subtree representation. We show that the anchor width of a chordal graph is at most $n^{\ell}$ where $\ell$ denotes the leafage. This shows that for some subclasses computing the neighborhood polynomial is possible in polynomial time while it is NP-hard for general chordal graphs.


Introduction
In this paper we study the neighborhood polynomial of graphs and give an algorithm to compute the polynomial for chordal graphs in polynomial time for some subclasses. Throughout the paper, all graphs are simple, finite and undirected. For a graph G = (V, E), the neighborhood of a vertex v ∈ V is the set of all adjacent vertices, denoted by N G (v) = {u ∈ V | uv ∈ E}. The neighborhood complex of a graph G, first introduced by Lovász (1978), consists of all subsets of vertices W ⊆ V which have a common neighbor, that is This set-system is clearly hereditary and hence it is a simplicial complex. To count the number of sets with cardinality k in N G , we define the neighborhood polynomial which is the generating function of the neighborhood complex N G . Since we only consider finite graphs, the sum is finite and N G (x) is a polynomial such as all other generating functions considered in this paper. We investigate the complexity of computing the neighborhood polynomial of some graph classes.
In particular, we look at chordal graphs and subclasses like interval graphs, split graphs and chordal comparability graphs. In order to do this, we introduce the anchor width of a graph and develop an algorithm for computing the neighborhood polynomial in Section 3. We will see that the anchor width is the essential parameter for a polynomial runtime of our algorithm. If for any subclass of chordal graphs the anchor width is polynomially bounded in the number of vertices, our algorithm is efficient. In particular our main result is the following theorem.
Theorem 1. Let G be a chordal graph with n vertices and anchor width k. Computing the neighborhood polynomial takes at most O(n 3 k + n 2 k 2 ) time.
In Section 4 we investigate the complexity of the anchor width for different subclasses. For this we look at chordal graphs with bounded leafage. The leafage (G) was introduced in Lin et al. (1998) and measures how close a chordal graph is to an interval graph. We show that a chordal graph G on n vertices has anchor width at most n (G) (cf. Theorem 7). Furthermore for interval graphs, which are the graphs with leafage at most two, we give a family with quadratic anchor width. Another result of Section 4 is that chordal comparability graphs have linearly bounded anchor width.

Preliminaries
The neighborhood polynomial was introduced by Brown and Nowakowski (2008) who investigated the effect of some elementary graph operations on the neighborhood polynomial. Given two graphs G 1 = (V 1 , E 1 ) and G 2 = (V 2 , E 2 ) on disjoint vertex sets, the union G 1 ∪ G 2 of the graphs is the graph on the vertex set V 1 ∪ V 2 with edge set E 1 ∪ E 2 . The join G 1 + G 2 of the two graphs is the graph on the vertex set V 1 ∪ V 2 consisting of both graphs together with all possible edges between vertices in V 1 and vertices in V 2 , that is E = E 1 ∪ E 2 ∪ {v 1 v 2 | v 1 ∈ V 1 , v 2 ∈ V 2 }.
Proposition 1 (Brown and Nowakowski (2008)). Let G 1 and G 2 be two graphs on disjoint vertex sets. Then the neighborhood polynomial of the disjoint union G 1 ∪ G 2 is Proposition 2 (Brown and Nowakowski (2008)). Let G 1 = (V 1 , E 1 ), G 2 = (V 2 , E 2 ) be two graphs on disjoint vertex sets. Then the neighborhood polynomial of the join G 1 + G 2 is The two graph operations, disjoint union and join, are used to define cographs. Cographs are exactly the graphs which do not contain an induced P 4 , a path on four vertices. They can be constructed recursively.
Starting with a single vertex as a cograph, the disjoint union and the join of two cographs are cographs. For this and other well-known graph theoretic facts, we refer to Golumbic (1980). The neighborhood polynomial of a single vertex graph is N (K 1 , x) = 1 and the two operations disjoint union and join, given by the two formulas in Proposition 1 and Proposition 2 are computable in linear time. Note that (1 + x) n can be computed in linear time using the binomial theorem. Corneil et al. (1985) present a linear time algorithm to recognize cographs and give the corresponding recursive construction rules using disjoint union and join. Hence the neighborhood polynomial of a cograph is computable in quadratic time.
Another graph operation is attaching one vertex v to a subset of vertices of a graph G. This operation was studied by Alipour and Tittmann (2021), who gave an explicit formula for a neighborhood polynomial after attaching a vertex to a subset of vertices. More formally for a graph G = (V, E), a subset U ⊆ V of vertices and an additional vertex v / ∈ V , we denote by G U v the graph with vertex set V ∪ {v} and edge set E ∪ {uv | u ∈ U }. For simplification we use the following notation for all W ⊆ V : Proposition 3 (Alipour and Tittmann (2021)). Let G = (V, E) be a graph, otherwise.
Using this formula, Alipour and Tittmann showed that for a fixed integer k, computing the neighborhood polynomial of k-degenerate graphs is possible in polynomial time, see Alipour and Tittmann (2021). A k-degenerate graph is a graph where every subgraph has a vertex v with deg(v) ≤ k. Using the degeneracy, we can pick one vertex of degree ≤ k after another and update the neighborhood polynomial by the formula of Proposition 3 in order to get a polynomial runtime. As a corollary it follows that there is a polynomial-time algorithm to compute the neighborhood polynomial for planar (or more general graphs of bounded genus) and k-regular graphs, see Alipour and Tittmann (2021). This update formula of Alipour and Tittman (see Proposition 3) was the starting point of our investigations for chordal graphs.
A graph G is said to be chordal if there is no induced cycle of length ≥ 4. Equivalently a graph is chordal if and only if it has a perfect elimination order. A perfect elimination order is an ordering v 1 , . . . , v n of the vertices such that for all i the neighborhood of v i in G[{v i , . . . v n }] is a clique. Here for a subset U ⊆ V the graph G[U ] denotes the subgraph of G induced by U . A vertex, whose neighborhood is a clique is called simplicial. It is well-known that every non-trivial chordal graph has at least two simplicial vertices, which gives us the perfect elimination order (cf. Golumbic (1980)). In order to study the neighborhood polynomial of chordal graphs and their subclasses, we make use of the perfect elimination order to build the chordal graph by attaching one vertex after another to a clique. We adapt the formula of Alipour and Tittmann (Proposition 3) to our use. To get some complexity results of computing the neighborhood polynomial, the connection to the domination polynomial is useful. For this we introduce dominating sets. A dominating set of a graph G = (V, E) is a set of vertices D ⊆ V such that every vertex of the graph is either in D or adjacent to a vertex of D, i.e.
The family of all dominating sets of a graph G is denoted by D G and the domination polynomial D G (x) is the generating function of D G that is The following relation between domination polynomials and neighborhood polynomials holds. For a proof see for example Heinrich and Tittmann (2018).
Proposition 4. For a graph G = (V, E) and its complement graph G it holds: With other words this proposition states that every vertex set has either a common neighbor in the graph or is a dominating set in the complement graph. The connection of these two polynomials can be used to determine the complexity of computing the neighborhood polynomial. In particular, the neighborhood polynomial is computable in polynomial time if and only if the domination polynomial of the complement graph is computable in polynomial time. Furthermore the contributions to the well-known graph problem DOMSET, imply some complexity results for the neighborhood polynomial. DOMSET is the problem of deciding whether a graph has a dominating set of size ≤ k for a given k.
Corollary 2. Let G be a class of graphs and G the class of the complement graphs of G. If DOMSET is NP-complete on G, then computing the neighborhood polynomial on G is NP-hard.
DOMSET is NP-hard on many graph classes such as chordal graphs, see Booth and Johnson (1982). Bertossi (1984) showed that it is NP-hard on bipartite graphs and split graphs. Split graphs are the graphs where the vertex set can be partitioned into a clique and an independent set. Since split graphs are exactly the graphs which are chordal and co-chordal (i.e. the complement graph is chordal), DOMSET is also NP-hard on co-chordal graphs. This together with Corollary 2 shows the NP-hardness of computing the neighborhood polynomial in split graphs (cf. Day (2017)) and hence in chordal graphs.

Algorithm for Chordal Graphs
Our algorithm relies on the perfect elimination order of chordal graphs and comes from the vertexattachment formula of Alipour and Tittmann, see Proposition 3. First, we adapt their formula to our special case where we attach a vertex to a clique. To study the new arising neighborhood sets after vertex attachment, we introduce anchor sets, which are subsets of a clique appearing as a common neighborhood of a set of vertices. The maximal number of anchor sets of a clique, which we denote as anchor width, is the essential parameter in our algorithm to get a polynomial runtime. Let C be a clique in a graph G = (V, E). We define the set of neighbors of the clique C, not including the clique itself as the periphery of C, denoted by of the periphery is called periphery set. Note that the empty set is also a periphery set. We call a non-empty subset A of C anchor set, if it is the common neighborhood in C of some periphery set M . See Figure 1 for an illustration. In general not all subsets of a clique are an anchor set. For every M ⊆ P G (C) we define the corresponding anchor set in C as The neighborhood of the empty periphery set M = ∅ is the empty intersection and thus the corresponding anchor set is C. Moreover, several periphery sets M and M can correspond to the same anchor set A G (M, C) = A G (M , C). For an anchor set A of C, the periphery sets M ⊆ P G (C) whose common neighborhood in C is A build the family The generating function of P G (A, C) is called periphery polynomial and defined by The family of all anchor sets of a clique C is Note that C ∈ A G (C) for every clique C, since C is the anchor set of the empty periphery set. The anchor width of a graph G is the smallest number k such that |A G (C)| ≤ k for all cliques C in G.
For a maximal clique C max and a clique C contained in C max the following relations hold.
Lemma 3. Let C be a clique and C max a maximal clique containing C in a graph G = (V, E). Then the following conditions hold: Proof: (a) Since every vertex in the clique C max \C is adjacent to C, the first inclusion holds. Furthermore, every element which is adjacent to one of the elements in C is either an element of C max \C or it is adjacent to an element of C max .
To show (b), we check which subsets of the clique C can appear as an anchor set. Let M ⊆ P G (C) be a periphery set such that A G (M, C) is a non-empty anchor set. Using (a) we distinguish three cases. If Since M only consists of elements of the periphery of C, the intersection of A with C provides the anchor set A G (M, C), which is non-empty. In the final case, M consist of elements of C max \C and P G (C max ). We only need to consider M = M ∩ P G (C max ), since the elements of C max \C just lead to another intersection with C. We continue as in the second case.
On the other hand, a set If we take all elements of M which are in the periphery of C, the common intersection of those elements inside C is exactly A . Hence A is an anchor set.
(c) The periphery polynomial P G (A, C, x) counts the different periphery sets with respective to the size, where A is the corresponding anchor set. As we have seen in (b), an anchor set A is given by A = A ∩ C for an anchor set A ∈ A G (C max ). Since there are different possibilities to choose A , we sum over all corresponding periphery polynomials which are counted in P G (A , C, x). Furthermore all elements in C max \C are in the periphery of C (see (a)) with neighborhood C. Hence we can add elements of C max \C to any periphery set M with anchor set A G (M , C max ) = A and still have as anchor set A G (M, C) = A. For the polynomial as generating function, we multiply P G (A , C, x) by For different anchor sets A and A with A ∩ C = A = A ∩ C, the corresponding periphery sets are pairwise different, since the common neighborhood inside C max is different. So in order to get all periphery sets corresponding to A, we need to sum up these the polynomials.
This shows that it is sufficient to provide the information about anchor sets and periphery polynomials for all maximal cliques of the graph. With this information we are able to compute the necessary information for all other cliques. Furthermore the anchor width only depends on the size of the anchor family of the maximal cliques.
In the following, we derive a formula for the neighborhood polynomial after vertex attachment using the periphery polynomial. For every set U ⊆ V of vertices we define the local neighborhood N G (U ) of U as the family consisting of all vertex sets of G which have a common neighbor in U , that is Note that the local neighborhood N G (V ) of the whole vertex set is equal to the neighborhood complex N G . For every clique C, we can partition the local neighborhood N G (C) by the following lemma into the disjoint sets Lemma 4. For every clique C of the graph G, it holds Proof: For every N ∈ N G (C) there is by definition a clique-vertex v ∈ C which is adjacent to every element in N . Hence the common neighborhood of N ∩ P G (C) inside C is non-empty. Note that in general N is not a periphery set since it can contain elements from C. The common neighborhood is an anchor set A. Since these anchor sets differ for different families N G (A, C) the union is disjoint.
Lemma 4 is useful since we only have to determine the generating functions of N G (A, C) for every A ∈ A G (C). Adding these generating functions, we maintain the generating function of the local neighborhood N G (C). In the next lemma, we derive a formula to compute the generating function of N G (A, C) for every A ∈ A G (C).

Lemma 5. For a given anchor set
Proof: We count the number of sets with respect to the cardinality in N G (A, C). Every M ∈ P G (A, C) is in N G (A, C). Hence P G (A, C, x) must be a summand of N G (A, C, x). Furthermore there are supersets N for all M which contribute to N G (A, C, x). Since we look at all M ∈ P G (A, C), it is enough to look at supersets N = M ∪X, where X is a subset of C. In order to keep N in the local neighborhood N G (C), we need a common neighbor in C. Since the common neighborhood of M inside C is the anchor set A, the common neighborhood of N must contain an element of A. Hence X cannot be the whole anchor set A. In particular, the possibilities to extend M are the elements of the family X = {X | ∃a ∈ A : X ⊆ C\{a}}.
All sets in X consist of a disjoint union of a proper subset of A and a subset of C\A. This leads to the generating function The generating function of P G (A, C), which counts the different possibilities of M is counted by P G (A, C, x).
We are now ready to prove the update formula for the neighborhood polynomial after attaching a vertex to a clique. The proof and the formula are similar to Proposition 3 (cf. Alipour and Tittmann (2021)).
Proposition 5. Let G = (V, E) be a graph and C a clique in the graph. The neighborhood polynomial of G C v with vertex set V ∪ {v} is: Proof: Let X ∈ N G C v be a neighborhood set of the graph G C v . We consider the following three cases: • If X ⊆ V and X ⊆ C, then X ∈ N G is in the neighborhood complex of G. Hence X is considered in the first summand N G (x) of the above formula.
• Now let X ⊆ V and X ⊆ C. If X is a proper subset of C, it already has a common neighbor in G, hence it is already counted in the first summand. Similarly this holds if X = C and C is not a maximal clique in G. Thus the only case where a new neighborhood arises is if X = C and C is a maximal clique in G. In G C v the common neighbor of C is v. This is counted in the summand in φ G (C).
• Let us now consider the case v ∈ X, i.e. X ⊆ V . Since v is connected to all elements in C, we need to count all subsets Y ⊆ V which have a common neighbor in C. This is equivalent to count the number of elements in N G (C). Combining Lemma 4 and Lemma 5, we obtain as the generating function of N G (C). In X there is one additional element v. Hence we have to multiply the polynomial with x.
Since the above cases are disjoint, this leads to the formula of the neighborhood polynomial as stated.
With this formula, we are able to compute the neighborhood polynomial after attaching a vertex v to a clique C in a graph. We will use this in connection with the perfect elimination order of the graph to compute the neighborhood polynomial of chordal graphs. For this we start with a single vertex and add in reverse order of the perfect elimination order the vertex one after another. After every step we compute the neighborhood polynomial using Proposition 5. Furthermore we need to make sure to have the correct data to compute the neighborhood polynomial after every step. Hence we need to update the anchor family and periphery polynomials.
To go into a more detailed analysis we assume that the chordal graph is connected. If the chordal graph is not connected we apply the algorithm for every connected component and compute the neighborhood polynomial of the whole graph by adding the neighborhood polynomials of every connected component (cf. Proposition 1). This operation can be done in linear time.
For a connected chordal graph we compute the elimination order v 1 , . . . , v n using a lexicographic breadth-first search which has linear runtime. We then add the vertices in reverse order, starting with v n . The neighborhood polynomial of this starting graph is 1. Then we add v i to the corresponding clique in G[v i+1 , . . . , v n ] and compute the new neighborhood polynomial with Proposition 5.
In order to compute the formula of Proposition 5, we need the anchor family of C and the corresponding periphery polynomials P G (A, C, x) for every A ∈ A G (C). With Lemma 3 it suffices to store these informations for the maximal cliques of the graph and compute them in every step for the required clique C where we attach the new vertex. The details of updating this information will be explained in the next paragraph. Furthermore we have a list of the maximal cliques in the current graph which need to be updated, too. Since every step gives at most one new maximal clique, there are at most n maximal cliques in a chordal graph with n vertices. After attaching one vertex, updating the polynomial and the corresponding information, we go on with the next step.
We now study how to update the anchor families and periphery polynomials for the maximal cliques after attaching a vertex in order to have the correct ones in the next step. Fix a clique C of the graph G. The graph with attached vertex v to C is denoted by G + = G C v . We get exactly one new maximal clique C + = C ∪ {v} which we have to add to the list of maximal cliques in the graph. If C is a maximal clique in G we have to delete the entry C from the list of maximal cliques.
We determine the anchor sets and periphery polynomial of the new arising maximal clique C + . The periphery of C + in G + is P G + (C + ) = P G (C) and the family of anchor sets is The periphery polynomials stay as in G that is P G + (A, C + , x) = P G (A, C, x) for all A ∈ A G (C) and P G + (C + , C + , x) = 1. Now we go through the list of maximal cliques and update the necessary information if needed. The maximal cliques in G which have no intersection with C, do not change in G + . Let C max be a maximal clique in G with C max ∩ C = ∅. It is C = C max . Note that we deleted C from the list in the case that C was maximal in G. The periphery of C max in G + consists of the periphery of C max in G together with the new element v. More formally it holds Every anchor set of C max in G remains an anchor set in G + . Since the new vertex v is attached to the subset C max ∩ C of the considered clique C max , this subset C max ∩ C = ∅ is a new anchor set in G + , if it was not already an anchor set in G. Furthermore all subsets of C max occurring as non-empty intersection of C max ∩ C with an anchor set in A G (C max ) build an anchor set of C max in G + . The family of anchor sets of C max in G + is: Note that C max ∩ C is an element of the second set in the above equation since C max ∈ A G (C max ). To determine the periphery polynomial P G + (A, C max , x) for every anchor set A ∈ A G + (C max ), we need to distinguish the following three cases. Since C = C max , the intersection C max ∩ C is a proper subset of C max .
(i) If A is a proper subset of C ∩ C max , all corresponding periphery sets in G are a corresponding periphery set in G + and we can add v to every corresponding periphery set M in G, since the intersection with the neighborhood N G + (v) = C does not change the anchor set. In this case we get: (ii) If A = C ∩ C max , the periphery sets in G with corresponding anchor set A which are counted in P G (A, C max , x) still have the same anchor set in G + . Furthermore v is a new periphery set with anchor set A = C ∩ C max and all periphery sets which have a superset A of A as corresponding anchor set, form together with v a periphery set with anchor set A. Hence the updated periphery polynomial is (iii) In the remaining case A is not a subset of C ∩ C max , hence v is not in a periphery set with anchor set A. So the periphery polynomial stays the same, which means This concludes the analysis of the cases and hence the algorithm to compute the neighborhood polynomial of a chordal graph. This algorithm leads to a polynomial time algorithm if the anchor width is polynomially bounded as stated in Theorem 1. We now give a detailed analysis of the runtime which concludes the proof of Theorem 1.
Proof of Theorem 1: Using lexicographic breadth-first search, we get a perfect elimination order of the chordal graph G in linear time (cf. Golumbic (1980)). After attaching one vertex, there is one new maximal clique, containing v. We add this maximal clique to the list of all maximal cliques in the graph, possibly removing the neighborhood of v if it was in the list. This shows that we have at most n maximal cliques. Furthermore we have an ordering of the vertices given by the perfect elimination order which is the reverse order of attaching the vertices to the graph. Hence in order to compute an intersection or test a subset relation, we only need to compare the elements in the clique in the attached order. Both is possible in linear time.
For every step we need to update the neighborhood polynomial and afterwards the other informations. In total we attach n vertices and hence have n steps.
To update the neighborhood polynomial after vertex attachment to a clique C, we first need to find a maximal clique, containing C and compute its anchor family and its periphery polynomials. In order to find this maximal clique we test for every maximal clique (at most n) whether C is a subset. This needs at most O(n 2 ) time.
Computing the anchor family takes O(nk) and for one anchor set the periphery polynomial takes O(nk) and since we have at most k anchor sets in a clique, we need O(nk 2 ) for this step (cf. Lemma 3). Now using the update formula to compute the neighborhood polynomial is possible in O(k). Updating the neighborhood polynomial takes for every step at most O(nk 2 ) time.
Afterwards we update the anchor families and periphery polynomials for all maximal cliques with non-empty intersection with C. We have at most n maximal cliques, where we need to update this information. Updating the anchor family for one maximal clique takes O(nk) time (see (1)) Hence for all maximal cliques this takes at most O(n 2 k). For one anchor set, updating the periphery polynomials takes at most O(nk) in case (ii). This case appears at most once and compute the periphery polynomial in the other cases is possible in linear time. Updating the necessary information for anchor sets and their periphery polynomials leads to a runtime of at most O(n 2 k) for all maximal cliques. Since we add in total n vertices, one after another, this leads to a total runtime of O(n 3 k + n 2 k 2 ).

Complexity of the Anchor Width
In this section, we will discuss some subclasses of chordal graphs and study their anchor width. We show that there are subclasses with polynomially bounded anchor width. We arrived at these graph classes starting from interval graphs, the first class for which we found a polynomial bound. For these subclasses the algorithm explained in Section 3 runs in polynomial time. In contrast to this result, we show that the anchor width of split graphs, a simple well-known subclass, is not polynomially bounded (see the following proposition). Hence the algorithm introduced in Section 3 might take super-polynomial time.
Proposition 6. For all n ∈ N there is a split graph on n vertices with anchor width at least 2 n 2 − 1.
Proof: We construct an infinite family of split graphs S m on n = 2m vertices such that the anchor width is 2 m − 1. We start with a clique C = {c 1 , . . . , c m } of size m and attach vertices v 1 , . . . , v m such that every v i (1 ≤ i ≤ m) is adjacent to c j for all j = i. This constructed graph is a split graph since C is a clique and {v 1 , . . . , v m } an independent set. All vertices v i are in the periphery P C , hence |P C | = m = n 2 . For a periphery set M ⊆ P C we denote by I M the indices of those vertices v i which are in M . The corresponding anchor set is then {C j | j / ∈ I M }. In such a way we can construct every non-empty subset of C as an anchor set. Hence the anchor width of S m is 2 m − 1 = 2 n 2 − 1.
Another interesting family of subclasses are the chordal graphs with bounded leafage. For those graphs we can show a polynomial upper bound of the anchor width. The leafage is a parameter which stems from the intersection graph representation of chordal graphs. An intersection graph of a family of sets F is the graph consisting of one vertex for every set in F such that two vertices are adjacent if and only if the corresponding sets have a non-empty intersection. An interval graph is an intersection graph of a family of subtrees of a path and chordal graphs are exactly the graphs which are the intersection graph of a family of subtrees of a host tree Gavril (1974). We call a representation of a chordal graph by a family of subtrees a subtree representation. Lin et al. (1998) introduced the leafage of a chordal graph, which measures how close a chordal graph is to an interval graph. More precisely, the leafage (G) of a chordal graph G is defined as the minimum number of leaves of the host tree among all subtree representations of G. We call a subtree representation optimal if it has the minimum number of leaves in the host tree. The interval graphs are exactly the chordal graphs with leafage at most 2. The split graphs S m constructed in Proposition 6 have leafage m and a possible optimal host tree is the star K 1,m . Habib and Stacho (2009) present a polynomial-time algorithm in order to compute the leafage of a chordal graph. As mentioned in Lin et al. (1998) we may restrict to host trees whose number of vertices is the number of maximal cliques of G.
Lemma 6. There exists an optimal representation such that the vertices of the host tree are in one-to-one correspondence with the maximal cliques of the graph.
Proof: Since every pairwise intersecting family of subtrees has the Helly property, i.e. the intersection of all subtrees of a subtree representation of a clique is non-empty Golumbic (1980), there is at least one common vertex v C for every clique C in the host tree. A vertex in the host tree cannot belong to different maximal cliques since their union has to form a clique as well and hence the cliques would not be maximal. Furthermore all subtrees intersecting in a vertex v of the host tree build a clique C. If C is not maximal, there is a maximal clique C max containing C. Contracting the path from v to v Cmax in the host tree does not increase the number of leaves. Thus, if we choose an optimal representation with few vertices as possible, the claim follows.
We study the connection between the anchor width and the leafage of a chordal graph and show an upper bound of the anchor width. In the following, we identify a subtree of the host tree by its vertices.
Theorem 7. For a chordal graph G with leafage = (G) and n vertices, the anchor width is at most n .
Proof: Let C = C max be a maximal clique in the graph G. We consider an optimal subtree representation of G such that the vertices of the host tree T are in one-to-one correspondence with the maximal cliques of G (cf. Lemma 6). Let v C be the vertex in the host tree which corresponds to the clique C of G. From v C there is a unique path in the host tree to all leaves which we denote by P 1 , . . . , P .
For a periphery set M ⊆ P C , the corresponding anchor set consists of those elements of the clique whose neighborhood contains M . For every w ∈ M , there is a tree T w representing w in the subtree configuration. Since C is a maximal clique, these trees T w do not contain v C since otherwise w would belong to C. For every path P i , we define a vertex v i representing M on P i as follows: where w i is an element from the periphery such that So for every w ∈ M such that T w ∩ P i = ∅, we choose the closest vertex v w to v C on the path P i of the corresponding tree T w . Among those vertices {v w } w , the vertex v i is the vertex with maximal distance to v C . If there is no subtree T w of the periphery which has a non-empty intersection with the path P i , we set v i = v C . Note that the v i 's are not necessarily distinct. Now the anchor set A = A G (M, C) consists exactly of all subtrees of the clique C, which contain all v 1 , . . . , v and v C . If there is no such subtree corresponding to an element of the clique, there is no corresponding anchor set to M in C. The anchor set A is fully determined by the vertices v i .
A chordal graph with n vertices has at most n maximal cliques. Hence the host tree has at most n vertices which gives at most n choices for every v i . In total we have at most n choices for the tuple (v 1 , . . . , v ) and hence at most n different anchor sets. This shows the upper bound for the anchor width.
Since interval graphs are the graphs with leafage at most 2, it follows: Corollary 8. The anchor width of interval graphs on n vertices is at most n 2 .
The magnitude of the bound is optimal for interval graphs since there is an infinite family of interval graphs on n = 4m+1 vertices with a clique of size 2m+1 which has at least m 2 = (n−1) 4 2 different anchor sets. For the construction (see Figure 2), we take the path P on 2m + 1 vertices v −m , . . . , v 0 , . . . , v m as a host tree. The subtrees corresponding to the clique C are the 2m + 1 paths on the vertices of the periphery. The anchor set corresponding to this two-element periphery set consists of all paths in the host tree corresponding to a clique vertex which contain v i and v j . For every choice of i and j these anchor sets differ. Hence there are at least m 2 anchor sets.
Another interesting subclass are the chordal comparability graphs. For these graphs we show a linear bound on the anchor width. A graph G = (V, E) is a comparability graph if there is a poset (V, ≺) such that two vertices u, v ∈ V are adjacent in G if and only if u ≺ v or v ≺ u.
Proposition 7. The anchor width of a chordal comparability graph with n vertices is at most 2n.
Proof: Let G be a chordal comparability graph with corresponding poset (V, ≺). Consider a maximal clique C max = {c 1 , . . . , c m } in G. A clique in the graph corresponds to a chain in the poset. Hence the maximal clique C max of size m corresponds to a maximal chain c 1 ≺ . . . ≺ c m of length m − 1 in the poset. So whenever there is a vertex v / ∈ C max , which is adjacent to c i ∈ C max such that v ≺ c i then v is adjacent to c k for all k ≥ i. Let i be the minimal element of the clique such that v ≺ c i . Since the clique is maximal, i > 1 and v is not comparable to c i−1 . Similar we get for every vertex w / ∈ C max which is connected to a vertex c j of the clique with w c j that w is connected to all elements c k of the clique with k ≤ j. Let c j be the maximal element of the clique connected to w, then j < m and c j+1 is not comparable to w. Hence an anchor set in C max is a chain of the form c i ≺ c i+1 ≺ . . . ≺ c j−1 ≺ c j . Assume there is an anchor set with 1 < i < j < m and vertices v and w such that v ≺ c i and w c j .
Then v and w are connected by an edge since w c j c i v holds. And since w and c j+1 do not share an edge and analogously v and c i−1 , we get an induced cycle of length 4 which is not possible since the graph is chordal. In Figure 3 the poset is illustrated by its Hasse diagram and gives an illustration of the contradiction. This shows that all anchor sets of C max are of the form c 1 ≺ . . . ≺ c j−1 ≺ c j for j ≤ m or c i ≺ c i+1 ≺ . . . ≺ c m for i ≥ 1. We have at most 2m − 1 ≤ 2n possibilities for those sets.

Discussion
In this paper we studied an algorithm for computing the neighborhood polynomial of chordal graphs, which is in general an NP-hard problem. The runtime of the algorithm depends on the introduced parameter anchor width. If the anchor width of a subclass of chordal graphs is bounded, we have a polynomialtime algorithm to compute the neighborhood polynomial. In Section 4 we investigated some subclasses and showed that the anchor width is bounded for chordal graphs with bounded leafage and chordal comparability graphs. Furthermore we showed that the anchor width is not bounded for split graphs. It would be interesting to get further subclasses of chordal graphs with bounded anchor width. It might be possible to give an upper bound for the anchor width using the asteroidal number. In Lin et al. (1998) it is shown that the leafage is an upper bound for the asteroidal number for all chordal graphs and they coincide for chordal graphs whose host tree is a subdivision of K 1,n as shown in Prisner (1992). Furthermore an infinite family of graphs similar to the one for interval graphs, which shows that the magnitude of the upper bound is optimal, would be interesting.
On top of that there might be other problems on chordal graphs which are hard in general but polynomial solvable on those subclasses with bounded anchor width. One natural candidate would be graph isomorphism, which is known to be graph-isomorphism-complete on general chordal graphs Lueker and Booth (1979) but has recently been shown to be solvable in polynomial time for chordal graphs of bounded leafage Arvind et al. (2021).