330 likes | 346 Views
Approximating Points by A Piecewise Linear Function: I. Danny Z. Chen and Haitao Wang Computer Science and Engineering University of Notre Dame Indiana, USA. Outline. Problem definitions Motivations and previous work Our results. Problem Definitions. Input: A point set P (2-D or 3-D)
E N D
Approximating Points by A Piecewise Linear Function: I Danny Z. Chen and Haitao Wang Computer Science and Engineering University of Notre Dame Indiana, USA
Outline • Problem definitions • Motivations and previous work • Our results
Problem Definitions • Input: A point set P (2-D or 3-D) • Output: An approximation function f • Error: Vertical distance • e(P,f)=max{error of each point} error
Two Problem Versions • min-#: • Given: An error toleranceε≥ 0 • Goal: f of minimized size, with e(p,f) ≤ε • min-ε: • Given: k>0 • Goal: f of minimized error e(p,f), with size ≤k
Problem Variations • Step function (SF) error
Problem Variations (cont.) • Piecewise-linear function (PF) error
Problem Variations (cont.) • Weighted versions for both SF and PF • Every point has a weight ui • Error of each point: ui×vertical distance • WSF and WPF there is a weight ui
Problems in 3-D • Extend SF and WSF to 3-D (SF3 and WSF3) • The function f is represented by a set of rectangular faces parallel to the x-y plane and each face approximates a subset of points • Vertical distance measured by z-values
Problem Summary • SF, PF, • Weighted version: WSF, WPF • 3D version: SF3, WSF3 • min-# and min-ε
Motivations • Query optimizations and histogram constructions in database management systems • Regression analysis
3D Problems • No previous result is found • Our results:
Technical Contributions • Two algorithm frameworks • A general formulation of path partition problem [Fournier,Vigneron,08] • Parametric search • Data structures for major components: • Vertical hull width query (PF) • 2-D sublist LP query (WSF) • 3-D sublist LP query (WPF) • A tiling modeling for 3-D problems
Where to Use Data Structures? • wij: The minimum error to approximate point subset Pij={pi,…,pj} by one segment • Need data structures to support queries on wij, 1≤i≤j≤n wij pj pi
Where to Use Data Structures? • wij: The minimum error to approximate point subset Pij={pi,…,pj} by one segment • Need data structures to support queries on wij, 1≤i≤j≤n wij pj pi
Vertical Hull Width Queries (PF) • Given: A point set P • Query q(i,j): The maximum vertical distance on the convex hull of Pij • Times: (n,lognloglogn), (nloglogn, logn) • Use compact interval tree Vertical hull width
Main Idea For each query q(i,j) • Obtain the convex hull of Pij (Guibas, Hershberger, Snoeyink, 91) • Beginning from the root, at each node, in O(1) time, find the edges of the upper hull and lower hull spanning the node, and then determine which way to go
2-D Sublist LP Queries (WSF) • Given: A halfplane set H={hi | 1≤i≤n} • Query q(i,j): The lowest point in the common intersection of Hij={hi, …, hj} common intersection lowest point
2-D Sublist LP Queries (cont.) • Previously best-known result: (nlogn,log4n) • Our solution: (nlogn, log2n) • Our techniques: Fractional cascading and binary search on sorted arrays
An (nlogn, log3n) Solution Preprocessing: • Build a complete binary tree T • The i-th leaf stores hi • Each internal node v stores the common intersection chain (Cv) of halfplanes stored in the subtree rooted at v • O(nlogn) time
Complete Binary Tree T Common intersection chain Cv of all halfplanes from lv to rv v lv rv stores halfplane hi
Query Algorithm q(i,j) • Suppose p* is the sought lowest point • Find the LCA w of i and j • Find O(logn) internal nodes by following the two paths from w to i and to j • p* is the lowest point of the chains stored in O(logn) internal nodes
Query Algorithm q(i,j) (cont.) p* is the lowest point in the common intersection of the O(log n) chains w LCA of i and j i j
Query Algorithm q(i,j) (cont.) • Each chain is represented by a sorted array • Totally O(logn) arrays • Given a vertical line L, for each chain, spend O(log n) time computing its intersection with L • Need O(log2n) time to determine whether p* is in the left side of L or right side • p* can be located in O(log3n) time p* L
An (nlogn, log2n) Solution • Observation: The O(logn) chains for each query are organized along two ancestor-descendant paths in the tree T • By using fractional cascading • Given L, its intersections with all O(logn) chains can be obtained in O(logn) time • O(nlogn) preprocessing time • Each query: O(log2n) time
3-D Sublist LP Queries (WPF) • Given: A halfspace set H={hi | 1≤i≤n} • Query q(i,j): The lowest point in the common intersection of Hij={hi, …, hj} • No previous solution has been found • Our solution: (nlogn, log3n)
Complete Binary Tree T Common intersection polyhedron Cv of all halfspaces from lv to rv v lv rv stores halfspace hi
Data Structure for Cv • To support an efficient query, use Kirkpatrick’s hierarchical planar point location data structure to store Cv A projection of Cv to the XY plane
Preprocessing Algorithm • Built the tree T in a bottom-up manner • Use Chazelle’s linear time convex polyhedra common intersection algorithm to construct Cv at an internal node v from its two children • Preprocessing time: O(nlogn)
Query Algorithm q(i,j) p* is the lowest point in the common intersection of the polyhedra stored there w LCA of i and j i j
3D Problems • NP-hardness proof: Based on reduction from planar-3SAT • Approximation algorithms: Use the solution of the hierarchical binary tiling problem (HBT) which can be solved optimally
Thank You Questions?