›—30 œ‘—œ‘ 1.3

download  ›—30 œ‘—œ‘ 1.3

of 22

  • date post

    05-Feb-2016
  • Category

    Documents

  • view

    9
  • download

    0

Embed Size (px)

description

ΠΛΗ30 ΜΑΘΗΜΑ 1.3

Transcript of  ›—30 œ‘—œ‘ 1.3

  • 30 1:

    1.3:

  • .

    .

    1.

    2 , 30, 1.3:

    1.

    1.

    2.

    3.

    4.

    5.

    2.

    3. 3.

    .

  • .

    :

    3 , 30, 1.3:

    ( )

  • . 1.

    4 , 30, 1.3:

    ,,,, .

    f(n) g(n). :

    f=o(g) , f g

    fg

  • . 1. 1.

    5 , 30, 1.3:

    , f=O(g), : fg. : :

    n0, f(n) cg(n) c.

    ))(()( ngOnf = )()(0:0,00 ngcnfcn >> 0nn

    H f(n)=O(g(n)) f g

  • . 1. 1.

    6 , 30, 1.3:

    :

    1 1 : 2n=O(n3)

    : f(n)=2n, g(n)=n3

    n0=1, c=2.

    322)()(

    nn

    ncgnf

    n1

    21 n

  • . 1. 2. o

    7 , 30, 1.3:

    , f=(g), : f0.

  • . 1. 2. o

    8 , 30, 1.3:

    :

    2 2 : 2n=(n2)

    : c>0:

    nc

    cn

    cnn

    ncgnf

    > ngcnfnc 0nn

    n=(n) n(n) n=(logn) n=(loglogn) ...

    c>0.

  • . 1. 5.

    12 , 30, 1.3:

    :

    4 4 : 0.5n2=(n)

    : c>0:

    cn

    cnn

    ncgnf

    5.0

    5.0)()(

    2

    >

    >

    >

    >

    n0 cn 2>

    c2

  • . 1. 5.

    13 , 30, 1.3:

    , f=(g), f=g. : :

    n0, f(n) g(n), :

    ))(()( ngnf = )()()(0:0,,0 21210 ngcnfngcccn >0nn

    H f(n)=(g(n)) f g

  • . 1. 5.

    14 , 30, 1.3:

    :

    5 5 : 4n=(n)

    : f(n)=4n, g(n)=n

    n0=1, c1=2.

    2424

    )()( 1

    nn

    ngcnf

    n1

    n0=1, c2=6.

    n1

    24

    6464

    )()(

    nn

    ncgnf

  • 2 :

    . 2.

    15 , 30, 1.3:

    : , :

    ( )

    =+

    =

    ==

    +

    ))(()(,))(()(,0

    ))(()(,0

    )()(lim

    ngnfngonf

    ngnfc

    ngnf

    n

    ( ) :

  • . 2.

    16 , 30, 1.3:

    :

    6 6 : 0.5n2=(n)

    :

    0.5n2=(n)+===

    +++)5.0(lim5.0lim)(

    )(lim2

    nn

    n

    ngnf

    nnn

    6 6 : 2n=o(3n)

    :

    2n=o(3n)

    0)66.0(lim32lim

    32lim)(

    )(lim ==

    ==

    ++++

    n

    n

    n

    nn

    n

    nn ngnf

  • . 3.

    17 , 30, 1.3:

    ::

    : f=g fg fg

    : fg fg ( )

    3: ))(()( ngnf = ))(()( ngnf =

  • . 4.

    18 , 30, 1.3:

    O(n2): : :

    1=O(n2) n+2=O(n2) logn=O(n2) logn+5loglogn=O(n2) 3n2=O(n2)

    O(n2) n2. n2.

    O(n2) :

    .

    )(2)(1

    2

    2

    nOnnO

    +

  • . 1

    f g f

    19 , 30, 1.3:

    f g.

    f(n) g(n) o O n2 n3

    n1.5 n

    4logn 8logn5n2 0.5n2

    .. 1 , n2=o(n3)

    5n2 0.5n2

    n3-5n 8logn

  • . 2

    f g 3

    20 , 30, 1.3:

    3 f g

    g(n)=5 g(n)=logn g(n)=n2 g(n)=2n g(n)=5n g(n)=nn

    f(n)=loglogn f(n)=4logn

    f(n)=nf(n)=2n2

    .. 1 loglogn=(1)

    f(n)=2nf(n)=6n5+n

    f(n)=3n

    f(n)=n!

  • . 1

    , :

    21 , 30, 1.3:

    :

    )(.6)3(2.5

    )(46.4)(loglog.3

    )(4.2)log(.1

    2

    2

    22

    nn

    o

    nn

    nn

    nnn

    nnOn

    n

    nn

    =

    =

    =+=

    =+=

    )(.6 nn =

  • . 2

    , :

    22 , 30, 1.3:

    )(.6)3(2.5

    )(46.4)(loglog.3

    )(4.2)log(.1

    2

    2

    22

    nn

    o

    nn

    nn

    nnn

    nnOn

    n

    nn

    =

    =

    =+=

    =+=

    )(.6 nn =