Download presentation
Presentation is loading. Please wait.
15
Example Input: points p 1, p 2,…,p 8 in a plane. Find a line L 1 such that 4 points are on one side and the other 4 points are on the other side. p1p1 p3p3 p2p2 p4p4 p7p7 p8p8 p6p6 p5p5 L1L1
16
p1p1 p3p3 p2p2 p4p4 L1L1 L2L2 1 Reg 1Reg 2 2.5 Consider the left four points p 1,p 2,p 3,p 4. Find a line L 2 such that 2 points are on one side and the other 2 points are on the other side. δ 1 =Closest-pair (Region 1) = dist(p 1,p 2 ) = 1. δ 2 =Closest- pair (Region 2) = dist(p 3,p 4 ) = 2.5 δ=min(δ 1,δ 2 )= 1 p7p7 p8p8 p6p6 p5p5
17
Delete the points in Region 1 and 2 further than δ= 1 from L 2 Compare the distance dist(p 1,p 3 ) with δ. Here dist(p 1,p 3 ) = 3 > δ, δ is not updated. Closest-pair (Region 1 and 2) = dist(p 1,p 2 ) = 1. p1p1 p3p3 L3L3 Reg 1Reg 2 3 p7p7 p8p8 p6p6 p5p5 L1L1
18
For the four points p 5,p 6,p 7,p 8, we use a line L 3 to divide them and use similar method to find δ 1 = Closest-pair (Region 3) = dist(p 5,p 6 ) = 2.5 δ 2 =Closest- pair (Region 4) = dist(p 7,p 8 ) = 2 δ= min(δ 1,δ 2 )= 2 Reg 2 p7p7 p8p8 p6p6 p5p5 L1L1 L3L3 Reg 3Reg 4 p1p1 p3p3 p2p2 L2L2 1 Reg 1 p4p4 2.5 2
19
Delete the points in Region 1 and 2 further than δ= 2 from L 3 Compare the distance dist(p 6,p 7 ) with δ. Here dist(p 6,p 7 ) = 0.5 < δ, δ is updated. Closest-pair (Region 3 and 4) = dist(p 6,p 7 ) = 0.5. Reg 2 p7p7 p8p8 p6p6 p5p5 L1L1 L3L3 Reg 3Reg 4 p1p1 p3p3 p2p2 L2L2 1 Reg 1 p4p4 0.5
20
Consider Region 1, 2 and Region 3, 4 as two large regions. δ 1 =Closest-pair (Region 1 and 2) = dist(p 1,p 2 ) = 1 δ 2 =Closest- pair (Region 3 and 4) = dist(p 6,p 7 ) = 0.5 δ= min(δ 1,δ 2 )= 0.5 Reg 2 p7p7 p8p8 p6p6 p5p5 L1L1 L3L3 Reg 3Reg 4 p1p1 p3p3 p2p2 L2L2 1 Reg 1 p4p4 0.5
21
Delete the points in Region 1, 2, 3 and 4 further than δ= 0.5 from L 1 Here only one point p4 is left, δ is not updated. Closest-pair (Region 1, 2, 3 and 4) = dist(p 6,p 7 ) = 0.5. Reg 2 L1L1 L3L3 Reg 3Reg 4L2L2 Reg 1 p4p4
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.