Representing a Functional Curve by Curves with Fewer Peaks Danny Z. Chen Chao Wang Haitao Wang Computer Science and Engineering University of Notre Dame Indiana, USA
General Problem Definition Input: a piecewise linear functional curve Output: one or more curves to approximate the input curve The output curves are structurally simpler
An Example The new curve is structually simpler
General Problem Definition (cont.) The optimization criteria Approximation error Output size All curves discussed in our problems are non-negative (required by application)
Formal Problem Definitions Input: A nonnegative piecewise linear functional curve F=(f1,f2,…,fn) f2 fn fi f1
Peaks and Valleys a peak a valley
Approximation Error: L∞ Givenε>0, F can be approximated by another curve G with approximation error є if and only if max|fi-gi|≤є, i.e., G lies in the area between F +εand F –ε F +ε G F F -ε
Three Problems Uphill-downhill pair representation (UDPR) Unimodal representation (UR) Fewer-peak representation (FPR)
Uphill-downhill Pair Representation (UDPR) Find two non-negative piecewise linear curves, one non-decreasing (uphill) and one non-increasing (downhill), to use their sum to approximate F
An Example for UDPR F uphill curve downhill curve
Two Problem Versions of UDPR Feasibility version: Givenε>0, determine whether there is a feasible UDPR solution for F with approximation errorε min-ε: Compute the minimum errorε* such that there is a feasible UDPR solution with an approximation error ε*
Unimodal Representation (UR) Find a set of non-negative unimodal (single-peak) curves to use their sum to approximate F
An Example for UR F
Two Problem Versions of UR min-k: Givenε>0, find a minimum number of unimodal curves with approximation errorε min-ε: Given k>0, find at most k unimodal curves that minimizes the approximation error
Fewer-peak Representation (FPR) Compute a non-negative piecewise linear curve with fewer peaks to approximate F F
Two Problem Versions of FPR min-k: Givenε>0, find a curve with the minimum number of peaks min-ε: Given k>0, find a curve with at most k peaks that minimizes the approximation error
Problem Summary Uphill-downhill pair representation (UDPR) Feasibility version min-εversion Unimodal representation (UR) min- k version Fewer-peak representation (FPR) min-k version
Motivations A dose decomposition problem in intensity-modulated radiation therapy (IMRT) A modern cancer treatment technique to deliver a prescribed dose to a target tumor The prescribed dose to be delivered is F (nonnegative) A unimodal dose function can be delivered smoothly Approximate F by a set of unimodel functions (UR) To solve UR, we need to solve UDPR FPR can be solved in a similar way as UDPR
Related Work [Chun, Sadakane, Tokuyama 2006] gave an O(n) time algorithm to approximate a piecewise linear curve by a single unimodal curve under L2 error metric O(n2(k+log n)) time algorithm for computing a curve with k peaks to approximate a piecewise linear curve, under the Lp error metric [Stout 2008] studied the problem of approximating points by a unimodal step function, O(nlog n), O(n) and O(n) time algorithms for L1, L2 and L∞ error metrics
Our Results UDPR UR FPR Feasibility version: O(n) time min-εversion: O(n) time UR min-k version: O(n) time min-εversion: O(nlogn) time FPR
Our Approaches Geometric observations on the topological structure of the problem Interesting pruning and search techniques, and data structures
The Characteristic Curve Given F and є, define its characteristic curve R(F,є)=(r1,…,rn), r1 = f1+є ri = fi-є if ri-1<fi-є, fi+є if ri-1>fi-є and ri-1 otherwise F+ε F-ε
UDPR Feasibility Version Givenε>0, determine whether there exist An uphill (non-decreasing) curve Y=(y1,…,yn) A downhill (non-increasing) curve Z=(z1,…,zn) Y and Z are non-negative Y+Z=(y1+z1,…, yn+zn) approximates F with errorε If yes, compute the two curves Y and Z
UDPR Feasibility Version (cont.) If the nonnegativeness is not required, the problem is easy even for є=0. Compute Y and Z as follows: F Y Z y-coordinate is 0
I(F) and D(F) F I(F) D(F) I(F): The increasing curve of F D(F): The decreasing curve of F
Algorithm for UDPR Feasibility I(R) D(R) f1+ є – the sum of the decreasing parts in R(F, є)
UDPR min- є Problem Compute the minimum approximation errorε* such that there is a feasible UDPR solution with errorε*
Algorithm for UDPR min- є R(F, є) F+ ε F- ε y=0 D(R)
The Changing of y-coordinate of the Lowest Point in D(R) as є Increases ε ε*
Determine the Critical Errors For every critical error, a peak “touches” a valley ε* must be in S={|fi-fj|/2 | for any i, j}; the size of S is O(n2) A simple O(nlog n) solution without producing S explicitly
Demo …
Determine the Critical Errors (cont.) The number of critical errors is at most n All critical errors can be computed in O(n) time UDPR min-εis solvable in O(n) time
The Problem UR Find a set of non-negative unimodal (single-peak) curves to use their sum to approximate F
An Observation Let Hi with 1≤i≤k be k unimodal curves and the index of the peak in Hi be pi; suppose 1≤p1≤…≤pk ≤n and H=∑Hi, then H[1…p1] is uphill H[pi-1…pi] has a UDPR solution with error zero H[pk…n] is downhill
p1 p2 p3 p4 p5
The Inverse is also True Given a curve H defined on [1…n], if 1≤p1≤…≤pk≤n H[1…p1] is uphill H[pi-1…pi] has a UDPR solution with error zero H[pk…n] is downhill Then, we can find k unimodal curves Hi, 0<i<k+1, such that H = ∑Hi
Solving UR min-k Model the problem UR as a series of UDPR problems Use our UDPR algorithms as subroutines A greedy algorithm, O(n) time min-є Determine a error set of O(n4) size containing є* O(n+mlog m) time, m is the number of peaks in F Use pruning and search techniques and data structures
Conclusions UDPR UR FPR Feasibility version: O(n) time min-εversion: O(n) time UR min-k version: O(n) time min-εversion: O(n+mlogm) time FPR
Thank you