15 research outputs found

    HIROIMONO is NP-complete

    Get PDF
    In a Hiroimono puzzle, one must collect a set of stones from a square grid, moving along grid lines, picking up stones as one encounters them, and changing direction only when one picks up a stone. We show that deciding the solvability of such puzzles is NP-complete

    Nondango is NP-Complete

    Full text link
    Nondango is a pencil puzzle consisting of a rectangular grid partitioned into regions, with some cells containing a white circle. The player has to color some circles black such that every region contains exactly one black circle, and there are no three consecutive circles (horizontally, vertically, or diagonally) having the same color. In this paper, we prove that deciding solvability of a given Nondango puzzle is NP-complete

    A Simple Application of Lightweight Fusion to Proving the Equivalence of Abstract Machines

    Get PDF
    We show how Ohori and Sasano's recent lightweight fusion by fixed-point promotion provides a simple way to prove the equivalence of the two standard styles of specification of abstract machines: (1) as a transition function together with a `driver loop' implementing the iteration of this transition function; and (2) as a function directly iterating upon a configuration until reaching a final state, if ever. The equivalence hinges on the fact that the latter style of specification is a fused version of the former one. The need for such a simple proof is motivated by our recent work on syntactic correspondences between reduction semantics and abstract machines, using refocusing

    Zig-Zag Numberlink is NP-Complete

    Get PDF
    When can tt terminal pairs in an m×nm \times n grid be connected by tt vertex-disjoint paths that cover all vertices of the grid? We prove that this problem is NP-complete. Our hardness result can be compared to two previous NP-hardness proofs: Lynch's 1975 proof without the ``cover all vertices'' constraint, and Kotsuma and Takenaga's 2010 proof when the paths are restricted to have the fewest possible corners within their homotopy class. The latter restriction is a common form of the famous Nikoli puzzle \emph{Numberlink}; our problem is another common form of Numberlink, sometimes called \emph{Zig-Zag Numberlink} and popularized by the smartphone app \emph{Flow Free}

    Refunctionalization at Work

    Get PDF
    We present the left inverse of Reynolds's defunctionalization and we show its relevance to programming and to programming languages. We present two methods to put a program that is almost in defunctionalized form into one that is actually in defunctionalized form, and we illustrate them with a recognizer for Dyck words and with Dijkstra's shunting-yard algorithm

    Characteristic Formulae: From Automata to Logic

    Get PDF
    This paper discusses the classic notion of characteristic formulae for processes using variations on Hennessy-Milner logic as the underlying logical specification language. It is shown how to characterize logically (states of) finite labelled transition systems modulo bisimilarity using a single formula in Hennessy-Milner logic with recursion. Moreover, characteristic formulae for timed automata with respect to timed bisimilarity and the faster-than preorder of Moller and Tofts are offered in terms of the logic L_nu of Laroussinie, Larsen and Weise

    On One-Pass CPS Transformations

    Get PDF
    We bridge two distinct approaches to one-pass CPS transformations, i.e., CPS transformations that reduce administrative redexes at transformation time instead of in a post-processing phase. One approach is compositional and higher-order, and is independently due to Appel, Danvy and Filinski, and Wand, building on Plotkin's seminal work. The other is non-compositional and based on a reduction semantics for the lambda-calculus, and is due to Sabry and Felleisen. To relate the two approaches, we use three tools: Reynolds's defunctionalization and its left inverse, refunctionalization; a special case of fold-unfold fusion due to Ohori and Sasano, fixed-point promotion; and an implementation technique for reduction semantics due to Danvy and Nielsen, refocusing. This work is directly applicable to transforming programs into monadic normal form

    On the Existence of a Finite Base for Complete Trace Equivalence over BPA with Interrupt

    Get PDF
    We study Basic Process Algebra with interrupt modulo complete trace equivalence. We show that, unlike in the setting of the more demanding bisimilarity, a ground complete finite axiomatization exists. We explicitly give such an axiomatization, and extend it to a finite complete one in the special case when a single action is present

    Tatamibari Is NP-Complete

    Get PDF
    In the Nikoli pencil-and-paper game Tatamibari, a puzzle consists of an m x n grid of cells, where each cell possibly contains a clue among ?, ?, ?. The goal is to partition the grid into disjoint rectangles, where every rectangle contains exactly one clue, rectangles containing ? are square, rectangles containing ? are strictly longer horizontally than vertically, rectangles containing ? are strictly longer vertically than horizontally, and no four rectangles share a corner. We prove this puzzle NP-complete, establishing a Nikoli gap of 16 years. Along the way, we introduce a gadget framework for proving hardness of similar puzzles involving area coverage, and show that it applies to an existing NP-hardness proof for Spiral Galaxies. We also present a mathematical puzzle font for Tatamibari

    Solving Yin-Yang Puzzles Using Exhaustive Search and Prune-and-Search Algorithms

    Get PDF
    We investigate some algorithmic and mathematical aspects of Yin-Yang/Shiromaru-Kuromaru puzzles. Specifically, we discuss two algorithms for solving arbitrary Yin-Yang puzzles, namely the exhaustive search approach and the prune-and-search technique. We show that both algorithms have an identical asymptotic running time of O(max{mn, 2^(mn−h)}) for finding all solutions of a Yin-Yang instance with h hints of size m x n. Nevertheless, our experiments show that the practical running time of the prune-and-search technique outperforms the conventional exhaustive search approach
    corecore