Principles of AI Planning December 15th, 2006 Computational complexity. Principles of AI Planning. Computational Complexity

Similar documents
Theoretical Computer Science (Bridging Course) Complexity

The Classes P and NP

Introduction to Logic in Computer Science: Autumn 2006

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

MATHEMATICS: CONCEPTS, AND FOUNDATIONS Vol. III - Logic and Computer Science - Phokion G. Kolaitis

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

NP-Completeness and Cook s Theorem

Introduction to NP-Completeness Written and copyright c by Jie Wang 1

Page 1. CSCE 310J Data Structures & Algorithms. CSCE 310J Data Structures & Algorithms. P, NP, and NP-Complete. Polynomial-Time Algorithms

Welcome to... Problem Analysis and Complexity Theory , 3 VU

OHJ-2306 Introduction to Theoretical Computer Science, Fall

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

CSE 135: Introduction to Theory of Computation Decidability and Recognizability

Chapter 7 Uncomputability

Complexity Classes P and NP

The Halting Problem is Undecidable

Lecture 7: NP-Complete Problems

Tutorial 8. NP-Complete Problems

CHAPTER 7 GENERAL PROOF SYSTEMS

Theory of Computation Chapter 2: Turing Machines

Complexity Theory. IE 661: Scheduling Theory Fall 2003 Satyaki Ghosh Dastidar

On the Relationship between Classes P and NP

Lecture 2: Universality

The Classes P and NP. mohamed@elwakil.net

CSC 373: Algorithm Design and Analysis Lecture 16

NP-Completeness. CptS 223 Advanced Data Structures. Larry Holder School of Electrical Engineering and Computer Science Washington State University

Updating Action Domain Descriptions

Computer Algorithms. NP-Complete Problems. CISC 4080 Yanjun Li

Notes on NP Completeness

Algorithmic Software Verification

Chapter. NP-Completeness. Contents

The P versus NP Solution

Complexity of Higher-Order Queries

3515ICT Theory of Computation Turing Machines

Quantum and Non-deterministic computers facing NP-completeness

Notes on Complexity Theory Last updated: August, Lecture 1

ON FUNCTIONAL SYMBOL-FREE LOGIC PROGRAMS

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

Complexity Theory. Jörg Kreiker. Summer term Chair for Theoretical Computer Science Prof. Esparza TU München

Complexity Classes. Chapter 27 of the forthcoming CRC Handbook on Algorithms and Theory of Computation. Eric Allender 1. Rutgers University

Notes on Complexity Theory Last updated: August, Lecture 1

Turing Machines: An Introduction

Computability Theory

CS154. Turing Machines. Turing Machine. Turing Machines versus DFAs FINITE STATE CONTROL AI N P U T INFINITE TAPE. read write move.

24 Uses of Turing Machines

CS 3719 (Theory of Computation and Algorithms) Lecture 4

P versus NP, and More

(IALC, Chapters 8 and 9) Introduction to Turing s life, Turing machines, universal machines, unsolvable problems.

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

Handout #1: Mathematical Reasoning

One last point: we started off this book by introducing another famously hard search problem:

Fabio Patrizi DIS Sapienza - University of Rome

A logical approach to dynamic role-based access control

COMPUTER SCIENCE TRIPOS

SOLVING NARROW-INTERVAL LINEAR EQUATION SYSTEMS IS NP-HARD PATRICK THOR KAHL. Department of Computer Science

Why Study NP- hardness. NP Hardness/Completeness Overview. P and NP. Scaling 9/3/13. Ron Parr CPS 570. NP hardness is not an AI topic

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

4.6 The Primitive Recursive Functions

CoNP and Function Problems

Lecture 1: Oracle Turing Machines

Pushdown Automata. place the input head on the leftmost input symbol. while symbol read = b and pile contains discs advance head remove disc from pile

Chapter 1. NP Completeness I Introduction. By Sariel Har-Peled, December 30, Version: 1.05

