Download presentation
Presentation is loading. Please wait.
Published byAmberly Pearson Modified over 9 years ago
1
Correctness of Constructing Optimal Alphabetic Trees Revisited Marek Karpinski, Lawrence L. Larmore, Wojciech Rytter Theoretical computer science 180 (1997) 309-324
2
18/12/2000 2 Outline Definitions General version of Garsia-Wachs (GW) algorithm Proof of GW Hu-Tacker (HT) algorithm Proof of HT by similarity to GW
3
18/12/2000 3 Definitions Binary tree: Every internal node has exactly two sons
4
18/12/2000 4 Definitions
5
18/12/2000 5 The Move Operator
6
18/12/2000 6 The Move Operator
7
18/12/2000 7 The Move Operator
8
18/12/2000 8 The Move Operator
9
18/12/2000 9 Definitions
10
18/12/2000 10 Theorem 1 (correctness of GW)
11
18/12/2000 11 Garsia-Wachs Algorithm
12
18/12/2000 12 Definitions
13
18/12/2000 13 Theorem 2
14
18/12/2000 14 Shift Operations
15
18/12/2000 15 Shift Operations
16
18/12/2000 16 LeftShift Example
17
18/12/2000 17 LeftShift Example
18
18/12/2000 18 LeftShift Example
19
18/12/2000 19 LeftShift Example
20
18/12/2000 20 LeftShift Example
21
18/12/2000 21 LeftShift Example
22
18/12/2000 22 LeftShift Example
23
18/12/2000 23 LeftShift Example
24
18/12/2000 24 LeftShift Example
25
18/12/2000 25 Theorem 2
26
18/12/2000 26 Proof of Point 2 in Theorem 2
27
18/12/2000 27 Proof of Point 2 in Theorem 2
28
18/12/2000 28 Proof of Point 3 Theorem 2
29
18/12/2000 29 Definition of Well Shaped Segments
30
18/12/2000 30 Definition of Well Shaped Segments Active Window
31
18/12/2000 31 Movability Lemma If the segment [i,…,j] is left well shaped, then the active pair (i,i+1) can be moved to the other side of the segment by locally rearranging sub-trees in the active window without changing the relative order of the other items and without changing the level function of the tree.
32
18/12/2000 32 Movability Lemma
33
18/12/2000 33 Movability Lemma
34
18/12/2000 34 Movability Lemma
35
18/12/2000 35 Movability Lemma
36
18/12/2000 36 Movability Lemma
37
18/12/2000 37 Theorem 3
38
18/12/2000 38 Point 1 in Theorem 2
39
18/12/2000 39 Hu-Tucker Algorithm Transparent items and opaque items Compatible pair – No opaque items in the middle Minimal compatible pair (mcp) – compatible pair (i,i+1) where Weight(i) + weight(i+1) is minimal Tie Breaking Rule
40
18/12/2000 40 Hu-Tucker Algorithm
41
18/12/2000 41 Hu-Tucker Algorithm
42
18/12/2000 42 Hu-Tucker Algorithm
43
18/12/2000 43 Hu-Tucker Algorithm
44
18/12/2000 44 GW` Algorithm gmp – Globaly Minimal Pair GW` - the same as GW but always choose gmp instead of some other lmp.
45
18/12/2000 45 Definitions Special sequence – sequence of weights, each one is either transparent or opaque Normal sequence – sequence of weights MoveTransparent operator – converts a special sequence into a normal sequence and moves all transparent items to their RightPos. (first it moves the rightmost item, then the one to its left, etc…)
46
18/12/2000 46 MoveTransparent
47
18/12/2000 47 MoveTransparent
48
18/12/2000 48 MoveTransparent
49
18/12/2000 49 MoveTransparent
50
18/12/2000 50 MoveTransparent
51
18/12/2000 51 MoveTransparent
52
18/12/2000 52 MoveTransparent
53
18/12/2000 53 MoveTransparent
54
18/12/2000 54 MoveTransparent
55
18/12/2000 55 MoveTransparent
56
18/12/2000 56 MoveTransparent
57
18/12/2000 57 MoveTransparent
58
18/12/2000 58 MoveTransparent
59
18/12/2000 59 MoveTransparent
60
18/12/2000 60 MoveTransparent
61
18/12/2000 61 MoveTransparent
62
18/12/2000 62 The Simulation Lemma Assuming there are no ties
63
18/12/2000 63 Proof of the Simulation Lemma Claim A Claim B
64
18/12/2000 64 Proof of Claim A By contradiction assume that w,u are not visible to each other. This means there is an opaque item q between them. Two cases:
65
18/12/2000 65 Proof of Claim A Contradiction – no place for q
66
18/12/2000 66 Proof of Claim A
67
18/12/2000 67 Proof of Claim A Contradiction – no place for q
68
18/12/2000 68 Proof of Claim B Claim B Proof
69
18/12/2000 69 Proof of Claim B The order of movements is from right to left, thus w is Processed first then the items between u and w, and then u. At this point u and w must be adjacent, thus q must be processed later, and thus it is to the left of u. q is not visible from u because (u,w) is mcp
70
18/12/2000 70 Proof of Claim B Let q` be the opaque item between q and u visible from u Contradiction
71
18/12/2000 71 Conclusion
72
18/12/2000 72 Claim C
73
18/12/2000 73 Proof of claim C
74
18/12/2000 74 Proof of Simulation Lemma The proof of the lemma is by induction
75
18/12/2000 75 Tie Braking Rule Theorem 4 The Tie Breaking Rule (TBR) is correct Proof
76
18/12/2000 76 Proof of TBR Case 1: All weights are strictly positive
77
18/12/2000 77 Proof of TBR Case 2: Some of the original weights are zero
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.