210 likes | 351 Views
Optional Line Bipartitions of Point Sets. Olivier Devillers Matthew J. Katz. Abstract. Let S be a set of points in the plane. Partition S into two subsets S a and S b such that max{f(S a ),f(S b )} is minimal. Where f is any monotone function defined over 2 S .
E N D
Optional Line Bipartitions of Point Sets Olivier Devillers Matthew J. Katz
Abstract • Let S be a set of points in the plane. Partition S into two subsets Sa and Sb such that max{f(Sa),f(Sb)} is minimal. Where f is any monotone function defined over 2S. • Monotone function means that if S’S then f(S’)f(S). • Some cases can use convex hull problem to help, like perimeter, area and width.
Introduction • We first describe the matrix searching procedure. • Next we present the (general) solution to the restricted problem. • Then we apply the solution of before to some common functions • Finally the non-restricted problem is presented.
A Matrix Searching Procedure • Let A = (ai,j );B = (bi,j ) be two m x n matrices of real values, such that the rows and columns of A (resp. B) define increasing (resp. decreasing) sequences. Define a third m x n matrix M = (mi,j ) by mi,j = max{ ai,j , bi,j }.
A: matrix A is larger, B:matrix B is larger, mi the Finding first column’s minimal If the right of mi is B, it is the next mi If the right of mi is A, go upward to find next B Considering which one is better time complexity O(m+n)
Observation • If f(Pla) f(Plb) for some line l, then any line cuts P below ldefines a worse partition. • Thus the best line bipartition is either defined by aline crossing l inside P, by l itself, or by a line that cuts P above l.
Step 1(count) • At j’th stage separating Pj-1 into two parts named P1j and P2j. • S1 contains P1j , S2 contains P2j • If f(S1)f(S2), then for every PiP2j can be neglected, and set P1j toPj; otherwise we may neglect every PiP1j and set P2j toPj .
Step 2 • Finding all lines cross l, in the figure the upper part defined by (p1,q1) is largest if pi or qi grows, the upper area is decreased. The lower area is counter to the upper one. • Using the result described before, time complexity of this stage is O(kh(n)), where k=n/2j, h(n) is the complexity of maintaining the value f(P’) under insertions and deletions of extreme vertices to/from P’, where P’is a portion of (the boundary of ) P.
Result • Time complexity: • O(g(n)+n h(n)) • g(n) is preprocessing(if needed)
Some Common Cases • Perimeter and area cases are easy, only to add or delete a triangle to or from original hull is ok. • In width case needs some effort. Width is defined by antipodal pairs.
Antipodal pairs(count.) • define p’ as the first antipodal point of pi turning clockwise around P beginning at pi , q’ the last antipodal point of qj , and r’ the point antipodal to the line segment (pi ,qj). • If we change pi, only p’ and r’ may be moved; qj is similar.
The Solution of the Non-Restricted Problem • Any line bipartition can also be defined by a line passing through a pair of points of S. • Totally N=(n2) such pairs of S, and 1<2<…<N be the slope defined by these pairs. • For every i ,i is the permutation of sweep-line with i, sweeping from left to right. • Pi(1) ,Pi(2) ,Pi(3)…Pi(n) is the permutation • li,jis the line make best bipartition corresponding to i ,j is the number. • mi,j defines the max of the two value of f for the bipartition defined by li,j. • Now we will maintain an N(n+1) matrix M=(mi,j).
Non-Restricted Problem(count) • Observation: • Line i of M is bitonic(first decreasing and then increasing). • The deference between i and i+1 is small. • If the best partition of row i is defined by li,j, and Pi(j’)=Pi+1(j’) for (j’=j and j’=j+1), then the best partition of row i+1is li+1,j. • If the best partition of row i is defined by li,j, and Pi(j’)Pi+1(j’) for (j’=j or j’=j+1), then the best partition of row i+1is li+1,j’ ,j-2j’j+2.
Non-Restricted Problem(count) • Jump directly to next point • Find 0=min{1,2,t}, if i reaches to 0, there will be a swap.(Figure) • Reaching 1,t,2 corresponding to [j-2,j], [j-1,j+1], [j,j+2] ranges to test • O(n2) is the trivial upper bound, in many examples are much smaller • Including h(n), totally complexity is O(kh(n))