CMPSCI611: Approximating MAX-CUT Lecture 20

Approximation Algorithms

A Working Knowledge of Computational Complexity for an Optimizer

6.080/6.089 GITCS Feb 12, Lecture 3

Lecture 1: Course overview, circuits, and formulas

Reachability in Succinct and Parametric One-Counter Automata

Complexity Classes. Eric Allender Rutgers University. Michael C. Loui University of Illinois at Urbana-Champaign

Properties of Stabilizing Computations

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

Algebraic Computation Models. Algebraic Computation Models

Secrecy for Bounded Security Protocols With Freshness Check is NEXPTIME-complete

Lecture summary for Theory of Computation

Automata and Computability. Solutions to Exercises

Exponential time algorithms for graph coloring

Theorem (informal statement): There are no extendible methods in David Chalmers s sense unless P = NP.

Chapter Load Balancing. Approximation Algorithms. Load Balancing. Load Balancing on 2 Machines. Load Balancing: Greedy Scheduling

Cloud Computing is NP-Complete

On the Unique Games Conjecture

1 Definition of a Turing machine

Fixed-Point Logics and Computation

How To Understand The Theory Of Computer Science

5.1 Bipartite Matching

CAD Algorithms. P and NP

A first step towards modeling semistructured data in hybrid multimodal logic

Problem Set 7 Solutions

Policy Analysis for Administrative Role Based Access Control

Path Querying on Graph Databases

Borne inférieure de circuit : une application des expanders

Universality in the theory of algorithms and computer science

Outline Introduction Circuits PRGs Uniform Derandomization Refs. Derandomization. A Basic Introduction. Antonis Antonopoulos.

Tetris is Hard: An Introduction to P vs NP

Fairness in Routing and Load Balancing

The Complexity of DC-Switching Problems

Formal Languages and Automata Theory - Regular Expressions and Finite Automata -

6.080 / Great Ideas in Theoretical Computer Science Spring 2008

SPARQL: Un Lenguaje de Consulta para la Web

3. Mathematical Induction

Generating models of a matched formula with a polynomial delay

Transcription:

Principles of AI Planning December 15th, 2006 Computational complexity Motivation NP-hardness of deterministic planning Turing Machines Alternating Turing Machines (Non-) Deterministic Turing Machines Computations Acceptance Complexity Measures Relationships The Planning Problem Propositional Planning Polynomial Plan Size First-Order Tasks EX Bounded Plan Existence? Undecidability of PlanningMotivation with Function Terms M. Helmert, B. Nebel (Universität Freiburg) AI Planning December 15th, 2006 1 / 47 Motivation Logistics Logistics: PLANEX Logistics: PLANLEN Computational Complexity We have seen that planning in transition systems can be done in time Other polynomial Domains in the size of the transition system This appears not to be true for planning in succinct transition systems (= planning tasks) 1. What is the precise computational complexity of the planning problem? 2. How does the computational complexity vary with the expressiveness of the planning language? 3. What is the computational complexity of planning in a particular domain (e.g. blocks world)? Principles of AI Planning Computational complexity Malte Helmert Bernhard Nebel Albert-Ludwigs-Universität Freiburg December 15th, 2006 M. Helmert, B. Nebel (Universität Freiburg) AI Planning December 15th, 2006 2 / 47 Motivation Why Computational Complexity? understand the problem know what is not possible find interesting subproblems that are easier to solve distinguish essential features from syntactic sugar M. Helmert, B. Nebel (Universität Freiburg) AI Planning December 15th, 2006 3 / 47 M. Helmert, B. Nebel (Universität Freiburg) AI Planning December 15th, 2006 4 / 47

