State Space Search Problems

Size: px
Start display at page:

Download "State Space Search Problems"

Transcription

1 State Space Search Problems Lecture Heuristic Search Stefan Edelkamp

2 1 Overview Different state space formalisms, including labelled, implicit and explicit weighted graph representations Alternative formalisms: Production Systems, Propositional Action Planning Brief introduction to (LTL) Model Checking Proof that general state space problem solving is undecidable Examples of single agent challenges: (n 2 1)-Puzzle and known extensions to it, Rubik s Cube, Sokoban, Atomix, and Wusel Application areas Route Planning and Multiple Sequence Alignment Overview 1

3 2 State Space Problems A state space problem is a quadruple P = < S, O, I, G >, where S is the set of states, I S is the initial state, G S is the set of goal states, and O : S S is the set of operators that transform states into states. State Space Problems 2

4 3 Solution A solution π = (O 1,..., O k ) is an ordered sequence of operators O i O, i {1,..., k}, that transforms the initial state I into one of the goal states G G There exists a sequence of states S i S, i {0,..., k}, with S 0 = I, S k = G, and S i is the outcome of applying O i to S i 1, i {1,..., k} The solution path with minimal k is called the optimal solution Solution 3

5 4 Labelled Representation A labelled state space problem is a quintuple P = < S, O, I, G,Σ >, where the set of operators is subdivided by labels Σ There is a function δ : S Σ S such that O = {(S, S ) σ Σ, δ(s, σ) = σ } Labelled Representation 4

6 5 Weighted Problems and Dead-Ends A weighted state space problem is a tupel P = < S, O, I, G, w >, where w is a cost function w : O IR + The cost of a path (O 1,..., O n ) is defined as n i=1 w(o i ) We call a solution optimal if it has minimum cost among all feasible solutions A problems is reversible, if for each operator O O there exists an operator O 1 O, so that O(O 1 (S)) = S and O 1 (O(S)) = S If the goal is reachable, then it is reachable from each encountered state A state space problem has a dead-end C S, if C is reachable and P =< S, O, C, G > is unsolvable. Weighted Problems and Dead-Ends 5

7 6 Explicit State Space Graph A state space problem graph G = (V, E, s, T ) for the state space problem P =< S, O, I, G > is defined by V = S as the set of nodes, s = I as the initial node, T = G as the set of goal states, and E V V as the set of edges that connect nodes to nodes with (u, v) E if and only if there exists and O O with O(u) = v Additionally, a weight function w : E IR, can be defined The graph has uniform weight, if w(u, v) is constant for all (u, v) E Explicit State Space Graph 6

8 7 Implicit State Space Graph In an implicit state space graph we have an initial node s V, a set of goal nodes determined by a predicate goal: V IB = {0, 1}, and a node expansion function expand: V 2 V To distinguish the node expansion procedure from the successor set itself, we will write Γ for the latter Function expand can often be decomposed as expand(u) = domove(u, a) a Σ Implicit State Space Graph 7

9 8 (n 2 1)-Puzzle The Eight-, Fifteen-, and Twenty-Four-Puzzle: Half of the (n 2 )! possible states are reachable 10 5 reachable states in the Eight-Puzzle, states in the Fifteen-Puzzle, and states in the Twenty-Four-Puzzle. (n 2 1)-Puzzle 8

10 State Space Representation S is casted as the set of vector representations, e.g. Eight-Puzzle: (1, 2, 3, 8, 0, 4, 7, 6, 5) initial state I S provided by the user, single goal state G G; value i at index i + 1, 1 i n 2 1 O O as follows: if blank is at index j, swap it either in direction U: index j n, unless blank top-most D: index j + n, unless blank bottom-most L: index j 1, unless blank left-most, or R: index j + 1, unless blank right-most In a labelled representation we may assign Σ = {U, D, L, R} (n 2 1)-Puzzle 9

11 9 General Sliding Tile Donkey-, Century- and Dad s- as well as the Harlekin- and Man-in-the-Bottle Donkey-Puzzle: 65, 880, Dad-Puzzle: 18, 504, Century-Puzzle: 109, 260, Harlekin-Puzzle: 176, 250, and Man-and-Bottle-Puzzle: 143, 100 states General Sliding Tile 10

12 Representations 1. Order of placements according to reference points, e.h. Donkey-Puzzle: 2x1, blank, blank, 2x1, 2x2, 2x1, 2x1, 1x2, 1x1, 1x1, 1x1, and 1x1. # configurations bounded by ( s ) = s! f 1,..., f k f 1! f k! 2. Unique normal form that stores, for every piece type, a sorted array of reference points (e.g. to a row-wise order) Successor set generation: place pebbles around each empty square, to signal if and in which direction an object may move Pebbling and unpebbling can be performed in time O(#blanks) Move execution can be tested in O(#pieces) time General Sliding Tile 11

13 10 Wusel Connected n-polycube, e.g. Wusel is always one piece In motion, a group of cubes is simultanously moved in one of the tree cube axis The group itself constitutes a 3D connected component Cubes connected to the ground can only be moved upwards Wusel tumbles if projection of the center of mass is outside convex hull Wusel 12

14 Successor Generation Wusel is represented as a sorted array of 3D coordinate values, avoiding repeated positions Naiive successor generation module concern all possible groups in an array of size n2 n, denoting whether the cubes with index i, 0 i n 1 is contained in partition j, 1 j 2 n 1 initialization by converting the binary encoding of the numbers 0 to 2 n 1. move execution checked O(2 n ) times and takes O(n) time, for O(n2 n ) total time After the move executions, the result state is validated combination of O(n) connectivity and O(n log n) gravity checks Wusel 13

15 11 Rubik s Cube Invented by E. Rubik Each face can be rotated by 90, 180, or 270 degrees 8! ! 2 12 / possible cube configurations Rubik s Cube 14

