250 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

    A note on the largest number of red nodes in red-black trees

    Full text link
    In this paper, we are interested in the number of red nodes in red-black trees. We first present an O(n2log⁑n)O(n^2\log n) time dynamic programming solution for computing r(n)r(n), the largest number of red internal nodes in a red-black tree on nn keys. Then the algorithm is improved to some O(log⁑n)O(\log n) time recursive and nonrecursive algorithms. Based on these improved algorithms we finally find a closed-form solution of r(n)r(n)

    Complete Solutions for a Combinatorial Puzzle in Linear Time

    Full text link
    In this paper we study a single player game consisting of nn black checkers and mm white checkers, called shifting the checkers. We have proved that the minimum number of steps needed to play the game for general nn and mm is nm+n+mnm + n + m. We have also presented an optimal algorithm to generate an optimal move sequence of the game consisting of nn black checkers and mm white checkers, and finally, we present an explicit solution for the general game

    Bioleaching of Sphalerite by the Native Mesophilic Iron-oxidizing Bacteria from a Lead-Zinc Tailing

    Get PDF
    AbstractAn isolated native mesophilic iron-oxidizing bacteria, acidithiobacillus ferrooxidans, was used to extract zinc by the bioleaching method from a typical lead-zinc tailing. Experiments were carried out by mixed culture of the mesophilic strain in the shake flasks and the different influencing factors such as pH, temperature, inoculation cell number, as well as slurry concentration on the process of bioleaching were investigated. The results indicated that the extraction efficiency of zinc was relevant with these variables and more than 70% of sphalerite was dissolved on the condition of with pH 2.0, initial ferrous concentration of 10g/L and slurry concentration of 10wt.% during 25 d, while without bacteria, 22% of Zn was merely extracted

    Potentialities of Hubble parameter and expansion rate function data to alleviate Hubble tension

    Full text link
    Taking advantage of Gaussian process (GP), we obtain an improved estimate of the Hubble constant, H0=70.41Β±1.58H_0=70.41\pm1.58 km sβˆ’1^{-1} Mpcβˆ’1^{-1}, using Hubble parameter [H(z)H(z)] from cosmic chronometers (CCH) and expansion rate function [E(z)E(z)], extracted from type Ia supernovae, data. This result is higher than those obtained by directly reconstructing CCH data with GP. In order to estimate the potential of future CCH data, we simulate two sets of H(z)H(z) data and use them to constrain H0H_0 by either using GP reconstruction or fitting them with E(z)E(z) data. We find that simulated H(z)H(z) data alleviate H0H_0 tension by pushing H0H_0 values higher towards ∼70\sim70 km sβˆ’1^{-1} Mpcβˆ’1^{-1}. We also find that joint H(z)H(z) + E(z)E(z) data favor higher values of H0H_0, which is also confirmed by constraining H0H_0 in the flat concordance model and 2-order Taylor expansion of H(z)H(z). In summary, we conclude that more and better-quality CCH data as well as E(z)E(z) data can provide a new and useful perspective on resolving H0H_0 tension.Comment: 11 pages, 8 figure
    • …
    corecore