NP-hardness Deterministic planning: NP-hardness NP-hardness Deterministic planning: NP-hardness Definition The decision problem SAT: test whether a given propositional formula φ is satisfiable. Reduction from SAT to deterministic planning A = the set of propositional variables occurring in φ I = any state, e.g. all state variables have value 0 O = ({ } A) ({, a a A}) There is a plan for A, I, O, φ if and only if φ is satisfiable. Because there is a polynomial-time translation from SAT into deterministic planning, and SAT is an NP-complete problem, there is a polynomial time translation from every decision problem in NP into deterministic planning. Hence the problem is NP-hard. 1. Does NP-hardness depend on having Boolean formulae as preconditions? 2. Does deterministic planning have the power of NP, or is it still more powerful? 3. We show that it is more powerful: The decision problem of testing whether a plan exists is -complete. M. Helmert, B. Nebel (Universität Freiburg) AI Planning December 15th, 2006 5 / 47 M. Helmert, B. Nebel (Universität Freiburg) AI Planning December 15th, 2006 6 / 47 Turing Machines Alternating Turing Machines ATMs Turing Machines (N)TMs (Non-) Deterministic Turing Machines Definition: Alternating Turing Machine Alternating Turing Machine (ATM) Σ,, Q, q 0, l, δ : 1. input alphabet Σ and blank symbol / Σ alphabets always non-empty and finite tape alphabet Σ = Σ { } 2. finite set Q of internal states with initial state q 0 Q 3. state labeling l : Q {Y, N,, } accepting, rejecting, existential, universal states Q Y, Q N, Q, Q terminal states Q = Q Y Q N nonterminal states Q = Q Q 4. transition relation δ (Q Σ ) (Q Σ { 1, +1}) Definition: Non-deterministic Turing Machine A non-deterministic Turing Machine (NTM) is an ATM where all nonterminal states are existential. no universal states Definition: Deterministic Turing Machine A deterministic Turing Machine (DTM) is an NTM where the transition relation is functional. for all (q, a) Q Σ, there is exactly one triple (q, a, ) with ((q, a), (q, a, )) δ notation: δ(q, a) = (q, a, ) M. Helmert, B. Nebel (Universität Freiburg) AI Planning December 15th, 2006 7 / 47 M. Helmert, B. Nebel (Universität Freiburg) AI Planning December 15th, 2006 8 / 47

Turing Machines Computations Turing Machines Computations Turing Machine Configurations Turing Machine Transitions Let M = Σ,, Q, q 0, l, δ be an ATM. Let M = Σ,, Q, q 0, l, δ be an ATM. Definition: Configuration A configuration of M is a triple (w, q, x) Σ Q Σ+. w: tape contents before tape head q: current state x: tape contents after and including tape head Definition: Yields relation A configuration c of M yields a configuration c of M, in symbols c c, as defined by the following rules, where a, a, b Σ, w, x Σ, q, q Q and ((q, a), (q, a, )) δ: (w, q, ax) (wa, q, x) if = +1, x 1 (w, q, a) (wa, q, ) if = +1 (wb, q, ax) (w, q, ba x) (ɛ, q, ax) (ɛ, q, a x) if = 1 if = 1 M. Helmert, B. Nebel (Universität Freiburg) AI Planning December 15th, 2006 9 / 47 M. Helmert, B. Nebel (Universität Freiburg) AI Planning December 15th, 2006 10 / 47 Turing Machines Acceptance Turing Machines Acceptance Acceptance (Time) Acceptance (Space) Let M = Σ,, Q, q 0, l, δ be an ATM. Definition: Acceptance (time) Let c = (w, q, x) be a configuration of M. M accepts c = (w, q, x) with q Q Y in time n for all n N 0. M accepts c = (w, q, x) with q Q in time n iff M accepts some c with c c in time n 1. M accepts c = (w, q, x) with q Q in time n iff M accepts all c with c c in time n 1. Let M = Σ,, Q, q 0, l, δ be an ATM. Definition: Acceptance (space) Let c = (w, q, x) be a configuration of M. M accepts c = (w, q, x) with q Q Y in space n iff w + x n. M accepts c = (w, q, x) with q Q in space n iff M accepts some c with c c in space n. M accepts c = (w, q, x) with q Q in space n iff M accepts all c with c c in space n. M. Helmert, B. Nebel (Universität Freiburg) AI Planning December 15th, 2006 11 / 47 M. Helmert, B. Nebel (Universität Freiburg) AI Planning December 15th, 2006 12 / 47

