Polynomial time recognition of vertices contained in all (or no) maximum dissociation sets of a tree

In a graph G, a dissociation set is a subset of vertices which induces a subgraph with vertex degree at most 1. Finding a dissociation set of maximum cardinality in a graph is NP-hard even for bipartite graphs and is called the maximum dissociation set problem. The complexity of maximum dissociation set problem in various subclasses of graphs has been extensively studied in the literature. In this paper, we study the maximum dissociation problem from different perspectives and characterize the vertices belonging to all maximum dissociation sets, and to no maximum dissociation set of a tree. We present a linear time recognition algorithm which can determine whether a given vertex in a tree is contained in all (or no) maximum dissociation sets of the tree. Thus for a tree with n vertices, we can find all vertices belonging to all (or no) maximum dissociation sets of the tree in O(n^2) time.


Introduction
We consider only simple and undirected labeled graphs, and follow the terminology and notation of [3]. Let G = (V, E) be a graph and v be a vertex of G, we write N G (v) to denote the (open) neighborhood of v. The closed neighborhood of v is defined as In a graph G, an independent set is a subset of vertices spanning no edges. Finding an independent set of maximum cardinality in a graph is a widely studied well-known problem of graph theory and is called the maximum independent set problem. In 1982, Hammer et al. [8] studied the maximum independent problem from different perspectives and investigated the vertices contained in all or in no maximum independent sets of a graph. Since then, researchers have extensively stuied this kind of problem for some other vertex subsets with given properties. For example, Mynhardt [11], Cockayne et al. [7], and Blidia et al. [2] considered this kind of problem for minimum dominating sets, total dominating sets, and minimum double dominating sets of trees, respectively. Recently, Bouquet et al. [4] studied this kinde of problem of minimum dominating sets on claw-free graphs, chordal graphs and triangle-free graphs.
In a graph G, a dissociation set is a subset of vertices F such that the induced subgraph G[F ] has maximum degree at most 1. A maximum dissociation set of G is a dissociation set of maximum cardinality. The dissociation number ψ(G) of a graph G is the cardinality of a maximum dissociation set of G. The concept of dissociation set was introduced by Yannakakis [16] in 1981 and is a natrual generalization of independent set. The problem of finding a maximum dissociation set in a graph has been extensively studied on various sub-classes of graphs [1,5,6,12] and is NP-hard for bipartite graphs [16].
A k-path vertex cover in a graph G is a subset of vertices intersecting every k-path of G, where a k-path is a path of order k. It is easy to see that a set S of vertices of a graph G is a 3-path vertex cover of G if and only if its complement V (G) \ S is a dissociation set of G. In this decade, the problem of finding a minimum k-path vertex cover in a graph has received great attention [5,9,10,14,15].
The main purpose of this paper is to characterize the vertices contained in all maximum dissociation sets and in no maximum dissociation set of a tree. Define the vertex subsets A(G), F (G) and N (G) by : v is in some but not all maximum dissociation sets of G}, On the other hand, the study is also inspired by the relationship between the characteristic of vertex subsets A(G) and N (G) and the number of maximum dissociation sets in a graph G. In [13], Tu, Zhang and Shi found four structure theorems concerning the vertex subsets A(T ) and N (T ) for a tree T and determined the maximum number of maximum dissociation sets in a tree of order n.
The paper is organized as follows. In Section 2, we introduce some necessary notation and lemmas. In Section 3, we characterize the vertex subsets A(T ) and N (T ) of a tree T . In Section 4, a linear recognition algorithm which can determine whether a given vertex in a tree is contained in all (or no) maximum dissociation sets of the tree will be presented. Thus, using the recognition algorithm, all vertices contained in all (or no) maximum dissociation sets of a tree of order n can be found in O(n 2 ) time.
A rooted tree T is a connected acyclic graph with a specified vertex r, called the root of T . Let T be a tree rooted at r and v be a vertex of T , each vertex on the path from the root r to the vertex v, including the vertex v itself, is called an ancestor of v, and a descendant of v is a vertex u such that v is an ancestor of u. An ancestor or descendant of a vertex is proper if it is not the vertex itself. The parent If no confusion occurs, these also be written by A leaf in a tree is a vertex with degree 1, a branch vertex is a vertex with degree at least 3. We write B(T ) to denote the set of branch vertices of T . A path P in T is called a v − L path, if P joins v to a leaf of T . Denote the order of P by n(P ), and for i = 0, 1, 2, define Now, some basic observations about maximum dissociation sets of the path are given.
Observation 2.1. Let P n be a path of order n ≥ 3 and u, v be the leaves of P n .
(c) If n ≡ 1( mod3), then both leaves of P n belong to all maximum dissociation sets of P n , furthermore, P n has a maximum dissociation set F such that d Pn Firstly, we characterize A(T ) and N (T ) in the case where B(T ) ≤ 1.
Proof. Because T w is a path for each w ∈ C(v), it is easy to determine ψ(T w ) and We consider the two cases.
If w ∈ C 1 (v), then T w ∼ = P n with n ≡ 1(mod3). By Observation 2.1(c), we have w ∈ F w . Thus, if |C 1 (v)| ≥ 2, then there is a 3-path in T [F ] that contains the vertex v, a contradiction.
The proof is complete.
Proof. (a) Necessity. Suppose, for a contradiction, that Thus, F is a maximum dissociation set of T and v / ∈ F , which contradicts with v ∈ A(T ). Sufficiency. Suppose that |C 2 (v)| = 0 and |C 1 (v)| ≤ 1. Then ψ(T ) = w∈C(v) ψ(T w )+ 1 by Lemma 2.2 and the vertex v is in all maximum dissociation sets of T . Thus, v ∈ A(T ).
The proof of (a) is complete.
If |C 2 (v)| = 0 and |C 1 (v)| ≤ 1, then v ∈ A(T ) by (a), a contradiction. If |C 2 (v)| = 0 and |C 1 (v)| = 2, then we assume w 1 , w 2 ∈ C 1 (v). For each w ∈ C 0 (v), there exists a maximum dissociation set F w of T w such that w / ∈ F w by Observation 2.1(b). For w 1 ∈ C 1 (v), we have T w 1 − w 1 ∼ = P n with n ≡ 0(mod3). Let F w 1 be a maximum dissociation set of T w 1 −w 1 . Then |F w 1 | = ψ(T w 1 )−1 by Observation 2.1(a). For w 2 ∈ C 1 (v), there exists a maximum dissociation set F w 2 of T w 2 such that d Tw 2 [Fw 2 ] (w 2 ) = 0 by Observation 2.1(c). Let F = w∈C 0 (v) F w ∪ F w 1 ∪ F w 2 ∪ {v}, then F is a dissociation set of T and |F | = w∈C(v) ψ(T w ). By Lemma 2.2, F is a maximum dissociation set of T and v ∈ F , a contradiction.
If |C 2 (v)| = 1 and |C 1 (v)| ≤ 1, then we assume w 3 ∈ C 2 (v). For w 3 ∈ C 2 (v), we have T w 3 − w 3 ∼ = P n with n ≡ 1(mod3). Let F w 3 be a maximum dissociation set of T w 3 − w 3 , then |F w 3 | = ψ(T w 3 )−1 by Observation 2.1(a). For each w ∈ C 0 (v), let F w be a maximum dissociation set of is a dissociation set of T and |F | = w∈C(v) ψ(T w ). By Lemma 2.2, F is a maximum dissociation set of T and v ∈ F , a contradiction.
Sufficiency. Suppose for a contradiction that F is a maximum dissociation set of T The proof of (b) is complete.

