?????? ????? - Recurrences - PowerPoint PPT Presentation

About This Presentation
Title:

?????? ????? - Recurrences

Description:

... (C, C++, Java, ( ... : : Data Structures, CS, TAU - 2.19 Cookbook Master Thm : ... – PowerPoint PPT presentation

Number of Views:52
Avg rating:3.0/5.0
Slides: 25
Provided by: TheA64
Category:

less

Transcript and Presenter's Notes

Title: ?????? ????? - Recurrences


1
???? ????????
?????
???? ????? ?????? ??????
?????? ?? ?????? (????????)
???? ???????? ??????
?????? ????? - Recurrences
Substitution - ????
???????
The Master Method
2
????? ?????? ???????-???
Data Structures, CS, TAU - 2.2
3
????? ????????? ????? ??????
????? ????? ?? ???? ??? (???? 3). (if v is not
adjacent to any vertex in newclr then begin)
(3.1) found false (3.2) for each vertex W
in newclr do (3.3) if there is an edge
between V and W in G then (3.4) found
true (3.5) if found false then begin (4)
. . (5) . .
.
Data Structures, CS, TAU - 2.1
4
???? ????? ?????? ??????
?????? ????? ???? ?????? (????? - ?????
??????, ???? ?????? - ????? ????)
Data Structures, CS, TAU - 2.3
5
Abstract Data Types
????- ???? ??? ????? ??? ?????? (??????? ???
?????? ?????, ?????)
?????- ????? ??? ????? ??????? ???? ?????
???? ??? ????? ??? ?????? ???? ???????
????? SET
????
???? SET

????? ?????? ?????? - ????? ?????? LIST ??????
1. MAKENULL (newclr) 2. W FIRST
(newclr) 3. W NEXT (newclr) 4. INSERT (v,
newclr)
Data Structures, CS, TAU - 2.4
6
????? ?-GRAPH
1. ??? ????? ?????? ??? ????
2. ???? ??? ?? ??? ??? 2 ?????
3. ??? ???? ?????
4. ??? ?? ????? ???
????
????? ???? ??????
???? ???? ?????? ???????? ???
???? ?????? ?? ?????? ??????? ????
???? ????? ?????? ????? ???????
Data Structures, CS, TAU - 2.5
7
?????? ?? ?????? (????????(
???? ??????, ????? ??????, ??????
(?????? ???????)
Data Structures, CS, TAU - 2.6
8
?????
???? ?????? ????? ?????? ?? ???? ???? ?? 10 - ??
???? ????? ??????
Data Structures, CS, TAU - 2.7
9
????? ???? ???? ?? 64
?????? ??? ????
Data Structures, CS, TAU - 2.8
10
?????
Procedure bubble var i, j, temp integer
begin (1) for i 1 to n-1 do (2) for j
n downto i1 do (3) if Aj-1 gt Aj
then begin swap Aj-1 and
Aj (4) temp Aj-1 (5)
Aj-1 Aj (6) Aj temp
end end bubble
Data Structures, CS, TAU - 2.9
11
????? ????? ???? (????????)
Function fact (n integer) begin (1) if nlt1
then (2) fact 1 else (3) fact
nfact(n-1) end fact
Data Structures, CS, TAU - 2.10
12
???? ???????? ??????
??? ?????
??? ?????
??? ????? ??????
exist c, n0 such that
f(n) exist c1, n0, c2 such that
Data Structures, CS, TAU - 2.11
13
??? o ???
O ???? ????? tight (????) ?? ??.
Data Structures, CS, TAU - 2.12
14
???? ???? ????????
Data Structures, CS, TAU - 2.13
15
???? ?????
CLR 1, 2.1-2.2
1.
2.
Growth of functions
????? ??
(?? ?????? ??? ????? ?????)
Data Structures, CS, TAU - 2.14
16
?????? ????? - Recurrences
Recurrence ?????? (??-???????) ?????? ???????
?? ????? ????? ?? ????????
????? ??????
1) Substitution
2) Iteration
3) Master
Data Structures, CS, TAU - 2.15
17
1. SUBSTITUTION (????)
?. ??? ??????
?????
?. ???? ??????????
?????
????
Data Structures, CS, TAU - 2.16
18
????? ?????
???? ?-n ???? ????
?????? ??????
1) ????? c - ??? ???? ???? ???? ????? ??????????.
2) ?? ?????? ?? ????? - ???? ?????? ?? ?????.
3) ???? ????? O ??????.
Data Structures, CS, TAU - 2.17
19
?????
???????
?"? ????
????
Data Structures, CS, TAU - 2.18
20
2. ???? ????????
????? ?????
Data Structures, CS, TAU - 2.19
21
3. THE MASTER METHOD
Master Thm
Data Structures, CS, TAU - 2.20
22
????? 1
Data Structures, CS, TAU - 2.21
23
????? 2
Data Structures, CS, TAU - 2.22
24
????? 3
???? n ????
Data Structures, CS, TAU - 2.23
Write a Comment
User Comments (0)
About PowerShow.com