B5.1 Motivation in the size of the transition system (i.e., the - - PowerPoint PPT Presentation

b5 1 motivation
SMART_READER_LITE
LIVE PREVIEW

B5.1 Motivation in the size of the transition system (i.e., the - - PowerPoint PPT Presentation

Planning and Optimization October 20, 2016 B5. Computational Complexity of Planning: Background Planning and Optimization B5.1 Motivation B5. Computational Complexity of Planning: Background B5.2 Background: Turing Machines Malte Helmert


slide-1
SLIDE 1

Planning and Optimization

  • B5. Computational Complexity of Planning: Background

Malte Helmert and Gabriele R¨

  • ger

Universit¨ at Basel

October 20, 2016

  • M. Helmert, G. R¨
  • ger (Universit¨

at Basel) Planning and Optimization October 20, 2016 1 / 19

Planning and Optimization

October 20, 2016 — B5. Computational Complexity of Planning: Background

B5.1 Motivation B5.2 Background: Turing Machines B5.3 Background: Complexity Classes B5.4 Summary

  • M. Helmert, G. R¨
  • ger (Universit¨

at Basel) Planning and Optimization October 20, 2016 2 / 19

  • B5. Computational Complexity of Planning: Background

Motivation

B5.1 Motivation

  • M. Helmert, G. R¨
  • ger (Universit¨

at Basel) Planning and Optimization October 20, 2016 3 / 19

  • B5. Computational Complexity of Planning: Background

Motivation

How Difficult is Planning?

◮ Using progression and a state-space search algorithm like

breadth-first search, planning can be solved in polynomial time in the size of the transition system (i.e., the number of states).

◮ However, the number of states is exponential in the number

  • f state variables, and hence in general exponential

in the size of the input to the planning algorithm. Do non-exponential planning algorithms exist? What is the precise computational complexity of planning?

  • M. Helmert, G. R¨
  • ger (Universit¨

at Basel) Planning and Optimization October 20, 2016 4 / 19

slide-2
SLIDE 2
  • B5. Computational Complexity of Planning: Background

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

◮ Is STRIPS planning easier than general planning? ◮ Is planning for FDR tasks harder than for propositional tasks?

  • M. Helmert, G. R¨
  • ger (Universit¨

at Basel) Planning and Optimization October 20, 2016 5 / 19

  • B5. Computational Complexity of Planning: Background

Background: Turing Machines

B5.2 Background: Turing Machines

  • M. Helmert, G. R¨
  • ger (Universit¨

at Basel) Planning and Optimization October 20, 2016 6 / 19

  • B5. Computational Complexity of Planning: Background

Background: Turing Machines

Reminder: Complexity Theory

Need to Catch Up?

◮ This and the following section are mostly reminders. ◮ We assume knowledge of complexity theory:

◮ languages and decision problems ◮ Turing machines: NTMs and DTMs;

polynomial equivalence with other models of computation

◮ complexity classes: P and NP ◮ polynomial reductions

◮ If you are not familiar with these topics, we recommend

Parts C and E of the Theorie der Informatik course at http://informatik.unibas.ch/fs2016/ theorie-der-informatik/.

◮ The slides are in English, even though the course is not.

Note: the space complexity classes (DSPACE, NSPACE, PSPACE, NPSPACE) go beyond the content of the prerequisite course.

  • M. Helmert, G. R¨
  • ger (Universit¨

at Basel) Planning and Optimization October 20, 2016 7 / 19

  • B5. Computational Complexity of Planning: Background

Background: Turing Machines

Nondeterministic Turing Machines

Definition (Nondeterministic Turing Machine) A nondeterministic Turing machine (NTM) is a 6-tuple Σ, , Q, q0, qY, δ with the following components:

◮ input alphabet Σ and blank symbol /

∈ Σ

◮ alphabets always nonempty and finite ◮ tape alphabet Σ = Σ ∪ {}

◮ finite set Q of internal states with initial state q0 ∈ Q

and accepting state qY ∈ Q

◮ nonterminal states Q′ := Q \ {qY}

◮ transition relation δ ⊆ (Q′ × Σ) × (Q × Σ × {−1, +1})

  • M. Helmert, G. R¨
  • ger (Universit¨

at Basel) Planning and Optimization October 20, 2016 8 / 19

slide-3
SLIDE 3
  • B5. Computational Complexity of Planning: Background

Background: Turing Machines

Deterministic Turing Machines

Definition (Deterministic Turing Machine) A deterministic Turing machine (DTM) is an NTM where the transition relation is functional, i.e., for all q, a ∈ Q′ × Σ, there is exactly one triple q′, a′, ∆ with q, a, q′, a′, ∆ ∈ δ. Notation: We write δ(q, a) for the unique triple q′, a′, ∆ such that q, a, q′, a′, ∆ ∈ δ.

  • M. Helmert, G. R¨
  • ger (Universit¨

at Basel) Planning and Optimization October 20, 2016 9 / 19

  • B5. Computational Complexity of Planning: Background

Background: Turing Machines

Turing Machine Configurations

Definition (Configuration) Let M = Σ, , Q, q0, qY, δ be an NTM. A configuration of M is a triple w, q, x ∈ Σ∗

× Q × Σ+ . ◮ w: tape contents to the left of tape head ◮ q: current state ◮ x: tape contents at tape head and to its right

  • M. Helmert, G. R¨
  • ger (Universit¨

at Basel) Planning and Optimization October 20, 2016 10 / 19

  • B5. Computational Complexity of Planning: Background

Background: Turing Machines

Turing Machine Transitions

Definition (Yields) Let M = Σ, , Q, q0, qY, δ be an NTM. 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 if ∆ = −1 ε, q, ax ⊢ ε, q′, a′x if ∆ = −1

  • M. Helmert, G. R¨
  • ger (Universit¨

at Basel) Planning and Optimization October 20, 2016 11 / 19

  • B5. Computational Complexity of Planning: Background

Background: Turing Machines

Accepting Configurations

Definition (Accepting Configuration: Time) Let M = Σ, , Q, q0, qY, δ be an NTM, let c = w, q, x be a configuration of M, and let n ∈ N0.

◮ If q = qY, M accepts c in time n. ◮ If q = qY and M accepts some c′ with c ⊢ c′ in time n,

then M accepts c in time n + 1. Definition (Accepting Configuration: Space) Let M = Σ, , Q, q0, qY, δ be an NTM, let c = w, q, x be a configuration of M, and let n ∈ N0.

◮ If q = qY and |w| + |x| ≤ n, M accepts c in space n. ◮ If q = qY and M accepts some c′ with c ⊢ c′ in space n,

then M accepts c in space n. Note: “in time/space n” means at most n, not exactly n

  • M. Helmert, G. R¨
  • ger (Universit¨

at Basel) Planning and Optimization October 20, 2016 12 / 19

slide-4
SLIDE 4
  • B5. Computational Complexity of Planning: Background

Background: Turing Machines

Accepting Words and Languages

Definition (Accepting Words) Let M = Σ, , Q, q0, qY, δ be an NTM. M accepts the word w ∈ Σ∗ in time (space) n ∈ N0 iff M accepts ε, q0, w in time (space) n.

◮ Special case: M accepts ε in time (space) n ∈ N0

iff M accepts ε, q0, in time (space) n. Definition (Accepting Languages) Let M = Σ, , Q, q0, qY, δ be an NTM, and let f : N0 → N0. 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 (in any time/space).

  • M. Helmert, G. R¨
  • ger (Universit¨

at Basel) Planning and Optimization October 20, 2016 13 / 19

  • B5. Computational Complexity of Planning: Background

Background: Complexity Classes

B5.3 Background: Complexity Classes

  • M. Helmert, G. R¨
  • ger (Universit¨

at Basel) Planning and Optimization October 20, 2016 14 / 19

  • B5. Computational Complexity of Planning: Background

Background: Complexity Classes

Time and Space Complexity Classes

Definition (DTIME, NTIME, DSPACE, NSPACE) Let f : N0 → N0. 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 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.

  • M. Helmert, G. R¨
  • ger (Universit¨

at Basel) Planning and Optimization October 20, 2016 15 / 19

  • B5. Computational Complexity of Planning: Background

Background: Complexity Classes

Polynomial Time and Space Classes

Let P be the set of polynomials p : N0 → N0 whose coefficients are natural numbers. Definition (P, NP, PSPACE, NPSPACE) P =

p∈P DTIME(p)

NP =

p∈P NTIME(p)

PSPACE =

p∈P DSPACE(p)

NPSPACE =

p∈P NSPACE(p)

  • M. Helmert, G. R¨
  • ger (Universit¨

at Basel) Planning and Optimization October 20, 2016 16 / 19

slide-5
SLIDE 5
  • B5. Computational Complexity of Planning: Background

Background: Complexity Classes

Polynomial Complexity Class Relationships

Theorem (Complexity Class Hierarchy) P ⊆ NP ⊆ PSPACE = NPSPACE Proof. P ⊆ NP and PSPACE ⊆ NPSPACE are obvious because deterministic Turing machines are a special case of nondeterministic ones. NP ⊆ NPSPACE holds because a Turing machine can only visit polynomially many tape cells within polynomial time. PSPACE = NPSPACE is a special case of a classical result known as Savitch’s theorem (Savitch 1970).

  • M. Helmert, G. R¨
  • ger (Universit¨

at Basel) Planning and Optimization October 20, 2016 17 / 19

  • B5. Computational Complexity of Planning: Background

Summary

B5.4 Summary

  • M. Helmert, G. R¨
  • ger (Universit¨

at Basel) Planning and Optimization October 20, 2016 18 / 19

  • B5. Computational Complexity of Planning: Background

Summary

Summary

◮ We recalled the definitions of the most important

complexity classes from complexity theory:

◮ P: decision problems solvable in polynomial time ◮ NP: decision problems solvable in polynomial time

by non-deterministic algorithms

◮ PSPACE: decision problems solvable in polynomial space ◮ NPSPACE: decision problems solvable in polynomial space

by non-deterministic algorithms

◮ These classes are related by P ⊆ NP ⊆ PSPACE = NPSPACE.

  • M. Helmert, G. R¨
  • ger (Universit¨

at Basel) Planning and Optimization October 20, 2016 19 / 19