Design and Analysis of Algorithms - - PowerPoint PPT Presentation

design and analysis of algorithms
SMART_READER_LITE
LIVE PREVIEW

Design and Analysis of Algorithms - - PowerPoint PPT Presentation

Design and Analysis of Algorithms


slide-1
SLIDE 1

Design and Analysis of Algorithms

. . ก ก ก 2542

http://www.cp.eng.chula.ac.th/faculty/spj

ก ก กกก

Undecidable Problems

Introduction

http://www.cp.eng.chula.ac.th/faculty/spj

Outline

Noncomputability / Undecidability Tiling Problem Word Correspondence Problem Halting Problem

Proving Undecidability

slide-2
SLIDE 2

http://www.cp.eng.chula.ac.th/faculty/spj

Algorithmic Problems

Tractable problems

admitting efficient algorithms

Intractable problems

admitting no efficient algorithms

Undecidable problems

admitting no algorithms ! ! !

http://www.cp.eng.chula.ac.th/faculty/spj

Tiling Problem

Fixed orientation A finite set of T of tile descriptions Can any finite area of any size be beatifully covered using only tiles in T ?

  • http://www.cp.eng.chula.ac.th/faculty/spj

Tiling Problem

Fixed orientation A finite set of T of tile descriptions Can any finite area of any size be beatifully covered using only tiles in T ?

  • http://www.cp.eng.chula.ac.th/faculty/spj

Tiling Problem

Fixed orientation A finite set of T of tile descriptions Can any finite area of any size be beatifully covered using only tiles in T ?

slide-3
SLIDE 3

http://www.cp.eng.chula.ac.th/faculty/spj

Tiling Problem

Fixed orientation A finite set of T of tile descriptions Can any finite area of any size be beatifully covered using only tiles in T ?

  • http://www.cp.eng.chula.ac.th/faculty/spj

Tiling Problem

Tiling problem is undecidable There is no algorithm (and never will be) for solving the tiling problem ! If one claims A can solve the problem, there will be input sets T upon which A runs forever or terminates with wrong answer

http://www.cp.eng.chula.ac.th/faculty/spj

Word Correspondence

abb a bab baba aba bbab aa ab a

Two groups of words over some finite alphabets

http://www.cp.eng.chula.ac.th/faculty/spj

Word Correspondence

abb a bab baba aba bbab aa ab a

aabbabbbabaabbaba

slide-4
SLIDE 4

http://www.cp.eng.chula.ac.th/faculty/spj

Word Correspondence

abb a bab baba aba bbab aa ab a

aabbabbbabaabbaba

  • http://www.cp.eng.chula.ac.th/faculty/spj

Unboundedness

undecidable กก ก exponential intractable problem

Hamiltonian path & Euler path NP-Complete P

http://www.cp.eng.chula.ac.th/faculty/spj

S T

Domino Snake

A finite set of T of tile descriptions

http://www.cp.eng.chula.ac.th/faculty/spj

Domino Snake

A finite set of T of tile descriptions

Undecidable Decidable

slide-5
SLIDE 5

http://www.cp.eng.chula.ac.th/faculty/spj

Halting Problem

for i=1 to n for j=1 to n for k=1 to j sum += 1

n = 10000000000000000 ก loop ?

http://www.cp.eng.chula.ac.th/faculty/spj

Halting Problem

while x 1 do if x is even then x = x/2 else x = 3x+1

x = 7 ก loop ? 7, 22, 11, 34, 17, 52, 26, 13, 40, 20, 10, 5, ...

http://www.cp.eng.chula.ac.th/faculty/spj

Proving Undecidablity

Q : Does P halt on X ? YES NO P(X) P(X) P program X input

http://www.cp.eng.chula.ac.th/faculty/spj

Proving Undecidablity

Q

  • P

X

Y N

W W W

S

S( W ) if Q(W,W) = ‘y’ loop forever else return

W(W) S( W ) loop W(W) loop S ( W )

slide-6
SLIDE 6

http://www.cp.eng.chula.ac.th/faculty/spj

Q P X

Y N

W W W

S

Proving Undecidablity

ก S( S ) loop ? S S S

  • S( S )

Q

  • loop

http://www.cp.eng.chula.ac.th/faculty/spj

Q P X

Y N

W W W

S

Proving Undecidablity

ก S( S ) loop ? S S S

  • S( S ) loop

Q

  • http://www.cp.eng.chula.ac.th/faculty/spj

Q P X

Y N

W W W

S

Proving Undecidablity

Halting problem is undecidable

http://www.cp.eng.chula.ac.th/faculty/spj

Diagonalization Method

6 N Y N Y Y Y ... 5 Y N Y Y Y N ... 4 Y Y Y Y N N ... 3 N N N N N N ... 2 Y Y Y Y N N ... 1 Y Y N N Y N ... 1 2 3 4 5 6 ...

all programs all inputs

N N Y N N N ...

program S

S

slide-7
SLIDE 7

http://www.cp.eng.chula.ac.th/faculty/spj

Computability

Tractable Intractable Undecidable

  • in principle

in practice