Lecture Notes in Computer Science 6099 Commenced Publication in 1973 Founding and Former Series Editors: Gerhard Goos, Juris Hartmanis, and Jan van Leeuwen Editorial Board David Hutchison Lancaster University, UK Takeo Kanade Carnegie Mellon University, Pittsburgh, PA, USA Josef Kittler University of Surrey, Guildford, UK Jon M. Kleinberg Cornell University, Ithaca, NY, USA Alfred Kobsa University of California, Irvine, CA, USA Friedemann Mattern ETH Zurich, Switzerland John C. Mitchell Stanford University, CA, USA Moni Naor Weizmann Institute of Science, Rehovot, Israel Oscar Nierstrasz University of Bern, Switzerland C. Pandu Rangan Indian Institute of Technology, Madras, India Bernhard Steffen TU Dortmund University, Germany Madhu Sudan Microsoft Research, Cambridge, MA, USA Demetri Terzopoulos University of California, Los Angeles, CA, USA Doug Tygar University of California, Berkeley, CA, USA Gerhard Weikum Max-Planck Institute of Computer Science, Saarbruecken, Germany
Paolo Boldi Luisa Gargano (Eds.) Fun with Algorithms 5th International Conference, FUN 2010 Ischia, Italy, June 2-4, 2010 Proceedings 13
Volume Editors Paolo Boldi Università degli Studi di Milano Dipartimento di Scienze dell Informazione 20135 Milano, Italy E-mail: paolo.boldi@gmail.com Luisa Gargano Università di Salerno Dipartimento di Informatica ed Applicazioni 84084, Fisciano, Italy E-mail: lg@dia.unisa.it Library of Congress Control Number: 2010926872 CR Subject Classification (1998): F.2, C.2, I.2, E.1, H.3, F.1 LNCS Sublibrary: SL 1 Theoretical Computer Science and General Issues ISSN 0302-9743 ISBN-10 3-642-13121-2 Springer Berlin Heidelberg New York ISBN-13 978-3-642-13121-9 Springer Berlin Heidelberg New York This work is subject to copyright. All rights are reserved, whether the whole or part of the material is concerned, specifically the rights of translation, reprinting, re-use of illustrations, recitation, broadcasting, reproduction on microfilms or in any other way, and storage in data banks. Duplication of this publication or parts thereof is permitted only under the provisions of the German Copyright Law of September 9, 1965, in its current version, and permission for use must always be obtained from Springer. Violations are liable to prosecution under the German Copyright Law. springer.com Springer-Verlag Berlin Heidelberg 2010 Printed in Germany Typesetting: Camera-ready by author, data conversion by Scientific Publishing Services, Chennai, India Printed on acid-free paper 06/3180
Preface FUN with Algorithms is a three-yearly conference that aims at attracting works which, besides a deep and interesting algorithmic content, also present amusing and fun aspects, are written with a keen wit, and are presented in a lively way. FUN is actually one of the main moving wheels behind most of the best scientific results, and in a sense this conference answers to the unconfessed need of having a place where we can present the most lighthearted part of our work without sacrificing precision and rigor. The 5th International Conference on Fun with Algorithms (FUN 2010) was held at Hotel Continental Terme in Ischia (Italy), June 2 4, 2010. The island of Ischia, a worldwide famous spa, sea, and tourist resort, is the ideal venue to host an event dedicated to pleasure as well as to science. The call for papers attracted 54 submissions from all over the world. Submitted papers were characterized by an extremely high quality and featuring a large variety of topics. After a careful and thorough reviewing process, the Program Committee selected 32 papers. The program also included three invited talks by Roberto Grossi, Prabhakar Raghavan, and Paul Spirakis. Extended versions of selected papers presented at the meeting will be published in a special issue of Theory of Computing Systems. We would like to take this opportunity to thank all the authors who submitted their work to FUN 2010 and of course all the colleagues that served on the Program Committee whose comments and discussions were crucial in selecting the papers. We also wish to thank all the external reviewers (listed in the following pages) who provided further reports on the papers as well as the members of the Organizing Committee (Gennaro Cordasco and Adele Rescigno). The EasyChair Conference System (http://www.easychair.org/)wasused through all the stages (submission, review, selection, preparation of the proceedings) and greatly simplified our work: we wish to thank its creators and maintainers for their support and help. We also thank Alfred Hofmann and Anna Kramer at Springer, who provided feedback and timely answers to our questions. We are pleased to acknowledge support from Dipartimento di Informatica ed Applicazioni R.M. Capocelli, from Università di Salerno, and from Dipartimento di Scienze dell Informazione (Università degli studi di Milano). March 2010 Paolo Boldi Luisa Gargano
Organization Program Chairs Paolo Boldi, Luisa Gargano Program Committee Ricardo Baeza-Yates, Anne Bergeron, Jean-Claude Bermond, Erik Demaine, Leah Epstein, Leszek Gasieniec, Magnus Halldorsson, Evangelos Kranakis, Fabrizio Luccio, Michael Mitzenmacher, Muthu Muthukrishnan, Gonzalo Navarro, Rasmus Pagh, David Peleg, Nadia Pisanti, Jos Rolim, Nicola Santoro, Eduardo Sany-Laber, Michael Segal, Steven Skiena, Shmuel Zaks External Reviewers Michael Atkinson, Valentina Ciriani, Andrew Collins, Philippe Giabbanelli, Mathieu Giraud, Ronen Gradwohl, Markus Holzer, Thore Husfeldt, David Ilcinkas, Rastislav Královič, Danny Krizanc, Dario Malchiodi, Carlo Mereghetti, Pat Morin, Nicolas Nisse, Linda Pagli, Stéphane Perennes, Roberto Radicioni, Tomasz Radzik, Adele Rescigno, Marco Rosa, Cole Smith, Henry Soldano, Krister Swenson, Ugo Vaccaro, Gerhard Woeginger, Norbert Zeh Local Organization Gennaro Cordasco, Luisa Gargano, Adele Rescigno
Table of Contents Fun with Olympiad in Algorithmics (Invited Talk)... 1 Roberto Grossi, Alessio Orlandi, and Giuseppe Ottaviano The FUNnest Talks That belong to FUN (Abstract) (Invited Talk)... 3 Prabhakar Raghavan Fun with Games (Invited Talk)... 4 Paul G. Spirakis, Ioannis Chatzigiannakis, Georgios Mylonas, and Panagiota N. Panagopoulou Do We Need a Stack to Erase a Component in a Binary Image?... 16 Tetsuo Asano Kaboozle Is NP-complete, Even in a Strip... 28 Tetsuo Asano, Erik D. Demaine, Martin L. Demaine, and Ryuhei Uehara AHatTrick... 37 Oren Ben-Zwi and Guy Wolfovitz Fun at a Department Store: Data Mining Meets Switching Theory... 41 Anna Bernasconi, Valentina Ciriani, Fabrizio Luccio, and Linda Pagli Using Cell Phone Keyboards is (NP)Hard... 53 Peter Boothe Urban Hitchhiking... 68 Marco Bressan and Enoch Peserico A Fun Application of Compact Data Structures to Indexing Geographic Data... 77 Nieves R. Brisaboa, Miguel R. Luaces, Gonzalo Navarro, and Diego Seco On Table Arrangements, Scrabble Freaks, and Jumbled Pattern Matching... 89 Péter Burcsi, Ferdinando Cicalese, Gabriele Fici, and Zsuzsanna Lipták Cryptographic and Physical Zero-Knowledge Proof: From Sudoku to Nonogram... 102 Yu-Feng Chien and Wing-Kai Hon
VIII Table of Contents A Better Bouncer s Algorithm... 113 Ferdinando Cicalese, Travis Gagie, Anthony J. Macula, Martin Milanič, and Eberhard Triesch Tradeoffs in Process Strategy Games with Application in the WDM Reconfiguration Problem... 121 Nathann Cohen, David Coudert, Dorian Mazauric, Napoleão Nepomuceno, and Nicolas Nisse UNO Is Hard, Even for a Single Player... 133 Erik D. Demaine, Martin L. Demaine, Ryuhei Uehara, Takeaki Uno, and Yushi Uno Leveling-Up in Heroes of Might and Magic III... 145 Dimitrios I. Diochnos The Magic of a Number System... 156 Amr Elmasry, Claus Jensen, and Jyrki Katajainen Bit-(Parallelism) 2 : Getting to the Next Level of Parallelism... 166 Domenico Cantone, Simone Faro, and Emanuele Giaquinta An Algorithmic Analysis of the Honey-Bee Game... 178 Rudolf Fleischer and Gerhard J. Woeginger Mapping an Unfriendly Subway System... 190 Paola Flocchini, Matthew Kellett, Peter C. Mason, and Nicola Santoro Cracking Bank PINs by Playing Mastermind... 202 Riccardo Focardi and Flaminia L. Luccio Computational Complexity of Two-Dimensional Platform Games... 214 Michal Forišek Christmas Gift Exchange Games... 228 Arpita Ghosh and Mohammad Mahdian Return of the Boss Problem: Competing Online against a Non-adaptive Adversary... 237 Magnús M. Halldórsson and Hadas Shachnai Managing Change in the Era of the iphone... 249 Patrick Healy The Computational Complexity of RaceTrack... 260 Markus Holzer and Pierre McKenzie Simple Wriggling Is Hard Unless You Are a Fat Hippo... 272 Irina Kostitsyna and Valentin Polishchuk
Table of Contents IX The Urinal Problem... 284 Evangelos Kranakis and Danny Krizanc Fighting Censorship with Algorithms... 296 Mohammad Mahdian The Complexity of Flood Filling Games... 307 David Arthur, Raphaël Clifford, Markus Jalsenius, Ashley Montanaro, and Benjamin Sach The Computational Complexity of the Kakuro Puzzle, Revisited... 319 Oliver Ruepp and Markus Holzer Symmetric Monotone Venn Diagrams with Seven Curves... 331 Tao Cao, Khalegh Mamakani, and Frank Ruskey The Feline Josephus Problem... 343 Frank Ruskey and Aaron Williams Scheduling with Bully Selfish Jobs... 355 Tami Tamir O(1)-Time Unsorting by Prefix-Reversals in a Boustrophedon Linked List... 368 Aaron Williams Author Index... 381