0 évaluation0% ont trouvé ce document utile (0 vote)
2 vues14 pages
The first set of lectures for this week is meant to give you the flavor of the course, and hopefully get you excited about it. We begin by discussing algorithms in general and why they're so important, and then use the problem of multiplying two integers to illustrate how algorithmic ingenuity can often improve over more straightforward or naive solutions. We discuss the Merge Sort algorithm in detail, for several reasons: it's a practical and famous algorithm that you should all know; it's a good warm-up to get you ready for more intricate algorithms; and it's the canonical introduction to the "divide and conquer" algorithm design paradigm. These lectures conclude by describing several guiding principles for how we'll analyze algorithms in this course.
The first set of lectures for this week is meant to give you the flavor of the course, and hopefully get you excited about it. We begin by discussing algorithms in general and why they're so important, and then use the problem of multiplying two integers to illustrate how algorithmic ingenuity can often improve over more straightforward or naive solutions. We discuss the Merge Sort algorithm in detail, for several reasons: it's a practical and famous algorithm that you should all know; it's a good warm-up to get you ready for more intricate algorithms; and it's the canonical introduction to the "divide and conquer" algorithm design paradigm. These lectures conclude by describing several guiding principles for how we'll analyze algorithms in this course.
The first set of lectures for this week is meant to give you the flavor of the course, and hopefully get you excited about it. We begin by discussing algorithms in general and why they're so important, and then use the problem of multiplying two integers to illustrate how algorithmic ingenuity can often improve over more straightforward or naive solutions. We discuss the Merge Sort algorithm in detail, for several reasons: it's a practical and famous algorithm that you should all know; it's a good warm-up to get you ready for more intricate algorithms; and it's the canonical introduction to the "divide and conquer" algorithm design paradigm. These lectures conclude by describing several guiding principles for how we'll analyze algorithms in this course.
Gio vin: toannv@uit.edu.vn Mn hc http://forum.uit.edu.vn/threads/4202 Gio trnh Problems in Algorithms (tc gi: Ian Parberry) Mn hc 1. Tn mn hc: Phn tch v thit k thut ton (Design and Analysis of Algorithms) 2. S tn ch: 3 tn ch (3 tn ch l thuyt; 0 tn ch thc hnh) 3. Trnh : cho sinh vin nm th 3 4. Phn b thi gian: LT: 45 tit 5. Mt s mn hc nn hc trc: - Cu trc d liu v gii thut - Cu trc d liu nng cao - Cu trc ri rc 6. Thi - Lm bi tp + thi gia k + thi cui k Mc tiu Phn tch c cc gii thut, tnh ton phc tp tnh ton, c s tnh ton phc tp ca cc thut ton. Mn hc cn cung cp cc phng php thit k thut ton nh : Phng php chia tr, phng php quay lui, phng php tham lam, phng php qui hoch ng, phng php nhnh cn. Gii thiu cc loi bi ton P, NP, NP y . Dn nhp T duy gii quyt vn : cu chuyn phng vn xin vic Lazada.vn, Google, Microsoft Microsoft ni ting l c cc cu hi phng vn nhn vin mi mang tnh k thut theo dng mo (a s l v thut ton hoc lp trnh C/C++). Gn y Google cng phng vn theo kiu tng t. y l mt cu hi s 25 trong s 33 cu ca Google: Cho mt dy s A gm n s thc: A[1],.., A[n]. Mt dy con ca A l mt dy lin tc cc phn t ca A. V d: dy A[2], A[2], , A[17] l mt dy con ca A. Bi ton l tm cch in ra dy con c tng ln nht ca A. (ch l A c th ln ln cc s m, dng.) Tng quan Bi ton xp bal: Mt k trm t nhp vo mt ca hiu tm thy c n mt hng c trng lng v gi tr khc nhau, nhng hn ch mang theo mt ci ti c sc cha v trng lng ti a l M. Vy k trm nn b vo ba l nhng mn no v s lng bao nhiu t gi tr cao nht trong kh nng m hn c th mang i c. Bi ton xp bal Thut ton tham lam: Martello v Toth (1990) a ra mt thut ton gn ng kiu tham lam (greedy approximation algorithm) gii bi ton xp ba l. Gii thut ny sp xp cc vt theo th t gim dn v gi tr, sau theo th t xp cc vt vo ba l cho n khi khng cho thm c vt no vo na. Qui hoch ng (dynamic program) qui Quay lui nh gi nhnh cn Thut ton Khi nim thut ton Thit k thut ton Tnh ng n ca thut ton Phn tch thut ton nh gi hiu qu ca thut ton Cc phng php biu din thut ton Thit k thut ton Thut ton: Khi nim thut ton V d: Thut ton tm USCLN Dy nu n Cc yu cu ng Dng Xc nh In/Out Kh thi Thut ton: Thit k thut ton Chin lc Tham lam Chia tr Qui hoch ng Thut ton: Tnh ng ca thut ton V d Chng minh thut ton Euclid Thut ton: Hiu qu ca thut ton n gin, d hiu Khng gian v thi gian Thut ton: Cc phng php biu din thut ton Ngn ng t nhin S khi Ngn ng lp trnh m gi Thut ton: Chng trnh = Thut ton + CTDL Cc CTDL thng dng Mng DSLK Cy Stack Queue th