16 Branching Factor Reduction Six faces initial branching factor of 6 3 = 18 Rule Never rotate the same face twice in a row, reduces the branching factor to 5 3 = 15 after the first move. Rule If two opposite faces are rotated consecutively, take only one order Arbitrarily label one a first face, and the other a second face 1. After a first face is twisted, there are three possible twists of each of the remaining five faces, resulting in a branching factor of After a second face is twisted, however, we can only twist four remaining faces, excluding the face just twisted and its corresponding first face, for a branching factor of 12. Rubik s Cube 15

17 12 Sokoban Rules: n balls located in a maze to be moved onto n corresponding goal fields man, controlled by the puzzle solver, traverses the board and push a ball onto an adjacent empty square Mininum number of ball pushes 90; minimum number of man movements 230 Sokoban 16

18 Dead-Ends Problem DECIDE is just the task to solve the puzzle Problem PUSHES additionally askes to minimize the number of ball pushes, whereas Problem MOVES request an optimal number of man movements Examples for dead-end positions in Sokoban are balls that lie at the boundary of the maze that does include a goal field, four balls placed next to each other in form of a square, so that the man can not move any of them Many dead-end positions can be indentified as local patterns. Sokoban 17

19 13 Atomix H H O H C H H H H H H H H H C C C H H C C C H C N C N C H H C H H H H H H C N H H C C C H O H C C H H C C N H H C = 13 H 66 Rules: the player selects an atom at a time and push it towards one direction it will keep on moving until it hits an obstacle or another atom game won when the atoms form the molecule as depicted beside the board Atomix 18

20 14 Route Planning In Route Planning, the shortest path between a start location s and a target location t has to be found according to a distance graph w : E IR + Given a layout function L : V IR 2 nodes can identified with their layout coordinates Edge weights w((u, v)) might be derived from straight-line distances u v 2 = (v 1 u 1 ) 2 + (v 2 u 2 ) 2, or in terms of actual travel distance or time Maps are often very large and hence stored on external storage devices route planning problem can be treated as an implicit state space problem In practice: on-line travel information systems with a set of (s, t) queries Route Planning 19

21 15 DNA Sequence Alignment k strings, representing DNA sequences over the alphabet Σ = {A, C, G, T } strings have to be aligned (written one above the other) such that letters in the same column preferably match introduce gaps in either sequence in order to shift the remaining letters into better alignment E.g. k = 2, cost funtion that requires cost 1 for a mismatch and cost 2 for a gap minimal alignment of two given sequences S 1 =ACGTACGACGT and S 2 =ATGTCGTCACGT with cost 5 has the form ACGTACGT_ACGT ATGT_CGTCACGT DNA Sequence Alignment 20

22 Dynamic Programming Approach The problem is very much related to the problem of computing the Edit Distance of k strings. The three main edit operation (in 2D) are noop (match, cost 0), change (mismatch, cost 1), and wait-l (introduce gap in string l) In 2D the entry T [x, y] includes the cost of aligning string S 1 [1..x] with S 2 [1..y] is computed as the minimum of the values T [x, y 1] + 2, T [x 1, y] + 2, and T [x 1, y 1] if S 1 [x] = S 2 [y] or T [x 1, y 1] + 1 if S 1 [x] S 2 [y] DNA Sequence Alignment 21

23 Search Approach An alignment can be conveniently depicted as a path between two opposite corners in a search graph structured as a k-dimensional grid: if there is no gap in either string, the path moves diagonally down and right; a gap in the vertical (horizontal) string is represented as a horizontal (vertical) move right (down), since a letter is consumed in only one of the strings The alignment graph is directed and acyclic, where a (non-border) vertex has incoming edges from the left, top, and left-top adjacent verteces, and outgoing edges to the right, bottom, and bottom-right verteces DNA Sequence Alignment 22

24 16 Action Planning Action planning refers to a world description in predicate logic, where a number of predicates AP describes what can be true or false in each state of the world by applying operations in a world, we arrive at another world where different atoms might be true or false for example, in a blocks world a robot might try to reach a target state by operators that stack and unstack blocks, or pay them on the table usually, only some few atoms are affected by an operator, and most of them remain the same Action Planning 23

25 Strips Planning A propositional planning problem (in STRIPS notation) is a finite state space problem P =< S, O, I, G >, where S 2 AP is the set of states, I S is the initial state, G S is the set of goal states, and O is the set of operators that transform states into states; Operators O = (P, A, D) O have propositional preconditions P, and propositional effects (A, D), where P AP is the precondition list, A AP is the add list and D AP is the delete list Given a state S with P S then its successor S = O(S) is defined as S = (S \ D) A. Action Planning 24

26 17 Model Checking Let AP be a set of atomic propositions A Kripke structure M over AP is a quadruple M =< S, I, R, L >, where S is a finite set of states, I S is the set of initial states, R S S is a (total) transition relation, and L : S 2 AP is the state labelling function A path in model M is a sequence of states π = S 0, S 1,... and π i denotes the suffix of π starting at S i. Model Checking 25

27 Model Checking Problem Given a Kripke structure M, and a temporal formula f Task: find the set of states in S that satisfies f, and check whether the set of initial states belongs to this state set We shortly write M = f in this case Model Checking 26

28 Linar Temporal Logic LTL formulas have the form Always f, Af for short, where f is a path formula if p AP then p is a path formula if f and g are path formulas, so are f, f g, f g, X f, F f, G f, f U g Semantics: for the next time operator X we have M, π = X f M, π 1 = f, for the until operator g U f we have M, π = g U f 0 k : M, π k = f 0 j k : M, π j = g, for the eventually operator we have M, π = F f 0 k : M, π k = f, for the globally operator we have M, π = G f 0 k : M, π k = f Model Checking 27

29 Example 1. The LTL formule A(G p) means: along every path, p will hold forever. 2. The LTL formule A(F p) means: along every path, there is some state, in which g will hold. 3. The LTL formula A(FG p) means: along every path, there is some state, from which p will hold forever. Model Checking 28

