design and analysis of algorithms
play

Design and Analysis of Algorithms - PowerPoint PPT Presentation

Design and Analysis of Algorithms


  1. �������� Design and Analysis of Algorithms ����������������������� ������ �����ก��� ������ ������������ ���������������������� ��. ��. ����� ��������������ก�� ��������������������������������������������������ก�� �����������ก�������������� ����� ������ก�� ��������������� ������ก�������������� �������������กก���������ก���������� 2542 http://www.cp.eng.chula.ac.th/faculty/spj Outline Undecidable Problems � Noncomputability / Undecidability � Tiling Problem � Word Correspondence Problem Introduction � Halting Problem � Proving Undecidability http://www.cp.eng.chula.ac.th/faculty/spj

  2. Algorithmic Problems Tiling Problem A finite set of T of tile descriptions � Tractable problems � admitting efficient algorithms Fixed orientation � Intractable problems Can any finite area of � admitting no efficient algorithms any size be �beatifully� � � Undecidable problems covered using only tiles � admitting no algorithms ! ! ! in T ? http://www.cp.eng.chula.ac.th/faculty/spj http://www.cp.eng.chula.ac.th/faculty/spj Tiling Problem Tiling Problem A finite set of T of tile descriptions A finite set of T of tile descriptions Fixed orientation Fixed orientation Can any finite area of Can any finite area of any size be �beatifully� any size be �beatifully� � � covered using only tiles covered using only tiles in T ? in T ? http://www.cp.eng.chula.ac.th/faculty/spj http://www.cp.eng.chula.ac.th/faculty/spj

  3. Tiling Problem Tiling Problem A finite set of T of tile descriptions � Tiling problem is undecidable � There is no algorithm (and never will be) for Fixed orientation solving the tiling problem ! Can any finite area of � If one claims A can solve the problem, any size be �beatifully� there will be input sets T upon which � covered using only tiles A runs forever or terminates with wrong answer in T ? http://www.cp.eng.chula.ac.th/faculty/spj http://www.cp.eng.chula.ac.th/faculty/spj Word Correspondence Word Correspondence abb bab abb bab a a baba baba aba aba Two groups of words over some finite alphabets aabbabbbabaabbaba bbab bbab ab ab aa a aa a http://www.cp.eng.chula.ac.th/faculty/spj http://www.cp.eng.chula.ac.th/faculty/spj

  4. Word Correspondence Unboundedness abb bab a � � ������� undecidable ���� ���������������� baba aba ก����������ก������������� � � � �������������������������ก������� � aabbabbbabaabbaba exponential �������� intractable problem� Hamiltonian path & Euler path bbab NP-Complete P ab aa a http://www.cp.eng.chula.ac.th/faculty/spj http://www.cp.eng.chula.ac.th/faculty/spj Domino Snake Domino Snake A finite set of T of tile descriptions A finite set of T of tile descriptions T Decidable Undecidable S http://www.cp.eng.chula.ac.th/faculty/spj http://www.cp.eng.chula.ac.th/faculty/spj

  5. Halting Problem Halting Problem for i=1 to n while x �� 1 do for j=1 to n if x is even for k=1 to j then x = x/2 sum += 1 else x = 3x+1 ��� n = 10000000000000000 ��� x = 7 ���ก���������� loop ������� ? ���ก���������� loop ������� ? 7, 22, 11, 34, 17, 52, 26, 13, 40, 20, 10, 5, ... http://www.cp.eng.chula.ac.th/faculty/spj http://www.cp.eng.chula.ac.th/faculty/spj Proving Undecidablity Proving Undecidablity W program input P X S( W ) if Q(W,W) = ‘y’ W P W X loop forever else Q : Does P halt on X ? return S Q P ( X ) � P ( X ) � � � ��� W ( W ) ���� S ( W ) ��� loop Y N ��� W ( W ) ��� loop S ( W ) ���� �YES� �NO� http://www.cp.eng.chula.ac.th/faculty/spj http://www.cp.eng.chula.ac.th/faculty/spj

  6. Proving Undecidablity Proving Undecidablity W S W S ���ก������ S ( S ) ���� ���ก������ S ( S ) ���� ������� loop ? ������� loop ? W P S W X S P S W X W S S S ��� ��� Q Q S ( S ) ���� S ( S ) ��� loop � � ��� loop Y N Y N Q ���� Q ���� ���� http://www.cp.eng.chula.ac.th/faculty/spj http://www.cp.eng.chula.ac.th/faculty/spj Proving Undecidablity Diagonalization Method W 6 N Y N Y Y Y ... 5 Y N Y Y Y N ... all 4 Y Y Y Y N N ... Halting problem programs W P W X 3 N N N N N N ... is undecidable S 2 Y Y Y Y N N ... Q S ������������� 1 Y Y N N Y N ... 1 2 3 4 5 6 ... all inputs Y N program S N N Y N N N ... http://www.cp.eng.chula.ac.th/faculty/spj http://www.cp.eng.chula.ac.th/faculty/spj

  7. Computability � Undecidable � � Intractable � � Tractable � in principle in practice http://www.cp.eng.chula.ac.th/faculty/spj

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend