Lecturer: ¦¿®¶·ç
Teaching Assistants (TAs): ·¨©y©÷ S®¶Û Áª÷¨k °ª°·»«
Time: ¶g¤T 14:00~16:50
Place: E6-A306 and E6-A303 (Audio and Slides)
TA Class: ¶g¤T
13:00~13:50 (E6-A306)
Scoring¡G
- ´Á¤¤¦Ò(¤ÀªR»P³]p·§©À)(20%)
- ´Á¥½¦Ò(¤ÀªR»P³]p·§©À)(25%)
- µ{¦¡³]p§@·~¡B³ø§i¡B½Òµ{°Ñ»P«×¤Îµ{¦¡³]pÄvÁɦ¨ÁZ(55%)
TextBook:
- My Book's Manuscript (book1-8.zip)
- R.C.T. Lee et. al., Introduction to the Design and Analysis of
Algorithms -- A
Strategic
Approach (2/e), McGraw Hill, 2005.
- Thomas Cormen, Charles
Leiserson, Ronald Rivest and Clifford
Stein, Introduction to
Algorithms
(3/e), MIT Press, 2009.
Reference Books:
- ªL¤j¶Q, TensorFlow + Keras ²`«×¾Ç²ß¤H¤u´¼¼z¹ê°ÈÀ³¥Î, ³ÕºÓ¤å¤Æ, 2017.
- »ôÃñd¼Ý, Deep Learning -- ¥ÎPython¶i¦æ²`«×¾Ç²ßªº°ò¦²z½×¹ê§@, O'REILLY, (§d¹ÅªÚ Ķ,
ùÖ®p¸ê°T¥Xª©), 2017.
- Algorithm Design: Foundations, Analysis, and Internet Examples,
Michael
T. Goodrich, Roberto Tamassia, Wiley, 2002. (¦³¤¤Ä¶¥»)
- Computer Algorithms, Ellis Horowitz et. al., Silicon Press, 2008.
- ¤¤
¤åJavaµ{¦¡³]p (²Ä¤Tª©) SIM-908A , ¦¿®¶·ç µÛ, ¾§ªL¥Xª©ªÀ, 2006.
- ª«
¥ó¾É¦V¸ê®Æµ²ºc ¡X ¨Ï¥ÎJava»y¨¥, ¦¿®¶·ç µÛ, ªQ±^¹Ï®Ñ¤½¥q, 2005.
- Algorithms, S. Dasgupta, C. Papadimitriou and U. Vazirani, McGraw
Hill,
2008.
- Programming Challenges, Steven S. Skiena and Miguel Revilla,
Elsevier,
2003.
- The Algorithm Design Manual, Steven S. Skiena, Elsevier.
Programming:
¦w¸Ë½Òµ{¬ÛÃö³nÅé¤Îì©lµ{¦¡½X: Jeep6 (for
JAVA
platform on Windows)(¤U¸ü: Jeep6Setup&SourceCode.exe)
1 ¦w¸ËJava Development Kit (JDK): http://java.sun.com/javase/downloads/index.jsp
2 ¦w¸ËMinGW C++ Compiler (G++):
http://prdownloads.sf.net/mingw/MinGW-3.0.0-1.exe?download
3 ¦w¸Ë³Ì·sPython 3 Interpreter:
https://www.anaconda.com/
4 ¦w¸ËJeep6(
Java
editor for Chines
eprogrammers v6.0)
(¤U¸ü:
Jeep6Setup&SourceCode.exe)
5 ³]©w¸ô®|°Ñ¼Æ:
ª`·N¡A³o·|¦]¬°§A¦w¸Ë¤W¦C¤£¦P³nÅ骺¤£¦Pª©¥»¦Ó¤£¦P¡A¤]·|¦]¬°§A¦w¸Ëªº§@·~¨t²Îª©¥»¤£¦P¦Ó¤£¦P¡C¥H¤U¬°°w¹ïWin7 64¦ì¤¸§@·~¨t²Î¡A¦w¸Ë¥Ñ¥»ºô¯¸°Ï°ì¤U¸ü³nÅ骺³]©w:
¿ï¾Ü [±±¨î¥x][¨t²Î¤Î¦w¥þ©Ê][¨t²Î][¶i¶¥¨t²Î³]©w][Àô¹ÒÅܼÆ]¡A§ä¥X[path]Åܼƨëö¤U[½s¿è]¡A¥H¦b¨äÅܼÆÈ¥½ºÝ¥[¤J
;JDK¦w¸Ë¥Ø¿ý\bin;MinGW¦w¸Ë¥Ø¿ý\
bin;Python¦w¸Ë¥Ø¿ý;Jeep6¦w¸Ë¥Ø¿ý
(¨Ò¦p: ;C:\Program
Files\Java\jdk-9.0.4\bin;C:\MinGW\bin;C:\Users\yourname\Anaconda3;C:\Jeep6)
6 ¤U¸ü½d¨Òµ{¦¡(
Sample.c)(
Sample.cpp)(
Sample.java)(
Sample.py)Àx
¦s©óC:\Jeep6¥Ø¿ý¤¤¡A«ö¤U®à±Jeep6¹Ï¥Ü°õ¦æJeep6³nÅé¡A¨Ã¨Ï¥Î [¶}ÂÂÀÉ]¿ï¶µ¸ü¤J½d¨Òµ{¦¡¶i¦æ[½sĶ][°õ¦æ]¡C
ACM°ê»Ú¤j¾Ç¥Íµ{¦¡³]p
ÄvÁÉ
(ACM International Collegiate Programming Contest, ACM-ICPC) (ACM-ICPC&EPC.ppt)
Syllabus:
- 1. »{ÃѺtºâªk -- ±q¹ÃШ찪¶¥µ{¦¡»y¨¥: (AlgSmallTalk.pptx) (Alg-Intro.pptx) (CPSforIndustry4.0.zip) (ACM-ICPC&EPC.ppt)(CPSProject.zip)(3/7)(3/14)
1. ºtºâªk¦WºÙªº¥Ñ¨Ó
2. ¤°»ò¬Oºtºâªk?
3. ºtºâªkªº¨Ò¤l
4. ¦p¦óªí¥Üºtºâªk?
5. ¦p¦ó¹ê§@ºtºâªk? (EuclidGCD.c)(EuclidGCD.cpp)(EucidCGDClass1.java)(EucidCGDClass.java)(EuclidGCD.py)
6. ºtºâªkªº¥¿½T©Ê
Homework1: (3/14; Due day: before
TA's class)
(A)¨Ï¥ÎµêÀÀº¿(pseudo
code)¼g¤@Óºtºâªk¡A¿é¤J¤@Ó¾ã¼Æn(n>2)¨Ã¨Ã§PÂ_n¬O§_¬°½è¼Æ(prime)(Write an algorithm using
the pseudo code to input an integer n and output (decide) if n is a
prime.)
(B) ¨Ï¥ÎµêÀÀ
º¿(pseudo
code)¼g¤@Óºtºâªk¡A¿é¤J¤@Ó¾ã¼Æn(n>2)¨Ã¿é¥X¤p©ónªº³Ì¤j¦]¼Æ(factor)
(Write an algorithm using the pseudo code to input an integer n and
output
the n's largest factor that is less than n.)
(C) ¨Ï¥ÎµêÀÀ
º¿(pseudo
code)¼g¤@Óºtºâªk¡A¿é¤J¤@Ó¾ã¼Æn(n>2)¨Ã¿é¥X©Ò¦³n°£¤F¥»¨¥H¥~ªº¥¿¦]¼Æ(factor)Á`©M (Write an
algorithm
using the pseudo code to input an integer n and output the total
summation of all n's factors except n.)
(D) ¨Ï¥ÎµêÀÀº¿(pseudo
code)¼g¤@Óºtºâªk¡A¿é¤J¾ã¼Æn¤Îm(n>m>2)¡A¿é¥X©Ò¦³¤ñn¤p¨Ã¤j©ómªºnªº¦]¼Æ(factor)Á`©M¡AYµL¦¹¦]¼Æ«h¿é¥X0
(Write an algorithm using the pseudo code to input integers n and m,
and output
all n's factors larger than m and less than n.)
(E) ¨Ï¥ÎµêÀÀº¿(pseudo code)¼g¤@Óºtºâªk¡A¿é¤J¤@Ó¾ã¼Æn(n>2)¨Ã§PÂ_n¬O§_¬°§¹¬ü¼Æ(perfect
number)¡C¤@Ó§¹¬ü¼Æ¬O¤@Ó¥¿¾ã¼Æ¡A¥¦©Ò¦³ªº¯u¦]¼Æ(§Y°£¤F¦Û¨¥H¥~ªº¦]¼Æ)ªº©M¡A«ê¦nµ¥©ó¥¦¥»¨¡C (Write
an algorithm using the pseudo code to input an integer n and output
(decide) if n is a perfect number. Note that a perfect number is a
positive integer that is equal to the sum of its proper positive
divisors, that is, the sum of its positive divisors excluding the
number itself.)
(F) ¨Ï¥ÎµêÀÀº¿(pseudo code)¼g ¤@Óºtºâªk¡A¿é¤J¤@Ó¾ã¼Æn(n>0)¨Ã§PÂ_n¬O§_¬°§Ö¼Ö¼Æ(happy number)
(Write an algorithm to input an integer n and output (decide) if n is a
happy number.)
µù:
§Ö¼Ö¼Æ¦³¥H¤Uªº¯S©Ê¡G¦bµ¹©wªº¶i¦ì¨î¤U¡A¸Ó¼Æ¦r©Ò¦³¼Æ¦ì(digits)ªº¥¤è©M¡A±o¨ìªº·s¼Æ¦A¦¸¨D©Ò¦³¼Æ¦ìªº¥¤è©M¡A¦p¦¹«½Æ¶i¦æ¡A³Ì²×µ²ªG¥²¬°1¡C¨Ò
¦p¡A¥H¤Q¶i¦ì¬°¨Ò¡G
28 ¡÷ 22+82= 68 ¡÷ 62+82=100
¡÷ 12+02+02=1¡A¦]¦¹28¬O§Ö¼Ö¼Æ
- 4. §R´M(prune-and-search)ºtºâªk: (Alg-Prune&Search.pptx)
(4/11)
§R´M(prune-and-search)ºtºâªk¥]§t¦h¦¸¡¥N
(iteration)¡A¦b¨C¤@¦¸ªº¡¥N¤¤¡A§¡§R°£(prune)¿é¤J¸ê®Æªº¤@³¡¤À(°²³]¬°f³¡¥÷,
0<f<1)¡A¦Ó«á¦A»¼°j¦a(recursively)¥H¬Û¦Pªººtºâªk¦b³Ñ¾lªº¸ê®Æ¤¤·j´M(search)¥X¸Ñµª¡C¦b¸g¹L¤@©w¦¸¼Æªº¡¥N«á¡A
¿é¤J¸ê®Æªº³W¼Ò±N·|Åܱo¬Û·í¤p¡A¦Ó¯à¦b±`¼Æ®É¶¡¤ºª½±µ§ä¥X¸Ñµª¡C
°²³]¤@Ó§R°£-·j´Mºtºâªkªº®É¶¡½ÆÂø«×¬°T(n)¡A¨Ã¥B¨C¦¸¡¥N©Ò»Ýªº®É¶¡
¬°O(nk)(k¬°¤j©ó0ªº±`¼Æ)¡A«hT(n)=T((1-f)n)+O(nk)¡C¥Ñ©ó
1-f<1¡A§ÚÌ¥i±oT(n)=O(nk)¡C
4.1 ¤G¤¸·j´M(binary search)ºtºâªk
4.2 ¿ï¨ú(selection)»P¤¤¦ì¼Æ(median)ºtºâªk
4.3 ¨îªº¤@¶ê¤ß(constrained
1-center)ºtºâªk
4.4 ²¤Æªº¤GÅܼƽu©Ê³W¹º(simplified 2-variable linear
programming)ºtºâªk
Problem Set 4:
(A) ¥é·Ómerge sortªº°õ¦æ¹Lµ{½d¨Ò»¡©ú¤è¦¡¡Aµe¹Ï»¡©úS=(-2, 1,
-3, 4, -1, 2, 1, -5)¨Ï¥Î³Ì¤j³sÄò«DªÅ¤l§Ç¦C©M¤Àªvºtºâªk(MCSSºtºâªk)¡vªº°õ¦æ¹Lµ{¡C
(B) ¥é·Ómerge sortªº°õ¦æ¹Lµ{½d¨Ò»¡©ú¤è¦¡¡Aµe¹Ï»¡©úS=(-2, -1, -3, -4, -1, -2, -1, -5)¨Ï¥Î³Ì¤j³sÄò¥iªÅ¤l§Ç¦C©M¤Àªvºtºâªk(MCSSºtºâªk)¡vªº°õ¦æ¹Lµ{¡C
(C) ¦b¿ï¨ú§R´Mºtºâªk¤¤¡AY¨CÓ¤À³Î¤l¶°§ï¬°3Ó¤¸¯À¡A«h¨ä³ÌÃaª¬ªp®É¶¡½ÆÂø«×¬O§_¨ÌµM¬°O(n)¡A¬°¤°»ò?
(D) ¦b¿ï¨ú§R´Mºtºâªk¤¤¡A±N¨CÓ¤À³Î¤l¶°§ï¬°6Ó¤¸¯À«á«·s¤ÀªR¨ä®É¶¡½ÆÂø«×¡C
(E) ¦³¤@Ó§R´Mºtºâªk¨ä®É¶¡½ÆÂø«×¬°T(n)=T((7/8)n)+cn2¡A
¸Ô²Ó¤ÀªR¨ä®É¶¡½ÆÂø«×¨Ã¥H¤jO°O¸¹ªí¥Ü¡C
(F) ¥H§R´Mºtºâªk¸Ñ¨M¥H¤U¨îªº¤@¶ê¤ß°ÝÃD:
(0,0),(1,1),(2,2),(3,3),(4,2),(5,1),(6,0),(2,0)¡A¶ê¤ß¦by=0¤W¡C(¥i¥Hºë½Tø¹Ï»¡©ú§Y¥i)
(G) ¥H§R´Mºtºâªk¸Ñ¨M¥H¤U¨îªº¤@¶ê¤ß°ÝÃD:
(0,0),(1,1),(2,2),(3,3),(4,2),(5,1),(6,0),(4,0)¡A¶ê¤ß¦by=3¤W¡C(¥i¥Hºë½Tø¹Ï»¡©ú§Y¥i)
- ´Á¤¤¦Ò:
(®É¶¡:
4/18 ¤U
¤È2:00-3:50)(½d³ò:
¤w±Â½Òªº³¡¥÷)(°Ñ¦ÒÁ¿¸q: book1-8.zip)
- 5. ³g°ýºtºâªk(greedy algorithm): (Alg-Greedy.pptx) (4/25)
³g°ýºtºâªk(greedy
algorithm)¤@¨B¨B¦a«Øºc¥X¤@Ó°ÝÃDªº§¹¾ã¸Ñµª¡C¨ä¨C¤@¨B³£Âǥѳg°ý¸ÑÃDµ¦²¤(greed
strategy)¼W¥[¤@³¡¥÷ªº¸Ñµª¨ì§¹¾ã¸Ñµª¤¤¡C©Ò¿×³g°ý¸ÑÃDµ¦²¤¬°: ¨C¤@¦¸³£¿ï¾Ü·í¤U³Ì¦nªº³¡¥÷¸Ñµª¥[¤J§¹¾ã¸Ñµª¤¤¡C
5.1 I¥]ºtºâªk(knapsack algorithm)
(±a¥X0/1I¥]°ÝÃD«á¥i¥H¦b¤§«áÁ¿±ÂNP-hard°ÝÃD)
5.2 Huffman½s½Xºtºâªk
5.3 Kruskal³Ì¤p§t¬A¾ð(minimum spanning tree,
MST)ºtºâªk
5.4 Prim³Ì¤p§t¬A¾ð(minimum spanning
tree,
MST)ºtºâªk
5.5
Dijkstra³Ìµu¸ô®|ºtºâªk
Problem Set 5:
(A) ¤@ÓI¥]®e¶q¬°10¡A²{¦b¦³5Óª««~¡A
«¶q¤À§O¬°4¡B3¡B6¡B2¡B5¡A»ù®æ¤À§O¬°10¡B9¡B 12¡B4¡B8¡A¨DI¥]¯à°÷¸Ë¤J¹s¸H(fractional)ª««~ªº³Ì¤j»ùȬ°¦ó?
(B)
¤À§O§Q¥ÎKruskal'sºtºâªk»PPrim'sºtºâªk¨D¥X¥H¤U¹Ï(graph)ªº³Ì¤p¥Í¦¨¾ð (minimum spanning
tree,
MST)
(C) §Q¥ÎHuffman
½s ½Xºtºâªk´À¥H¤U¦r¤¸½s½XA(42%)¡BB(17%)¡BC
(28%)¡BD (13%)¡C(³Æµù:¬A¸¹¤¤¬°¦r¤¸¥X²{ÀW²v)
(D)
§Q¥ÎDijkstraºtºâªk¨D¥H¤U¹Ï(graph)³»ÂI4¨ì¦U³»ÂIªº³Ìµu¸ô®|(shortest path)¤Î¨ä¶ZÂ÷(¦¨¥»)
(E)
©Ó¤WÃD¡A§Q¥ÎDijkstraºtºâªk¨D³»ÂI1¨ì¦U³»ÂIªº³Ìµu¸ô®|(shortest path)¤Î¨ä¶ZÂ÷(¦¨
¥»)
- Introduction to Software Defined
Networking
(SDN) Multicast (SDN-Multicast.pptx)
(4/25)
- 6 and 7. °ÊºA³W¹º(dynamic
programming)ºtºâªk: (Alg-DP.pptx) (5/2)(5/9)
°ÊºA³W¹º(dynamic programming)ºtºâªkÄy¥Ñ±Nì°ÝÃD¤À¸Ñ¦¨¤@¨t¦C¤l°ÝÃD
(subproblems)¡A¨Ã¨Ì§Ç¸Ñ¨M¤l°ÝÃD¨Ó¸Ñ¨Mì°ÝÃD¡C¬°ÁקK¤@¦A¦a¸Ñ«½Æªº¤l°Ý
ÃD¡A¤@¥¹¸Ñ¥X¤l°ÝÃDªº¸Ñµª(solution)¡A§Y·|±N¨ä¦s¦bªí®æ(©Î°}¦C)¤¤¡C·í»Ýn¥Î¨ì¬Y¤@¤l°ÝÃDªº¸Ñµª®É¡A»P¨ä«·spºâ¨ä¸Ñµª¡Aºtºâªk·|¨ú¦Ó¥N¤§¦a
±qªí®æ¤¤ª½±µ¨ú¥X¨ä¸Ñµª¥H¸`¬Ùpºâ®É¶¡¡A¬O¤@Ó¡u¥HªÅ¶¡´«¨ú®É¶¡¡vªººtºâªk¡C¤@ӰʺA³W¹ººtºâªk·|¥ý±q³Ì²³æªº¤l°ÝÃD¥ý¸Ñ°_¡A¨Ã¥H¤@©wªºµ{§Ç«ùÄò¹B¦æª½¦Ü
¨D¥Xì°ÝÃD¸Ñµª¬°¤î¡C
³Ì¨Î¸Ñì«h(Principle of optimality):
°²³]¬°¤F¸Ñ¨M¤@Ó°ÝÃD¡A§ÚÌ¥²¶·§@¥X¤@¨t¦Cªº¨Mµ¦
D1, D2, ¡K,
Dn¡CY³o¤@¨t¦Cªº¨Mµ¦¬O³Ì¨Î¸Ñ¡A«h°w¹ï©ó«en-kÓ(©Î³Ì«án-kÓ)¨Mµ¦©Ò²£¥Íªºª¬ºA(¤l°ÝÃD)¦Ó¨¥¡A³Ì«áªºkÓ(©Î«ekÓ)¨Mµ¦(1<=
k<=n)¥²©w¤]¬O³Ì¨Îªº¡C
*0/1I¥]°ÊºA³W¹ººtºâªk(0/1 knapsack dynamic
programming algorithm)
*¤l¶°¦X¥[Á`°ÊºA³W¹ººtºâªk
*¦h¶µ¦¡¤Î°°¦h¶µ¦¡®É¶¡ºtºâªk
*³Ì¤j³sÄò¤l§Ç¦C©M(maximum contiguous subsequence sum, MCSS)°ÊºA³W¹ººtºâªk
*³Ìªø¦@¦P¤l§Ç¦C(longest common subsequence, LCS or LCSS)ºtºâªk
*¯x°}Ã켿n(matrix-chain product)°ÊºA³W¹ººtºâªk
*³Ì¨Î¤G¤¸·j´M¾ð°ÊºA³W¹ººtºâªk
*¦h¶¥¹Ï³Ì¤p¦¨¥»¸ô®|ºtºâªk
*Bellman-Ford³Ìµu¸ô®|ºtºâªk
*Floyd-Warshall³Ìµu¸ô®|ºtºâªk
Problem
Set 6 and 7:
A.
µ¹©w¤@Ó0/1I¥]°ÝÃD¦p¤U¡FI¥]²ü«W=12¡A¥B4Óª««~¨ä«¶q¦U¬°6¡B4¡B5¡B3¡A¨ä»ùȦU¬°20¡B30¡B40¡B10¡A»¡©úÂǥѰʺA³W¹ººtºâªk¸Ñ¨M¦¹0/1I¥]°ÝÃDªº¹Lµ{¡C
B.
¥H¤l¶°¦X¥[Á`°ÊºA³W¹ººtºâªk¸Ñ¨M¥H¤U¤l¶°¦X¥[Á`°ÝÃD: µ¹©w¾ã¼Æ¶°¦XS={1, 2, 4, 7}¤Î¾ã¼Æc=10¡C
C.
קï¤l¶°¦X¥[Á`°ÊºA³W¹ººtºâªk¨Ï¨ä¶Ç¦^¥[Á`Ȭ°cªº¤l¶°¦XY¦¹¤l¶°¦X¦s¦b¡F§_«h¶Ç¦^ªÅ¶°¦X¡C
D. ¥OS = (-2, 1, -3, 4, -1, 2, 1, -5, 4), ¨Ï¥Î°ÊºA³W¹ººtºâªk¨D¥X³Ì¤j³sÄò«DªÅ¤l§Ç¦C©M¡C
E. ³]p³Ì¤j³sÄò¥iªÅ¤l§Ç¦C©M°ÊºA³W¹ººtºâªk¡C
F.
»¡©úX=ABCBA»PY=BDCA¨âÓ¦r¦êÂǥѰʺA³W¹ººtºâªk¨D¥X³Ìªø¦@¦P¤l§Ç¦Cªº¹Lµ{¡C
G.
ÂǥѰʺA³W¹ººtºâªk¨Ó´À¤@¯x°}Ãì(¨äºû«×§Ç¦C¬° <5, 20, 10, 12> )¥[¤W¬A¸¹¨Ó³Ì¨Î¤Æ¯x°}¬Û¼¦¸¼Æ¡C
H. µ¹©wp1=0.2, p2=0.15, p3=0.3; q0=0.1, q1=0.08, q2=0.07,
q3=0.1,¥H³Ì¨Î¤G¤¸·j´M¾ð°ÊºA³W¹ººtºâªk«Øºc¥X³Ì¨Î¤G¤¸·j´M¾ð¡C
I.
µe¹Ï»¡©ú§Q¥Î§Q¥ÎFloyd-Warshallºtºâªk¨D¥H¤U¹Ï(graph)¥þ¹ï³Ìµu¸ô®|(all-pair
shortest path)¶ZÂ÷(¦¨¥»)(¦¹¹Ïªº±Ò©l¶ZÂ÷¯x°}¦p¤U¡A¥H¸g¹Lªº¤¤¶¡¸`ÂI¬°s, a, b, c, dªº¶¶§Ç¼g¥X¶ZÂ÷¯x°}ªº§ïÅܹLµ{¡C)
(d->bªº¥[Åv¦b¹Ï§Î»Pªí®æ¤¤»~´Ó¬°¤£¤@PªºÈ¡A¦P¾Ç¥i¥H±N¤§§ï¬°5©Î6Åý¹Ï§Î»Pªí®æ¤@P«á¸ÑÃD³£ºâµª¹ï¡C)
J. ¨D¥X¥H¤Uµ¹©w¹Ï(graph)ªºFloyd-Warshallºtºâªkªº±Ò©l«e¸`ÂI¯x°}(°}¦C)¡A¨Ã¨D¥X³Ì«áªº«e¸`ÂI¯x°}(°}¦C)¡C
K.
¥H¤U¬OFloyd-Warshallºtºâªk°w¹ï¨ã¦³¤Ó¸`ÂI(°O¬°1¡B2¡B3¡B4¡B5)ªº¹Ï²£¥Íªº«e¸`ÂI¯x°}(°}¦C)¡A»¡©ú¦p¦óÂÇ¥H§ä¥X¸`ÂI1¨ì¸`ÂI3ªº
³Ìµu¸ô®|¡A¤Î¸`ÂI5¨ì¸`ÂI2ªº³Ìµu¸ô®|¡C
L.
°w¹ï¥H¤Uªºµ¹©w¹Ï¡A¦C¥XBellman-Ford³Ìµu¸ô®|ºtºâ
ªk°õ¦æ¹Lµ{¡A
»¡©úBellman
-Ford³Ìµu¸ô®|ºtºâªk¦p¦óÀˬd¥X¤@µ¹©w¹Ï¨ã¦³t´`Àô(negative-weight
cycle)¡C
- 8. (5/16)¾ð·j´M(tree
search)»P¦^·¹(backtracking)ºtºâªk: (TreeSearch.pptx)
Previous Slides and Videos: (Alg4-1203(NoMark).pptx)(§ó¥¿:
§ë¼v¤ù²Ä36©M37¶ ¾ð²Ä¤T¼h¥kÃ䪺¤TÓ¸`ÂI¥Ñ¥ª¦Ó¥k¨Ì§Ç¬°"2' "4' "5") (Youtube video:https://youtu.be/mM93FheJEGQ)
*³\¦h°ÝÃDªº´M§ä¸Ñµª¹Lµ{¥i¥H¨Ï¥Î¾ð
(tree)¨Óªí¹F¡A³oÃþ°ÝÃD¤]³£¥i¥H«Øºc ¥X¸ÑµªªÅ¶¡¾ð(solution space
tree)¡C¦]¦¹n§ä¨ì³o¨Ç°ÝÃDªº¸Ñµª¡A¤£ºÞ¬O¥i¦æ¸Ñ(feasible solution)©Î¬O³Ì¨Î¸Ñ(optimal
solution)¡A´NÂàÅܦ¨¤@Ó¾ð·j´M(tree search)°ÝÃD¡C
*¦³³\¦h¤èªk¥i¥H«ô³X(visit)»P©Ý®i(expand)¤@Ӹѵª
ªÅ¶¡¾ð¡A¥]¬A²`«×Àu¥ý·j´M(depth-first
search, DFS)¡B¼s«×Àu¥ý·j´M(breadth-
first search, BFS)¡Bµn¤s·j´M(hill
climbing search, HCS)¥H¤Î³Ì¨ÎÀu¥ý·j´M(best-first search)µ¥ºtºâªk¡C
* ¼s«×Àu¥ý·j´M(breadth-first search, BFS)ºtºâªk
* ²`«×Àu¥ý·j´M(depth-first search, DFS)ºtºâªk
* µn¤s·j´Mªk(hill climbing search, HCS)ºtºâªk
* ³Ì¨ÎÀu¥ý·j´Mªk(best-first search)ºtºâªk
* ¦^·¹(backtracking)ºtºâªk
Problem Set 8:
A. µ¹©w¤@¶°¦XS={7, 4, 1, 2,
11}¥H¤Î¤@¥[Á`È10¡A§Q¥Î²`«×Àu¥ý·j´Mªk¨Ó¸Ñ¤l¶°¦X¥[Á`°ÝÃD¡A§A¥²¶·µe¥X¸Ñ¥X°ÝÃDªº¸ÑµªªÅ¶¡¾ð(solution
space tree)¡C
B. ¥H²`«×Àu¥ý·j´Mºtºâªk§ä¥X¥H¤U¹Ï(graph)ªºº~¦Ìº¸¹y°j¸ô
(Hamiltonian
circuit)¡A§A¥²¶·µe¥X¸Ñ¥X°ÝÃDªº¸ÑµªªÅ¶¡¾ð(solution
space tree)¡C
C. ¥H¼s«×Àu¥ý·j´Mºtºâªk§ä¥X¤W¹Ïªºº~¦Ìº¸¹y°j¸ô¡A§A¥²¶·µe¥X¸Ñ¥X°ÝÃDªº¸ÑµªªÅ¶¡¾ð(solution
space tree)¡C
D. ¥HªÅ³æ
®æªº²¾°Ê¤è¦V¬°¤W¤U¥ª¥kªº¦¸§Ç¡A¥H¼s«×Àu¥ý·j´Mºtºâªk¤U¸Ñ¨M¥H¤Uªº¤K«÷¹Ï(8-
puzzle)°ÝÃD¡C
°_©lª¬ºA:
¥Ø¼Ðª¬ºA:
E. ¥HªÅ³æ
®æªº²¾°Ê¤è¦V¬°¤W¤U¥ª¥kªº¦¸§Ç¡A¥H²`«×Àu¥ý·j´Mºtºâªk¸Ñ¨MDÃD¤¤ªº¤K«÷¹Ï(8-
puzzle)°ÝÃD¡C
F. ¥HªÅ³æ®æªº²¾°Ê¤è¦V¬°¤W¤U¥ª¥kªº¦¸§Ç¡A¥Hµn¤s·j´Mºtºâªk¸Ñ¨MDÃD¤¤ªº¤K«÷¹Ï(8-puzzle)°ÝÃD¡C¦Óµû¦ô¨ç¼Æ¬°¤è¶ô¿ù¸mªº¼Æ¥Ø¡AY¦³¬Û¦Pªº
±¡§Î¡A«h¥HªÅ³æ®æ²¾°Ê¤è¦V¤W¤U¥ª¥k¬°¨äÀu¥ý¶¶§Ç¡C
G. ¥HªÅ³æ®æªº²¾°Ê¤è¦V¬°¤W¤U¥ª¥kªº¦¸§Ç¡A¥H³Ì¨ÎÀu¥ý·j´Mºtºâªk¸Ñ¨MDÃD¤¤ªº¤K«÷¹Ï(8-puzzle)°ÝÃD¡C¦Óµû¦ô¨ç¼Æ¬°¤è¶ô¿ù¸mªº¼Æ¥Ø¡AY¦³¬Û¦Pªº±¡§Î¡A«h¥HªÅ³æ®æ²¾°Ê¤è¦V¤W¤U¥ª¥k¬°¨äÀu¥ý¶¶§Ç¡C
- 9. (5/23) ¤À¤ä©w¬É(Branch and Bound)ºtºâªk (Branch&Bound.zip)
(Youtube video Part1: https://youtu.be/KUlDxRV6fsU)(Youtube video Part2: https://youtu.be/R91wC81n6Yk)
*¤À¤ä©w¬É(branch
and bound)¬O¤@Ó«ô
³X»P©Ý®i¸Ñ
µªªÅ¶¡¾ðªº¯S®í¤èªk¡A¥Î©ó§ä¥X°ÝÃDªº³Ì¨Î¸Ñ¡C¨ä°µªk¬Û·í©ó§ä¥X¤@ºØ¤èªk¨Ó¤Á³Î¥X¸ÑµªªÅ¶¡ªº¤À¤ä(branch)¡AµM«á¥H¤W¬É(upper
bound)»P¤U¬É(lower bound)ªº·§©À¨Ó¥[§Ö³Ì¨Î¸Ñªº·j´M¡C
*¹ï©ó´M§ä³Ì¤p¦¨¥»(minimum cost)¸Ñµªªº³Ì¨Î¤Æ°ÝÃD¦Ó¨¥¡A¤À¤ä©w¬Éºtºâªk·|°w¹ï¨C¤@¤À¤äªº¸Ñµª¹w´ú¨ä¦¨¥»¤U¬É(lower
bound)¡A¨Ã§Q¥Î§ä¥X¥i¦æ¸Ñ¨Ó±o¨ì°ÝÃDªº¦¨¥»¤W¬É(upper
bound)¡C¦pªG¦³¤@Ӹѵªªº¦¨¥»¤U¬É¶W¹L°ÝÃD¦¨¥»¤W¬É¡A«h³oӸѤ£¥i¯à¬O³Ì¨Îªº¡A¦]¦¹ºtºâªk·|¤¤¤î(terminate)»P³oӸѬÛÃöÁpªº¾ãÓ¤À¤äªº
·j´M¡C
*¦Ó¹ï©ó´M§ä³Ì¤j§Q¯q(maximum benefit)¸Ñµªªº³Ì¨Î¤Æ°ÝÃD¦Ó¨¥¡A¤À¤ä©w¬Éºtºâªk·|°w¹ï¨C¤@¤À¤äªº¸Ñµª¹w´ú¨ä§Q¯q¤W¬É(upper
bound)¡A¨Ã§Q¥Î§ä¥X¥i¦æ¸Ñ¨Ó±o¨ì°ÝÃDªº§Q¯q¤U¬É(lower
bound)¡C¦pªG¦³¤@Ӹѵªªº§Q¯q¤W¬É§C©ó°ÝÃD§Q¯q¤U¬É¡A«h³oӸѤ£¥i¯à¬O³Ì¨Îªº¡A¦]¦¹ºtºâªk·|¤¤¤î(terminate)»P³oӸѬÛÃöÁpªº¾ãÓ¤À¤äªº
·j´M¡C
.1 °ò¥»·§©À
.2 ¤À¤ä©w¬Éºtºâªk(°t¦Xµn¤s·j´Mªk)¸Ñ¨M¦h¶¥¹Ï³Ìµu¸ô®|°ÝÃD
.3 ¤À¤ä©w¬Éºtºâªk(°t¦X³Ì¨ÎÀu¥ý·j´Mªk)¸Ñ¨M®È¦æ±À¾Pû°ÝÃD
.4 ¤À¤ä©w¬Éºtºâªk(°t¦X³Ì¨ÎÀu¥ý·j´Mªk)¸Ñ¨M0/1I¥]°ÝÃD
.5 ¤@Ó¯S®íªº¤À¤ä©w¬Éºtºâªk: A*ºtºâªk
Problem Set 9:
A. ¥H¤À¤ä©w¬Éºtºâªk¸Ñ¨M¥H¤U¦h¶¥¹Ï³Ìµu¸ô®|°ÝÃD¡C
B.
µ¹©w¤@0/1I¥]°ÝÃD¡A¨äI¥]¥i¸ü«C=10,¥B¦³¤Tª««~ªº«¶q¤À§O¬°10,
3, 5¡A¦Ó¨ä§Q¼í¤À§O¬°40, 20, 30¡A¨D¥X¥i¥H©ñ¤JI¥]¤¤ª««~§Q¼íªºtȪº³Ì¤p¤Æ¡A¨Ï¥Î¤À¤ä©w¬Éºtºâªk¨Ó¸Ñ¦¹0/1I¥]°ÝÃD¡C ¡]µù:
¥²¶·µe¥X·j´M¾ð¡^(¦¹ÃD¨Ï¥Îtªº¥Ø¼Ð¨ç¼ÆÈ¡A¦]¦¹feasible
solution¬O¨D¥Xupper bound¡A¦Ó¥B§Ṳ́£Â_¦a¹Á¸Õ°§Cupper
bound)
C. ¦P¤W
ÃD¡A¦ý¥Ø¼Ð§ï¬°¨D
¥X¥i¥H©ñ¤JI
¥]¤¤ª««~§Q¼íªº³Ì¤j¤Æ¡A¨Ï¥Î¤À¤ä©w¬Éºtºâªk¨Ó¸Ñ¦¹0/1I¥]°Ý
ÃD¡C
¡]µù: ¥²¶·µe¥X·j´M¾ð¡^(¦¹ÃD¨Ï¥Î¥¿ªº¥Ø¼Ð¨ç¼ÆÈ¡A¦]¦¹feasible solution¬O¨D¥Xlower
bound¡A¦Ó¥B§Ṳ́£Â_¦a¹Á¸Õ´£°ªlower
bound)
D.
¨Ï¥ÎA*ºtºâªk¨Ó¸Ñ¥H¤U¤§¦h¶¥¹Ï³Ìµu¸ô®|°ÝÃD¡C¡]µù:
¥²¶·µe¥X·j´M¾ð¡^
E. ±NAÃDªºS»PT¹ï½Õ¡A½bÀY¤Ï¦V¸ÑÃD¡C
F. ±NBÃD©Ò¦³¦¨¥»¼¥H2´î3¸ÑÃD¡C
G. ±NCÃDªºª««~«¶q§ï¬°20, 5, 6¸ÑÃD¡C
H. ±NDÃDªºV0»PV8¹ï½Õ¡A½bÀY¤Ï¦V¸Ñ¥ÑV8¨ìV0ªº³Ì¬q¸ô®|°ÝÃD¡C
- 10.
(Optional) ³Ì¤p¦¨¥»³Ì¤j¬y¶qºtºâªk(Minimum-Cost Maximum-Flow Alg., Min-Cost Max-Flow Alg.,
MCMF Alg.)(MCMF-New.zip)
À³¥Î
¹ê¨Ò 1: Paper: Yung-Liang Lai and Jehn-Ruey Jiang,
"Sink-Connected Barrier Coverage Optimization for Wireless Sensor
Networks," in Proc. of 2011 International Conference on Wireless and
Mobile Communications (ICWMC 2011), 2011. (Slides)
À³¥Î¹ê¨Ò 2: Paper: Yung-Liang Lai, and Jehn-Ruey Jiang, "Barrier Coverage
with Optimized Quality for Wireless Sensor Networks," in Proc. of the
15th International Symposium on Wireless Personal Multimedia
Communications Symposium (WPMC'12), 2012. (Slides)
À³¥Î¹ê¨Ò 3: Jehn-Ruey Jiang,
Guan-Yi Sung, and Jih-Wei Wu, "LOM: A Leader
Oriented Matchmaking Algorithm for Multiplayer Online Games," in
Proc. of International Conference on Internet Studies (NETs
2015), 2015. (Distinguished Paper Award)(LOM.ppt)
*¦I¤ú§Qºtºâªk(Hungarian Algorithm)(HungarianAlg.zip)(The algorithm will be taught if time is
available.)
Problem
Set 10:
A.¥HFord-Fulkersonºtºâªk
(·f°tHill-Climbing Search)¸Ñ¨M¥H¤U³Ì¤j¬y¶q°ÝÃD(¹Ïªº¦³¦VÃä(directed
edge)¤W©Ò¼Ð¥Üªº¬°®e¶q(capacity))
B. ¥HEdmonds
-Karpºtºâªk¸Ñ¨M¥H¤U³Ì¤j¬y¶q°ÝÃD(¹Ïªº¦³¦VÃä(directed edge)¤W©Ò¼Ð¥Üªº¬°®e¶q(capacity))
C. ¦Û¦æ³]p¤@Ó¬yºô (flow
network)(°£s¡Bt¥~¨ã¦³4Ó¸`ÂI¡A¨Ã¨ã¦³10Óedge)¡A¥HEdmonds-Karpºtºâªk¸Ñ¨M
¨ä³Ì¤j¬y¶q°ÝÃD¡C
D.
§¹¦¨§ë¼v¤ùp30¤§Bellman-FordºtºâªkÀË´út¥[Åv´`Àô½d¨Ò¨ìiteration 8
E. §¹¦¨§ë¼v¤ùp30¤§Bellman-
FordºtºâªkÀË´út¥[Åv´`Àô½d¨Ò¨ìiteration 8¡A¨Ã¥[¤Jpredecessorµù°O
F. »¡©ú¦p¦ódetect§ë¼v¤ùp30¤§t¥[Åv´`Àô
(Optional,
for Hangarian Algorithm)
A.
¨Ï¥Î¦I¤ú§Qºtºâªk(Hungarian algorithm)¨Ó¸Ñ¥H¤Uªº«ü¬£°ÝÃD(assignment problem)¡]µù:
¥²¶·¼g¥Xºtºâªk°õ¦æ¹Lµ{¤¤ªº¨CÓ¤¤¶¡µ²ªG¡^
|
Task A
|
Task B
|
Task C
|
Tim
|
$1
|
$2
|
$3
|
Bob
|
$2
|
$3
|
$2
|
Alex
|
$2
|
$2
|
$3
|
B.
¦Û¦æ³]p¤@Ó«ü ¬£°ÝÃD(assignment
problem)ªº4x4¦¨¥»¯x°}¡A¨Ã¥H¦I¤ú§Qºtºâªk(Hungarian
algorithm)§ä¥X³Ì¤jÅv«§¹¬ü¤G¤À¤Ç°t(Maximum-Weight Perfect Bipartite Matching)¡C
C.
»¡©ú¦p¦ó¨Ï¥Î¦I¤ú§Qºtºâªk(Hungarian
algorithm)¸Ñ¨M³Ì¤p¼Ú¤ó¥±Åv«°t¹ï(Minimum Euclidean Weighted
Matching)°ÝÃD¡C©Ò¿×³Ì¤p¼Ú¤ó¥±Åv«
°t¹ï°ÝÃD´yz¦p¤U:
µ¹©wnÓÂI(n¬°°¸¼Æ)¡A¦p¦ó±N¦¹nÓÂI¤Ç°t§Î¦¨n/2ÓÂI¹ï¡AÅý¨CÓÂI¹ï§Î¦¨¤@±ø½u¬q¡A¦Ó¦¹n/2±ø½u¬q¨ã¦³³Ì¤pªºªø«×Á`©M¡C
D.
ÀH·Nµe¥X¥|Ó¼Ú¤ó¥±ÂI(2D
point)¡A³]¨ä¶ZÂ÷¬Ò¬°¾ã¼Æ(¥H¤½¤Àpºâ)¡A¥H¦I¤ú§Qºtºâªk(Hungarian
algorithm)§ä¥X¨ä³Ì¤p¼Ú¤ó¥±Åv«°t¹ï(Minimum Euclidean Weighted Matching)¡C
E.
»¡©ú¦p¦ó±N¦I¤ú§Qºtºâªk¯à°÷¸Ñµªªº³Ì
¤p¦¨¥»«ü ¬£°ÝÃD(assignment
problem)ÅÜÂର(reduce to)³Ì¤j¬y°ÝÃD
F. ±N¥H
¤U³Ì¤p¦¨¥»«ü
¬£°ÝÃD(assignment
problem)Âà´«¬°¬yºô(flow network)¡A¥H«K¨Ï¥Î³Ì¤j¬y(max-flow)ºtºâªk¸Ñ¨M¤§
|
Task 1
|
Task 2
|
Task 3
|
Carl
|
$24
|
$28
|
$24
|
Bob
|
$26
|
$32
|
$28
|
Alex
|
$24
|
$28
|
$30
|
- 11. (5/30) °ÝÃD¤U¬É»P°ÝÃD¤ÀÃþ: P¡BNP¡BNP§xÃø»PNP§¹¥þ°ÝÃD*¤@Ó°ÝÃD ªº¤U¬É¬°¥ô¦ó¯à¸Ñ¨M¦¹°ÝÃDªººtºâªk¦Ü¤Ö©Ò»Ýªº®É¶¡½ÆÂø«×¡C(The
lower
bound of a problem is the least time complexity required for any
algorithm
which can be used to solve this problem.) (ProblemLB.zip)
*NP§¹¥þ°ÝÃD²z½×:
Y¥ô¦ó¤@ÓNP§¹¥þ°ÝÃD¥i¦b¦h¶µ¦¡®É¶¡³Q¸Ñ¨M¡A«h¨C¤@ÓNP°ÝÃD¬Ò¥i¦b¦h¶µ¦¡®É¶¡Àò±o¸Ñ¨M(¤]´N¬OP=NP)¡C If any one
NP-complete problem can be solved in polynomial time, then every
problem in NP can also be solved in polynomial time (i.e., P=NP). (Recipe, Cook and Carp)(NPC.zip)
*(NPC²z½×´úÅç¤Î¸Ñµª)
Problem
Set 10:
A. ÃÒ©ú¤ä°t¶°°ÝÃD(dominating set
problem)¬°NP°ÝÃD¡C
B. ÃÒ©úÂIÂл\°ÝÃD(vertex cover problem)¬°NP°ÝÃD¡C
C. ÃÒ©ú¶°¹Î°ÝÃD(clique problem)¬°NP°ÝÃD¡C
D. ÃÒ©úµÛ¦â°ÝÃD(chromatic coloring problem)¬°NP°ÝÃD¡C
E. ÃÒ©ú0/1 I¥]°ÝÃD(0/1 knapsack problem)¬°NP°ÝÃD¡C
F. ÃÒ©ú3-º¡¨¬°ÝÃD(3-SAT problem)¬°NP°ÝÃD¡C
G. ÃÒ©úSteiner tree¨Mµ¦°ÝÃD¬°NP°ÝÃD¡C
H. ¥H¤Uªº±Ôz¬O¹ïÁÙ¬O¿ù¡A¨Ã¸ÑÄÀ¹ï©Î¿ùªºì¦]:
Y§Ú̯àÃÒ©ú¥ô¦ó¤@Ó NPC°ÝÃDªº³ÌÃaª¬ªp°ÝÃD¤U¬É(worst case problem lower
bound)¬O«ü¼Æ¨ç¼Æ¶q¯Å¡A«h§Ṳ́w¸gÃÒ©ú NP¤£µ¥©óP¡C
I. ¥H¤Uªº±Ôz¬O¹ïÁÙ¬O¿ù¡A¨Ã¸ÑÄÀ¹ï©Î¿ùªºì¦]:
Y§Ú̯àÃÒ©ú¥ô¦ó¤@Ó NPC°ÝÃDªº³ÌÃaª¬ªp°ÝÃD¤U¬É(worst case problem lower
bound)¬O¦h¶µ¦¡¨ç¼Æ¶q¯Å¡A«h§Ṳ́w¸gÃÒ©ú NPµ¥©óP¡C
J. ¥H¤Uªº±Ôz¬O¹ïÁÙ¬O¿ù¡A¨Ã¸ÑÄÀ¹ï©Î¿ùªºì¦]:
Y§Ú̯ઽ§ä¨ì¤@Ó½T©w©Êºtºâªk¡A¦b³Ì®tª¬ªp¤U¥H¦h¶µ¦¡®É¶¡½ÆÂø«×¸Ñ¨M¤@ÓNPC°ÝÃD¡A«h§Ṳ́w¸gÃÒ©úNPµ¥©óP¡C
K. ¥H¤Uªº±Ôz¬O¹ïÁÙ¬O¿ù¡A¨Ã¸ÑÄÀ¹ï©Î¿ùªºì¦]:
¤H̤w¸gÃÒ©ú: ¨S¦³¥ô¦ó½T©wºtºâªk(deterministic algorithm)¥i¥H¦b³Ì®tª¬ªp(worst
case)¤U¡A¥H¦h¶µ¦¡®É¶¡½ÆÂø«×¸Ñ¨MNPC°ÝÃD¡C
L. ¥H¤Uªº±Ôz¬O¹ïÁÙ¬O¿ù¡A¨Ã¸ÑÄÀ¹ï©Î¿ùªºì¦]:
¤H̤w¸gÃÒ©ú: ¨S¦³¥ô¦ó½T©wºtºâªk(deterministic algorithm)¥i¥H¦b³Ì®tª¬ªp(worst
case)¤U¡A¥H¦h¶µ¦¡®É¶¡½ÆÂø«×¸Ñ¨MNP-hard°ÝÃD¡C
M. ¥H¤Uªº±Ôz¬O¹ïÁÙ¬O¿ù¡A¨Ã¸ÑÄÀ¹ï©Î¿ùªºì¦]:
¥ô¦óNPC°ÝÃD¥i¥Hpolynomially reduces to¥t¤@ÓNPC°ÝÃD¡C - 12.
(6/6) ¾÷¾¹¾Ç²ßºtºâªk
(Machine Learning
algorithms) (ML.pptx)(DeepLearning.pptx)
- 13. (Optional) ªñ¦üºtºâªk
(Approximation
algorithms) (ApproximationAlgorithm.zip)
¼Ú©Ô®È³~ºtºâªk (Eulerian Tour Algorithm) (EulerianTour.zip)
©w²z¤@
*³s³qªºµL¦V¹ÏG¦³¼Ú©Ô¸ô®|ªº¥Rn±ø¥ó¬O¡G G¤¤©_³»ÂI¡]³s±µªºÃä¼Æ¶q¬°©_¼Æªº³»ÂI¡^ªº¼Æ¥Øµ¥©ó0©ÎªÌ2¡C
*³s³qªºµL¦V¹ÏG¬O¼Ú©ÔÀô¡]¦s¦b¼Ú©Ô°j¸ô¡^ªº¥Rn±ø¥ó¬O¡G G¤¤¨CÓ³»ÂIªº«×³£¬O°¸¼Æ¡C
©w²z¤G
*¤@Ó³s³qªº¦³¦V¹Ï¥i¥Hªí¥Ü¬°¤@±ø±q³»ÂI u¨ì vªº¡]¤£³¬¦Xªº¡^¼Ú©Ô¸ô®|ªº¥Rn±ø¥ó¬O¡G
uªº¥X«×¡]±q³oÓ³»ÂIµo¥Xªº¦³¦VÃ䪺¼Æ¶q¡^¤ñ¤J«×¡]«ü¦V³oÓ³»ÂIªº¦³¦VÃ䪺¼Æ¶q¡^¦h1¡A vªº¥X«×¤ñ¤J«×¤Ö1¡A¦Ó¨ä¥¦³»ÂIªº¥X«×©M¤J«×³£¬Ûµ¥¡C
*¤@Ó³s³qªº¦³¦V¹Ï¬O¼Ú©ÔÀô¡]¦s¦b¼Ú©Ô°j¸ô¡^ªº¥Rn±ø¥ó¬O¡G¨CÓ³»ÂIªº¥X«×©M¤J«×³£¬Ûµ¥¡C
Problem
Set 12:
A. ¨Ï¥Î2-ªñ¦üºtºâªk(2-approximation
algorithm)¨Ó¸Ñ¨M¥H¤U¹Ïªº³»ÂIÂл\°ÝÃD(vertex cover
problem)¡C¡]µù:
¶·´yz¦b°õ¦æºtºâªk¹Lµ{ªº¨CÓ¤¤¶¡µ²ªG¡C¡^
B. ¨Ï¥Î¼Ú©Ô®È³~ºtºâªk¨Ó§ä¥X¥H¤U¹Ïªº¼Ú©Ô®È³~¡C¡]µù: ¶·´yz¦b°õ¦æºtºâªk¹Lµ{ªº¨CÓ¤¤¶¡µ²ªG¡C¡^
C.
±N¥H¦ÛµM»y¨¥¼¶¼gªº¡uµL¦V¹Ï¼Ú©Ô®È³~/¸ô®|ºtºâªk¡v§ï¬°¥HµêÀÀ½X¼¶¼g
D.
¥H¦ÛµM»y¨¥¼¶¼g¡u¦³¦V¹Ï¼Ú©Ô®È³~/¸ô®|ºtºâªk¡v
E.
¥HµêÀÀ½X¼¶¼g¡u¦³¦V¹Ï¼Ú©Ô®È³~/¸ô®|ºtºâªk¡v
F.
¤ÀªR¨âÓºtºâªkªº®É¶¡½ÆÂø«×