blog¥¿¦¡转²¾¨ì¤F这¨½¡G

http://blog.phoeagon.cz.cc



I know

phoeagon啲01¥@¬É

2009 ¦~ 1 ¤ë 24 ¤é  ¬P´Á¤»   ´¸¤Ñ


JZOI¶°°Vºî¦X´ú¸Õ ¤ÀÃþ: Programming Impossib...

 

JZOIersºî¦X¯À½è´úµû

 

CS¬O¤@´ÚµÛ¦Wªººôµ¸¹CÀ¸¡C¹CÀ¸¤¤ª±®a±±¨î¦U¦Ûªº¨¤¦â¡A¶i¦æ¤À¶¤ªº²Ä¤@¤HºÙ®gÀ»ÄvÁÉ¡C®Ú¾Ú§÷®Æ¦^µª1-3ÃD¡C

¡]¿ï¾ÜÃD¡^

1. Àq»{±¡ªp¤UcsªA°È¾¹·|¦Û°Ê®Ú¾Ú¾Ôªp­«·s¤À²Õ¡A¦P¤@±i¦a¹ÏÁÙ¦³³Ì¦h§½¼Æ­­¨î¡A¥H¨¾¤î³æ¤è³sÄòÀ£­Ë©Ê³Ó§Q¡C½Ð°Ý³oÅé²{¤F¡G

A ¤½¥­­ì«h    B ©M¿Ó¬Fµ¦   C Ävª§­ì«h   D ¤@¯ë»P¯S®í­ì«h

¡]½×­zÃD¡^

2. JZOIersµo²{¡A¨Ï¥Î¦Û°Ê¨Bºj³sÄò®gÀ»¥Ø¼Ð®É¡A·Ç¬P·|³vº¥Åܤj¡C¨«¶i«á·|µo²{À»¤¤ªº¦ì¸m³vº¥¤W´­¦¨®°§Î¡C¸Õ¥H¤û¹y¹B°Ê©w«ß¸ÑÄÀ¡C

¡]²µªÃD¡^

3. ¦bÄvÁɯZ¤¤¡A¦³¤H°¾·RCS¡A¦³¤H°¾·R¡mÅ]Ã~ª§ÅQ¡n¡C¦]¦Ó²£¥Í¤F¤@¨Çª§°õ¡C½Ð¹B¥Î©Ò¾Çª¾ÃÑ¡A²­n·§¬AÀ³¦p¦ó¬Ý«Ý³oºØ¤å¤Æªº®t²§©Ê¡C

 

ºtºâªk¬Oµ{¦¡³]­pªº¤G¤j­n¯À¤§¤@¡C¾\Ū¥H¤U§÷®Æ¦^µª4-6ÃD¡C

1.Read the text below and answer the questions.

Algorithm

In mathematics, computing, linguistics and related subjects, an algorithm is a sequence of finite instructions, often used for calculation and data processing. It is formally a type of effective method in which a list of well-defined instructions for completing a task will, when given an initial state, proceed through a well-defined series of successive states, eventually terminating in an end-state. The transition from one state to the next is not necessarily deterministic; some algorithms, known as probabilistic algorithms, incorporate randomness.

A partial formalization of the concept began with attempts to solve the Entscheidungsproblem (the "decision problem") posed by David Hilbert in 1928. Subsequent formalizations were framed as attempts to define "effective calculability" (Kleene 1943:274) or "effective method" (Rosser 1939:225); those formalizations included the Gödel-Herbrand-Kleene recursive functions of 1930, 1934 and 1935, Alonzo Church's lambda calculus of 1936, Emil Post's "Formulation 1" of 1936, and Alan Turing's Turing machines of 1936–7 and 1939.

It is frequently important to know how much of a particular resource (such as time or storage) is required for a given algorithm. Methods have been developed for the analysis of algorithms to obtain such quantitative answers; for example, the algorithm above has a time requirement of O(n), using the big O notation with n as the length of the list. At all times the algorithm only needs to remember two values: the largest number found so far, and its current position in the input list. Therefore it is said to have a space requirement of O(1), if the space required to store the input numbers is not counted, or O (log n) if it is counted.

