Bai01 - Tong Quan

  • View
    218

  • Download
    3

Embed Size (px)

Transcript

  • 27/01/2015

    1

    Phn tch v Thit kTHUT TON

    H i Dng

    duonghd@mta.edu.vn

    Web: fit.mta.edu.vn/~duonghd

    Bi 1 - Gii thiuPHN TCH V THIT K THU TON

  • 27/01/2015

    2

    NI DUNG

    I. Gii thiu1. Mc ch

    2. Ni dung mn hc

    3. Hnh thc Kim tra, Thi v nh gi kt qu

    4. Ti liu tham kho

    II. Thut ton1. nh ngha

    2. Tnh cht

    3. Biu din

    NI DUNG

    III. phc tp thut ton1. Gii tiu

    2. Hng tip cn

    3. Phn lp phc tp

    IV. Bi tp

  • 27/01/2015

    3

    I. Gii thiu

    1. MC CH Cung cp kin thc v vic nh gi thut ton

    L thuyt Thc nghim

    Kin thc, k thut v gii quyt bi ton trn my tnh: Trc tip Gin tip

    Thit k thut gii Chia tr Quy hoch ng Tm kim cc b

    I. Gii thiu

    2. NI DUNG

    Tng quan v thut ton v phc tp ca thut ton

    nh gi thut ton: L thuyt (ton hc s cp)

    Thc nghim

    quy v phng php nh gi

    nh gi mt s thut ton thng dng Thut ton tm kim

    Thut ton sp xp

  • 27/01/2015

    4

    I. Gii thiu

    2. NI DUNG

    Cc phng php gii quyt bi ton trn my tnh Trc tip

    Gin tip

    K thut thit k thut ton Chia tr

    Gii thut tham lam

    Quy hoch ng

    Tm kim cc b

    I. Gii thiu

    3. HNH THC KIM TRA

    10% Chuyn cn

    20% Thng xuyn (bi tp, bi kim tra)

    70% Thi cui k (vn p): Sinh vin thc hin 1 bi tp ln vi yucu: Ci t thut ton cho bi ton t ra,

    Chy vi d liu pht sinh ngu nhin, m s php gn v so snh, v th, tnh phng sai, lch chun -> c lng phc tp ca thut ton

    Tnh ton bng l thuyt v so snh vi thc nghim.

    Vit bo co, vn p tr li cc cu hi t ra.

  • 27/01/2015

    5

    I. Gii thiu

    4. TI LIU THAM KHO

    Slide bi ging.

    Bi ging Thit k v nh gi Thut ton, Trn Xun Sinh, NXB, HQG, 2010.

    Cm nang thut ton, Robert Sedgewich - Trn an Th dch (ti bnln 2), NXB KHKT, 2006.

    Cu trc d liu v gii thut, Trn Xun Li, NXB H Quc Gia, 2006.

    Gii mt bi ton trn my tnh nh th no (3 tp), Hong Kim, NXB Gio dc, 2005.

    I. Gii thiu

    4. TI LIU THAM KHO

    Gii thut v lp trnh (bi ging chuyn ), L Minh Hong, HSP, 2002.

    Computer Algorithms Introduction to Design and Analysis, Addison-Wesley, 1988.

    Algorithms and Complexity, Herbert S. Wilf, University of Pennsylvania, Philadelphia 1999.

    Algorithm Design, Jon Kleinberg, Eva Tardos Pearson, 2006.

  • 27/01/2015

    6

    II. Thut ton

    1. NH NGHA

    C nhiu cch pht biu c chp nhn, trong :

    1)

    2)

    II. Thut ton

    2. TNH CHT

  • 27/01/2015

    7

    II. Thut ton

    2. TNH CHT

    II. Thut ton

    2. TNH CHT

  • 27/01/2015

    8

    II. Thut ton

    2. TNH CHT

    II. Thut ton

    3. BIU DIN THUT TON

  • 27/01/2015

    9

    II. Thut ton

    4. THUT GII

    III. phc tp thut ton

    1. GII THIU

    Kch thc ca bi ton n (c th hiu l s phn t cn phi x l ca biton) V d: Sp xp mt danh sch n sinh vin

    Tm phn t X trong mt mng c n phn t

    Vi 1 bi ton c th c nhiu thut gii (chng trnh) Chng trnh 1

    Chng trnh 2

    Chng trnh (thut gii) no tt?

  • 27/01/2015

    10

    III. phc tp thut ton

    1. GII THIU nh gi phc tp thi gian tnh ton

    (V thi gian cn ph thuc vo mt my tnh c th)

    nh gi theo tng s cc php ton c bn (gn, so snh)

    V vic nh gi ph thuc vo n nn phc tp thut ton c hiunh mt hm ph thuc vo n, f(n)

    III. phc tp thut ton

    2. HNG TIP CN

    nh gi f(n) nh th no?

  • 27/01/2015

    11

    III. phc tp thut ton

    2. HNG TIP CN

    Hng tip cn thc nghim

    III. phc tp thut ton

    2. HNG TIP CN

    c lng tim cn(l thuyt):

    ngha:

    nh ngha:

  • 27/01/2015

    12

    III. phc tp thut ton

    2. HNG TIP CN

    c lng tim cn(l thuyt):

    III. phc tp thut ton

    2. HNG TIP CN

    c lng tim cn(l thuyt):

  • 27/01/2015

    13

    III. phc tp thut ton

    2. HNG TIP CN

    c lng tim cn(l thuyt):

    III. phc tp thut ton

    2. HNG TIP CN

    c lng tim cn(l thuyt):

  • 27/01/2015

    14

    III. phc tp thut ton

    2. HNG TIP CN

    c lng tim cn(l thuyt):

    III. phc tp thut ton

    2. HNG TIP CN

    c lng tim cn(l thuyt):

  • 27/01/2015

    15

    III. phc tp thut ton

    2. HNG TIP CN

    c lng tim cn(l thuyt):

    III. phc tp thut ton

    3. PHN LP CC HM

  • 27/01/2015

    16

    III. phc tp thut ton

    3. PHN LP CC HM

    III. phc tp thut ton

    3. PHN LP CC HM

  • 27/01/2015

    17

    III. phc tp thut ton

    4. MT S VN KHC

    S ph thuc/khng ph thuc vo phn b d liu

    III. phc tp thut ton

    4. MT S VN KHC

    Tnh O (ln) da trn quy tc Cng/Nhn

  • 27/01/2015

    18

    NI DUNG BI HC

    I. Gii thiu

    II. Thut ton

    III. phc tp thut ton

    IV. Bi tp

    1. Nu nh ngha, tnh cht v cc cch thc biu din thut ton

    2. Cho cc bi ton sau:a) Tnh nghim phng trnh bc 2: ax2+bx+c=0, a0.

    b) Tnh tng bnh phng ca n s t nhin u tin.

    c) Tm s c gi tr x trong dy x1, x2,,xn.

    d) Tm s c gi tr ln nht trong dy x1, x2,,xn.

    Hy tm thut ton gii bi ton trn, m t cc thut ton s dng ngnng t nhin v ch ra cc tnh cht ca thut ton .

    3. M t cc thut ton trong bi 2 dng s khi.

    4. M t cc thut ton trong bi 2 dng gi m.