Characterizations of A(T ) and N (T )
A technique called pruning process was introduced in [11]. Using the technique and Theorem 2.3, we can characterize A(T ) and N (T ) for an arbitrary tree T .
Let T be a rooted tree with the root v and u be a branch vertex of T at maximum distance from v. It is easy to see that |C(u)| ≥ 2 and d T (x) ≤ 2 for each x ∈ D(u). If u = v, we execute the following pruning process: This step of pruning process is called a pruning of T at u. Repeat the above pruning process, finially we obtain a unique treeT called the pruning of T such that dT (u) ≤ 2 for each u ∈ V (T ) \ {v}. We will show that the root v is in all maximum dissociation sets (or in no maximum dissociation set) of T if and only if it is in all maximum dissociation sets (or in no maximum dissociation set) of the pruningT of T . Suppose that when |B ′ (T )| < k, the lemma holds. Let T be a tree with |B ′ (T )| = k and u be a vertex of B ′ (T ) at maximum distance from v. Let T ′ be the tree obtained from T by applying a pruning of T at u. Thus,T is also the pruning of T ′ . First, we show that for every maximum dissociation setF ofT , there exists a maximum dissociation set F of T such that v ∈ F if and only if v ∈F . By the induction hypothesis, for every maximum dissociation setF ofT , there exists a maximum dissociation set F ′ of T ′ such that v ∈ F ′ if and only if v ∈F .
For each w ∈ C(u) \ {z}, T w ∼ = P n with n ≡ 0 (mod3). Let F w be a maximum dissociation set of T w such that w / ∈ F w (F w exists by Observation 2.
In this case, . For each w ∈ C(u), let F w be a maximum dissociation set of T w . Let F = w∈C(u) F w ∪ F ′ . Since |C 2 (u)| ≥ 1 or |C 1 (u)| ≥ 2, by Lemma 2.2, ψ(T u ) = w∈C(u) ψ(T w ) = w∈C(u) |F w |, which implies that w∈C(u) F w is a maximum dissociation set of T u . Thus, F is a maximum dissociation set of T . Since v ∈ F ′ if and only if v ∈ F , we have v ∈ F if and only if v ∈F . Now, we show that for every maximum dissociation set F of T , there exists a maximum dissociation setF ofT such that v ∈F if and only if v ∈ F . Likewise, we consider the following two cases. Case 1. |C 2 (u)| = 0 and |C 1 (u)| ≤ 1.
For each w ∈ C(u) \ {z}, we have T w ∼ = P n with n ≡ 0( mod 3). Let F w be a maximum dissociation set of T w such that w / ∈ F w (F w exists by Observation 2.1(b)). For every maximum dissociation set F of T , let F ′ = F − w∈C(u)\{z} D[w]. Then F ′ is a dissociation set of T ′ and v ∈ F if and only if v ∈ F ′ . We will prove that F ′ is a maximum dissociation set of T ′ . Suppose, for a contradiction, that F 1 is a maximum dissociation set of T ′ with |F 1 | > |F ′ |. Let F 2 = w∈C(u)\{z} F w ∪ F 1 . Then F 2 is a dissociation set of T and which contradicts to the fact that F is a maximum dissociation set of T . Thus F ′ is a maximum dissociation set of T ′ . By the induction hypothesis, there exists a maximum dissociation setF ofT such that v ∈ F ′ if and only if v ∈F . Hence, there exists a maximum dissociation setF ofT such that v ∈ F if and only if v ∈F . Case 2. |C 2 (u)| ≥ 1 or |C 1 (u)| ≥ 2.
For each w ∈ C(u), let F w be a maximum dissociation set of T w . By Lemma 2.2, ψ(T u ) = w∈C(u) ψ(T w ) = w∈C(u) |F w |.
For every maximum dissociation set F of T , let F ′ = F − D[u]. We will prove that F ′ is a maximum dissociation set of T ′ . Suppose, for a contradiction, that F 1 is a maximum dissociation set of T ′ with |F 1 | > |F ′ |. Let F 2 = w∈C(u) F w ∪F 1 . Then F 2 is a dissociation set of T and which contradicts with the fact that F is a maximum dissociation set of T . Thus F ′ is a maximum dissociation set of T ′ . By the induction hypothesis, there exists a maximum dissociation setF ofT such that v ∈ F ′ if and only if v ∈F . Thus, there exists a maximum dissociation setF ofT such that v ∈ F if and only if v ∈F . We complete the proof. By Lemma 3.1, we can obtain the following corollary.

A recognition algorithm
In this section, we present a linear time recognition algorithm which can determine whether a given vertex in a tree is in all (or no) maximum dissociation sets of the tree. The recognition algorithm is described in detail as follows.
For a rooted tree, we can use the breadth-first search algorithm to find the distance from the root to each other vertex in linear time.
Step 4 is the pruning process of the rooted tree T and can be executed in linear time. Thus, the runtime of the recognition algorithm is linear. Thus, using the recognition algorithm we can find all vertices contained in all (or no) maximum dissociation sets of a tree of order n in O(n 2 ) time.