Turing Machines Acceptance Complexity Measures Accepting Words and Languages Time Complexity Let M = Σ,, Q, q 0, l, δ be an ATM. Definition: Accepting words M accepts the word w Σ in time (space) n N 0 iff M accepts (ɛ, q 0, w) in time (space) n. Special case: M accepts ɛ in time (space) n N 0 iff M accepts (ɛ, q 0, ) in time (space) n. Definition: Accepting languages Let f : N 0 N 0. M accepts the language L Σ in time (space) f iff M accepts each word w L in time (space) f ( w ), and M does not accept any word w / L. Definition: DTIME, NTIME, ATIME Let f : N 0 N 0. Complexity class DTIME(f ) contains all languages accepted in time f by some DTM. Complexity class NTIME(f ) contains all languages accepted in time f by some NTM. Complexity class ATIME(f ) contains all languages accepted in time f by some ATM. M. Helmert, B. Nebel (Universität Freiburg) AI Planning December 15th, 2006 13 / 47 M. Helmert, B. Nebel (Universität Freiburg) AI Planning December 15th, 2006 14 / 47 Complexity Measures Space Complexity Polynomial Definition: DSPACE, NSPACE, ASPACE Let f : N 0 N 0. Complexity class DSPACE(f ) contains all languages accepted in space f by some DTM. Complexity class NSPACE(f ) contains all languages accepted in space f by some NTM. Complexity class ASPACE(f ) contains all languages accepted in space f by some ATM. Let P be the set of polynomials p : N 0 N 0. Definition: P, NP,... P = p P DTIME(p) NP = p P NTIME(p) AP = p P ATIME(p) = p P DSPACE(p) N = p P NSPACE(p) A = p P ASPACE(p) M. Helmert, B. Nebel (Universität Freiburg) AI Planning December 15th, 2006 15 / 47 M. Helmert, B. Nebel (Universität Freiburg) AI Planning December 15th, 2006 16 / 47

Exponential Doubly Exponential Let P be the set of polynomials p : N 0 N 0. Definition: EXP, NEXP,... EXP = p P DTIME(2p ) NEXP = p P NTIME(2p ) AEXP = p P ATIME(2p ) EX = p P DSPACE(2p ) NEX = p P NSPACE(2p ) AEX = p P ASPACE(2p ) Let P be the set of polynomials p : N 0 N 0. Definition: 2-EXP,... 2-EXP = p P DTIME(22p )... M. Helmert, B. Nebel (Universität Freiburg) AI Planning December 15th, 2006 17 / 47 M. Helmert, B. Nebel (Universität Freiburg) AI Planning December 15th, 2006 18 / 47 Relationships Relationships Standard Relationships The Power of Nondeterministic Space Theorem P NP AP N A EXP NEXP AEXP EX NEX AEX 2-EXP... Theorem (Savitch 1970) NSPACE(f ) DSPACE(f 2 ), and thus: = N EX = NEX M. Helmert, B. Nebel (Universität Freiburg) AI Planning December 15th, 2006 19 / 47 M. Helmert, B. Nebel (Universität Freiburg) AI Planning December 15th, 2006 20 / 47