Different algorithms may complete the same task with a different set of instructions in less or more time, space, or 'effort' than others. For example, a binary search algorithm will usually outperform a brute force sequential search when used for table lookups on sorted lists.

4. Which of the followings is true:

A it doesn't matter how an algorithm works if it gives the right answer, 'cause computers are extremely quick today.

B algorithm is only defined in mathematics

C a binary indexed tree can find the nth value in a given sequence more easily and quicker than brute force scan

D a convex hull algorithm can be used to solve a 'knapsack' problem

5. ¤U¦Cºtºâªk¦WºÙ¹ïÀ³¿ù»~ªº¬O¡G

A¦X¨Ö±Æ§Ç merge-sort

B³g¤ßªk greedy algorithm

C ¤G¤À¬d§ä Binary Code

D ³Ì¤j¬yFºtºâªk Ford-Fulkerson

6. ¤U­±¤@¬qµ{¦¡µ¹¥X¤F¤@­Ó¨D¸Ñ¬Y­Ó°ÝÃDªººtºâªk¡C¾\Ūµ{¦¡¡A½×­z°ÝÃD¨D¸Ñªº¤º®e¥H¤Îºtºâªkªº¹ê²{¡A¨Ã±q»¼±À¦¡µ¹¥X¨ä®É¶¡½ÆÂø«×«×¶q¡C

function num(i:longint):longint;

begin

if i<3 then exit(i)

else exit(num(i-1)+num(i-2));

end;

 ¹q¸£±q½Ï¥Í¨ì²{¦b¸g¾ú¤F³\¦h¦¸§ó·s¡C®Ú¾Ú¥H¤W§÷®Æ¦^µª¤U¦C°ÝÃD¡C

 7. ®Ú¾Ú®É¶¡¥ý«á¶¶§Çµ¹¤U¦C¨Æ¥ó±Æ§Ç¡C

a¹ÏÆFµoªí½×¤å´£¥X¸U¯à¾÷¾¹ªº·§©À

b ¤¤°ê¤Hµo©úºâ½L

c ³Áª÷¶ð¹q¸£½Ï¥Í

d ®J¥§ªü§J½Ï¥Í

e ¯À¼Æ¦X¼Æ§PÂ_°ÝÃDÃÒ©ú¬°PÃþ

8. ®Ú¾ÚNPI  ,  NP  ,  P  ,  co-NP  ,   NPC  ,   co-NPC  ¦b·í«e¾Ç³N¬É¥D¬y·N¨£ªº¥]§tÃö«Y¹º¥X³o´XÃþ°ÝÃDªº¶°¦Xªº­³®¦¹Ï¡C¡]Venn Graph¡^

 

¤wª¾¤£¦Pªººtºâªk¸Ñ¨M¦P¤@­Ó°ÝÃD©Ò»Ý­nªº®É¶¡¬O¤£¦Pªº¡C¨Ò¦p¡A¹ïµ¹©wªºn­Ó¼Æ¦ì±Æ§Ç¡A¦³±qO(n)¨ìO(nlogn)¨ìO(n^2)ªº¦UºØºtºâªk¡C®Ú¾Ú§÷®Æ¦^µª

9. ¿ëªRºâªk¡B¼Æ¾Úµ²ºc¡BRP¤TªÌªºÁpô¡C

10.  ¦pªG±Ä¥Î¾A·íªººtºâªk¡A¥i¥H­°§C¯Ó¶Oªº®ÉªÅ¸ê·½¶q¡C¨Ò¦p¡A±Ä¥Î§Ö³t±Æ§Ç´À¥N«_ªw±Æ§Çµ¹¤@»õ­ÓµL§Çªº¶Ã¼Æ±Æ§Ç¡A¥i¥H¤j¤j­°§C¹B¦æ®É¶¡¡A´î¤Ö¯Ó¶Oªº¹q¯à¡A±q¦Ó´î¤Ö¤G®ñ¤ÆºÒ±Æ©ñ¡C

(1) ¸Õ·§ªp¤G®ñ¤ÆºÒªºª«²z¤Æ¾Ç©Ê½è¡C

(2) ¸Õ¥Î¥i«ùÄòµo®iªºÆ[ÂI¿ëªR³]­p§ó¦nºtºâªkªº·N¸q¡C

(3) Á|¥X´X­ÓOIers®e©ö°µ¨ìªº¸`¯à´î±Æªº±¹¬I¡C

(4) ¥Íª«¹q¸£¬O¥Ø«e¹q¸£¬ã¨sªº¤@­Ó­«­n¤è¦V¡C¥Í©R¬¡°ÊÂ÷¤£¶}酶¡C¤ÀÃþ·§¬A酶¹ï¥Í©R¬¡°Êªº·N¸q¤Î酶ªº®ÄÀ³¨ü¥~¬É¼vÅTªº¦]¯À¡C

 ªþ¥[ÃD¡G

 

CS¤¤¡A¬Y¦ìOIer±±¨îªº¨¤¦â¦b±q«Î³»¼ç¤J¼Ä¤è°}¦a®É¤£·V¶^¤U¡A¦b¤U¸¨¹Lµ{¤¤¡A¬Ý¨ì¼Ä¤H¡C爲¤F¦b¦Û¤v¸¨¦a«eµ²§ô¡A¥L¥²¶·¾¨§Ö±þ¦º¼Ä¤H¡C¸Õ¤ÀªR

 

(1)¸ÓOIer¶}©l¦b¸£¤¤¦^¾Ð¡A¥Îª±¨ãºj¦b®a¤¤´ú¸Õªº±¡¸`¡C°Ý©¿²¤ªÅ®ðªý¤O¡A¤ÀªR¦b¥Lµø¨¤¨½¤l¼u­¸¦æ¬O¦V¤W°¾ÁÙ¬O¦V¤U°¾¡C

(2)¦b¹CÀ¸¤¤¡A­Y¦Ò¼{ªÅ®ðªý¤O¡Ag¨úÀq»{9.8¡A°Ý¥LºË·Ç®É·Ç¬PÀ³¸Ó¥¿¹ï¼Ä¤HÁÙ¬O¦V¤W©Î¦V¤U°¾¦}»¡©ú²z¥Ñ¡C

§@¤å¡G

¡]¤G¿ï¤@¡^

1.¾\Ū¥H¤U§÷®Æ¡A¥þ­±²z¸Ñ¡A¦Û¿ï¨¤«×¡B¤åÅé©MÃD§÷¡]¸Öºq°£¥~¡^¡A¼g¤@½g¤£¤Ö©ó500¦rªºµu¤å¡C

¡uºtºâªk¡v§Yºtºâªkªº¤j³°¤¤¤å¦WºÙ¥X¦Û©Pñ¹ºâ¸g¡F¦Ó­^¤å¦WºÙ Algorithm ¨Ó¦Û©ó9¥@¬öªi´µ¼Æ¾Ç®a¤ñªü°Ç·ÀN¥ËùتQ(ªüº¸·ªá©Ô¤l¦Ì)ªº¦W¦ral-Khwarizmi¡A¦]¬°¤ñªü°Ç·ÀN¥ËùتQ¦b¼Æ¾Ç¤W´£¥X¤Fºtºâªk³o­Ó·§©À¡C¡uºtºâªk¡v­ì¬°"algorism"¡A·N«ä¬Oªü©Ô§B¼Æ¦ìªº¹Bºtºâªk«h¡A¦b18¥@¬öºtÅܬ°"algorithm"¡C¼Ú´Xùرoºtºâªk³Q¤H­Ì»{¬°¬O¥v¤W²Ä¤@­Óºtºâªk¡C ²Ä¤@¦¸½s¼gµ{¦¡¬OAda Byron©ó1842¦~¬°¤Ú¨©©_¤ÀªR¾÷½s¼g¨D¸Ñ¸Ñ§B§V§Q¤èµ{ªºµ{¦¡¡A¦]¦¹Ada Byron³Q¤j¦h¼Æ¤H»{¬°¬O¥@¬É¤W²Ä¤@¦ìµ{¦¡³]­p®v¡C¦]¬°¬dº¸´µ·¤Ú¨©©_(Charles Babbage)¥¼¯à§¹¦¨¥Lªº¤Ú¨©©_¤ÀªR¾÷¡A³o­Óºtºâªk¥¼¯à¦b¤Ú¨©©_¤ÀªR¾÷¤W°õ¦æ¡C ¦]¬°"well-defined procedure"¯Ê¤Ö¼Æ¾Ç¤Wºë½Tªº©w¸q¡A19¥@¬ö©M20¥@¬ö¦­´Áªº¼Æ¾Ç®a¡BÅÞ¿è¾Ç®a¦b©w¸qºtºâªk¤W¥X²{¤F§xÃø¡C20¥@¬öªº­^°ê¼Æ¾Ç®a¹ÏÆF´£¥X¤FµÛ¦Wªº¹ÏÆF½×ÃD¡A¨Ã´£¥X¤@ºØ°²·Qªº¹q¸£ªº©â¶H¼Ò«¬¡A³o­Ó¼Ò«¬³QºÙ¬°¹ÏÆF¾÷¡C¹ÏÆF¾÷ªº¥X²{¸Ñ¨M¤Fºtºâªk©w¸qªºÃøÃD¡A¹ÏÆFªº«ä·Q¹ïºtºâªkªºµo®i°_¨ì¤F­«­nªº§@¥Î¡C

2. ¸Õ¼g¤@½gij½×¤å¤ÀªR“MM»P¹q¸£ªº²§¦P¡C­n¨D¦³²z¦³¾Ú¡A»y¨¥ÄYÂÔ¬yºZ¡A¤£¤Ö©ó600¦r¡C¤å¤¤¤£±o¥X²{¯u¹êªº¤H¦W®Õ¦W¡C

 






³X«È¯d¨¥ (ªð¦^ phoeagon ªº¤é»x)

³X«È¦WºÙ¡G
¹q¶l¦a§}¡G (¤£·|¤½¶})
ÅçÃÒ½X¡G  «ö¦¹§ó·sÅçÃÒ½X (¦p¬Ý¤£²M·¡ÅçÃÒ½X½ÐÂIÀ»¹Ï¤ù¨ê·s)
«N«N¸Ü¡G (¥²»Ý µn¤J «á¤~¯à¨Ï¥Î¦¹¥\¯à)
[ ¶}±Ò¦h¥\¯à½s¿è¾¹ ]







¤H®ð¡G79393
¼ÊºÙ¡G phoeagon
©Ê§O¡G ¨k
MORE...  
« June 2024 »
SMTWTFS
1
2345678
9101112131415
16171819202122
23242526272829
30
» ³Ì·s¤é»x
Blog Moved!
¸ó¯¸jsMath实现
¸ô¥Ñªí¬O个¦n东¦è
Twitter Fav¦Cªí达陈100...
·d©w¤F¤½¦¡显¥Ü
» ¤é»x¤ÀÃþ
¥þ³¡ (175)
Code Storage (11)
Math&Phy@Chem@MM (8)
Music Anyway (5)
Programming Impossible (28)
RSS´£¥Ü (2)
StorageBox (5)
'Bout Here (12)
·Æ¹«¤H¥Í (42)
¸H®h (51)
¥¼¤ÀÃþ (11)
» ³X«È¯d¨¥
³Ìªñ¤T­Ó¤ë©|µL¥ô¦ó¯d¨¥
» ³Ìªñ³X«È
³Ìªñ¨S¦³³X«È
» ¨C¤ë¤å³¹
» ¤é»x­q¾\
©|¥¼­q¾\¥ô¦ó¤é»x
» §Úªº¦n¤Í
» §Úªº³sµ²
Ink Mark --Jlim
StarKirby
|S||S||S|
¡u¬y¦~²½¡v
» ¤é»x²Î­p
¤å³¹Á`¼Æ¡G 175
¯d¨¥Á`¼Æ¡G 86
¤µ¤é¤H®ð¡G 163
²Ö¿n¤H®ð¡G 79393
» ¯¸¤º·j¯Á
RSS Feed