10,854 research outputs found

    An Efficient Dynamic Programming Algorithm for the Generalized LCS Problem with Multiple Substring Exclusion Constrains

    Full text link
    In this paper, we consider a generalized longest common subsequence problem with multiple substring exclusion constrains. For the two input sequences XX and YY of lengths nn and mm, and a set of dd constrains P={P1,...,Pd}P=\{P_1,...,P_d\} of total length rr, the problem is to find a common subsequence ZZ of XX and YY excluding each of constrain string in PP as a substring and the length of ZZ is maximized. The problem was declared to be NP-hard\cite{1}, but we finally found that this is not true. A new dynamic programming solution for this problem is presented in this paper. The correctness of the new algorithm is proved. The time complexity of our algorithm is O(nmr)O(nmr).Comment: arXiv admin note: substantial text overlap with arXiv:1301.718

    Submodular Maximization Meets Streaming: Matchings, Matroids, and More

    Full text link
    We study the problem of finding a maximum matching in a graph given by an input stream listing its edges in some arbitrary order, where the quantity to be maximized is given by a monotone submodular function on subsets of edges. This problem, which we call maximum submodular-function matching (MSM), is a natural generalization of maximum weight matching (MWM), which is in turn a generalization of maximum cardinality matching (MCM). We give two incomparable algorithms for this problem with space usage falling in the semi-streaming range---they store only O(n)O(n) edges, using O(nlogn)O(n\log n) working memory---that achieve approximation ratios of 7.757.75 in a single pass and (3+ϵ)(3+\epsilon) in O(ϵ3)O(\epsilon^{-3}) passes respectively. The operations of these algorithms mimic those of Zelke's and McGregor's respective algorithms for MWM; the novelty lies in the analysis for the MSM setting. In fact we identify a general framework for MWM algorithms that allows this kind of adaptation to the broader setting of MSM. In the sequel, we give generalizations of these results where the maximization is over "independent sets" in a very general sense. This generalization captures hypermatchings in hypergraphs as well as independence in the intersection of multiple matroids.Comment: 18 page
    corecore