287,036 research outputs found

    The Complexity of Pattern Matching for 321321-Avoiding and Skew-Merged Permutations

    Full text link
    The Permutation Pattern Matching problem, asking whether a pattern permutation Ļ€\pi is contained in a permutation Ļ„\tau, is known to be NP-complete. In this paper we present two polynomial time algorithms for special cases. The first algorithm is applicable if both Ļ€\pi and Ļ„\tau are 321321-avoiding; the second is applicable if Ļ€\pi and Ļ„\tau are skew-merged. Both algorithms have a runtime of O(kn)O(kn), where kk is the length of Ļ€\pi and nn the length of Ļ„\tau

    Minimum and maximum against k lies

    Full text link
    A neat 1972 result of Pohl asserts that [3n/2]-2 comparisons are sufficient, and also necessary in the worst case, for finding both the minimum and the maximum of an n-element totally ordered set. The set is accessed via an oracle for pairwise comparisons. More recently, the problem has been studied in the context of the Renyi-Ulam liar games, where the oracle may give up to k false answers. For large k, an upper bound due to Aigner shows that (k+O(\sqrt{k}))n comparisons suffice. We improve on this by providing an algorithm with at most (k+1+C)n+O(k^3) comparisons for some constant C. The known lower bounds are of the form (k+1+c_k)n-D, for some constant D, where c_0=0.5, c_1=23/32=0.71875, and c_k=\Omega(2^{-5k/4}) as k goes to infinity.Comment: 11 pages, 3 figure

    Time Optimal Control in Spin Systems

    Get PDF
    In this paper, we study the design of pulse sequences for NMR spectroscopy as a problem of time optimal control of the unitary propagator. Radio frequency pulses are used in coherent spectroscopy to implement a unitary transfer of state. Pulse sequences that accomplish a desired transfer should be as short as possible in order to minimize the effects of relaxation and to optimize the sensitivity of the experiments. Here, we give an analytical characterization of such time optimal pulse sequences applicable to coherence transfer experiments in multiple-spin systems. We have adopted a general mathematical formulation, and present many of our results in this setting, mindful of the fact that new structures in optimal pulse design are constantly arising. Moreover, the general proofs are no more difficult than the specific problems of current interest. From a general control theory perspective, the problems we want to study have the following character. Suppose we are given a controllable right invariant system on a compact Lie group, what is the minimum time required to steer the system from some initial point to a specified final point? In NMR spectroscopy and quantum computing, this translates to, what is the minimum time required to produce a unitary propagator? We also give an analytical characterization of maximum achievable transfer in a given time for the two spin system.Comment: 20 Pages, 3 figure

    On smoothed analysis of quicksort and Hoare's find

    Get PDF
    We provide a smoothed analysis of Hoare's find algorithm, and we revisit the smoothed analysis of quicksort. Hoare's find algorithm - often called quickselect or one-sided quicksort - is an easy-to-implement algorithm for finding the k-th smallest element of a sequence. While the worst-case number of comparisons that Hoareā€™s find needs is Theta(n^2), the average-case number is Theta(n). We analyze what happens between these two extremes by providing a smoothed analysis. In the first perturbation model, an adversary specifies a sequence of n numbers of [0,1], and then, to each number of the sequence, we add a random number drawn independently from the interval [0,d]. We prove that Hoare's find needs Theta(n/(d+1) sqrt(n/d) + n) comparisons in expectation if the adversary may also specify the target element (even after seeing the perturbed sequence) and slightly fewer comparisons for finding the median. In the second perturbation model, each element is marked with a probability of p, and then a random permutation is applied to the marked elements. We prove that the expected number of comparisons to find the median is Omega((1āˆ’p)n/p log n). Finally, we provide lower bounds for the smoothed number of comparisons of quicksort and Hoareā€™s find for the median-of-three pivot rule, which usually yields faster algorithms than always selecting the first element: The pivot is the median of the first, middle, and last element of the sequence. We show that median-of-three does not yield a significant improvement over the classic rule

    Maximal Area Triangles in a Convex Polygon

    Full text link
    The widely known linear time algorithm for computing the maximum area triangle in a convex polygon was found incorrect recently by Keikha et. al.(arXiv:1705.11035). We present an alternative algorithm in this paper. Comparing to the only previously known correct solution, ours is much simpler and more efficient. More importantly, our new approach is powerful in solving related problems
    • ā€¦
    corecore