126 research outputs found

    A new lower bound for the Towers of Hanoi problem

    Get PDF
    More than a century after its proposal, the Towers of Hanoi puzzle with 4 pegs was solved by Thierry Bousch in a breakthrough paper in 2014. The general problem with p pegs is still open, with the best lower bound on the minimum number of moves due to Chen and Shen. We use some of Bousch's new ideas to obtain an asymptotic improvement on this bound for all p >= 5

    On generalized Frame-Stewart numbers

    Get PDF
    For the multi-peg Tower of Hanoi problem with k4k \geqslant 4 pegs, so far the best solution is obtained by the Stewart's algorithm based on the the following recurrence relation: S_k(n)=min_1tn{2S_k(nt)+S_k1(t)}\mathrm{S}\_k(n)=\min\_{1 \leqslant t \leqslant n} \left\{2 \cdot \mathrm{S}\_k(n-t) + \mathrm{S}\_{k-1}(t)\right\}, S_3(n)=2n1\mathrm{S}\_3(n) = 2^n -- 1. In this paper, we generalize this recurrence relation to G_k(n)=min_1tn{p_kG_k(nt)+q_kG_k1(t)}\mathrm{G}\_k(n) = \min\_{1\leqslant t\leqslant n}\left\{ p\_k\cdot \mathrm{G}\_k(n-t) + q\_k\cdot \mathrm{G}\_{k-1}(t) \right\}, G_3(n)=p_3G_3(n1)+q_3\mathrm{G}\_3(n) = p\_3\cdot \mathrm{G}\_3(n-1) + q\_3, for two sequences of arbitrary positive integers (p_i)_i3\left(p\_i\right)\_{i \geqslant 3} and (q_i)_i3\left(q\_i\right)\_{i \geqslant 3} and we show that the sequence of differences (G_k(n)G_k(n1))_n1\left(\mathrm{G}\_k(n)- \mathrm{G}\_k(n-1)\right)\_{n \geqslant 1} consists of numbers of the form (_i=3kq_i)(_i=3kp_iα_i)\left(\prod\_{i=3}^{k}q\_i\right) \cdot \left(\prod\_{i=3}^{k}{p\_i}^{\alpha\_i}\right), with α_i0\alpha\_i\geqslant 0 for all ii, arranged in nondecreasing order. We also apply this result to analyze recurrence relations for the Tower of Hanoi problems on several graphs.Comment: 13 pages ; 3 figure

    The Apprentices\u27 Tower of Hanoi

    Get PDF
    The Apprentices\u27 Tower of Hanoi is introduced in this thesis. Several bounds are found in regards to optimal algorithms which solve the puzzle. Graph theoretic properties of the associated state graphs are explored. A brief summary of other Tower of Hanoi variants is also presented

    On the Treewidth of Hanoi Graphs

    Get PDF
    The objective of the well-known Towers of Hanoi puzzle is to move a set of disks one at a time from one of a set of pegs to another, while keeping the disks sorted on each peg. We propose an adversarial variation in which the first player forbids a set of states in the puzzle, and the second player must then convert one randomly-selected state to another without passing through forbidden states. Analyzing this version raises the question of the treewidth of Hanoi graphs. We find this number exactly for three-peg puzzles and provide nearly-tight asymptotic bounds for larger numbers of pegs

    Distances and automatic sequences in distinguished variants of Hanoi graphs

    Get PDF
    In this thesis three open problems concerning Hanoi-type graphs are addressed. I prove a theorem to determine all shortest paths between two arbitrary vertices s and t in the General Sierpiński graph S_p^n with base p ≥ 3 and exponent n ≥ 0 and find an algorithm based on this theorem which gives us the index of the potential auxiliary subgraph, the distance between s and t and the best first move(s). Using the isomorphism between S_3^n and the Hanoi graphs H_3^n, this algorithm also determines the shortest paths in H_3^n. The results are also used in order to simplify proofs of already known metric properties of S_p^n. Additionally, I compute the average number of input pairs (s_i, t_i) for i ϵ{1,...,n} to be read by the algorithm. The Theorem and the algorithm for S_p^n are modified for the Sierpiński triangle graphs, which are deeply connected to the well-known Sierpiński triangle and the Sierpiński graphs, with the result that the shortest paths in the Sierpiński triangle graphs can be determined for the first time. The Hanoi graphs H_3^n are then considered as directed graphs by differentiating the directions of the disc moves between the pegs of the corresponding Tower of Hanoi. For the problem to transfer a tower from one peg to another peg there are five different solvable variants. Here, the variants TH(C_3^+) and TH(K_3^-) are discussed concerning the infinite sequences of moves which arise from the solutions as n tends to infinity. The Allouche-Sapir Conjecture says that these sequences are not d-automatic for any d. I prove this for the TH(C_3^+) sequence with the aid of the frequency of a letter and its rationality in automatic sequences. For the TH(K_3^-) sequence I employ Cobham’s Theorem about multiplicative independence, automatic sequences and ultimate periodicity. I show that this sequence is the image, under a 1-uniform morphism, of an iterative fixed point of a primitive prolongable endomorphism. F. Durand’s methodᵃ is then used for the decision about the question whether the sequence is ultimately periodic. The method of I. V. Mitrofanovᵇ, which works with subword schemata,is applied to the problem as well. Using the theory of recognisable sets, a sufficient condition for deciding the question about the automaticity of the TH(K_3^-) sequence is deduced. Finally, a yet not studied distance problem on the so-called Star Tower of Hanoi, which is based on the star graph S t(4), is considered. Assuming that the Frame-Stewart type strategy is optimal, a recurrence for the length of the resulting paths is deduced and solved up to n = 12. ᵃ F. Durand, HD0L ω-equivalence and periodicity problems in the primitive case (to the memory of G. Rauzy). Journal of Uniform Distribution Theory, 7(1):199-215, 2012 ᵇ I. V. Mitrofanov, Periodicity of Morphic Words, Journal of Mathematical Sciences, 206(6):679-687, 2015Ich beweise ein Theorem zur Bestimmung aller kürzesten Wege zwischen zwei beliebigen Ecken s und t in den allgemeinen Sierpiński-Graphen S_p^n mit Basis p ≥ 3 und Exponent n ≥ 0 und erstelle auf diesem Theorem beruhend einen Algorithmus, der den Index des allfälligen Hilfsuntergraphen, den Abstand zwischen s und t und einen besten ersten Schritt liefert. Unter Verwendung des Isomorphismus zwischen S_3^n und den Hanoi-Graphen H_3^n bestimmt dieser Algorithmus auch die kürzesten Wege in H_3^n. Die Ergebnisse werden benutzt, um Beweise bereits bekannter metrischer Eigenschaften der S_p^n zu vereinfachen. Zusätzlich berechne ich die durchschnittlich benötigte Anzahl von Eingabepaaren (s_i, t_i) für i ϵ{1,...,n} in den Algorithmus. Das Theorem und der Algorithmus für S_p^n werden für die Klasse der Sierpiński-Dreiecksgraphen, welche in direktem Zusammenhang mit dem berühmten Sierpiński-Dreieck und den Sierpiński-Graphen stehen, modifiziert, sodass erstmals auch die kürzesten Wege in diesen Graphen bestimmt werden können. Die Hanoi-Graphen H_3^n werden dann als gerichtete Graphen betrachtet, indem man die Richtungen der Bewegungen zwischen den Stäben des entsprechenden Turms von Hanoi differenziert. Für das Problem des Versetzens eines Turms von einem Stab auf einen anderen gibt es fünf verschiedene lösbare Varianten. Die Varianten TH(C_3^+) und TH(K_3^-) werden bezüglich der unendlichen Folgen von Bewegungen betrachtet, die sich durch die Lösung für n gegen Unendlich strebend ergeben. Die Allouche-Sapir-Vermutung besagt, dass für kein d diese Folgen d-automatisch erzeugt sind. Ich beweise dies für die TH(C_3^+) Folge mit Hilfe der Theorie über die Häufigkeit eines Buchstabens und deren Rationalität in automatisch erzeugten Folgen. Für die TH(K_3^-) Folge wird Cobhams Theorem über multiplikative Unabhängigkeit, automatisch erzeugte Folgen und ultimative Periodizität verwendet. Ich zeige, dass diese Folge das Bild, unter einem 1-uniformen Morphismus, eines iterativen Fixpunktes eines primitiven verlängerbaren Endomorphismus ist. Die Methode von F. Durandᵃ wird dann für die Entscheidung über die Frage, ob die Folge ultimativ periodisch ist, verwendet. Ebenso wird die Methode von I. V. Mitrofanovᵇ, welche mit Teilwortschemata arbeitet, auf das Problem angewandt. Unter Verwendung der Theorie über erkennbare Mengen wird eine hinreichende Bedingung für die Frage der Automatizität der TH(K_3^-) Folge hergeleitet. Zuletzt wird ein bislang nicht untersuchtes Abstandsproblem im sogenannten Stern-Turm-von- Hanoi betrachtet, welcher auf dem Stern-Graphen St(4) beruht. Unter der Annahme, dass die Frame-Stewart-Strategie optimal sei, wird eine Rekursionsvorschrift für die Länge der so gewonnenen Wege entwickelt und bis n = 12 gelöst. ᵃ F. Durand, HD0L ω-equivalence and periodicity problems in the primitive case (to the memory of G. Rauzy). Journal of Uniform Distribution Theory, 7(1):199-215, 2012 ᵇ I. V. Mitrofanov, Periodicity of Morphic Words, Journal of Mathematical Sciences, 206(6):679-687, 201

    Additive Pattern Database Heuristics

    Full text link
    We explore a method for computing admissible heuristic evaluation functions for search problems. It utilizes pattern databases, which are precomputed tables of the exact cost of solving various subproblems of an existing problem. Unlike standard pattern database heuristics, however, we partition our problems into disjoint subproblems, so that the costs of solving the different subproblems can be added together without overestimating the cost of solving the original problem. Previously, we showed how to statically partition the sliding-tile puzzles into disjoint groups of tiles to compute an admissible heuristic, using the same partition for each state and problem instance. Here we extend the method and show that it applies to other domains as well. We also present another method for additive heuristics which we call dynamically partitioned pattern databases. Here we partition the problem into disjoint subproblems for each state of the search dynamically. We discuss the pros and cons of each of these methods and apply both methods to three different problem domains: the sliding-tile puzzles, the 4-peg Towers of Hanoi problem, and finding an optimal vertex cover of a graph. We find that in some problem domains, static partitioning is most effective, while in others dynamic partitioning is a better choice. In each of these problem domains, either statically partitioned or dynamically partitioned pattern database heuristics are the best known heuristics for the problem

    Proof Pearl : Playing with the Tower of Hanoi Formally

    Get PDF
    The Tower of Hanoi is a typical example that is used in computer science courses to illustrate all the power of recursion. In this paper, we show that it is also a very nice example for inductive proofs and formal verification. We present some non-trivial results that have been formalised in the {Coq} proof assistant
    corecore