The Power of Alternation Relationships Relationships The Hierarchy of complexity classes 2-EX= 2-NEX Theorem (Chandra et al. 1981) AP = A = EXP AEXP = EX AEX = 2-EXP 2-NEXP 2-EXP= AEX EX= NEX= AEXP NEXP EXP= A = N = AP NP P M. Helmert, B. Nebel (Universität Freiburg) AI Planning December 15th, 2006 21 / 47 M. Helmert, B. Nebel (Universität Freiburg) AI Planning December 15th, 2006 22 / 47 The Planning Problem The Planning Problem Propositional Planning Plan Existence vs. Bounded Plan Existence PlanEx (Plan Existence) Given: Planning task A, I, O, G Question: Is there a plan for A, I, O, G? PlanLen (Bounded Plan Existence) Given: Planning task A, I, O, G, bound K N 0 Question: Is there a plan for A, I, O, G of length at most K? PlanEx p PlanLen A planning task with n state variables has a plan iff it has a plan of length at most 2 n 1. polynomial reduction M. Helmert, B. Nebel (Universität Freiburg) AI Planning December 15th, 2006 23 / 47 M. Helmert, B. Nebel (Universität Freiburg) AI Planning December 15th, 2006 24 / 47

Membership in Hardness for PlanLen Show PlanLen N and use Savitch s theorem. Nondeterministic algorithm: def plan( A, I, O, G, K): s := I k := K repeat until s = G: guess o O reject if o not applicable in s set s := app o (s) reject if k = 0 set k := k 1 accept Idea: generic reduction For a fixed polynomial p, given DTM M and input w, generate planning task which is solvable iff M accepts w in space p( w ) For simplicity, restrict to TMs which never move to the left of the initial head position (no loss of generality) M. Helmert, B. Nebel (Universität Freiburg) AI Planning December 15th, 2006 25 / 47 M. Helmert, B. Nebel (Universität Freiburg) AI Planning December 15th, 2006 26 / 47 Reduction: State Variables Reduction: Initial State Let p be the space-bound polynomial. Given DTM Σ,, Q, q 0, l, δ and input w 1... w n, define relevant tape positions X = {1,..., p(n)}. State variables state q for all q Q head i for all i X {0, p(n) + 1} content i,a for all i X, a Σ Let p be the space bound polynomial. Given DTM Σ,, Q, q 0, l, δ and input w 1... w n, define relevant tape positions X = {1,..., p(n)}. Initial state Initially true: state q0 head 1 content i,wi for all i {1,..., n} content i, for all i X \ {1,..., n} Initially false: all others M. Helmert, B. Nebel (Universität Freiburg) AI Planning December 15th, 2006 27 / 47 M. Helmert, B. Nebel (Universität Freiburg) AI Planning December 15th, 2006 28 / 47

Reduction: Operators Reduction: Goal Let p be the space bound polynomial. Given DTM Σ,, Q, q 0, l, δ and input w 1... w n, define relevant tape positions X = {1,..., p(n)}. Operators One operator for each transition rule δ(q, a) = (q, a, ) and each cell position i X : precondition: state q head i content i,a Let p be the space bound polynomial. Given DTM Σ,, Q, q 0, l, δ and input w 1... w n, define relevant tape positions X = {1,..., p(n)}. Goal q Q Y state q effect: state q head i content i,a state q head i+ content i,a M. Helmert, B. Nebel (Universität Freiburg) AI Planning December 15th, 2006 29 / 47 M. Helmert, B. Nebel (Universität Freiburg) AI Planning December 15th, 2006 30 / 47 -completeness for STRIPS Polynomial plan size Polynomial Plan Size Theorem (-completeness (Bylander)) PlanEx and PlanLen are -complete even if the planning task is given in STRIPS form (preconditions and goals are conjunctions of literals and no conditional effects). Proof. Hardness and membership for the general formalism follows from the above. Hardness holds for STRIPS as well because of the style of the reduction: only simple preconditions and no conditional effects. The only problem is the disjunction in the goal formula. This can be eliminated by transforming the TM beforehand, though. The result depends on the fact that plans can become exponentially long. What if restrict them to be only of polynomial length? Theorem (NP-completeness for polynomial plan size) PlanEx and PlanLen are NP-complete even if the planning task is given in STRIPS form provided only plans of length polynomial in the size of the planning task are permitted. Membership follows easily by using a guess-and-check algorithm. Hardness needs a bit more... Note: Answers earlier questions whether we need the Boolean precondition formula for NP-hardness M. Helmert, B. Nebel (Universität Freiburg) AI Planning December 15th, 2006 31 / 47 M. Helmert, B. Nebel (Universität Freiburg) AI Planning December 15th, 2006 32 / 47

