99,541 research outputs found
Insertion Sort is O(n log n)
Traditional Insertion Sort runs in O(n^2) time because each insertion takes
O(n) time. When people run Insertion Sort in the physical world, they leave
gaps between items to accelerate insertions. Gaps help in computers as well.
This paper shows that Gapped Insertion Sort has insertion times of O(log n)
with high probability, yielding a total running time of O(n log n) with high
probability.Comment: 6 pages, Latex. In Proceedings of the Third International Conference
on Fun With Algorithms, FUN 200
Physical Zero-Knowledge Proofs for Akari, Takuzu, Kakuro and KenKen
Akari, Takuzu, Kakuro and KenKen are logic games similar to Sudoku. In Akari,
a labyrinth on a grid has to be lit by placing lanterns, respecting various
constraints. In Takuzu a grid has to be filled with 0's and 1's, while
respecting certain constraints. In Kakuro a grid has to be filled with numbers
such that the sums per row and column match given values; similarly in KenKen a
grid has to be filled with numbers such that in given areas the product, sum,
difference or quotient equals a given value. We give physical algorithms to
realize zero-knowledge proofs for these games which allow a player to show that
he knows a solution without revealing it. These interactive proofs can be
realized with simple office material as they only rely on cards and envelopes.
Moreover, we formalize our algorithms and prove their security.Comment: FUN with algorithms 2016, Jun 2016, La Maddalena, Ital
Recommended from our members
Artificial Immune Systems - Models, algorithms and applications
Copyright © 2010 Academic Research Publishing Agency.This article has been made available through the Brunel Open Access Publishing Fund.Artificial Immune Systems (AIS) are computational paradigms that belong to the computational intelligence family and are inspired by the biological immune system. During the past decade, they have attracted a lot of interest from researchers aiming to develop immune-based models and techniques to solve complex computational or engineering problems. This work presents a survey of existing AIS models and algorithms with a focus on the last five years.This article is available through the Brunel Open Access Publishing Fun
Normal, Abby Normal, Prefix Normal
A prefix normal word is a binary word with the property that no substring has
more 1s than the prefix of the same length. This class of words is important in
the context of binary jumbled pattern matching. In this paper we present
results about the number of prefix normal words of length , showing
that for some and
. We introduce efficient
algorithms for testing the prefix normal property and a "mechanical algorithm"
for computing prefix normal forms. We also include games which can be played
with prefix normal words. In these games Alice wishes to stay normal but Bob
wants to drive her "abnormal" -- we discuss which parameter settings allow
Alice to succeed.Comment: Accepted at FUN '1
Who witnesses The Witness? Finding witnesses in The Witness is hard and sometimes impossible
We analyze the computational complexity of the many types of
pencil-and-paper-style puzzles featured in the 2016 puzzle video game The
Witness. In all puzzles, the goal is to draw a simple path in a rectangular
grid graph from a start vertex to a destination vertex. The different puzzle
types place different constraints on the path: preventing some edges from being
visited (broken edges); forcing some edges or vertices to be visited
(hexagons); forcing some cells to have certain numbers of incident path edges
(triangles); or forcing the regions formed by the path to be partially
monochromatic (squares), have exactly two special cells (stars), or be singly
covered by given shapes (polyominoes) and/or negatively counting shapes
(antipolyominoes). We show that any one of these clue types (except the first)
is enough to make path finding NP-complete ("witnesses exist but are hard to
find"), even for rectangular boards. Furthermore, we show that a final clue
type (antibody), which necessarily "cancels" the effect of another clue in the
same region, makes path finding -complete ("witnesses do not exist"),
even with a single antibody (combined with many anti/polyominoes), and the
problem gets no harder with many antibodies. On the positive side, we give a
polynomial-time algorithm for monomino clues, by reducing to hexagon clues on
the boundary of the puzzle, even in the presence of broken edges, and solving
"subset Hamiltonian path" for terminals on the boundary of an embedded planar
graph in polynomial time.Comment: 72 pages, 59 figures. Revised proof of Lemma 3.5. A short version of
this paper appeared at the 9th International Conference on Fun with
Algorithms (FUN 2018
Higher-order subtyping
AbstractSystem Fâ©œÏ is an extension with subtyping of the higher-order polymorphic λ-calculus âan orthogonal combination of Girard's system FÏ with Cardelli and Wegner's Kernel Fun variant of System Fâ©œ. We develop the fundamental metatheory of this calculus: decidability of ÎČ-conversion on well-kinded types, elimination of the âcut-ruleâ of transitivity from the subtype relation, and the soundness, completeness, and termination of algorithms for subtyping and typechecking
- âŠ