1,502 research outputs found

    Faster Evaluation of Subtraction Games

    Get PDF
    Subtraction games are played with one or more heaps of tokens, with players taking turns removing from a single heap a number of tokens belonging to a specified subtraction set; the last player to move wins. We describe how to compute the set of winning heap sizes in single-heap subtraction games (for an input consisting of the subtraction set and maximum heap size nn), in time O~(n)\tilde O(n), where the O~\tilde O elides logarithmic factors. For multi-heap games, the optimal game play is determined by the nim-value of each heap; we describe how to compute the nim-values of all heaps of size up to~nn in time O~(mn)\tilde O(mn), where mm is the maximum nim-value occurring among these heap sizes. These time bounds improve naive dynamic programming algorithms with time O(n∣S∣)O(n|S|), because m≤∣S∣m\le|S| for all such games. We apply these results to the game of subtract-a-square, whose set of winning positions is a maximal square-difference-free set of a type studied in number theory in connection with the Furstenberg-S\'ark\"ozy theorem. We provide experimental evidence that, for this game, the set of winning positions has a density comparable to that of the densest known square-difference-free sets, and has a modular structure related to the known constructions for these dense sets. Additionally, this game's nim-values are (experimentally) significantly smaller than the size of its subtraction set, implying that our algorithm achieves a polynomial speedup over dynamic programming.Comment: 12 pages, 4 figures. To appear in the Proceedings of the 9th International Conference on Fun with Algorithms (FUN 2018), Leibniz International Proceedings in Informatic

    Effect handlers via generalised continuations

    Get PDF
    Plotkin and Pretnar's effect handlers offer a versatile abstraction for modular programming with user-defined effects. This paper focuses on foundations for implementing effect handlers, for the three different kinds of effect handlers that have been proposed in the literature: deep, shallow, and parameterised. Traditional deep handlers are defined by folds over computation trees, and are the original construct proposed by Plotkin and Pretnar. Shallow handlers are defined by case splits (rather than folds) over computation trees. Parameterised handlers are deep handlers extended with a state value that is threaded through the folds over computation trees. We formulate the extensions both directly and via encodings in terms of deep handlers, and illustrate how the direct implementations avoid the generation of unnecessary closures. We give two distinct foundational implementations of all the kinds of handlers we consider: a continuation passing style (CPS) transformation and a CEK-style abstract machine. In both cases, the key ingredient is a generalisation of the notion of continuation to accommodate stacks of effect handlers. We obtain our CPS translation through a series of refinements as follows. We begin with a first-order CPS translation into untyped lambda calculus which manages a stack of continuations and handlers as a curried sequence of arguments. We then refine the initial CPS translation by uncurrying it to yield a properly tail-recursive translation, and then moving towards more and more intensional representations of continuations in order to support different kinds of effect handlers. Finally, we make the translation higher-order in order to contract administrative redexes at translation time. Our abstract machine design then uses the same generalised continuation representation as the CPS translation. We have implemented both the abstract machine and the CPS transformation (plus extensions) as backends for the Links web programming language

    Effect handlers via generalised continuations

    Get PDF

    The Cowl - v.54 - n.9 - Nov 15, 1989

    Get PDF
    The Cowl - student newspaper of Providence College. Volume 54, Number 9 - November 15, 1989. 20 pages

    The Implementation of Word Chain Game to Improve the Mastery of English Vocabulary

    Get PDF
    Vocabulary is an important element in any language teaching learning process. In learning English, mastery of vocabulary is one of the main goals to improve students’ English skill. This research is designed to measure the implementation of Word Chain Game in improving the mastery of English vocabulary. The research questions in this research are: (1) What does the Word Chain Game do toward students’ vocabulary? (2) What are the ELT students at second year of UIN AR-RANIRY, Banda Aceh responses toward the Word Chain Games in English vocabulary teaching learning process? In collecting the data for this research, the writer used techniques which are: Experimental teaching, test, and questionnaire. The experimental teaching was conducted in five meeting. This research included two tests, there were pre-test and post-test. The questionnaire was given in the last meeting to find out the responses from ELT students. The sample in this research was unit 5 of the ELT students at second year of UIN AR-RANIRY 2016/2017.The result of this research showed that experimental teaching helped the students to improve their mastery of English vocabulary because the students gave the positive respond, they felt enjoyable in learning English vocabulary by applying Word Chain Game, and they felt easily to recall their memories about the vocabulary they have known before. For the tests showed that the mean of post-test score (71,8) was higher than the mean of pre-test (63,8). In answering the questionnaire most of the students gave the good respond in answering questionnaire. The writer also analyzed the hypothesis of this research and it showed that alternative hypothesis (Ha) was accepted and null hypothesis (Ho) was rejected. In this research, the writer will be very pleased to accept any critics and suggestions to make this thesis better

    Spartan Daily, January 31, 1997

    Get PDF
    Volume 108, Issue 6https://scholarworks.sjsu.edu/spartandaily/9083/thumbnail.jp

    Java, Java, Java: Object-Oriented Problem Solving

    Get PDF
    Open Access Textbook from Open Textbook Library: Java, Java, Java, 3e was previously published by Pearson Education, Inc. The first edition (2000) and the second edition (2003) were published by Prentice-Hall. In 2010 Pearson Education, Inc. reassigned the copyright to the authors, and we are happy now to be able to make the book available under an open source license. This PDF edition of the book is available under a Creative Commons Attribution 4.0 International License, which allows the book to be used, modified, and shared with attribution: (https://creativecommons.org/licenses/by/4.0/). – Ralph Morelli and Ralph Walde – Hartford, CT – December 30, 201
    • …
    corecore