A rule-based approach to the puzzle of Slither Link

Size: px
Start display at page:

Transcription

2 h i,j = 1 iff the horizontal edge at position (i,j) is part of the cycle v i,j = 1 iff the vertical edge at position (i,j) is part of the cycle The cell (i,j) has the horizontal edge h i,j above and the vertical edge v i,j left of itself. How cells and edges are arranged can be seen in Figure 2. have to be positive. A cycle without crossings is equivalent to a cycle which visits every node at most once, so the number of incident positive edges can never be greater than two. On the other hand if a node does not lie on the cycle also none of its incident edges can be positive. This leads to the second constraint: For every node either zero or two incident edges are positive in every solution. We get one constraint per node, that is for (i,j) {1,...,N + 1 {1,...,M + 1: c ed (i,j) : h i 1,j + v i,j 1 + h i,j + v i,j {0,2 (2) Nodes at the borders of the board have less than four incident edges. For these edges variables which are not in the domains of h or v, like h 0,j, occur and have to be considered zero. In contrast to the first type of constraint, the edge degree constraint does not change with the problem instance. The only change is the number of constraints for differently sized problems. 5.3 Constraints as propositional formulas Fig. 2. Structure of a problem instance In order to distinguish between edges in the grid graph and edges of the cycle we call the former simply edges and the latter positive edges when used in the cycle and negative edges when not. Later we will also deal with intermediate solutions with unassigned edges. We will also make no strict distinction between h i,j and v i,j having a value of zero or one and being a boolean variable in a propositional formula. 5. LOCAL CONSTRAINTS This section will present two types of constraints. These constraints can be called local since they deal with a small number of connected edges. They are also structured in a way, so that the same configuration found at two different positions in a board results in constraints, that only differ in the indices of variables. The locality and recurring structure of constraints are the actual leverage points for rules. They allow us to find local rules which can be applied at different positions in a board. 5.1 Constraints by cell value The first type of constraint is directly imposed by the problem itself. If a cell c i,j is not empty the number of surrounding positive edges has to be exactly c i,j. For (i,j) {1,...,N {1,...,M and c i,j {0,1,2,3 we get: c num (i,j) : h i,j + v i,j + h i,j+1 + v i+1,j = c i,j (1) This type of constraint varies with the actual problem instance. 5.2 Constraints by edge degree The second type of constraint exploits that every solution forms a cycle without crossings in the grid graph. If a node of the grid graph lies on the cycle two of its incident edges Both types of constraints can easily be translated into propositional formulas. A list of these formulas can be found in Appendix I. The propositional formula which is equivalent to c ed (i,j) is called ϕ ed (i,j). The propositional formulas equivalent to c num (i,j) are divided into four subtypes according to the actual value of c i,j. These are called ϕ num,0 (i,j) to ϕ num,3 (i,j). With these we can define two sets of propositional formulas Φ num = i,j ϕ num,c i,j (i,j) for (i,j) {1,...,N {1,...,M and c i,j empty Φ ed = i,j ϕ ed(i,j) for (i,j) {1,...,N + 1 {1,...,M + 1 Φ = Φ num Φ ed Every model of Φ is a candidate solution of the Slither Link instance. An variable assignment which fulfils both types of constraints for the all the given values of i and j has the correct number of edges around cells and additionally every edge lies on a cycle. The only condition missing to a solution is that we need a single cycle. 6. RULES There are different ways to represent rules, but they all have a common structure. Rules consist of a prerequisite part, also called left hand side, and a conclusion part, also called right hand side. The prerequisite part contains cell values and positive and negative edges together with their position relative to each other. The conclusion part then tells us which positive and negative edges can be assigned when the prerequisite occurs somewhere in the board. We will not consider rules with conclusions like either edge A or edge B has to be positive. These rules would not fit well in our concept, since we want the conclusions of one applied rule to create the prerequisites for the next applied rule.

3 6.1 Representation of rules The most intuitive way to represent rules is graphically in the way that can be seen in Figure 3. When we find the left hand side of such a graphical rule somewhere in the board we can exchange it with the right hand side. Fig. 4. Rule detecting inconsistency Fig. 3. Graphical rule Such a graphical representation fails when it comes to handling rules in algorithms or as mathematical objects. We encode every cell or edge on both sides of the rule as tuples consisting of position and value. The negative edge in our example rule would be encoded as (h,0,1,0) where h,0,1 are orientation and position and 0 is the value. We then have three sets of tuples: cell values, left hand side edges and right hand side edges. The complete example rule is ({(1,1,3), {(vert,1,0,1),(horiz,0,1,0), {(vert,2,1,1), (horiz,1,2,1)). In general a rule R can be described as: R = (C lhs,e lhs,e rhs ) C lhs finite subset of C = {(i,j,v): i,j N,v {0,1,2,3 E lhs and E rhs finite subsets of E = {(o,i,j,e): o {horiz,vert; i,j N; e {0,1 We say a rule matches a board B = ((c,n,m),(h,v)) at position (δi, δj), if for all (i,j,v) C lhs c(i + δi,j + δj) = v, for all (horiz,i,j,e) E lhs h(i + δi,j + δj) = e, and for all (vert,i,j,e) E lhs v(i + δi,j + δj) = e A rule is called correct if the conclusion, under the effective constraints, follows from the prerequisites. A rule is called maximal if it is correct and its conclusion is the union of the conclusions of all correct rules with the same prerequisites. 6.2 Detecting inconsistencies through rules Rules can also be used to detect inconsistencies. This detection occurs when a rule matches a board, but the conclusion contradicts what is already assigned to an edge. When looking at Figure 4 we have a rule in the upper part that matches the board in the lower part. But when we apply the rule, we notice that one edge would change from negative to positive. This means we have found an inconsistency. If the rule is correct, the board must be unsatisfiable with the current edge assignment. Exactly this is the case in our example: We have a cell with a value of 3, which implies exactly one negative edge, but our board has two negative edges. The rule has served as a test for satisfaction of a constraint. 7. AUTOMATIC CONSTRUCTION OF RULES 7.1 Rule construction algorithm This section will present an algorithm to construct the conclusions of a rule from its prerequisites. The prerequisites of a rule are basically a part of a board in which some cell values and edges are already set. Such a subboard is subject to the same local constraints as a complete board. What we do in the algorithm is to generate all possible assignments to the edges that have not been fixed in the prerequisite and test which of these assignments fulfil the constraints. By doing this, we get the set of all consistent assignments on this subboard. In the next step, we determine those edges which have been assigned the same value in the whole set. These edges form the conclusion, as we know that they are the same in every solution. Fig. 5. Construction of a rule Figure 5 is an example for the process: From the prerequisites three consistent assignments are calculated. Then these assignments are intersected to form the conclusion. In order to be able to enumerate all assignments on a subboard, we have to define which edges are part of it. We will do this by restricting our rule to being rectangular and then specifying its width and height. Choosing a bigger rectangle has the advantage to include more edges that potentially could end up in the conclusion.however, the disadvantage is that with every added edge the number of assignments we have to test doubles. The restriction to a rectangle is not strictly necessary, it just makes presentation and implementation easier and ensures that we have a connected set of edges. In general we would only need to define the set of edges in the subboard. The following pseudocode shows the algorithm. The core of the Java implementation can be found in Appendix I constructrule(c lhs,e lhs, width, height) B is board of dimensions width height

4 CA = for all edge assignments of B {e = (o,i,j,v): e E { if (ea is consistent){ CA = CA ea E rhs = ( e CA e) \ E lhs Output E rhs and CA There are three possible outcomes of the algorithm: CA = E rhs = : There are no consistent assignments. This happens when the prerequisites imply that the subboard has no solution. CA and E rhs = : We cannot conclude something from the prerequisites, but the subboard is solvable. CA and E rhs : We have constructed a new rule R = (C lhs,e lhs,e rhs ) and can add it to our ruleset. The algorithm has a time complexity of O(2 e ) where e is the number of edges in the subboard that have not been fixed by the prerequisites. Since it does an exhaustive search the constructed rules are always maximal. 7.2 The standard ruleset We are now able to construct a ruleset from a set of prerequisites. Now we need to define this set of prerequisites. Section 9 will present effective methods to remove redundant rules from a ruleset, so we do not have to be concerned that we get too many rules with a large number of prerequisites. Three sets of prerequisites have chosen and proved to be helpful: All 1 1-rules: This ruleset implicitly encodes ϕ num. This set contains 115 rules that have been created from = 405 prerequisites. 2 2 rules where, apart from cell values, only the edges that are incident with the centre node are allowed to be used in the prerequisites: These edges have been chosen since they are exactly the ones needed to implicitly encode ϕ ed (15,632 rules created from = 50,625 prerequisites). 2 2 rules in which all cells are empty: This ruleset also encodes ϕ ed (47,601 rules created from = 531,441 prerequisites). The union of these rulesets forms what we will call the standard ruleset. 8. APPLICATION OF RULESETS 8.1 Simple iterative application of rules The application of a ruleset to a board is straightforward: We go through all positions on the board and test for every rule in the ruleset if the rule matches at that position. If it does we update the board according to the conclusions of this rule. While updating, we keep track if we actually changed the board. We also determine if the update changes a positive edge to a negative one or vice versa. If this happens we have found an inconsistency. We do this iteratively as long as updates change the board and we do not find an inconsistency. The following pseudocode describes the algorithm. applyrules(board, ruleset) Changed = true while(changed){ Changed=false for every position (i,j) of the Board{ for every R ruleset{ if R matches Board at position (i,j){ update Board at position (i,j) according to R if(update discovered inconsistency){ Output discovered inconsistency Abort and return from method if(update changed board){ Changed = true Output Board The algorithm can exit in two different ways: It discovers an inconsistency. This means, assuming all rules are correct, that the board is not satisfiable. It terminates normally and outputs the board which has all the edges that could be concluded from the ruleset. 8.2 Trial and generalisation After the ruleset has been applied to a board and the instance is not solved yet, we go over to test different assignments to edges of the board. We do this in the following fashion: Find an unassigned edge Set this edge to 1 and apply the ruleset. If we find an inconsistency we can safely set the edge to 0 and are done. We do the same again, but this time we set the edge to 0 and if we find an inconsistency later to 1. If both possibilities are consistent we compare the two board we got after applying the ruleset. If we find an edge that is assigned the same value in both and that is unassigned in the original board, we have also gained knowledge. If we have found new assignments, we check whether we can successfully apply the ruleset again. We exploit here that it is not necessary to explicitly check the local constraints. They have been completely incorporated into the rule set. The Java implementation can be found in Appendix I. 9. REFINING THE SET OF RULES The automatic construction of rules by the methods of section 7 leads to large numbers of them. Since the time needed to apply a ruleset is linear to the number of rules,

5 it is desirable to reduce this number. Our goal is to retain the full expressiveness of the ruleset. Both methods remove redundant rules, rather than replacing a number of rules with fewer new rules. The idea is to remove rules whose function can be simulated by one or more other rules. For this purpose we will define two relations: dominates and composed. 9.1 Dominated rules A rule R dominates R, if R has weaker or the same prerequisites and stronger or the same conclusions as R. In our definition of rules this means R = (C lhs,e lhs,e rhs ) dominates R = (C lhs,e lhs,e rhs ) if 1) C lhs C lhs 2) V lhs V lhs, 3) and V rhs V rhs The removal of rules is straightforward: removedominated(ruleset) for (R RuleSet) for (R RuleSet) if(r R and R dominates R ) RuleSet = RuleSet \ R Output RuleSet This reduction is already quite effective. The standard ruleset can be reduced from 63,348 to 1,862 rules. The time complexity of removedominated, when considering the size of rules as constant, is O( RuleSet 2 ). Fortunately removed rules can be ignored in further steps of the nested for-loop. This way the actually needed tests inside the loop can be reduced from about to for the standard ruleset. The order in which rules are tested for removal does not affect the end result since dominates is transitive. 9.2 Composed rules The application of one rule can be simulated by the sequence of applying other rules. This can for example be seen in Figure 6. The two left rules can be used to simulate the effect of the right rule. Fig. 6. R composed {R 1,...,R n if Rule is composed by two other rules Let the board B 1 contain the prerequisites of R, R i matches B i and its application results in B i+1 and every edge in the conclusion of R is assigned the same value in B n+1. This means that composition is always stronger than domination,as R dominates R implies R composed {R. It still makes sense to remove dominated rules first, as the test for composition needs far more time as we will see. We remove composed rules by going through the ruleset and testing each rule. We do this by constructing a board containing the prerequisites of a rule and then applying the rest of the ruleset on this board. If this results in a board which contains all conclusions of the rule, the rest of the could simulate the effects of the rule and the rule can be removed. removecomposed(ruleset) for (R = (C lhs,e lhs,e rhs ) RuleSet) Board is constructed from C lhs and E lhs applyrules(board, RuleSet \ R) if(e E rhs implies e Board) RuleSet = RuleSet \ R Output RuleSet In contrast to the dominates relation, the order in which rules are tested and removed matters. For the standard ruleset, varying this order resulted in sizes between 193 and 224 rules. This is never the less a massive reduction from 1,862 rules with the dominated-relation alone. By combining both algorithms we have achieved a reduction in the number of rules by a factor of 300, from over 60,000 to CONSTRAINT LOGIC PROGRAMMING AND SAT-SOLVING The already presented methods cannot solve Slither Link problems in the general case, as they are polynomial and Slither Link NP-complete 2. For this task Constraint Logic Programming is ideal as we already have constraints. The only requirement for a solution that these constraints do not capture is that we need a single cycle. We can test a labeling fulfilling the constraint with logic programming in the following way: 1) Count all edges 2) Take one edge and determine the length of the cycle it lies on, by following it 3) If both numbers match, we have found a solution else find next labeling and test it We can now combine this with the rule-based methods by using their results as starting points. This has been tested with a instance ([Fuj] problem 34) containing 2775 edges. Using CLP without any precomputed edges does not find any labeling within 3 hours of cpu-time, after which the run was aborted. When 1754 edges which had been precomputed in 156 seconds are used as a starting point the time needed to find a first labeling drops to less than a second. 2 Assuming P NP

7 APPENDIX I: CENTRAL ALGORITHMS IN JAVA private static Board constructrulefromprerequisites(board subboard){ GeneratorBoard generboard= new GeneratorBoard(subboard); generboard.prepareboard(); GeneratorBoard resultboard = null; boolean firstconsistent=true; int consistents=0; do{ if(generboard.consistencytest()){ consistents++; if(firstconsistent){ //copy first consistent board to result firstconsistent=false; resultboard= new GeneratorBoard(generBoard); else{ //compare consistent board to current result resultboard.bpos.reset(); generboard.bpos.reset(); do{ if(resultboard.getedgeatpos()!= generboard.getedgeatpos()){ resultboard.setedgeatpos(board.emptyedge); while(resultboard.bpos.nextposition() && generboard.bpos.nextposition()); while(generboard.nextedgeconfiguration()); return resultboard; Fig. 7. Rule Construction

8 public static void trysingleedges(board board, RuleSet ruleset) { BoardPosition edgepos= new BoardPosition(board.getWidth(),board.getHeight()); Board resultingboardedge; Board resultingboardnoedge; BoardPosition bpos= new BoardPosition(board.getWidth(),board.getHeight()); int edge; boolean changed=true; boolean justchanged; while(changed){ changed=false; edgepos.reset(); while(board.nextemptyedge(edgepos)){ resultingboardedge = new Board(board); resultingboardnoedge = new Board(board); justchanged=false; if(!tryedge(board,ruleset,edgepos,board.edge,resultingboardedge)){ //falsified proposition board.setedgeatpos(edgepos, Board.NOEDGE); justchanged=true; else if(!tryedge(board,ruleset,edgepos,board.noedge,resultingboardnoedge)){ board.setedgeatpos(edgepos, Board.EDGE); justchanged=true; else { //see if something can be learned by comparing bpos.reset(); do{ if((board.getedgeatpos(bpos)== Board.EMPTYEDGE) && (resultingboardedge.getedgeatpos(bpos)!= Board.EMPTYEDGE) && (resultingboardedge.getedgeatpos(bpos) ==resultingboardnoedge.getedgeatpos(bpos))){ board.setedgeatpos(bpos,resultingboardedge.getedgeatpos(bpos)); justchanged=true; while(bpos.nextposition()); if(justchanged){ applyruleset(board, ruleset); changed=true; edgepos.nextposition(); //skip current position Fig. 8. Trying single lines

Why? A central concept in Computer Science. Algorithms are ubiquitous.

Analysis of Algorithms: A Brief Introduction Why? A central concept in Computer Science. Algorithms are ubiquitous. Using the Internet (sending email, transferring files, use of search engines, online

Minesweeper as a Constraint Satisfaction Problem

Minesweeper as a Constraint Satisfaction Problem by Chris Studholme Introduction To Minesweeper Minesweeper is a simple one player computer game commonly found on machines with popular operating systems

Sudoku as a SAT Problem

Sudoku as a SAT Problem Inês Lynce IST/INESC-ID, Technical University of Lisbon, Portugal ines@sat.inesc-id.pt Joël Ouaknine Oxford University Computing Laboratory, UK joel@comlab.ox.ac.uk Abstract Sudoku

Offline 1-Minesweeper is NP-complete

Offline 1-Minesweeper is NP-complete James D. Fix Brandon McPhail May 24 Abstract We use Minesweeper to illustrate NP-completeness proofs, arguments that establish the hardness of solving certain problems.

Boulder Dash is NP hard

Boulder Dash is NP hard Marzio De Biasi marziodebiasi [at] gmail [dot] com December 2011 Version 0.01:... now the difficult part: is it NP? Abstract Boulder Dash is a videogame created by Peter Liepa and

Complexity Classes P and NP

Complexity Classes P and NP MATH 3220 Supplemental Presentation by John Aleshunas The cure for boredom is curiosity. There is no cure for curiosity Dorothy Parker Computational Complexity Theory In computer

Degrees of Truth: the formal logic of classical and quantum probabilities as well as fuzzy sets.

Degrees of Truth: the formal logic of classical and quantum probabilities as well as fuzzy sets. Logic is the study of reasoning. A language of propositions is fundamental to this study as well as true

Theoretical Computer Science (Bridging Course) Complexity

Theoretical Computer Science (Bridging Course) Complexity Gian Diego Tipaldi A scenario You are a programmer working for a logistics company Your boss asks you to implement a program that optimizes the

NP-complete? NP-hard? Some Foundations of Complexity. Prof. Sven Hartmann Clausthal University of Technology Department of Informatics

NP-complete? NP-hard? Some Foundations of Complexity Prof. Sven Hartmann Clausthal University of Technology Department of Informatics Tractability of Problems Some problems are undecidable: no computer

Satisfiability Checking

Satisfiability Checking SAT-Solving Prof. Dr. Erika Ábrahám Theory of Hybrid Systems Informatik 2 WS 10/11 Prof. Dr. Erika Ábrahám - Satisfiability Checking 1 / 40 A basic SAT algorithm Assume the CNF

Introduction to Logic in Computer Science: Autumn 2006

Introduction to Logic in Computer Science: Autumn 2006 Ulle Endriss Institute for Logic, Language and Computation University of Amsterdam Ulle Endriss 1 Plan for Today Now that we have a basic understanding

On the Relationship between Classes P and NP

Journal of Computer Science 8 (7): 1036-1040, 2012 ISSN 1549-3636 2012 Science Publications On the Relationship between Classes P and NP Anatoly D. Plotnikov Department of Computer Systems and Networks,

The Classes P and NP

The Classes P and NP We now shift gears slightly and restrict our attention to the examination of two families of problems which are very important to computer scientists. These families constitute the

Ian Stewart on Minesweeper

Ian Stewart on Minesweeper It's not often you can win a million dollars by analysing a computer game, but by a curious conjunction of fate, there's a chance that you might. However, you'll only pick up

How To Check For Differences In The One Way Anova

MINITAB ASSISTANT WHITE PAPER This paper explains the research conducted by Minitab statisticians to develop the methods and data checks used in the Assistant in Minitab 17 Statistical Software. One-Way

Diagonalization. Ahto Buldas. Lecture 3 of Complexity Theory October 8, 2009. Slides based on S.Aurora, B.Barak. Complexity Theory: A Modern Approach.

Diagonalization Slides based on S.Aurora, B.Barak. Complexity Theory: A Modern Approach. Ahto Buldas Ahto.Buldas@ut.ee Background One basic goal in complexity theory is to separate interesting complexity

VISUAL ALGEBRA FOR COLLEGE STUDENTS. Laurie J. Burton Western Oregon University

VISUAL ALGEBRA FOR COLLEGE STUDENTS Laurie J. Burton Western Oregon University VISUAL ALGEBRA FOR COLLEGE STUDENTS TABLE OF CONTENTS Welcome and Introduction 1 Chapter 1: INTEGERS AND INTEGER OPERATIONS

How To Solve A Minimum Set Covering Problem (Mcp)

Measuring Rationality with the Minimum Cost of Revealed Preference Violations Mark Dean and Daniel Martin Online Appendices - Not for Publication 1 1 Algorithm for Solving the MASP In this online appendix

Approximation Algorithms

Approximation Algorithms or: How I Learned to Stop Worrying and Deal with NP-Completeness Ong Jit Sheng, Jonathan (A0073924B) March, 2012 Overview Key Results (I) General techniques: Greedy algorithms

Approximation Algorithms Chapter Approximation Algorithms Q. Suppose I need to solve an NP-hard problem. What should I do? A. Theory says you're unlikely to find a poly-time algorithm. Must sacrifice one

P versus NP, and More

1 P versus NP, and More Great Ideas in Theoretical Computer Science Saarland University, Summer 2014 If you have tried to solve a crossword puzzle, you know that it is much harder to solve it than to verify

Compact Representations and Approximations for Compuation in Games

Compact Representations and Approximations for Compuation in Games Kevin Swersky April 23, 2008 Abstract Compact representations have recently been developed as a way of both encoding the strategic interactions

The Union-Find Problem Kruskal s algorithm for finding an MST presented us with a problem in data-structure design. As we looked at each edge,

The Union-Find Problem Kruskal s algorithm for finding an MST presented us with a problem in data-structure design. As we looked at each edge, cheapest first, we had to determine whether its two endpoints

ABSTRACT. For example, circle orders are the containment orders of circles (actually disks) in the plane (see [8,9]).

Degrees of Freedom Versus Dimension for Containment Orders Noga Alon 1 Department of Mathematics Tel Aviv University Ramat Aviv 69978, Israel Edward R. Scheinerman 2 Department of Mathematical Sciences

Policy nalysis for dministrative Role Based ccess Control without Separate dministration Ping Yang Department of Computer Science, State University of New York at Binghamton, US Mikhail I. Gofman Department

EE384Y Project Final Report Load Balancing and Switch Scheduling Xiangheng Liu Department of Electrical Engineering Stanford University, Stanford CA 94305 Email: liuxh@systems.stanford.edu Abstract Load

JUST-IN-TIME SCHEDULING WITH PERIODIC TIME SLOTS. Received December May 12, 2003; revised February 5, 2004

Scientiae Mathematicae Japonicae Online, Vol. 10, (2004), 431 437 431 JUST-IN-TIME SCHEDULING WITH PERIODIC TIME SLOTS Ondřej Čepeka and Shao Chin Sung b Received December May 12, 2003; revised February

Weakly Secure Network Coding

Weakly Secure Network Coding Kapil Bhattad, Student Member, IEEE and Krishna R. Narayanan, Member, IEEE Department of Electrical Engineering, Texas A&M University, College Station, USA Abstract In this

Mathematics Review for MS Finance Students

Mathematics Review for MS Finance Students Anthony M. Marino Department of Finance and Business Economics Marshall School of Business Lecture 1: Introductory Material Sets The Real Number System Functions,

Union-Find Algorithms. network connectivity quick find quick union improvements applications

Union-Find Algorithms network connectivity quick find quick union improvements applications 1 Subtext of today s lecture (and this course) Steps to developing a usable algorithm. Define the problem. Find

! Solve problem to optimality. ! Solve problem in poly-time. ! Solve arbitrary instances of the problem. !-approximation algorithm.

Approximation Algorithms Chapter Approximation Algorithms Q Suppose I need to solve an NP-hard problem What should I do? A Theory says you're unlikely to find a poly-time algorithm Must sacrifice one of

Polynomial Degree and Finite Differences

CONDENSED LESSON 7.1 Polynomial Degree and Finite Differences In this lesson you will learn the terminology associated with polynomials use the finite differences method to determine the degree of a polynomial

SPARQL: Un Lenguaje de Consulta para la Web

SPARQL: Un Lenguaje de Consulta para la Web Semántica Marcelo Arenas Pontificia Universidad Católica de Chile y Centro de Investigación de la Web M. Arenas SPARQL: Un Lenguaje de Consulta para la Web Semántica

Updating Action Domain Descriptions

Updating Action Domain Descriptions Thomas Eiter, Esra Erdem, Michael Fink, and Ján Senko Institute of Information Systems, Vienna University of Technology, Vienna, Austria Email: (eiter esra michael jan)@kr.tuwien.ac.at

Cloud Computing is NP-Complete

Working Paper, February 2, 20 Joe Weinman Permalink: http://www.joeweinman.com/resources/joe_weinman_cloud_computing_is_np-complete.pdf Abstract Cloud computing is a rapidly emerging paradigm for computing,

OHJ-2306 Introduction to Theoretical Computer Science, Fall 2012 8.11.2012

276 The P vs. NP problem is a major unsolved problem in computer science It is one of the seven Millennium Prize Problems selected by the Clay Mathematics Institute to carry a \$ 1,000,000 prize for the

Graph Security Testing

JOURNAL OF APPLIED COMPUTER SCIENCE Vol. 23 No. 1 (2015), pp. 29-45 Graph Security Testing Tomasz Gieniusz 1, Robert Lewoń 1, Michał Małafiejski 1 1 Gdańsk University of Technology, Poland Department of

Modeling Guidelines Manual

Modeling Guidelines Manual [Insert company name here] July 2014 Author: John Doe john.doe@johnydoe.com Page 1 of 22 Table of Contents 1. Introduction... 3 2. Business Process Management (BPM)... 4 2.1.

Outline. NP-completeness. When is a problem easy? When is a problem hard? Today. Euler Circuits

Outline NP-completeness Examples of Easy vs. Hard problems Euler circuit vs. Hamiltonian circuit Shortest Path vs. Longest Path 2-pairs sum vs. general Subset Sum Reducing one problem to another Clique

Introduction to Algorithms. Part 3: P, NP Hard Problems

Introduction to Algorithms Part 3: P, NP Hard Problems 1) Polynomial Time: P and NP 2) NP-Completeness 3) Dealing with Hard Problems 4) Lower Bounds 5) Books c Wayne Goddard, Clemson University, 2004 Chapter

Unit 2.1. Data Analysis 1 - V2.0 1. Data Analysis 1. Dr Gordon Russell, Copyright @ Napier University

Data Analysis 1 Unit 2.1 Data Analysis 1 - V2.0 1 Entity Relationship Modelling Overview Database Analysis Life Cycle Components of an Entity Relationship Diagram What is a relationship? Entities, attributes,

Model Checking: An Introduction

Announcements Model Checking: An Introduction Meeting 2 Office hours M 1:30pm-2:30pm W 5:30pm-6:30pm (after class) and by appointment ECOT 621 Moodle problems? Fundamentals of Programming Languages CSCI

Pricing of Limit Orders in the Electronic Security Trading System Xetra

Pricing of Limit Orders in the Electronic Security Trading System Xetra Li Xihao Bielefeld Graduate School of Economics and Management Bielefeld University, P.O. Box 100 131 D-33501 Bielefeld, Germany

Dedekind s forgotten axiom and why we should teach it (and why we shouldn t teach mathematical induction in our calculus classes)

Dedekind s forgotten axiom and why we should teach it (and why we shouldn t teach mathematical induction in our calculus classes) by Jim Propp (UMass Lowell) March 14, 2010 1 / 29 Completeness Three common

Equilibrium computation: Part 1

Equilibrium computation: Part 1 Nicola Gatti 1 Troels Bjerre Sorensen 2 1 Politecnico di Milano, Italy 2 Duke University, USA Nicola Gatti and Troels Bjerre Sørensen ( Politecnico di Milano, Italy, Equilibrium

CS510 Software Engineering

CS510 Software Engineering Propositional Logic Asst. Prof. Mathias Payer Department of Computer Science Purdue University TA: Scott A. Carr Slides inspired by Xiangyu Zhang http://nebelwelt.net/teaching/15-cs510-se

Procedia Computer Science 00 (2012) 1 21. Trieu Minh Nhut Le, Jinli Cao, and Zhen He. trieule@sgu.edu.vn, j.cao@latrobe.edu.au, z.he@latrobe.edu.

Procedia Computer Science 00 (2012) 1 21 Procedia Computer Science Top-k best probability queries and semantics ranking properties on probabilistic databases Trieu Minh Nhut Le, Jinli Cao, and Zhen He

! Solve problem to optimality. ! Solve problem in poly-time. ! Solve arbitrary instances of the problem. #-approximation algorithm.

Approximation Algorithms 11 Approximation Algorithms Q Suppose I need to solve an NP-hard problem What should I do? A Theory says you're unlikely to find a poly-time algorithm Must sacrifice one of three

DURING a project s lifecycle many factors can change at

Proceedings of the 2014 Federated Conference on Computer Science and Information Systems pp. 1191 1196 DOI: 10.15439/2014F426 ACSIS, Vol. 2 Algorithms for Automating Task Delegation in Project Management

WHAT ARE MATHEMATICAL PROOFS AND WHY THEY ARE IMPORTANT?

WHAT ARE MATHEMATICAL PROOFS AND WHY THEY ARE IMPORTANT? introduction Many students seem to have trouble with the notion of a mathematical proof. People that come to a course like Math 216, who certainly

Object Oriented Programming. Risk Management

Section V: Object Oriented Programming Risk Management In theory, there is no difference between theory and practice. But, in practice, there is. - Jan van de Snepscheut 427 Chapter 21: Unified Modeling

A single minimal complement for the c.e. degrees

A single minimal complement for the c.e. degrees Andrew Lewis Leeds University, April 2002 Abstract We show that there exists a single minimal (Turing) degree b < 0 s.t. for all c.e. degrees 0 < a < 0,

Today s Agenda. Automata and Logic. Quiz 4 Temporal Logic. Introduction Buchi Automata Linear Time Logic Summary

Today s Agenda Quiz 4 Temporal Logic Formal Methods in Software Engineering 1 Automata and Logic Introduction Buchi Automata Linear Time Logic Summary Formal Methods in Software Engineering 2 1 Buchi Automata

Chapter. NP-Completeness. Contents

Chapter 13 NP-Completeness Contents 13.1 P and NP......................... 593 13.1.1 Defining the Complexity Classes P and NP...594 13.1.2 Some Interesting Problems in NP.......... 597 13.2 NP-Completeness....................

Alok Gupta. Dmitry Zhdanov

RESEARCH ARTICLE GROWTH AND SUSTAINABILITY OF MANAGED SECURITY SERVICES NETWORKS: AN ECONOMIC PERSPECTIVE Alok Gupta Department of Information and Decision Sciences, Carlson School of Management, University

Learning Objectives 9.2. Media Run Times 9.3

Unit 9 Table of Contents Unit 9: Factoring Video Overview Learning Objectives 9.2 Media Run Times 9.3 Instructor Notes 9.4 The Mathematics of Factoring Polynomials Teaching Tips: Conceptual Challenges

Determining Degree Of Difficulty In Rogo, A TSP-based Paper Puzzle

Determining Degree Of Difficulty In Rogo, A TSP-based Paper Puzzle Dr Nicola Petty, Dr Shane Dye Department of Management University of Canterbury New Zealand {shane.dye,nicola.petty}@canterbury.ac.nz

Lecture 15 An Arithmetic Circuit Lowerbound and Flows in Graphs

CSE599s: Extremal Combinatorics November 21, 2011 Lecture 15 An Arithmetic Circuit Lowerbound and Flows in Graphs Lecturer: Anup Rao 1 An Arithmetic Circuit Lower Bound An arithmetic circuit is just like

A Slot Representation of the Resource-Centric Models for Scheduling Problems

A Slot Representation of the Resource-Centric Models for Scheduling Problems Roman Barták * Charles University, Faculty of Mathematics and Physics Department of Theoretical Computer Science Malostranské

How To Understand And Solve Algebraic Equations

College Algebra Course Text Barnett, Raymond A., Michael R. Ziegler, and Karl E. Byleen. College Algebra, 8th edition, McGraw-Hill, 2008, ISBN: 978-0-07-286738-1 Course Description This course provides

A Study of Sufficient Conditions for Hamiltonian Cycles

DeLeon 1 A Study of Sufficient Conditions for Hamiltonian Cycles Melissa DeLeon Department of Mathematics and Computer Science Seton Hall University South Orange, New Jersey 07079, U.S.A. ABSTRACT A graph

TOPOLOGY: THE JOURNEY INTO SEPARATION AXIOMS

TOPOLOGY: THE JOURNEY INTO SEPARATION AXIOMS VIPUL NAIK Abstract. In this journey, we are going to explore the so called separation axioms in greater detail. We shall try to understand how these axioms

A Tool for Generating Partition Schedules of Multiprocessor Systems

A Tool for Generating Partition Schedules of Multiprocessor Systems Hans-Joachim Goltz and Norbert Pieth Fraunhofer FIRST, Berlin, Germany {hans-joachim.goltz,nobert.pieth}@first.fraunhofer.de Abstract.

Process Modeling Notations and Workflow Patterns

Process Modeling Notations and Workflow Patterns Stephen A. White, IBM Corp., United States ABSTRACT The research work of Wil van der Aalst, Arthur ter Hofstede, Bartek Kiepuszewski, and Alistair Barros

COMP 378 Database Systems Notes for Chapter 7 of Database System Concepts Database Design and the Entity-Relationship Model

COMP 378 Database Systems Notes for Chapter 7 of Database System Concepts Database Design and the Entity-Relationship Model The entity-relationship (E-R) model is a a data model in which information stored

OPRE 6201 : 2. Simplex Method

OPRE 6201 : 2. Simplex Method 1 The Graphical Method: An Example Consider the following linear program: Max 4x 1 +3x 2 Subject to: 2x 1 +3x 2 6 (1) 3x 1 +2x 2 3 (2) 2x 2 5 (3) 2x 1 +x 2 4 (4) x 1, x 2

Notes on Factoring. MA 206 Kurt Bryan

The General Approach Notes on Factoring MA 26 Kurt Bryan Suppose I hand you n, a 2 digit integer and tell you that n is composite, with smallest prime factor around 5 digits. Finding a nontrivial factor

Nan Kong, Andrew J. Schaefer. Department of Industrial Engineering, Univeristy of Pittsburgh, PA 15261, USA

A Factor 1 2 Approximation Algorithm for Two-Stage Stochastic Matching Problems Nan Kong, Andrew J. Schaefer Department of Industrial Engineering, Univeristy of Pittsburgh, PA 15261, USA Abstract We introduce

KNOWLEDGE FACTORING USING NORMALIZATION THEORY

KNOWLEDGE FACTORING USING NORMALIZATION THEORY J. VANTHIENEN M. SNOECK Katholieke Universiteit Leuven Department of Applied Economic Sciences Dekenstraat 2, 3000 Leuven (Belgium) tel. (+32) 16 28 58 09

Factoring & Primality

Factoring & Primality Lecturer: Dimitris Papadopoulos In this lecture we will discuss the problem of integer factorization and primality testing, two problems that have been the focus of a great amount

THE TURING DEGREES AND THEIR LACK OF LINEAR ORDER

THE TURING DEGREES AND THEIR LACK OF LINEAR ORDER JASPER DEANTONIO Abstract. This paper is a study of the Turing Degrees, which are levels of incomputability naturally arising from sets of natural numbers.

A 2-factor in which each cycle has long length in claw-free graphs

A -factor in which each cycle has long length in claw-free graphs Roman Čada Shuya Chiba Kiyoshi Yoshimoto 3 Department of Mathematics University of West Bohemia and Institute of Theoretical Computer Science

How To Test Automatically

Automated Model-Based Testing of Embedded Real-Time Systems Jan Peleska jp@tzi.de University of Bremen Bieleschweig Workshop 7 2006-05-05 Outline Technologie-Zentrum Informatik Objectives Basic concepts

CSC 373: Algorithm Design and Analysis Lecture 16

CSC 373: Algorithm Design and Analysis Lecture 16 Allan Borodin February 25, 2013 Some materials are from Stephen Cook s IIT talk and Keven Wayne s slides. 1 / 17 Announcements and Outline Announcements

AUTOMATED TEST GENERATION FOR SOFTWARE COMPONENTS

TKK Reports in Information and Computer Science Espoo 2009 TKK-ICS-R26 AUTOMATED TEST GENERATION FOR SOFTWARE COMPONENTS Kari Kähkönen ABTEKNILLINEN KORKEAKOULU TEKNISKA HÖGSKOLAN HELSINKI UNIVERSITY OF

Which Semantics for Neighbourhood Semantics?

Which Semantics for Neighbourhood Semantics? Carlos Areces INRIA Nancy, Grand Est, France Diego Figueira INRIA, LSV, ENS Cachan, France Abstract In this article we discuss two alternative proposals for

Reputation Management Algorithms & Testing. Andrew G. West November 3, 2008

Reputation Management Algorithms & Testing Andrew G. West November 3, 2008 EigenTrust EigenTrust (Hector Garcia-molina, et. al) A normalized vector-matrix multiply based method to aggregate trust such

ARTICLE IN PRESS. European Journal of Operational Research xxx (2004) xxx xxx. Discrete Optimization. Nan Kong, Andrew J.

A factor 1 European Journal of Operational Research xxx (00) xxx xxx Discrete Optimization approximation algorithm for two-stage stochastic matching problems Nan Kong, Andrew J. Schaefer * Department of

MapReduce and Distributed Data Analysis. Sergei Vassilvitskii Google Research

MapReduce and Distributed Data Analysis Google Research 1 Dealing With Massive Data 2 2 Dealing With Massive Data Polynomial Memory Sublinear RAM Sketches External Memory Property Testing 3 3 Dealing With

Chapter II. Controlling Cars on a Bridge

Chapter II. Controlling Cars on a Bridge 1 Introduction The intent of this chapter is to introduce a complete example of a small system development. During this development, you will be made aware of the

Mathematics for Computer Science/Software Engineering. Notes for the course MSM1F3 Dr. R. A. Wilson

Mathematics for Computer Science/Software Engineering Notes for the course MSM1F3 Dr. R. A. Wilson October 1996 Chapter 1 Logic Lecture no. 1. We introduce the concept of a proposition, which is a statement

How To Compare A Markov Algorithm To A Turing Machine

Markov Algorithm CHEN Yuanmi December 18, 2007 1 Abstract Markov Algorithm can be understood as a priority string rewriting system. In this short paper we give the definition of Markov algorithm and also

A Model-driven Approach to Predictive Non Functional Analysis of Component-based Systems

A Model-driven Approach to Predictive Non Functional Analysis of Component-based Systems Vincenzo Grassi Università di Roma Tor Vergata, Italy Raffaela Mirandola {vgrassi, mirandola}@info.uniroma2.it Abstract.

EKT150 Introduction to Computer Programming. Wk1-Introduction to Computer and Computer Program

EKT150 Introduction to Computer Programming Wk1-Introduction to Computer and Computer Program A Brief Look At Computer Computer is a device that receives input, stores and processes data, and provides

Formal Verification by Model Checking

Formal Verification by Model Checking Natasha Sharygina Carnegie Mellon University Guest Lectures at the Analysis of Software Artifacts Class, Spring 2005 1 Outline Lecture 1: Overview of Model Checking

Classification of Cartan matrices

Chapter 7 Classification of Cartan matrices In this chapter we describe a classification of generalised Cartan matrices This classification can be compared as the rough classification of varieties in terms

Verification of Computing Policies and Other Hard Problems

Verification of Computing Policies and Other Hard Problems Mohamed G Gouda University of Texas at Austin gouda@cs.utexas.edu Presentation at METIS-2014 1 Computing Policy A computing policy is a formalism

Algebraic Computation Models. Algebraic Computation Models

Algebraic Computation Models Ζυγομήτρος Ευάγγελος ΜΠΛΑ 201118 Φεβρουάριος, 2013 Reasons for using algebraic models of computation The Turing machine model captures computations on bits. Many algorithms

How To Find An Optimal Search Protocol For An Oblivious Cell

The Conference Call Search Problem in Wireless Networks Leah Epstein 1, and Asaf Levin 2 1 Department of Mathematics, University of Haifa, 31905 Haifa, Israel. lea@math.haifa.ac.il 2 Department of Statistics,

The Hardness of the Lemmings Game, or Oh no, more NP-Completeness Proofs

The Hardness of the Lemmings Game, or Oh no, more NP-Completeness Proofs Graham Cormode Abstract In the computer game Lemmings, the player must guide a tribe of green-haired lemming creatures to safety,

Efficient Recovery of Secrets

Efficient Recovery of Secrets Marcel Fernandez Miguel Soriano, IEEE Senior Member Department of Telematics Engineering. Universitat Politècnica de Catalunya. C/ Jordi Girona 1 i 3. Campus Nord, Mod C3,

Discuss the size of the instance for the minimum spanning tree problem.

3.1 Algorithm complexity The algorithms A, B are given. The former has complexity O(n 2 ), the latter O(2 n ), where n is the size of the instance. Let n A 0 be the size of the largest instance that can

The Minimum Consistent Subset Cover Problem and its Applications in Data Mining

The Minimum Consistent Subset Cover Problem and its Applications in Data Mining Byron J Gao 1,2, Martin Ester 1, Jin-Yi Cai 2, Oliver Schulte 1, and Hui Xiong 3 1 School of Computing Science, Simon Fraser

COUNTING INDEPENDENT SETS IN SOME CLASSES OF (ALMOST) REGULAR GRAPHS

COUNTING INDEPENDENT SETS IN SOME CLASSES OF (ALMOST) REGULAR GRAPHS Alexander Burstein Department of Mathematics Howard University Washington, DC 259, USA aburstein@howard.edu Sergey Kitaev Mathematics

If A is divided by B the result is 2/3. If B is divided by C the result is 4/7. What is the result if A is divided by C?

Problem 3 If A is divided by B the result is 2/3. If B is divided by C the result is 4/7. What is the result if A is divided by C? Suggested Questions to ask students about Problem 3 The key to this question

1. Nondeterministically guess a solution (called a certificate) 2. Check whether the solution solves the problem (called verification)

Some N P problems Computer scientists have studied many N P problems, that is, problems that can be solved nondeterministically in polynomial time. Traditionally complexity question are studied as languages:

A Concrete Introduction. to the Abstract Concepts. of Integers and Algebra using Algebra Tiles

A Concrete Introduction to the Abstract Concepts of Integers and Algebra using Algebra Tiles Table of Contents Introduction... 1 page Integers 1: Introduction to Integers... 3 2: Working with Algebra Tiles...