1,417 research outputs found

    Permutations generated by a depth 2 stack and an infinite stack in series are algebraic

    Full text link
    © 2015, Australian National University. All rights reserved. We prove that the class of permutations generated by passing an ordered sequence 12... n through a stack of depth 2 and an in nite stack in series is in bi-jection with an unambiguous context-free language, where a permutation of length n is encoded by a string of length 3n. It follows that the sequence counting the number of permutations of each length has an algebraic generating function. We use the explicit context-free grammar to compute the generating function:(formula presented) where cn is the number of permutations of length n that can be generated, and (formula presented) is a simple variant of the Catalan generating function. This in turn implies that (formula presented

    Quasi-Linear Cellular Automata

    Full text link
    Simulating a cellular automaton (CA) for t time-steps into the future requires t^2 serial computation steps or t parallel ones. However, certain CAs based on an Abelian group, such as addition mod 2, are termed ``linear'' because they obey a principle of superposition. This allows them to be predicted efficiently, in serial time O(t) or O(log t) in parallel. In this paper, we generalize this by looking at CAs with a variety of algebraic structures, including quasigroups, non-Abelian groups, Steiner systems, and others. We show that in many cases, an efficient algorithm exists even though these CAs are not linear in the previous sense; we term them ``quasilinear.'' We find examples which can be predicted in serial time proportional to t, t log t, t log^2 t, and t^a for a < 2, and parallel time log t, log t log log t and log^2 t. We also discuss what algebraic properties are required or implied by the existence of scaling relations and principles of superposition, and exhibit several novel ``vector-valued'' CAs.Comment: 41 pages with figures, To appear in Physica

    Two first-order logics of permutations

    Full text link
    We consider two orthogonal points of view on finite permutations, seen as pairs of linear orders (corresponding to the usual one line representation of permutations as words) or seen as bijections (corresponding to the algebraic point of view). For each of them, we define a corresponding first-order logical theory, that we call TOTO\mathsf{TOTO} (Theory Of Two Orders) and TOOB\mathsf{TOOB} (Theory Of One Bijection) respectively. We consider various expressibility questions in these theories. Our main results go in three different direction. First, we prove that, for all k1k \ge 1, the set of kk-stack sortable permutations in the sense of West is expressible in TOTO\mathsf{TOTO}, and that a logical sentence describing this set can be obtained automatically. Previously, descriptions of this set were only known for k3k \le 3. Next, we characterize permutation classes inside which it is possible to express in TOTO\mathsf{TOTO} that some given points form a cycle. Lastly, we show that sets of permutations that can be described both in TOOB\mathsf{TOOB} and TOTO\mathsf{TOTO} are in some sense trivial. This gives a mathematical evidence that permutations-as-bijections and permutations-as-words are somewhat different objects.Comment: v2: minor changes, following a referee repor

    Transformers Learn Shortcuts to Automata

    Full text link
    Algorithmic reasoning requires capabilities which are most naturally understood through recurrent models of computation, like the Turing machine. However, Transformer models, while lacking recurrence, are able to perform such reasoning using far fewer layers than the number of reasoning steps. This raises the question: what solutions are learned by these shallow and non-recurrent models? We find that a low-depth Transformer can represent the computations of any finite-state automaton (thus, any bounded-memory algorithm), by hierarchically reparameterizing its recurrent dynamics. Our theoretical results characterize shortcut solutions, whereby a Transformer with o(T)o(T) layers can exactly replicate the computation of an automaton on an input sequence of length TT. We find that polynomial-sized O(logT)O(\log T)-depth solutions always exist; furthermore, O(1)O(1)-depth simulators are surprisingly common, and can be understood using tools from Krohn-Rhodes theory and circuit complexity. Empirically, we perform synthetic experiments by training Transformers to simulate a wide variety of automata, and show that shortcut solutions can be learned via standard training. We further investigate the brittleness of these solutions and propose potential mitigations

    Enumeration of polyominoes defined in terms of pattern avoidance or convexity constraints

    Full text link
    In this thesis, we consider the problem of characterizing and enumerating sets of polyominoes described in terms of some constraints, defined either by convexity or by pattern containment. We are interested in a well known subclass of convex polyominoes, the k-convex polyominoes for which the enumeration according to the semi-perimeter is known only for k=1,2. We obtain, from a recursive decomposition, the generating function of the class of k-convex parallelogram polyominoes, which turns out to be rational. Noting that this generating function can be expressed in terms of the Fibonacci polynomials, we describe a bijection between the class of k-parallelogram polyominoes and the class of planted planar trees having height less than k+3. In the second part of the thesis we examine the notion of pattern avoidance, which has been extensively studied for permutations. We introduce the concept of pattern avoidance in the context of matrices, more precisely permutation matrices and polyomino matrices. We present definitions analogous to those given for permutations and in particular we define polyomino classes, i.e. sets downward closed with respect to the containment relation. So, the study of the old and new properties of the redefined sets of objects has not only become interesting, but it has also suggested the study of the associated poset. In both approaches our results can be used to treat open problems related to polyominoes as well as other combinatorial objects.Comment: PhD thesi
    corecore