First-Order Tasks EX First-Order Tasks Membership in EX we considered propositional state variables (0-ary predicates) and grounded operators (0-ary schematic operators) reasonable: most planning algorithms work on grounded representations predicate arity is typically small (a constant?) How do the complexity results change if we introduce first-order predicates and schematic operators? PlanEx, PlanLen EX input size n at most 2 n grounded state variables at most 2 n grounded operators can ground the task in exponential time, then use the earlier algorithms M. Helmert, B. Nebel (Universität Freiburg) AI Planning December 15th, 2006 33 / 47 M. Helmert, B. Nebel (Universität Freiburg) AI Planning December 15th, 2006 34 / 47 EX EX Hardness for EX Reduction: Example Operator Idea: Adapt the earlier reduction from PlanEx to encode Turing Machine contents more succinctly. Assume relevant tape positions are now X = {1,..., 2 n }. We need to encode the computation as a planning task in polynomial time! Objects 0, 1 Predicates state q () for all q Q head(?b 1,...,?b n ) content a (?b 1,...,?b n ) for all a Σ Operator example Schematic operator for transition rule δ(q, a) = (q, a, +1) parameters:?b 1,...,?b n precondition: state q head(?b 1,...,?b n ) content a (?b 1,...,?b n ) effect: state q head(?b 1,...,?b n ) content a (?b 1,...,?b n ) state q advance-head content a (?b 1,...,?b n ) M. Helmert, B. Nebel (Universität Freiburg) AI Planning December 15th, 2006 35 / 47 M. Helmert, B. Nebel (Universität Freiburg) AI Planning December 15th, 2006 36 / 47

EX Bounded Plan Existence? Reduction: Example Operator (continued) Operator example (ctd.) Plan Existence vs. Bounded Plan Existence advance-head = ((?b n = 0) head(?b 1,...,?b n 1, 1)) ((?b n 1 = 0?b n = 1) head(?b 1,...,?b n 2, 1, 0)) ((?b n 2 = 0?b n 1 = 1?b n = 1) head(?b 1,...,?b n 3, 1, 0, 0))... ((?b 1 = 0?b 2 = 1?b n = 1) head(1, 0,..., 0)) Our earlier reduction from PlanEx to PlanLen no longer works: the shortest plan can have length doubly exponentially in the input size, so that the bound cannot be written down in polynomial time. Indeed, PlanLen is actually easier than PlanEx for this planning formalism (NEXP-complete). M. Helmert, B. Nebel (Universität Freiburg) AI Planning December 15th, 2006 37 / 47 M. Helmert, B. Nebel (Universität Freiburg) AI Planning December 15th, 2006 38 / 47 Undecidability Planning with function terms If we allow in addition function terms with arity > 0, then planning becomes undecidable. The state space is infinite: s(0), s(s(0)), s(s(s(0))),... We can use function terms to describe (the index of) tape cells of a Turing machine. We can use operators to describe the Turing machine control. The existence of a plan is then equivalent to the existence of a successful computation on the Turing machine. PlanEx for planning tasks with function terms can be used to decide the Halting problem. Planning (and its complexity) for particular domains is interesting, since we want to judge planning benchmarks... and perhaps want to go for domain-dependent planning. Consider fixed domains and determine complexity. Theorem PlanEx for planning tasks with function terms is undecidable. M. Helmert, B. Nebel (Universität Freiburg) AI Planning December 15th, 2006 39 / 47 M. Helmert, B. Nebel (Universität Freiburg) AI Planning December 15th, 2006 40 / 47

