COMP 5331 MultiCriteria Decision Making Prepared by Raymond
COMP 5331 Multi-Criteria Decision Making Prepared by Raymond Wong Presented by Raymond Wong raywong@cse COMP 5331 1
Multi-Criteria Decision Making n n Skyline Algorithm COMP 5331 2
We want to find a hotel near to Disneyland. Distance from the Disneyland 1. Skyline. Hotel ID y ID Distance Price ID (x, y) c 4 8 c (4, 8) d d 6 7 d (6, 7) f e 9 10 e (9, 10) f 7 5 f (7, 5) g 5 6 g (5, 6) h 4 3 h (4, 3) i 3 2 i (3, 2) 4 l (10, 4) 2 m (6, 2) 3 n (8 , 3) 10 9 e c 8 7 g 6 5 4 h 3 2 n m i l 1 0 1 2 3 4 5 6 7 8 9 10 Objective: to find a hotel with (1) low price, and (2) short distance from Disneyland COMP 5331 Price of Hotel x l How can we find a 10 hotel by considering TWO m 6 criteria atnthe SAME 8 time? 3
We want to find a hotel near to Disneyland. Distance from the Disneyland 1. Skyline. Hotel ID y Price of Hotel ID 10 9 e c 8 d 7 g 6 5 4 f h 3 2 n l 8 9 10 m i 1 0 1 2 3 4 5 6 7 Objective: to find a hotel with (1) low price, and (2) short distance from Disneyland COMP 5331 x Distance This is because hotel i Price ID other (x, y) dominates all 8 c (4, 8) hotels c 4 Hotel i has d 7 d (6, 7) (1) the lowest price 6 Both distance and price of (2) the shortest distance e 9 10 e (9, 10) hotel i are smaller than or from Disneyland f 7 5 f of all(7, 5) equal to those other g 5 6 (5, 6) hotels (≠hotelg i) Hotel i isha skyline 4 point. 3 h there(4, In other words, is 3) no i 3 2 i (3, 2) hotel which dominates i. l 4 How can we find a 10 hotel l (10, 4) by considering TWO m 6 2 is the formal m (6, 2) This criteria atnthe SAME 8 3 definition of nskyline(8 , 3) time? points. Point p is a skyline point if there is no hotel which dominates point p 4
Consider other examples 1. Skyline y y Does i dominate h? Yes 10 9 8 7 7 6 5 h 4 3 i 2 Does i dominate h? No 10 i 2 1 1 0 1 COMP 5331 2 3 4 5 6 7 8 9 10 x 0 1 2 3 4 5 6 7 8 9 10 x 5
Consider other examples 1. Skyline y y Does i dominate h? No 10 9 8 7 7 6 5 4 4 3 3 i 2 Does i dominate h? No 10 h 1 i h 2 1 0 1 COMP 5331 2 3 4 5 6 7 8 9 10 x 0 1 2 3 4 5 6 7 8 9 10 x 6
Consider other examples 1. Skyline y y Does i dominate h? Yes 10 9 8 7 7 6 5 4 4 3 2 hi 3 h i Does i dominate h? No 10 2 1 1 0 1 2 IMPORTANT!!! COMP 5331 3 4 5 6 7 8 9 10 x 0 1 2 3 4 5 6 7 8 9 10 x Definition: Hotel i dominates hotel f if both distance and price of hotel i are smaller than or equal to those of hotel f AND both distance and price of hotel i are NOT equal to those of hotel f 7
We want to find a hotel near to Disneyland. Distance from the Disneyland 1. Skyline. Hotel ID y 10 ab 9 8 ID Distance Price ID (x, y) a 1 9 a (1, 9) d b 2 10 b (2, 10) f c 4 8 c (4, 8) d 6 7 d (6, 7) e 9 10 e (9, 10) f 7 5 f (7, 5) g 5 6 g (5, 6) h 4 3 h (4, 3) 2 i (3, 2) 1 k (9, 1) 4 l (10, 4) e c 7 g 6 5 4 h 3 2 n m i 1 2 3 l k 1 0 4 5 6 7 8 9 10 Objective: to find a hotel with (1) low price, and (2) short distance from Disneyland COMP 5331 Price of Hotel x How can we find a hotel i 3 by considering TWO k the SAME 9 criteria at 10 time? l m 6 2 m (6, 2) n 8 3 n (8 , 3) 8
We want to find a hotel near to Disneyland. Distance from the Disneyland 1. Skyline. Hotel ID y Price of Hotel ID 10 ab 9 8 e c d 7 g 6 5 4 f h 3 2 n m i k 1 0 1 2 3 l 4 5 6 7 8 9 10 Objective: to find a hotel with (1) low price, and (2) short distance from Disneyland COMP 5331 x Distance Price ID (x, y) Hotels a, ia and k are 1 the a 9 skyline points. b b 2 10 There is no hotel which c c 4 8 dominates hotel a. (2, 10) There is 10 no hotel which e dominates hotel i. (9, 10) d 6 e 9 f 7 7 5 d f There is 6 no hotel which g h 4 dominates 3 hotel k. h How can we find a hotel i i 3 2 by considering TWO k k the SAME 9 1 criteria at l 10 4 time? l g 5 (1, 9) (4, 8) (6, 7) (7, 5) (5, 6) (4, 3) (3, 2) (9, 1) (10, 4) m 6 2 m (6, 2) n 8 3 n (8 , 3) 9
We want to find a hotel near to Disneyland. Distance from the Disneyland 1. Skyline. Hotel ID y Price of Hotel ID 10 ab 9 8 e c g 6 5 4 f h 3 2 n m i 0 1 2 3 l k 1 4 5 6 7 8 9 10 Objective: to find a hotel with (1) low price, and (2) short distance from Disneyland COMP 5331 Price ID Hotel h isa. NOT a skyline a 1 9 point. b b 2 10 This is because hotel i c c 4 8 dominates hotel h. d 7 Distance x (4, 8) (6, 7) 5 6 g (5, 6) 4 3 h (4, 3) 2 i (3, 2) 1 k (9, 1) 4 l (10, 4) e 9 h (2, 10) d 6 g (1, 9) 7 d f (x, y) That is, 10 both distance e and(9, 10) price of hotel i are smaller or f (7, 5) 7 5 equal to than those of hotel h. How can we find a hotel i 3 by considering TWO k the SAME 9 criteria at 10 time? l m 6 2 m (6, 2) n 8 3 n (8 , 3) 10
We want to find a hotel near to Disneyland. Distance from the Disneyland 1. Skyline. Hotel ID y Price of Hotel ID 10 ab 9 8 e c d 7 g 6 5 4 f h 3 2 n m i k 1 0 1 2 3 l 4 5 6 7 8 9 10 Objective: to find a hotel with (1) low price, and (2) short distance from Disneyland COMP 5331 x Distance Price ID (x, y) Hotels a, ia and k are 1 the a 9 skyline points. b b 2 10 There is no hotel which c c 4 8 dominates hotel a. (2, 10) There is 10 no hotel which e dominates hotel i. (9, 10) d 6 e 9 f 7 7 5 d f There is 6 no hotel which g h 4 dominates 3 hotel k. h How can we find a hotel i i 3 2 by considering TWO k k the SAME 9 1 criteria at l 10 4 time? l g 5 (1, 9) (4, 8) (6, 7) (7, 5) (5, 6) (4, 3) (3, 2) (9, 1) (10, 4) m 6 2 m (6, 2) n 8 3 n (8 , 3) 11
Consider other examples 1. Skyline Which are the skyline points? y y 10 ab 9 8 10 e c 8 d 7 g 6 5 2 m i 1 0 1 2 3 COMP 5331 4 5 6 g h 8 9 10 f n m 3 2 k 7 d 4 l e c 6 5 n h 3 i 7 f 4 ab 9 k 1 x l 0 1 2 3 4 5 6 7 8 9 10 x 12
Consider other examples 1. Skyline Hotels a, i and k are the skyline points. y 10 ab 9 8 y e c 10 g 6 5 4 8 2 m i d g 6 5 n l f 4 3 k 1 e c 7 f h 3 ab 9 d 7 Hotels a, i, h and k are the skyline points. h 2 n m i k 1 0 1 2 3 COMP 5331 4 5 6 7 8 9 10 x 0 1 2 3 l 4 5 6 7 8 9 10 x 13
Why Skyline? y 10 ab 9 8 We return all “possible” hotels which customers are interested e c d 7 g 6 5 4 2 We remove all hotels which customers are not interested. f n h 3 m i 1 2 3 4 5 6 7 8 Skyline points cover all possible choices of customers (if we do not know the score function) COMP 5331 Different customers may have different weights on different dimensions. l k 1 0 Hotels a, i and k are the skyline points. 9 10 x e. g. , Customer 1 weighs x (distance) higher prefers a Score function = 0. 9 x + 0. 1 y Customer 2 weighs y (price) higher prefers k Score function = 0. 1 x + 0. 9 y 14
1. Skyline Back to our original example y 10 ab 9 8 e c Hotels a, i and k are the skyline points. d 7 g 6 5 4 f h 3 2 n m i k 1 0 1 2 3 COMP 5331 How can we find the skyline points efficiently? l 4 5 6 7 8 9 10 x We can build an index for this data set (e. g. R-tree). 15
2. R-tree y 10 ab 9 8 N 1 e N 2 c N 6 d 7 g 6 5 N 3 4 3 2 f h n m N 5 i 1 2 3 4 5 6 7 l N 4 N 7 k 1 0 We obtain an R-tree from the data set. 8 9 10 R e 6 e 7 x N 7 N 6 e 1 COMP 5331 a b c N 1 e 2 d e f N 2 e 3 e 4 e 5 g h i N 3 l k N 4 m n N 5 16
2. R-tree You don’t need to know the details of R-tree y 10 ab 9 8 N 1 e N 2 c N 6 d 7 g 6 5 N 3 4 3 2 f h n m N 5 i 1 2 3 4 5 6 7 l N 4 N 7 k 1 0 Max no of entries M= 3 Min no of entries m= 2 8 9 10 R e 6 e 7 x N 7 N 6 e 1 COMP 5331 a b c N 1 e 2 d e f N 2 e 3 e 4 e 5 g h i N 3 l k N 4 m n N 5 17
3. Algorithm of Finding Skylines n Definition of Distance of N 6 = 5+1 = 6 y y 10 10 9 9 Distance of i = 2+3=5 8 7 N 6 8 7 6 5 4 4 3 3 3 i 2 1 0 1 2 3 5 2 4 5 6 7 8 9 10 x 0 1 2 3 4 5 6 7 8 9 10 x 1 COMP 5331 18
3. Algorithm of Finding Skylines n n Algorithm (without R-tree) Algorithm (with R-tree) COMP 5331 19
3. Algorithm of Finding Skylines n Algorithm (without R-tree) n n n Input: D: a set of processing data points S Ф // S is a set of skylines As “minimum” is used, we can make use of the heap data structure. While D ≠Ф n Find point P with the minimum distance value (according to the distance defined in the previous slide) n Check whether P is dominated by a point in S n If P is NOT dominated by any point in S (i. e. P is a skyline point) n Insert P into S n Remove P from D COMP 5331 20
3. Algorithm of Finding Skylines n Algorithm (without R-tree) n n n Input: D: a set of processing data points S Ф // S is a set of skylines Insert all points in D into heap according to the distance defined before While Dheap ≠Ф ≠Ф n Find point P with the minimum distance value (according to the Remove top entry P from heap distance defined in the previous slide) n Check whether P is dominated by a point in S n If P is NOT dominated by any point in S (i. e. P is a skyline point) n Insert P into S n Remove P from D COMP 5331 21
3. Algorithm of Finding Skylines i S={ } y 10 ab 9 8 Which point has the smallest distance value? e c Is it a skyline point? Yes d 7 g 6 5 4 2 n m i 1 2 3 COMP 5331 l k 1 0 4 Distance=5 f h 3 i 5 6 7 8 9 10 x This is because no point dominates i. 22
3. Algorithm of Finding Skylines i S={ } y 10 ab 9 8 Which point has the smallest distance value? e c Is it a skyline point? Yes d 7 g 6 5 4 f h 3 2 n m i 0 1 2 3 Is it a skyline point? No k 1 4 5 6 7 8 9 10 Distance=5 Which point has the 2 nd smallest distance value? l i h Distance=7 x This is because i dominates h. COMP 5331 23
3. Algorithm of Finding Skylines i S={ } y 10 ab 9 8 Which point has the smallest distance value? e c Is it a skyline point? Yes d 7 g 6 5 4 f h 3 2 n m i 0 1 2 3 4 5 6 7 8 Distance=5 Which point has the 2 nd smallest distance value? l Is it a skyline point? No k 1 i 9 10 x Distance=7 Which point has the 3 rd smallest distance value? Is it a skyline point? No h m Distance=8 We continue the steps similarly to find the skyline points. COMP 5331 This is because i dominates m. 24
Rule: When we pick a point p with the smallest distance value, we compare p with each point in S If p is not dominated by any point in S, p is a skyline point. S={ i } Why can we compare p with the points in S y only (not all points in the dataset)? 10 Which point has the smallest distance value? e b 9 3. Algorithm of Finding Skylines a c 8 Is it a skyline point? Yes d 7 g 6 5 4 f h 3 2 n m i 0 1 2 3 Is it a skyline point? No k 1 4 5 6 7 8 9 10 Distance=5 Which point has the 2 nd smallest distance value? l x i h Distance=7 Which point has the 3 rd smallest distance value? m We guarantee that all points q which dominate p are processed Is it a skyline point? No Distance=8 before p is processed. We continue the steps similarly to find the skyline points. Thus, there exists a point q dominating p in S (if there are some This is because i points dominating p). COMP 5331 25 dominates m.
3. Algorithm of Finding Skylines y y 10 ab 9 8 10 e c 8 d 7 g 6 5 4 3 2 m 1 0 1 2 3 4 5 6 7 8 9 10 N 3 2 f h n m N 5 i x 0 1 2 3 4 5 6 7 l N 4 N 7 k 1 Here, we did not consider the R -tree structure. COMP 5331 g 3 k N 6 d 4 l e N 2 c 6 5 n i N 1 7 f h ab 9 8 9 10 x How can we make use of the R-tree structure for finding skyline points? 26
Now, we. Skylines process MBR N 3. Algorithm of Finding Are all hotels/points inside N skyline 2 n points? Properties y 10 9 8 y Now, we process hotel h. Is hotel h a skyline point? 10 No 7 7 6 5 This is because i dominates h. h 4 3 i 2 0 1 2 3 Suppose we know that hotel i is a skyline point. COMP 5331 4 5 6 7 N 2 9 8 d f 6 5 4 3 2 1 1 2 i e No This is because i dominates all hotels/points inside N 2. Formally, i dominates N 2. 0 Suppose we know that x 1 2 3 4 5 6 7 8 9 10 x 8 9 10 hotel i is a skyline. Both x and y of i are ≦ those of bottom-left corner of MBR Conclusion: We do not need to process every hotels/points We may “prune” a lot of hotels in some MBRs (e. g. N 2) 27
3. Algorithm of Finding Skylines y y Does i dominate N? Yes 10 9 8 N 7 9 8 7 6 5 4 4 3 N 3 i 2 Does i dominate N? No 10 i 2 1 1 0 1 COMP 5331 2 3 4 5 6 7 8 9 10 x 0 1 2 3 4 5 6 7 8 9 10 x 28
3. Algorithm of Finding Skylines y y Does i dominate N? No 10 9 8 7 7 6 5 4 4 N 3 i 2 Does i dominate N? No 10 i 2 1 1 0 1 COMP 5331 2 3 4 5 6 7 8 9 10 x 0 1 2 3 4 5 6 7 8 9 10 x 29
3. Algorithm of Finding Skylines n Algorithm n n Input: R: an R-tree built from the data set S Ф // S is a set of skylines Insert all entries of the root R in the heap while heap ≠Ф n n Remove top entry e from heap If e is dominated by a point in S n n Discard e Else // e is not dominated by any point in S n If e is an internal node n n Else n COMP 5331 n for each child ei of e if ei is not dominated by any point in S insert ei into heap // e is a data point Insert ei into S 30
3. Algorithm for Finding Skylines Distance of e 6=1+5=6 y 10 N 1 ab 9 g 6 5 N 3 4 3 2 h n m N 5 i 1 2 3 4 Access Root <e 7, 4 > <e 6, 6 > {} f 5 6 7 l N 4 N 7 k 1 0 S N 6 d 7 Heap Contents e N 2 c 8 Action 8 9 10 R e 6 e 7 x Distance of e 7=3+1=4 COMP 5331 N 7 N 6 e 1 a b c N 1 e 2 d e f N 2 e 3 e 4 e 5 g h i N 3 l k N 4 m n N 5 31
e 7 is not dominated by any point in S As e 7 is an internal node, expand e 7. 3. Algorithm for Finding Skylines y 10 N 1 ab 9 c 8 e N 2 g 6 5 N 3 4 3 2 h n m N 5 i 1 2 3 4 S Access Root <e 7, 4 > <e 6, 6 > {} Expand e 7 <e 3, 5 > <e <e 66, , 66 >> <e 5, 8 > <e 4, 10 > {} f 5 6 7 l N 4 N 7 k 1 0 Heap Contents N 6 d 7 Action 8 9 10 R e 6 e 7 x N 7 N 6 e 1 COMP 5331 a b c N 1 e 2 d e f N 2 e 3 e 4 e 5 g h i N 3 l k N 4 m n N 5 32
e 3 is not dominated by any point in S As e 3 is an internal node, expand e 3. Algorithm for Finding Skylines y 10 N 1 ab 9 c 8 e N 2 N 6 d 7 g 6 5 N 3 4 3 2 h n m N 5 i 1 2 3 4 Heap Contents S Access Root <e 7, 4 > <e 6, 6 > {} Expand e 7 <e 3, 5 > <e <e 66, , 66 >> <e 5, 8 > <e 4, 10 > {} Expand e 3 <e 66, , 66><h, > 7><e <e 55, , 88><e 44, , 10 10><g, > 11> <i, 5><e {} f 5 6 7 l N 4 N 7 k 1 0 Action 8 9 10 R e 6 e 7 x N 7 N 6 e 1 COMP 5331 a b c N 1 e 2 d e f N 2 e 3 e 4 e 5 g h i N 3 l k N 4 m n N 5 33
i is not dominated by any point in S As i is a data point, insert i into S. 3. Algorithm for Finding Skylines y 10 N 1 ab 9 c 8 e N 2 N 6 d 7 g 6 5 N 3 4 3 2 f h n m N 5 i N 4 1 2 3 4 5 6 7 Heap Contents S Access Root <e 7, 4 > <e 6, 6 > {} Expand e 7 <e 3, 5 > <e <e 66, , 66 >> <e 5, 8 > <e 4, 10 > {} Expand e 3 <i, 5><e 6, <e 6><h, , 8><e , 10> 11> 4, 104><g, 6, 6> 7><e 5, 8><e {} Insert i <e 6, 6><h, 7><e 5, 8><e 4, 10><g, 11> {i} N 7 k 1 0 l Action 8 9 10 R e 6 e 7 x N 7 N 6 e 1 COMP 5331 a b c N 1 e 2 d e f N 2 e 3 e 4 e 5 g h i N 3 l k N 4 m n N 5 34
e 6 is not dominated by any point in S As e 6 is an internal node, expand e 6. 3. Algorithm for Finding Skylines y 10 N 1 ab 9 c 8 e N 2 N 6 d 7 g 6 5 N 3 4 3 2 f h n m N 5 i N 4 1 2 3 4 5 6 7 Heap Contents S Access Root <e 7, 4 > <e 6, 6 > {} Expand e 7 <e 3, 5 > <e <e 66, , 66 >> <e 5, 8 > <e 4, 10 > {} Expand e 3 <i, 5><e 6, <e 6><h, , 8><e , 10> 11> 4, 104><g, 6, 6> 7><e 5, 8><e {} Insert i <e 6, 6><h, 7><e 5, 8><e 4, 10><g, 11> {i} Expand e 6 > 1, 9><e <e 44, , 10 10><g, 11 11><e > 2, 11> <h, 7><e 5, 8><e {i} N 7 k 1 0 l Action 8 9 10 R e 6 e 7 x e 2 is dominated by i (in S) N 7 N 6 e 1 COMP 5331 a b c N 1 e 2 d e f N 2 e 3 e 4 e 5 g h i N 3 l k N 4 m n N 5 35
h is dominated by i (in S) Discard h 3. Algorithm for Finding Skylines y 10 N 1 ab 9 c 8 e N 2 N 6 d 7 g 6 5 N 3 4 3 2 f h n m N 5 i N 4 1 2 3 4 5 6 7 Heap Contents S Access Root <e 7, 4 > <e 6, 6 > {} Expand e 7 <e 3, 5 > <e <e 66, , 66 >> <e 5, 8 > <e 4, 10 > {} Expand e 3 <i, 5><e 6, <e 6><h, , 8><e , 10> 11> 4, 104><g, 6, 6> 7><e 5, 8><e {} Insert i <e 6, 6><h, 7><e 5, 8><e 4, 10><g, 11> {i} Expand e 6 > 1, 9><e <e 44, , 10 10><g, 11 11>> <h, 7><e 5, 8><e {i} <e 5, 8><e 1, 9><e 4, 10><g, 11> {i} N 7 Discard h k 1 0 l Action 8 9 10 R e 6 e 7 x N 7 N 6 e 1 COMP 5331 a b c N 1 e 2 d e f N 2 e 3 e 4 e 5 g h i N 3 l k N 4 m n N 5 36
e 5 is dominated by i (in S) Discard e 5 3. Algorithm for Finding Skylines y 10 N 1 ab 9 c 8 e N 2 N 6 d 7 g 6 5 N 3 4 3 2 f h n m N 5 i N 4 1 2 3 4 5 6 7 8 9 10 Heap Contents S Access Root <e 7, 4 > <e 6, 6 > {} Expand e 7 <e 3, 5 > <e <e 66, , 66 >> <e 5, 8 > <e 4, 10 > {} Expand e 3 <i, 5><e 6, <e 6><h, , 8><e , 10> 11> 4, 104><g, 6, 6> 7><e 5, 8><e {} Insert i <e 6, 6><h, 7><e 5, 8><e 4, 10><g, 11> {i} Expand e 6 > 1, 9><e <e 44, , 10 10><g, 11 11>> <h, 7><e 5, 8><e {i} <e 5, 8><e 1, 9><e 4, 10><g, 11> {i} <e 1, 9><e 4, 10><g, 11> R {i} N 7 Discard h Discard e 5 k 1 0 l Action e 6 e 7 x N 7 N 6 e 1 COMP 5331 a b c N 1 e 2 d e f N 2 e 3 e 4 e 5 g h i N 3 l k N 4 m n N 5 37
e 1 is not dominated by any point in S As e 1 is an internal node, expand e 1 3. Algorithm for Finding Skylines y 10 N 1 ab 9 c 8 e N 2 N 6 d 7 g 6 5 N 3 4 3 2 f h n m N 5 i N 4 1 2 3 4 5 6 7 8 9 10 Heap Contents S Access Root <e 7, 4 > <e 6, 6 > {} Expand e 7 <e 3, 5 > <e <e 66, , 66 >> <e 5, 8 > <e 4, 10 > {} Expand e 3 <i, 5><e 6, <e 6><h, , 8><e , 10> 11> 4, 104><g, 6, 6> 7><e 5, 8><e {} Insert i <e 6, 6><h, 7><e 5, 8><e 4, 10><g, 11> {i} Expand e 6 > 1, 9><e <e 44, , 10 10><g, 11 11>> <h, 7><e 5, 8><e {i} <e 5, 8><e 1, 9><e 4, 10><g, 11> {i} <e 1, 9><e 4, 10><g, 11> R <a, 10><e <e 44, 10><g, 11 11>><b, 12><c, 12> e 6 e 7 {i} N 7 Discard h Discard e 5 k 1 0 l Action x Expand e 1 N 7 N 6 e 1 COMP 5331 a b c N 1 {i} ceis dominated by i (in S) 3 e 4 e 5 e 2 d e f N 2 g h i N 3 l k N 4 m n N 5 38
a is not dominated by any point in S As a is a data point, insert a into S 3. Algorithm for Finding Skylines y 10 N 1 ab 9 c 8 e N 2 N 6 d 7 g 6 5 N 3 4 3 2 f h n m N 5 i N 4 1 2 3 4 5 6 7 8 9 10 Heap Contents S Access Root <e 7, 4 > <e 6, 6 > {} Expand e 7 <e 3, 5 > <e <e 66, , 66 >> <e 5, 8 > <e 4, 10 > {} Expand e 3 <i, 5><e 6, <e 6><h, , 8><e , 10> 11> 4, 104><g, 6, 6> 7><e 5, 8><e {} Insert i <e 6, 6><h, 7><e 5, 8><e 4, 10><g, 11> {i} Expand e 6 > 1, 9><e <e 44, , 10 10><g, 11 11>> <h, 7><e 5, 8><e {i} <e 5, 8><e 1, 9><e 4, 10><g, 11> {i} <e 1, 9><e 4, 10><g, 11> R <a, 10><e <e 44, , 10 10><g, 11 11>><b, 12> e 6 e 7 <e 4, 10><g, 11><b, 12> {i} N 7 Discard h Discard e 5 k 1 0 l Action x Expand e 1 Insert a N 6 e 1 COMP 5331 a b c N 1 e 2 d e f N 2 {i} {i, a} N 7 e 3 e 4 e 5 g h i N 3 l k N 4 m n N 5 39
e 4 is not dominated by any point in S As e 4 is an internal node, expand e 4 3. Algorithm for Finding Skylines y 10 N 1 ab 9 c 8 e N 2 N 6 d 7 g 6 5 N 3 4 3 2 f h n m N 5 i N 4 1 2 3 4 5 6 7 8 9 10 Heap Contents S Access Root <e 7, 4 > <e 6, 6 > {} Expand e 7 <e 3, 5 > <e <e 66, , 66 >> <e 5, 8 > <e 4, 10 > {} Expand e 3 <i, 5><e 6, <e 6><h, , 8><e , 10> 11> 4, 104><g, 6, 6> 7><e 5, 8><e {} Insert i <e 6, 6><h, 7><e 5, 8><e 4, 10><g, 11> {i} Expand e 6 > 1, 9><e <e 44, , 10 10><g, 11 11>> <h, 7><e 5, 8><e {i} <e 5, 8><e 1, 9><e 4, 10><g, 11> {i} <e 1, 9><e 4, 10><g, 11> R <a, 10><e <e 44, , 10 10><g, 11 11>><b, 12> e 6 e 7 <e 4, 10><g, 11><b, 12> ><c, 12> {i} N 7 Discard h x Expand e 1 Insert ai Expand e 4 COMP 5331 l is dominated by i (in S) Discard e 5 k 1 0 l Action a b c N 1 N 6 e 1 {i} {i, a} N 7 <k, 10><g, 11 11><b, 12 12><l, > 14> e 2 e 3 e 4 e 5 d e f N 2 g h i N 3 l k N 4 {i, a} m n N 5 40
k is not dominated by any point in S As k is a data point, insert k 3. Algorithm for Finding Skylines y 10 N 1 ab 9 c 8 e N 2 N 6 d 7 g 6 5 N 3 4 3 2 f h n m N 5 i N 4 1 2 3 4 5 6 7 8 9 10 Heap Contents S Access Root <e 7, 4 > <e 6, 6 > {} Expand e 7 <e 3, 5 > <e <e 66, , 66 >> <e 5, 8 > <e 4, 10 > {} Expand e 3 <i, 5><e 6, <e 6><h, , 8><e , 10> 11> 4, 104><g, 6, 6> 7><e 5, 8><e {} Insert i <e 6, 6><h, 7><e 5, 8><e 4, 10><g, 11> {i} Expand e 6 > 1, 9><e <e 44, , 10 10><g, 11 11>> <h, 7><e 5, 8><e {i} <e 5, 8><e 1, 9><e 4, 10><g, 11> {i} <e 1, 9><e 4, 10><g, 11> R <a, 10><e <e 44, , 10 10><g, 11 11>><b, 12> e 6 e 7 <e 4, 10><g, 11><b, 12> ><c, 12> {i} N 7 Discard h Discard e 5 k 1 0 l Action x Expand e 1 Insert ai Expand e 4 Insert k COMP 5331 a b c N 1 N 6 e 1 {i} {i, a} N 7 <k, 10><g, 11><b, 12> e 2 e 3 e 4 e 5 <g, 11><b, 12> d e f N 2 g h i N 3 l k N 4 {i, a} {i, a, k} m n N 5 41
g is dominated by i (in S) Discard g 3. Algorithm for Finding Skylines y 10 N 1 ab 9 c 8 e N 2 N 6 d 7 g 6 5 N 3 4 3 2 f h n m N 5 i N 4 1 2 3 4 5 6 7 8 9 10 Heap Contents S Access Root <e 7, 4 > <e 6, 6 > {} Expand e 7 <e 3, 5 > <e <e 66, , 66 >> <e 5, 8 > <e 4, 10 > {} Expand e 3 <i, 5><e 6, <e 6><h, , 8><e , 10> 11> 4, 104><g, 6, 6> 7><e 5, 8><e {} Insert i <e 6, 6><h, 7><e 5, 8><e 4, 10><g, 11> {i} Expand e 6 > 1, 9><e <e 44, , 10 10><g, 11 11>> <h, 7><e 5, 8><e {i} <e 5, 8><e 1, 9><e 4, 10><g, 11> {i} <e 1, 9><e 4, 10><g, 11> R <a, 10><e <e 44, , 10 10><g, 11 11>><b, 12> e 6 e 7 <e 4, 10><g, 11><b, 12> ><c, 12> {i} N 7 Discard h Discard e 5 k 1 0 l Action x Expand e 1 Insert ai Expand e 4 Insert k COMP 5331 Discard g a b c N 1 N 6 e 1 {i} {i, a} N 7 <k, 10><g, 11><b, 12> e 2 e 3 e 4 e 5 <g, 11><b, 12> {i, a} <b, 12> d e f {i, a, k} N 2 g h i N 3 l k N 4 {i, a, k} m n N 5 42
b is dominated by a (in S) Discard b 3. Algorithm for Finding Skylines y 10 N 1 ab 9 c 8 e N 2 N 6 d 7 g 6 5 N 3 4 3 2 f h n m N 5 i N 4 1 2 3 4 5 6 7 8 9 10 Heap Contents S Access Root <e 7, 4 > <e 6, 6 > {} Expand e 7 <e 3, 5 > <e <e 66, , 66 >> <e 5, 8 > <e 4, 10 > {} Expand e 3 <i, 5><e 6, <e 6><h, , 8><e , 10> 11> 4, 104><g, 6, 6> 7><e 5, 8><e {} Insert i <e 6, 6><h, 7><e 5, 8><e 4, 10><g, 11> {i} Expand e 6 > 1, 9><e <e 44, , 10 10><g, 11 11>> <h, 7><e 5, 8><e {i} <e 5, 8><e 1, 9><e 4, 10><g, 11> {i} <e 1, 9><e 4, 10><g, 11> R <a, 10><e <e 44, , 10 10><g, 11 11>><b, 12> e 6 e 7 <e 4, 10><g, 11><b, 12> ><c, 12> {i} N 7 Discard h Discard e 5 k 1 0 l Action x Expand e 1 Insert ai Expand e 4 Insert k COMP 5331 Discard g a b c Discard b N 1 N 6 e 1 {i} {i, a} N 7 <k, 10><g, 11><b, 12> e 2 e 3 e 4 e 5 <g, 11><b, 12> {i, a} <b, 12> d e f {i, a, k} N 2 g h i N 3 l k N 4 {i, a, k} m n N 5 {i, a, k} 43
3. Algorithm for Finding Skylines y 10 N 1 ab 9 c 8 e N 2 N 6 d 7 g 6 5 N 3 4 3 2 f h n m N 5 i N 4 1 2 3 4 5 6 7 8 9 10 Heap Contents S Access Root <e 7, 4 > <e 6, 6 > {} Expand e 7 <e 3, 5 > <e <e 66, , 66 >> <e 5, 8 > <e 4, 10 > {} Expand e 3 <i, 5><e 6, <e 6><h, , 8><e , 10> 11> 4, 104><g, 6, 6> 7><e 5, 8><e {} Insert i <e 6, 6><h, 7><e 5, 8><e 4, 10><g, 11> {i} Expand e 6 > 1, 9><e <e 44, , 10 10><g, 11 11>> <h, 7><e 5, 8><e {i} <e 5, 8><e 1, 9><e 4, 10><g, 11> {i} <e 1, 9><e 4, 10><g, 11> R <a, 10><e <e 44, , 10 10><g, 11 11>><b, 12> e 6 e 7 <e 4, 10><g, 11><b, 12> ><c, 12> {i} N 7 Discard h Discard e 5 k 1 0 l Action x Expand e 1 Insert ai Expand e 4 Insert k COMP 5331 Discard g a b c Discard b N 1 N 6 e 1 {i} {i, a} N 7 <k, 10><g, 11><b, 12> e 2 e 3 e 4 e 5 <g, 11><b, 12> {i, a} <b, 12> d e f {i, a, k} N 2 g h i N 3 l k N 4 {i, a, k} m n N 5 {i, a, k} 44
- Slides: 44