30 Propositional Planning as Model Checking Theorem Any STRIPS planning problem can be modelled as an LTL model checking problems. Proof (Sketch) Achieving any propositional goal g 2 AP can be expressed in form of a counter-example to the temporal formula f = A(G g) in LTL. If the problem is solvable, the LTL model checker will return a counter-example which in fact is a solution path for the STRIPS planning problem. On the other hand, several model checking problem can be modelled as state space problems P =< S, O, I, G > The class of model checking problems that fit into the representation of a state space problem with a witnessing goal set are the ones with so-called safety properties Model Checking 29

31 18 NP-hard Problems For all NP(-complete) decision problems L we have a non-deterministic Turing-Machine M that recognices L in polonomial time Well-known instances are boolean satisfiability (SAT ), number partitioning (PARTITION), bin packing (BPP) as well as graph problems like graph partitioning (GPP) and node coverage (VERTEX-COVER) Even in initial work of Garey and Johnson hundrets of NP-complete problems have been identified NP-hard Problems 30

32 Simulation and Modeling A deterministic Turing machine may simulate all possible computations of M in exponential time Therefore NP problems are state space problems with S being the set of configurations of M, O being the set of transitions to one successor configuration, I being the start configuration of M and G G being its end configuration. NP-hard Problems 31

33 19 Production Systems Another classical AI representation for a search problem is a production system. A production system is a state space problem, whose states are strings in Σ, and whose operators are given in form of grammar inferences rules α β, with α, β Σ for some fixed alphabet Σ. Production Systems 32

34 Undecidability Theorem (Post 1943) The problem to solve a general production system for arbitrary start and goal state is not decidable. Proof Reduction to the halting problem for Turing machines: States are configurations of the Turing machine M, i.e. words of {B} + Γ Q Γ {B} + The initial state is state B q 0 B and goal state is B q e B. Depending on the value of d we assign each aq bq d to words wcqaw s, s {wcq bw, wcbq w, wq cbw } with w {B} + Γ and w Γ {B} + Production Systems 33

CS6901: review of Theory of Computation and Algorithms

CS6901: review of Theory of Computation and Algorithms CS6901: review of Theory of Computation and Algorithms Any mechanically (automatically) discretely computation of problem solving contains at least three components: - problem description - computational

More information

CS3719 Theory of Computation and Algorithms

CS3719 Theory of Computation and Algorithms CS3719 Theory of Computation and Algorithms Any mechanically (automatically) discretely computation of problem solving contains at least three components: - problem description - computational tool - analysis

More information

9. PSPACE 9. PSPACE. PSPACE complexity class quantified satisfiability planning problem PSPACE-complete

9. PSPACE 9. PSPACE. PSPACE complexity class quantified satisfiability planning problem PSPACE-complete Geography game Geography. Alice names capital city c of country she is in. Bob names a capital city c' that starts with the letter on which c ends. Alice and Bob repeat this game until one player is unable

More information

9. PSPACE. PSPACE complexity class quantified satisfiability planning problem PSPACE-complete

9. PSPACE. PSPACE complexity class quantified satisfiability planning problem PSPACE-complete 9. PSPACE PSPACE complexity class quantified satisfiability planning problem PSPACE-complete Lecture slides by Kevin Wayne Copyright 2005 Pearson-Addison Wesley Copyright 2013 Kevin Wayne http://www.cs.princeton.edu/~wayne/kleinberg-tardos

More information

Chapter 9. PSPACE: A Class of Problems Beyond NP. Slides by Kevin Wayne Pearson-Addison Wesley. All rights reserved.

Chapter 9. PSPACE: A Class of Problems Beyond NP. Slides by Kevin Wayne Pearson-Addison Wesley. All rights reserved. Chapter 9 PSPACE: A Class of Problems Beyond NP Slides by Kevin Wayne. Copyright @ 2005 Pearson-Addison Wesley. All rights reserved. 1 Geography Game Geography. Alice names capital city c of country she

More information

Chapter 4: Computation tree logic

Chapter 4: Computation tree logic INFOF412 Formal verification of computer systems Chapter 4: Computation tree logic Mickael Randour Formal Methods and Verification group Computer Science Department, ULB March 2017 1 CTL: a specification

More information

Notes for Lecture Notes 2

Notes for Lecture Notes 2 Stanford University CS254: Computational Complexity Notes 2 Luca Trevisan January 11, 2012 Notes for Lecture Notes 2 In this lecture we define NP, we state the P versus NP problem, we prove that its formulation

More information

CSCI3390-Lecture 14: The class NP

CSCI3390-Lecture 14: The class NP CSCI3390-Lecture 14: The class NP 1 Problems and Witnesses All of the decision problems described below have the form: Is there a solution to X? where X is the given problem instance. If the instance is

More information

Analysis of Algorithms. Unit 5 - Intractable Problems

Analysis of Algorithms. Unit 5 - Intractable Problems Analysis of Algorithms Unit 5 - Intractable Problems 1 Intractable Problems Tractable Problems vs. Intractable Problems Polynomial Problems NP Problems NP Complete and NP Hard Problems 2 In this unit we

More information

CS 580: Algorithm Design and Analysis. Jeremiah Blocki Purdue University Spring 2018

CS 580: Algorithm Design and Analysis. Jeremiah Blocki Purdue University Spring 2018 CS 580: Algorithm Design and Analysis Jeremiah Blocki Purdue University Spring 2018 Chapter 9 PSPACE: A Class of Problems Beyond NP Slides by Kevin Wayne. Copyright @ 2005 Pearson-Addison Wesley. All rights

More information

1 Computational Problems

1 Computational Problems Stanford University CS254: Computational Complexity Handout 2 Luca Trevisan March 31, 2010 Last revised 4/29/2010 In this lecture we define NP, we state the P versus NP problem, we prove that its formulation

More information

Artificial Intelligence. 3 Problem Complexity. Prof. Dr. Jana Koehler Fall 2016 HSLU - JK

Artificial Intelligence. 3 Problem Complexity. Prof. Dr. Jana Koehler Fall 2016 HSLU - JK Artificial Intelligence 3 Problem Complexity Prof. Dr. Jana Koehler Fall 2016 Agenda Computability and Turing Machines Tractable and Intractable Problems P vs. NP Decision Problems Optimization problems

