20,095 research outputs found

    A constant-time algorithm for middle levels Gray codes

    Get PDF
    For any integer n1n\geq 1 a middle levels Gray code is a cyclic listing of all nn-element and (n+1)(n+1)-element subsets of {1,2,,2n+1}\{1,2,\ldots,2n+1\} such that any two consecutive subsets differ in adding or removing a single element. The question whether such a Gray code exists for any n1n\geq 1 has been the subject of intensive research during the last 30 years, and has been answered affirmatively only recently [T. M\"utze. Proof of the middle levels conjecture. Proc. London Math. Soc., 112(4):677--713, 2016]. In a follow-up paper [T. M\"utze and J. Nummenpalo. An efficient algorithm for computing a middle levels Gray code. To appear in ACM Transactions on Algorithms, 2018] this existence proof was turned into an algorithm that computes each new set in the Gray code in time O(n)\mathcal{O}(n) on average. In this work we present an algorithm for computing a middle levels Gray code in optimal time and space: each new set is generated in time O(1)\mathcal{O}(1) on average, and the required space is O(n)\mathcal{O}(n)

    A Model for Optimal Human Navigation with Stochastic Effects

    Full text link
    We present a method for optimal path planning of human walking paths in mountainous terrain, using a control theoretic formulation and a Hamilton-Jacobi-Bellman equation. Previous models for human navigation were entirely deterministic, assuming perfect knowledge of the ambient elevation data and human walking velocity as a function of local slope of the terrain. Our model includes a stochastic component which can account for uncertainty in the problem, and thus includes a Hamilton-Jacobi-Bellman equation with viscosity. We discuss the model in the presence and absence of stochastic effects, and suggest numerical methods for simulating the model. We discuss two different notions of an optimal path when there is uncertainty in the problem. Finally, we compare the optimal paths suggested by the model at different levels of uncertainty, and observe that as the size of the uncertainty tends to zero (and thus the viscosity in the equation tends to zero), the optimal path tends toward the deterministic optimal path

    An explicit universal cycle for the (n-1)-permutations of an n-set

    Full text link
    We show how to construct an explicit Hamilton cycle in the directed Cayley graph Cay({\sigma_n, sigma_{n-1}} : \mathbb{S}_n), where \sigma_k = (1 2 >... k). The existence of such cycles was shown by Jackson (Discrete Mathematics, 149 (1996) 123-129) but the proof only shows that a certain directed graph is Eulerian, and Knuth (Volume 4 Fascicle 2, Generating All Tuples and Permutations (2005)) asks for an explicit construction. We show that a simple recursion describes our Hamilton cycle and that the cycle can be generated by an iterative algorithm that uses O(n) space. Moreover, the algorithm produces each successive edge of the cycle in constant time; such algorithms are said to be loopless

    (Almost) tight bounds for randomized and quantum Local Search on hypercubes and grids

    Full text link
    The Local Search problem, which finds a local minimum of a black-box function on a given graph, is of both practical and theoretical importance to many areas in computer science and natural sciences. In this paper, we show that for the Boolean hypercube \B^n, the randomized query complexity of Local Search is Θ(2n/2n1/2)\Theta(2^{n/2}n^{1/2}) and the quantum query complexity is Θ(2n/3n1/6)\Theta(2^{n/3}n^{1/6}). We also show that for the constant dimensional grid [N1/d]d[N^{1/d}]^d, the randomized query complexity is Θ(N1/2)\Theta(N^{1/2}) for d4d \geq 4 and the quantum query complexity is Θ(N1/3)\Theta(N^{1/3}) for d6d \geq 6. New lower bounds for lower dimensional grids are also given. These improve the previous results by Aaronson [STOC'04], and Santha and Szegedy [STOC'04]. Finally we show for [N1/2]2[N^{1/2}]^2 a new upper bound of O(N1/4(loglogN)3/2)O(N^{1/4}(\log\log N)^{3/2}) on the quantum query complexity, which implies that Local Search on grids exhibits different properties at low dimensions.Comment: 18 pages, 1 figure. v2: introduction rewritten, references added. v3: a line for grant added. v4: upper bound section rewritte

    Efficient computation of middle levels Gray codes

    Get PDF
    For any integer n1n\geq 1 a middle levels Gray code is a cyclic listing of all bitstrings of length 2n+12n+1 that have either nn or n+1n+1 entries equal to 1 such that any two consecutive bitstrings in the list differ in exactly one bit. The question whether such a Gray code exists for every n1n\geq 1 has been the subject of intensive research during the last 30 years, and has been answered affirmatively only recently [T. M\"utze. Proof of the middle levels conjecture. Proc. London Math. Soc., 112(4):677--713, 2016]. In this work we provide the first efficient algorithm to compute a middle levels Gray code. For a given bitstring, our algorithm computes the next \ell bitstrings in the Gray code in time O(n(1+n))\mathcal{O}(n\ell(1+\frac{n}{\ell})), which is O(n)\mathcal{O}(n) on average per bitstring provided that =Ω(n)\ell=\Omega(n)
    corecore