Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

of

ΠΛΗ30 ΚΑΡΤΑ 1.4 (4sl) Slide 1
Upcoming SlideShare
ΠΛΗ30 ΜΑΘΗΜΑ 1.4
Next
Download to read offline and view in fullscreen.

0 Likes

Share

Download to read offline

ΠΛΗ30 ΚΑΡΤΑ 1.4 (4sl)

Download to read offline

.

Related Audiobooks

Free with a 30 day trial from Scribd

See all
  • Be the first to like this

ΠΛΗ30 ΚΑΡΤΑ 1.4 (4sl)

  1. 1. : , « » , : : (1) : ( ) procedure BinarySearch(A,x,start,finish) if start>finish then return 0 else middle=(start+finish) div 2 if (x==A[middle]) then return middle else if (x<A[middle]) then pos=BinarySearch(A,x,start,middle-1) return pos else if (x>A[middle]) then pos=BinarySearch(A,x,middle+1,finish) return pos end if end if end procedure : , x ! : : • ! " # . : • ! " 0 " : ! $ : x = , " # . x < , % x > , % : & - . ' ( (merge) (n). : ) : ( ) : ! " # $ % $ procedure MergeSort(A,start, finish) if |A|<=2 then else middle=(start+finish) div 2 A1=MergeSort(A,start,middle) A2=MergeSort(A,middle+1,finish) A=Merge(A1,A2) end if end procedure : ! : ( ) " : : ) * ) ( procedure Merge(A, ) i=1, j=1, k=1 while (i<=n AND j<=m) if (ai<bj) then ck=ai ; i=i+1 else ck=bj ; j=j+1 k=k+1 end while B C return C end procedure $ % " " ! "#$ % &: + a,1, b>1 # , # . # ( : ) # >0, : !" -) : !" !" &) # $ # >0 % & # c<1, : + : . : # >0 / ’ : n n TnT += 2 8)( 38loglog,)(,2,8 2 ===== annfba b )()( 3 ε− == nOnnf )()( 3 nnT Θ= + : . : / B’ : 2 3 9)( n n TnT += 29loglog,)(,3,9 3 2 ===== annfba b )()( 22 nnnf Θ== )log()( 2 nnnT Θ= + : . : # >0 ! c<1 ( : / ½0c<1. / &’ : 3 2 4)( n n TnT += 24loglog,)(,2,4 2 3 ===== annfba b )()( 23 ε+ Ω== nnnf cccn n cn n ncf n fncf b n af ≤⇔≤⇔≤⇔≤⇔≤⇔≤ 2 1 8 4 2 4 2 4)( 2 4)( 3 3 3 3 3 )()( 3 nnT Θ= '()*+,-./ 0 1234 5 6 ’ -’ 7 &’ : $ $& ' ' # ( : 1 : 8 9: ; < = 7 > 2 : 8 : ; < = : : ; <? ; < = = := ; <? : ; < = = := : ; <@ ; <? = : ; < = = :A ; <@ := ; <? = : ; < = = B :C ; <D :C E ; <DFG = B := ; <? = : ; < = = 3 ; <D H IC H J < :KLMN ; ; <OPQN R :KLMN ; E ; <OPQN RFG = B := ; <? = : ; < = = :KLMN ; :KLMN ; E ; <OPQN RFG = B := ; <? = : ; < = = S :T ; <U =KLMN ; E TVW S :T ;? <U ? KLMN ; E TVW = S AU <? U KLMN ; E TVW = S AU EXU KLMN ; E TVW = S A EX TKLMN ; E TVW = @ GY OPQN R E @ GY E = 1. 3 " ( " " : 8 ZA ; [@ ). 4 2. ! k % ( # : ; [D ) 3. ) $ ( ; [D W k). . . W , J [ 4. k 5 2 5. ) . 4 : S T; TVW ]R^G E ] E 3 )* & + & # ' , & _ `a b 7 c &b c • 6 $ "( • 6 # ( • 6 # 8 : ; < = ; < : ; <? ; < = ; <? : ; <@ ; <? = >

.

Views

Total views

7,675

On Slideshare

0

From embeds

0

Number of embeds

6,956

Actions

Downloads

161

Shares

0

Comments

0

Likes

0

×