More information

Undecidable Problems. Z. Sawa (TU Ostrava) Introd. to Theoretical Computer Science May 12, / 65

Undecidable Problems. Z. Sawa (TU Ostrava) Introd. to Theoretical Computer Science May 12, / 65 Undecidable Problems Z. Sawa (TU Ostrava) Introd. to Theoretical Computer Science May 12, 2018 1/ 65 Algorithmically Solvable Problems Let us assume we have a problem P. If there is an algorithm solving

More information

Show that the following problems are NP-complete

Show that the following problems are NP-complete Show that the following problems are NP-complete April 7, 2018 Below is a list of 30 exercises in which you are asked to prove that some problem is NP-complete. The goal is to better understand the theory

More information

Computability and Complexity Theory: An Introduction

Computability and Complexity Theory: An Introduction Computability and Complexity Theory: An Introduction meena@imsc.res.in http://www.imsc.res.in/ meena IMI-IISc, 20 July 2006 p. 1 Understanding Computation Kinds of questions we seek answers to: Is a given

More information

Limitations of Algorithm Power

Limitations of Algorithm Power Limitations of Algorithm Power Objectives We now move into the third and final major theme for this course. 1. Tools for analyzing algorithms. 2. Design strategies for designing algorithms. 3. Identifying

More information

Announcements. Friday Four Square! Problem Set 8 due right now. Problem Set 9 out, due next Friday at 2:15PM. Did you lose a phone in my office?

Announcements. Friday Four Square! Problem Set 8 due right now. Problem Set 9 out, due next Friday at 2:15PM. Did you lose a phone in my office? N P NP Completeness Announcements Friday Four Square! Today at 4:15PM, outside Gates. Problem Set 8 due right now. Problem Set 9 out, due next Friday at 2:15PM. Explore P, NP, and their connection. Did

More information

Data Structures in Java

Data Structures in Java Data Structures in Java Lecture 21: Introduction to NP-Completeness 12/9/2015 Daniel Bauer Algorithms and Problem Solving Purpose of algorithms: find solutions to problems. Data Structures provide ways

More information

CSC 8301 Design & Analysis of Algorithms: Lower Bounds

CSC 8301 Design & Analysis of Algorithms: Lower Bounds CSC 8301 Design & Analysis of Algorithms: Lower Bounds Professor Henry Carter Fall 2016 Recap Iterative improvement algorithms take a feasible solution and iteratively improve it until optimized Simplex

More information

UNIT-VIII COMPUTABILITY THEORY

UNIT-VIII COMPUTABILITY THEORY CONTEXT SENSITIVE LANGUAGE UNIT-VIII COMPUTABILITY THEORY A Context Sensitive Grammar is a 4-tuple, G = (N, Σ P, S) where: N Set of non terminal symbols Σ Set of terminal symbols S Start symbol of the

More information

Advanced topic: Space complexity

Advanced topic: Space complexity Advanced topic: Space complexity CSCI 3130 Formal Languages and Automata Theory Siu On CHAN Chinese University of Hong Kong Fall 2016 1/28 Review: time complexity We have looked at how long it takes to

More information

Final exam of ECE 457 Applied Artificial Intelligence for the Spring term 2007.

Final exam of ECE 457 Applied Artificial Intelligence for the Spring term 2007. Spring 2007 / Page 1 Final exam of ECE 457 Applied Artificial Intelligence for the Spring term 2007. Don t panic. Be sure to write your name and student ID number on every page of the exam. The only materials

More information

Chapter 3 Deterministic planning

Chapter 3 Deterministic planning Chapter 3 Deterministic planning In this chapter we describe a number of algorithms for solving the historically most important and most basic type of planning problem. Two rather strong simplifying assumptions

More information

Examination Artificial Intelligence Module Intelligent Interaction Design December 2014