Logistics Logistics: PLANEX A Concrete Domain: Logistics Plan Existence for Logistics There are several cities, each containing several locations, some of which are airports. There are also trucks, which drive within a single city, and airplanes, which can fly between airports. The goal is to get some packages from various locations to various new locations [McDermott, 1998]. Theorem PLANEX for Logistics can be decided in polynomial time. Proof. Consider the subgraphs formed by the connected airport networks (for planes) and city networks (for trucks). If at least one vehicle (truck or plane) is in one of the subgraphs, all nodes in the subgraph are internally reachable, otherwise only the externally connected nodes can be reached. Check for each package delivery, whether there are connected subgraphs such that the package can pass through the subgraphs to the target node. This is a simple reachability test, which can be done in poly. time. M. Helmert, B. Nebel (Universität Freiburg) AI Planning December 15th, 2006 41 / 47 M. Helmert, B. Nebel (Universität Freiburg) AI Planning December 15th, 2006 42 / 47 Logistics: PLANLEN Logistics: PLANLEN Optimizing Delivery: Shortest Plans for Logistics Definition (Feedback Vertex Set) Given: a directed graph G = (V, A) and a natural number k Question: Does there exists a subset V V with V k such that removing V results in an acyclic graph? This problem is NP-complete and can be used to prove the following result: Theorem PLANLEN for Logistics is NP-complete, even if there is only one complete city graph and one truck in this graph. PLANLEN for Logistics: NP-hardness contd. (1) Proof. (continued) Let G = (V, A) be a directed graph and k a natural number. Then G contains a FVS of size k iff the logistics problem constructed below has a plan of length at most 3 V + 2 A + k. Construct a Logistics task with just one truck and one city network which is a complete graph containing V and an extra node v 0, where the truck starts. The truck has to deliver one package from v 0 to each other location and one package from u to v for each (u, v) A. Proof. Membership follows because there is an obvious polynomial upper bound of moves for all solvable instances. Hardness is shown using a reduction from FVS. M. Helmert, B. Nebel (Universität Freiburg) AI Planning December 15th, 2006 43 / 47 M. Helmert, B. Nebel (Universität Freiburg) AI Planning December 15th, 2006 44 / 47

Logistics: PLANLEN Other Domains PLANLEN for Logistics: NP-hardness contd. (2) Other Domains Proof. (continued). Let V V the feedback vertex set. Solve task by moving to V in any order, then to all V V using a topological ordering on these nodes, and finally to V again. Requires A + V load and unload actions each, and V + V V + V movements, i.e., 3 V + 2 A + k actions if V = k. Conversely, at least 3 V + 2 A actions are needed. If a plan contains not more than 3 V + 2 A + k, then no more than k nodes are visited twice. These nodes form a FVS of size k. Note: It is not route planning that makes the task difficult, but the interaction of sub-goals! Generalizations of all the domains that have been used at the international planning competition have been analyzed. Many show a similar behavior as Logistics: PLANEX is in P, PLANLEN is NP-complete, e.g., Blocks world. Some are already NP-complete for PLANEX, e.g. Freecell. A few are even -complete for PLANEX, e.g. Airport. M. Helmert, B. Nebel (Universität Freiburg) AI Planning December 15th, 2006 45 / 47 M. Helmert, B. Nebel (Universität Freiburg) AI Planning December 15th, 2006 46 / 47 Other Domains Summary Planning using general first-order terms is undecidable. Planning using a function free language is EX-complete. Planning with a propositional language (no schema variables) is -complete. If we consider only short plans, the complexity comes down to NP-completeness. Domain-dependent planning can be easier. For Logistics, the existence problem is in P, while the optimization problem is NP-complete, which holds for many other domains as well. M. Helmert, B. Nebel (Universität Freiburg) AI Planning December 15th, 2006 47 / 47