This paper presents a linear time algorithm for testing whether or not there is a path [v1, ..., v(m)] of an undirected tree T (\V(T)\ = n) that coincides with a string s = s1 ... s(m) (i.e., label(v1) ... label(v(m))...
详细信息
This paper presents a linear time algorithm for testing whether or not there is a path [v1, ..., v(m)] of an undirected tree T (\V(T)\ = n) that coincides with a string s = s1 ... s(m) (i.e., label(v1) ... label(v(m)) = s1 ... s(m)). Since any path of the tree is allowed, linear time substring matching algorithms can not be directly applied and a new method is developed. In the algorithm, O(n/m) vertices are selected from V(T) such that any path of length more than m - 2 must contain at least one of the selected vertices. A search is performed using the selected vertices as 'bases' and two tables of size O(m) are constructed for each of the selected vertices. A suffix tree, which is a well-known data structure in string matching, is used effectively in the algorithm. From each of the selected vertices, a search is performed with traversing the suffix tree associated with s. Although the size of the alphabet is assumed to be bounded by a constant in this paper, the algorithm can be applied to the case of unbounded alphabets by increasing the time complexity to O(n log m).
It is shown, that for each constant k≥1, the following problems can be solved in time: given a graph G, determine whether G has k vertex disjoint cycles, determine whether G has k edge disjoint cycles, determine whet...
详细信息
It is shown, that for each constant k≥1, the following problems can be solved in time: given a graph G, determine whether G has k vertex disjoint cycles, determine whether G has k edge disjoint cycles, determine whether G has a feedback vertex set of size ≤k. Also, every class , that is closed under minor taking, taking, and that does not contain the graph consisting of k disjoint copies of K 3 , has an membership test algorithm.
暂无评论