Examination Artificial Intelligence Module Intelligent Interaction Design December 2014 Examination Artificial Intelligence Module Intelligent Interaction Design December 2014 Introduction This exam is closed book, you may only use a simple calculator (addition, substraction, multiplication

More information

POLYNOMIAL SPACE QSAT. Games. Polynomial space cont d

POLYNOMIAL SPACE QSAT. Games. Polynomial space cont d T-79.5103 / Autumn 2008 Polynomial Space 1 T-79.5103 / Autumn 2008 Polynomial Space 3 POLYNOMIAL SPACE Polynomial space cont d Polynomial space-bounded computation has a variety of alternative characterizations

More information

Overview. Discrete Event Systems Verification of Finite Automata. What can finite automata be used for? What can finite automata be used for?

Overview. Discrete Event Systems Verification of Finite Automata. What can finite automata be used for? What can finite automata be used for? Computer Engineering and Networks Overview Discrete Event Systems Verification of Finite Automata Lothar Thiele Introduction Binary Decision Diagrams Representation of Boolean Functions Comparing two circuits

More information

Complexity of domain-independent planning. José Luis Ambite

Complexity of domain-independent planning. José Luis Ambite Complexity of domain-independent planning José Luis Ambite 1 Decidability Decision problem: a problem with a yes/no answer e.g. is N prime? Decidable: if there is a program (i.e. a Turing Machine) that

More information

Computation Tree Logic (CTL) & Basic Model Checking Algorithms

Computation Tree Logic (CTL) & Basic Model Checking Algorithms Computation Tree Logic (CTL) & Basic Model Checking Algorithms Martin Fränzle Carl von Ossietzky Universität Dpt. of Computing Science Res. Grp. Hybride Systeme Oldenburg, Germany 02917: CTL & Model Checking

More information

CPSC 421: Tutorial #1

CPSC 421: Tutorial #1 CPSC 421: Tutorial #1 October 14, 2016 Set Theory. 1. Let A be an arbitrary set, and let B = {x A : x / x}. That is, B contains all sets in A that do not contain themselves: For all y, ( ) y B if and only

More information

Computational Complexity

Computational Complexity Computational Complexity Algorithm performance and difficulty of problems So far we have seen problems admitting fast algorithms flow problems, shortest path, spanning tree... and other problems for which

More information

T Reactive Systems: Temporal Logic LTL

T Reactive Systems: Temporal Logic LTL Tik-79.186 Reactive Systems 1 T-79.186 Reactive Systems: Temporal Logic LTL Spring 2005, Lecture 4 January 31, 2005 Tik-79.186 Reactive Systems 2 Temporal Logics Temporal logics are currently the most

More information

Complexity Theory Part II

Complexity Theory Part II Complexity Theory Part II Time Complexity The time complexity of a TM M is a function denoting the worst-case number of steps M takes on any input of length n. By convention, n denotes the length of the

More information

Lecture 22: Counting

Lecture 22: Counting CS 710: Complexity Theory 4/8/2010 Lecture 22: Counting Instructor: Dieter van Melkebeek Scribe: Phil Rydzewski & Chi Man Liu Last time we introduced extractors and discussed two methods to construct them.

More information

From Liveness to Promptness

From Liveness to Promptness From Liveness to Promptness Orna Kupferman Hebrew University Nir Piterman EPFL Moshe Y. Vardi Rice University Abstract Liveness temporal properties state that something good eventually happens, e.g., every

More information

Turing Machine Recap

Turing Machine Recap Turing Machine Recap DFA with (infinite) tape. One move: read, write, move, change state. High-level Points Church-Turing thesis: TMs are the most general computing devices. So far no counter example Every

More information

(a) Definition of TMs. First Problem of URMs

(a) Definition of TMs. First Problem of URMs Sec. 4: Turing Machines First Problem of URMs (a) Definition of the Turing Machine. (b) URM computable functions are Turing computable. (c) Undecidability of the Turing Halting Problem That incrementing

More information

Boolean circuits. Lecture Definitions

Boolean circuits. Lecture Definitions Lecture 20 Boolean circuits In this lecture we will discuss the Boolean circuit model of computation and its connection to the Turing machine model. Although the Boolean circuit model is fundamentally

More information

Automata-based Verification - III

Automata-based Verification - III COMP30172: Advanced Algorithms Automata-based Verification - III Howard Barringer Room KB2.20: email: howard.barringer@manchester.ac.uk March 2009 Third Topic Infinite Word Automata Motivation Büchi Automata

More information

Friday Four Square! Today at 4:15PM, Outside Gates

Friday Four Square! Today at 4:15PM, Outside Gates P and NP Friday Four Square! Today at 4:15PM, Outside Gates Recap from Last Time Regular Languages DCFLs CFLs Efficiently Decidable Languages R Undecidable Languages Time Complexity A step of a Turing

More information

CS6902 Theory of Computation and Algorithms

CS6902 Theory of Computation and Algorithms CS6902 Theory of Computation and Algorithms Any mechanically (automatically) discretely computation of problem solving contains at least three components: - problem description - computational tool - procedure/analysis

More information

an efficient procedure for the decision problem. We illustrate this phenomenon for the Satisfiability problem.

an efficient procedure for the decision problem. We illustrate this phenomenon for the Satisfiability problem. 1 More on NP In this set of lecture notes, we examine the class NP in more detail. We give a characterization of NP which justifies the guess and verify paradigm, and study the complexity of solving search

More information

NP-complete problems. CSE 101: Design and Analysis of Algorithms Lecture 20

NP-complete problems. CSE 101: Design and Analysis of Algorithms Lecture 20 NP-complete problems CSE 101: Design and Analysis of Algorithms Lecture 20 CSE 101: Design and analysis of algorithms NP-complete problems Reading: Chapter 8 Homework 7 is due today, 11:59 PM Tomorrow

More information

COMP Analysis of Algorithms & Data Structures

COMP Analysis of Algorithms & Data Structures COMP 3170 - Analysis of Algorithms & Data Structures Shahin Kamali Computational Complexity CLRS 34.1-34.4 University of Manitoba COMP 3170 - Analysis of Algorithms & Data Structures 1 / 50 Polynomial

More information

NP-Completeness. Until now we have been designing algorithms for specific problems

NP-Completeness. Until now we have been designing algorithms for specific problems NP-Completeness 1 Introduction Until now we have been designing algorithms for specific problems We have seen running times O(log n), O(n), O(n log n), O(n 2 ), O(n 3 )... We have also discussed lower

More information

Q = Set of states, IE661: Scheduling Theory (Fall 2003) Primer to Complexity Theory Satyaki Ghosh Dastidar

Q = Set of states, IE661: Scheduling Theory (Fall 2003) Primer to Complexity Theory Satyaki Ghosh Dastidar IE661: Scheduling Theory (Fall 2003) Primer to Complexity Theory Satyaki Ghosh Dastidar Turing Machine A Turing machine is an abstract representation of a computing device. It consists of a read/write

More information

NP-Completeness. Andreas Klappenecker. [based on slides by Prof. Welch]

NP-Completeness. Andreas Klappenecker. [based on slides by Prof. Welch] NP-Completeness Andreas Klappenecker [based on slides by Prof. Welch] 1 Prelude: Informal Discussion (Incidentally, we will never get very formal in this course) 2 Polynomial Time Algorithms Most of the

More information

Lecture 2: Symbolic Model Checking With SAT

Lecture 2: Symbolic Model Checking With SAT Lecture 2: Symbolic Model Checking With SAT Edmund M. Clarke, Jr. School of Computer Science Carnegie Mellon University Pittsburgh, PA 15213 (Joint work over several years with: A. Biere, A. Cimatti, Y.

More information

Computational Complexity of Bayesian Networks

Computational Complexity of Bayesian Networks Computational Complexity of Bayesian Networks UAI, 2015 Complexity theory Many computations on Bayesian networks are NP-hard Meaning (no more, no less) that we cannot hope for poly time algorithms that

More information

Decision, Computation and Language

Decision, Computation and Language Decision, Computation and Language Non-Deterministic Finite Automata (NFA) Dr. Muhammad S Khan (mskhan@liv.ac.uk) Ashton Building, Room G22 http://www.csc.liv.ac.uk/~khan/comp218 Finite State Automata

More information

Formal Verification Techniques. Riccardo Sisto, Politecnico di Torino

Formal Verification Techniques. Riccardo Sisto, Politecnico di Torino Formal Verification Techniques Riccardo Sisto, Politecnico di Torino State exploration State Exploration and Theorem Proving Exhaustive exploration => result is certain (correctness or noncorrectness proof)

More information

6.5.3 An NP-complete domino game

6.5.3 An NP-complete domino game 26 Chapter 6. Complexity Theory 3SAT NP. We know from Theorem 6.5.7 that this is true. A P 3SAT, for every language A NP. Hence, we have to show this for languages A such as kcolor, HC, SOS, NPrim, KS,

More information

FINAL EXAM PRACTICE PROBLEMS CMSC 451 (Spring 2016)

FINAL EXAM PRACTICE PROBLEMS CMSC 451 (Spring 2016) FINAL EXAM PRACTICE PROBLEMS CMSC 451 (Spring 2016) The final exam will be on Thursday, May 12, from 8:00 10:00 am, at our regular class location (CSI 2117). It will be closed-book and closed-notes, except

More information

CS 350 Algorithms and Complexity

CS 350 Algorithms and Complexity 1 CS 350 Algorithms and Complexity Fall 2015 Lecture 15: Limitations of Algorithmic Power Introduction to complexity theory Andrew P. Black Department of Computer Science Portland State University Lower

More information

Decidability: Church-Turing Thesis

Decidability: Church-Turing Thesis Decidability: Church-Turing Thesis While there are a countably infinite number of languages that are described by TMs over some alphabet Σ, there are an uncountably infinite number that are not Are there

More information

More on NP and Reductions

More on NP and Reductions Indian Institute of Information Technology Design and Manufacturing, Kancheepuram Chennai 600 127, India An Autonomous Institute under MHRD, Govt of India http://www.iiitdm.ac.in COM 501 Advanced Data

More information

SOLUTION: SOLUTION: SOLUTION:

SOLUTION: SOLUTION: SOLUTION: Convert R and S into nondeterministic finite automata N1 and N2. Given a string s, if we know the states N1 and N2 may reach when s[1...i] has been read, we are able to derive the states N1 and N2 may

More information

NP-completeness. Chapter 34. Sergey Bereg

NP-completeness. Chapter 34. Sergey Bereg NP-completeness Chapter 34 Sergey Bereg Oct 2017 Examples Some problems admit polynomial time algorithms, i.e. O(n k ) running time where n is the input size. We will study a class of NP-complete problems

More information

ENEE 459E/CMSC 498R In-class exercise February 10, 2015

ENEE 459E/CMSC 498R In-class exercise February 10, 2015 ENEE 459E/CMSC 498R In-class exercise February 10, 2015 In this in-class exercise, we will explore what it means for a problem to be intractable (i.e. it cannot be solved by an efficient algorithm). There

More information

CS Lecture 29 P, NP, and NP-Completeness. k ) for all k. Fall The class P. The class NP

CS Lecture 29 P, NP, and NP-Completeness. k ) for all k. Fall The class P. The class NP CS 301 - Lecture 29 P, NP, and NP-Completeness Fall 2008 Review Languages and Grammars Alphabets, strings, languages Regular Languages Deterministic Finite and Nondeterministic Automata Equivalence of

