Algorithmics (ºtºâªk) 2021

Lecturer: ¦¿®¶·ç
Teaching Assistants (TAs): ³¯«ä¿« ¦¶«TÞ³ ªL«Û§Ê ³¯¯§Åï
Time: ¶g¤G 14:00~16:50
Place:
¶g¤G ±Ð¬ã¤j¼Ó TR A203
TA Class:  ¶g¤G 13:00~13:50 (±Ð¬ã¤j¼Ó TR A203)
Video List: Link
½Ð¤j®a¥ýÆ[¬Ý¥h¦~ªº½Òµ{¤¶²Ð¼v¤ù: https://youtu.be/pLTIKYN2DUg
*
¥[¿ï½Ð·V«ä¡A¦]¬°¨C¶g¤â¼g§@·~6-10ÃD¡A¥ô¿ï¤GÃD§@µª¡F¨C¶g½u ¤Wµ{¦¡§@·~3ÃD¡A¦Ü¤Ö§¹¦¨¤@ÃD¡F¨C¶g§U±Ð½Òµ{¤À²Õ³ø§i¤@¤p®É¡A»Ý¤W¶Ç§@·~¸ÑÃD§ë¼v¤ù¡C
*«Øij¥i¥H±Ä¥Î¥ý¬Ý²ßÃD¡AµM«á¦A¨ì¼v¤ù¤¤¾Ç·|¸Ñ¨M°ÝÃD§Þ³Nªº¤è¦¡¾Ç²ß¡A®ÄªG¸û¨Î!


Scope:
Scoring¡G
Textbooks:
Reference Books:
Programming:
  • ¦w¸Ë½Òµ{¬ÛÃö³nÅé¤Î­ì©lµ{¦¡½X: Jeep7 (for JAVA platform on Windows)
  • 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¸ËJeep7(Java editor for every programmers v7.0) (¤U¸ü: Jeep7Setup&SourceCode.exe) (¨¾¬r³nÅé·|»~§P¬°¤£¦w¥þ³nÅé¡A¦ý«OÃÒ¦w¥þ¡A½Ð¦w¤ß¨Ï¥Î¡C)
    5 ³]©w¸ô®|°Ñ¼Æ: ª`·N¡A³o·|¦]¬°§A¦w¸Ë¤W¦C¤£¦P³nÅ骺¤£¦Pª©¥»¦Ó¤£¦P¡A¤]·|¦]¬°§A¦w¸Ëªº§@·~¨t²Îª©¥»¤£¦P¦Ó¤£¦P¡C¥H¤U¬°°w¹ïWindows§@·~¨t²Îªº³]©w:

    ¿ï¾Ü [±±¨î¥x][¨t²Î¤Î¦w¥þ©Ê][¨t²Î][¶i¶¥¨t²Î³]©w][Àô¹ÒÅܼÆ]¡A§ä¥X[path]Åܼƨëö¤U[½s¿è]¡A¨Ã¦b¨äÅܼƭȥ½ºÝ¥[¤J¥H¤U¤º®e:


    ;JDK¦w¸Ë¥Ø ¿ý\bin;MinGW¦w¸Ë¥Ø¿ý\ bin;Python¦w¸Ë¥Ø¿ý;Jeep7¦w¸Ë¥Ø¿ý 
    (¨Ò¦p:   ;C:\Program Files\Java\jdk-9.0.4\bin;C:\MinGW\bin;C:\Users\yourname\Anaconda3;C:\Jeep7)


    6 ¤U¸ü½d¨Òµ{¦¡(Sample.c)(Sample.cpp)(Sample.java)(Sample.py)Àx ¦s©óC:\Jeep7¥Ø¿ý¤¤¡A«ö¤U®à­±Jeep7¹Ï¥Ü°õ¦æJeep7³nÅé¡A¨Ã¨Ï¥Î [¶}ÂÂÀÉ]¿ï¶µ¸ü¤J½d¨Òµ{¦¡¶i¦æ[½sĶ][°õ¦æ]¡C

  • ACM°ê»Ú¤j¾Ç¥Í µ{¦¡³]­p ÄvÁÉ (ACM International Collegiate Programming Contest, ACM-ICPC) (ACM-ICPC&EPC.ppt)
  • Syllabus:  
    A. »¡©úX=ABCBA»PY=BDCA¨â­Ó¦r¦êÂǥѰʺA³W¹ººt ºâªk¨D¥X³Ìªø¦@¦P¤l§Ç¦Cªº¹Lµ{¡C
    B. ³]­p¤@­Óºtºâªk¡A¥i¥H²£¥Í¤@­Óµ¹©w¶°¦XSªº©Ò¦³¥i¯à¤l¶°¦X¡C
    C. ³]­p¤@­Óºtºâªk¡A¥i¥H¿é¤Jªø«×¬°mªº§Ç¦CX
    ¤Îªø «×¬°nªº§Ç¦CY¡A¿é¥Xtrue©Î¬Ofalse¡A¤À§O ¥NªíX¬O©Î¤£¬OYªº¤l§Ç¦C¡C
    D. µ¹©w¤@­Ó0/1­I¥]°ÝÃD¦p¤U¡F­I¥]²ü­«W=12¡A¥B4­Óª««~¨ä­«¶q¦U¬°6¡B4¡B5¡B3¡A¨ä»ù­È¦U¬°20¡B30¡B40¡B10¡A»¡©ú
    ÂǥѰʺA³W¹ººtºâªk ¸Ñ¨M¦¹0/1­I¥]°ÝÃDªº¹Lµ{¡C
    E. ¥H¤l¶°¦X¥[Á`°ÊºA³W¹ººtºâªk¸Ñ¨M¥H¤U¤l¶°¦X¥[Á`°ÝÃD: µ¹©w¾ã¼Æ¶°¦XS={1, 2, 4, 7}¤Î¾ã¼Æc=10¡C
    F. ­×§ï¤l¶°¦X¥[Á`°ÊºA³W¹ººtºâªk¨Ï¨ä¶Ç¦^¥[Á`­È¬°cªº¤l¶°¦X­Y¦¹¤l¶°¦X¦s¦b¡F§_«h¶Ç¦^ªÅ¶°¦X¡C
    G. ¥OS = (-2, 1, -3, 4, -1, 2, 1, -5, 4), ¨Ï¥Î
    °ÊºA³W¹ººtºâªk¨D¥X³Ì¤j³sÄò«DªÅ¤l §Ç¦C©M¡C
    H. ³]­p
    ³Ì¤j³sÄò¥iªÅ¤l§Ç¦C©M°ÊºA³W¹ººtºâªk¡C
    Homework 11:
    A. ¥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
    B. ¥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
    C. ¥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
    D. ¥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
    E. ¥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
    F. ¥H¤Uªº±Ô­z¬O¹ïÁÙ¬O¿ù¡A¨Ã¸ÑÄÀ¹ï©Î¿ùªº­ì¦]:
    ¥ô¦óNPC°ÝÃD¥i¥Hpolynomially reduces to¥t¤@­ÓNPC°ÝÃD¡C
    G. ÃÒ©ú¤ä°t¶°°ÝÃD(dominating set problem)¬°NP°ÝÃD¡CÃÒ©ú¤ä°t¶°°ÝÃD(dominating set problem)¬°NP°ÝÃD¡C
    H. ÃÒ©úÂIÂл\°ÝÃD(vertex cover problem)¬°NP°ÝÃD¡C
    I. ÃÒ©ú¶°¹Î°ÝÃD(clique problem)¬°NP°ÝÃD¡C
    J. ÃÒ©úµÛ¦â°ÝÃD(chromatic coloring problem)¬°NP°ÝÃD¡C
    K. ÃÒ©ú0/1 ­I¥]°ÝÃD(0/1 knapsack problem)¬°NP°ÝÃD¡C
    L. ÃÒ©ú3-º¡¨¬°ÝÃD(3-SAT problem)¬°NP°ÝÃD¡C
    M. ÃÒ©ú³Ì¤j³Î°ÝÃD(Max cut problem)¬°NP°ÝÃD¡C
    N. ÃÒ©ú¥v©Z·S¾ð°ÝÃD(Steiner tree problem)¬°NP°ÝÃD¡C
    O. ÃÒ©ú¹º¤À°ÝÃD(partition problem)¬°NP°ÝÃD¡C
    P. ÃÒ©úÀ»¤¤¶°¦X°ÝÃD(hitting set problem)¬°NP°ÝÃD¡C
    Q. ÃÒ©ú¤Tºû¤Ç°t°ÝÃD(3-dimensional matching problem)¬°NP°ÝÃD¡C
    R. ÃÒ©úConvex Hull°ÝÃDªº°ÝÃD¤U¬É¬°Omega(n log n)
    S. µe¥Xmerge sortºtºâªkªº¤T­Ó¤¸¯À(1,2,3)ªºdecision tree
    Links¡G