More information

Lecture 8: Alternatation. 1 Alternate Characterizations of the Polynomial Hierarchy

Lecture 8: Alternatation. 1 Alternate Characterizations of the Polynomial Hierarchy CS 710: Complexity Theory 10/4/2011 Lecture 8: Alternatation Instructor: Dieter van Melkebeek Scribe: Sachin Ravi In this lecture, we continue with our discussion of the polynomial hierarchy complexity

More information

Computer Science 385 Analysis of Algorithms Siena College Spring Topic Notes: Limitations of Algorithms

Computer Science 385 Analysis of Algorithms Siena College Spring Topic Notes: Limitations of Algorithms Computer Science 385 Analysis of Algorithms Siena College Spring 2011 Topic Notes: Limitations of Algorithms We conclude with a discussion of the limitations of the power of algorithms. That is, what kinds

More information

Linear-time Temporal Logic

Linear-time Temporal Logic Linear-time Temporal Logic Pedro Cabalar Department of Computer Science University of Corunna, SPAIN cabalar@udc.es 2015/2016 P. Cabalar ( Department Linear oftemporal Computer Logic Science University

More information

Algorithms. NP -Complete Problems. Dong Kyue Kim Hanyang University

Algorithms. NP -Complete Problems. Dong Kyue Kim Hanyang University Algorithms NP -Complete Problems Dong Kyue Kim Hanyang University dqkim@hanyang.ac.kr The Class P Definition 13.2 Polynomially bounded An algorithm is said to be polynomially bounded if its worst-case

More information

Automata Theory CS Complexity Theory I: Polynomial Time

Automata Theory CS Complexity Theory I: Polynomial Time Automata Theory CS411-2015-17 Complexity Theory I: Polynomial Time David Galles Department of Computer Science University of San Francisco 17-0: Tractable vs. Intractable If a problem is recursive, then

More information

Bounded Model Checking with SAT/SMT. Edmund M. Clarke School of Computer Science Carnegie Mellon University 1/39

Bounded Model Checking with SAT/SMT. Edmund M. Clarke School of Computer Science Carnegie Mellon University 1/39 Bounded Model Checking with SAT/SMT Edmund M. Clarke School of Computer Science Carnegie Mellon University 1/39 Recap: Symbolic Model Checking with BDDs Method used by most industrial strength model checkers:

More information

Notes for Lecture 3... x 4

Notes for Lecture 3... x 4 Stanford University CS254: Computational Complexity Notes 3 Luca Trevisan January 14, 2014 Notes for Lecture 3 In this lecture we introduce the computational model of boolean circuits and prove that polynomial

More information

Announcements. Problem Set 7 graded; will be returned at end of lecture. Unclaimed problem sets and midterms moved!

Announcements. Problem Set 7 graded; will be returned at end of lecture. Unclaimed problem sets and midterms moved! N P NP Announcements Problem Set 7 graded; will be returned at end of lecture. Unclaimed problem sets and midterms moved! Now in cabinets in the Gates open area near the drop-off box. The Complexity Class

More information

Algorithmic verification

Algorithmic verification Algorithmic verification Ahmed Rezine IDA, Linköpings Universitet Hösttermin 2018 Outline Overview Model checking Symbolic execution Outline Overview Model checking Symbolic execution Program verification

More information

Automata-Theoretic LTL Model-Checking

Automata-Theoretic LTL Model-Checking Automata-Theoretic LTL Model-Checking Arie Gurfinkel arie@cmu.edu SEI/CMU Automata-Theoretic LTL Model-Checking p.1 LTL - Linear Time Logic (Pn 77) Determines Patterns on Infinite Traces Atomic Propositions

More information

CS 350 Algorithms and Complexity

CS 350 Algorithms and Complexity CS 350 Algorithms and Complexity Winter 2019 Lecture 15: Limitations of Algorithmic Power Introduction to complexity theory Andrew P. Black Department of Computer Science Portland State University Lower

More information

8. INTRACTABILITY I. Lecture slides by Kevin Wayne Copyright 2005 Pearson-Addison Wesley. Last updated on 2/6/18 2:16 AM

8. INTRACTABILITY I. Lecture slides by Kevin Wayne Copyright 2005 Pearson-Addison Wesley. Last updated on 2/6/18 2:16 AM 8. INTRACTABILITY I poly-time reductions packing and covering problems constraint satisfaction problems sequencing problems partitioning problems graph coloring numerical problems Lecture slides by Kevin

More information

Intelligent Agents. Formal Characteristics of Planning. Ute Schmid. Cognitive Systems, Applied Computer Science, Bamberg University

Intelligent Agents. Formal Characteristics of Planning. Ute Schmid. Cognitive Systems, Applied Computer Science, Bamberg University Intelligent Agents Formal Characteristics of Planning Ute Schmid Cognitive Systems, Applied Computer Science, Bamberg University Extensions to the slides for chapter 3 of Dana Nau with contributions by

More information

Space and Nondeterminism

Space and Nondeterminism CS 221 Computational Complexity, Lecture 5 Feb 6, 2018 Space and Nondeterminism Instructor: Madhu Sudan 1 Scribe: Yong Wook Kwon Topic Overview Today we ll talk about space and non-determinism. For some

More information

Theory of Computation. Theory of Computation

Theory of Computation. Theory of Computation Theory of Computation Theory of Computation What is possible to compute? We can prove that there are some problems computers cannot solve There are some problems computers can theoretically solve, but

More information

Computational Complexity and Intractability: An Introduction to the Theory of NP. Chapter 9

Computational Complexity and Intractability: An Introduction to the Theory of NP. Chapter 9 1 Computational Complexity and Intractability: An Introduction to the Theory of NP Chapter 9 2 Objectives Classify problems as tractable or intractable Define decision problems Define the class P Define

More information

P P P NP-Hard: L is NP-hard if for all L NP, L L. Thus, if we could solve L in polynomial. Cook's Theorem and Reductions

P P P NP-Hard: L is NP-hard if for all L NP, L L. Thus, if we could solve L in polynomial. Cook's Theorem and Reductions Summary of the previous lecture Recall that we mentioned the following topics: P: is the set of decision problems (or languages) that are solvable in polynomial time. NP: is the set of decision problems

More information

Automata-based Verification - III

Automata-based Verification - III CS3172: Advanced Algorithms Automata-based Verification - III Howard Barringer Room KB2.20/22: email: howard.barringer@manchester.ac.uk March 2005 Third Topic Infinite Word Automata Motivation Büchi Automata

More information

Algorithms: COMP3121/3821/9101/9801

Algorithms: COMP3121/3821/9101/9801 NEW SOUTH WALES Algorithms: COMP3121/3821/9101/9801 Aleks Ignjatović School of Computer Science and Engineering University of New South Wales LECTURE 9: INTRACTABILITY COMP3121/3821/9101/9801 1 / 29 Feasibility

More information

PROPOSITIONAL LOGIC. VL Logik: WS 2018/19

PROPOSITIONAL LOGIC. VL Logik: WS 2018/19 PROPOSITIONAL LOGIC VL Logik: WS 2018/19 (Version 2018.2) Martina Seidl (martina.seidl@jku.at), Armin Biere (biere@jku.at) Institut für Formale Modelle und Verifikation BOX Game: Rules 1. The game board

More information

Verification. Arijit Mondal. Dept. of Computer Science & Engineering Indian Institute of Technology Patna

Verification. Arijit Mondal. Dept. of Computer Science & Engineering Indian Institute of Technology Patna IIT Patna 1 Verification Arijit Mondal Dept. of Computer Science & Engineering Indian Institute of Technology Patna arijit@iitp.ac.in Introduction The goal of verification To ensure 100% correct in functionality

More information

Timo Latvala. February 4, 2004

Timo Latvala. February 4, 2004 Reactive Systems: Temporal Logic LT L Timo Latvala February 4, 2004 Reactive Systems: Temporal Logic LT L 8-1 Temporal Logics Temporal logics are currently the most widely used specification formalism

More information

Final Exam (Version B) December 16, 2014 Name: NetID: Section: 1 2 3

Final Exam (Version B) December 16, 2014 Name: NetID: Section: 1 2 3 CS 374 : Algorithms and Models of Computation, Fall 2014 Final Exam (Version B) December 16, 2014 Name: NetID: Section: 1 2 3 # 1 2 3 4 5 6 Total Score Max 20 10 10 10 10 10 70 Grader Don t panic! Please

More information

NP-Completeness. Sections 28.5, 28.6

NP-Completeness. Sections 28.5, 28.6 NP-Completeness Sections 28.5, 28.6 NP-Completeness A language L might have these properties: 1. L is in NP. 2. Every language in NP is deterministic, polynomial-time reducible to L. L is NP-hard iff it

More information

On the Computational Hardness of Graph Coloring

On the Computational Hardness of Graph Coloring On the Computational Hardness of Graph Coloring Steven Rutherford June 3, 2011 Contents 1 Introduction 2 2 Turing Machine 2 3 Complexity Classes 3 4 Polynomial Time (P) 4 4.1 COLORED-GRAPH...........................

More information

P,NP, NP-Hard and NP-Complete

P,NP, NP-Hard and NP-Complete P,NP, NP-Hard and NP-Complete We can categorize the problem space into two parts Solvable Problems Unsolvable problems 7/11/2011 1 Halting Problem Given a description of a program and a finite input, decide

More information

Lecture 16: Computation Tree Logic (CTL)

Lecture 16: Computation Tree Logic (CTL) Lecture 16: Computation Tree Logic (CTL) 1 Programme for the upcoming lectures Introducing CTL Basic Algorithms for CTL CTL and Fairness; computing strongly connected components Basic Decision Diagrams

More information

Principles of Computing, Carnegie Mellon University. The Limits of Computing

Principles of Computing, Carnegie Mellon University. The Limits of Computing The Limits of Computing Intractability Limits of Computing Announcement Final Exam is on Friday 9:00am 10:20am Part 1 4:30pm 6:10pm Part 2 If you did not fill in the course evaluations please do it today.

More information

MACHINE COMPUTING. the limitations

MACHINE COMPUTING. the limitations MACHINE COMPUTING the limitations human computing stealing brain cycles of the masses word recognition: to digitize all printed writing language education: to translate web content games with a purpose

More information

Automata-Theoretic Model Checking of Reactive Systems

Automata-Theoretic Model Checking of Reactive Systems Automata-Theoretic Model Checking of Reactive Systems Radu Iosif Verimag/CNRS (Grenoble, France) Thanks to Tom Henzinger (IST, Austria), Barbara Jobstmann (CNRS, Grenoble) and Doron Peled (Bar-Ilan University,

More information

Synthesis weakness of standard approach. Rational Synthesis

Synthesis weakness of standard approach. Rational Synthesis 1 Synthesis weakness of standard approach Rational Synthesis 3 Overview Introduction to formal verification Reactive systems Verification Synthesis Introduction to Formal Verification of Reactive Systems

More information

Introduction to Arti Intelligence

Introduction to Arti Intelligence Introduction to Arti Intelligence cial Lecture 4: Constraint satisfaction problems 1 / 48 Constraint satisfaction problems: Today Exploiting the representation of a state to accelerate search. Backtracking.

More information

Model Checking: An Introduction

Model Checking: An Introduction Model Checking: An Introduction Meeting 3, CSCI 5535, Spring 2013 Announcements Homework 0 ( Preliminaries ) out, due Friday Saturday This Week Dive into research motivating CSCI 5535 Next Week Begin foundations

More information

Advanced Undecidability Proofs

Advanced Undecidability Proofs 17 Advanced Undecidability Proofs In this chapter, we will discuss Rice s Theorem in Section 17.1, and the computational history method in Section 17.3. As discussed in Chapter 16, these are two additional

More information

6.045J/18.400J: Automata, Computability and Complexity. Quiz 2. March 30, Please write your name in the upper corner of each page.

6.045J/18.400J: Automata, Computability and Complexity. Quiz 2. March 30, Please write your name in the upper corner of each page. 6.045J/18.400J: Automata, Computability and Complexity March 30, 2005 Quiz 2 Prof. Nancy Lynch Please write your name in the upper corner of each page. Problem Score 1 2 3 4 5 6 Total Q2-1 Problem 1: True

More information

FORMAL LANGUAGES, AUTOMATA AND COMPUTATION

FORMAL LANGUAGES, AUTOMATA AND COMPUTATION FORMAL LANGUAGES, AUTOMATA AND COMPUTATION DECIDABILITY ( LECTURE 15) SLIDES FOR 15-453 SPRING 2011 1 / 34 TURING MACHINES-SYNOPSIS The most general model of computation Computations of a TM are described

More information

CS/COE

CS/COE CS/COE 1501 www.cs.pitt.edu/~nlf4/cs1501/ P vs NP But first, something completely different... Some computational problems are unsolvable No algorithm can be written that will always produce the correct

More information

An Approach to Computational Complexity in Membrane Computing

An Approach to Computational Complexity in Membrane Computing An Approach to Computational Complexity in Membrane Computing Mario J. Pérez-Jiménez Research Group on Natural Computing, Department of Computer Science and Artificial Intelligence, University of Sevilla

More information

Temporal logics and explicit-state model checking. Pierre Wolper Université de Liège

Temporal logics and explicit-state model checking. Pierre Wolper Université de Liège Temporal logics and explicit-state model checking Pierre Wolper Université de Liège 1 Topics to be covered Introducing explicit-state model checking Finite automata on infinite words Temporal Logics and

More information

UNIVERSITY OF CALIFORNIA, RIVERSIDE

UNIVERSITY OF CALIFORNIA, RIVERSIDE UNIVERSITY OF CALIFORNIA, RIVERSIDE DEPARTMENT OF COMPUTER SCIENCE 2006 DEPTH EXAMINATION IN THEORY OF OF COMPUTATION AND ALGORITHMS There are 10 problems on the test. Each problem is worth 10 points.

More information

6.045: Automata, Computability, and Complexity (GITCS) Class 15 Nancy Lynch

6.045: Automata, Computability, and Complexity (GITCS) Class 15 Nancy Lynch 6.045: Automata, Computability, and Complexity (GITCS) Class 15 Nancy Lynch Today: More Complexity Theory Polynomial-time reducibility, NP-completeness, and the Satisfiability (SAT) problem Topics: Introduction

More information