Loading in 2 Seconds...
Loading in 2 Seconds...
Algorithms in the Real World: From Application to Abstraction to Algorithm. (and Back). Robert E. Tarjan. Princeton University and InterTrust Technologies. Research with Haim Kaplan and Kostas Tsioutsiouliklis Help from Andrew Goldberg. Outline.
Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.
From Application to Abstraction to Algorithm
Robert E. Tarjan
Research with Haim Kaplan and Kostas Tsioutsiouliklis
Help from Andrew Goldberg
Scheduling Using a Kinetic Heap
Connections to Computational Geometry
A Simple Solution
The Discovery/Development Process
(Lecture by Mike Franklin
One server, many possible items to send.
One broadcast channel.
Users submit requests for items.
Goal: Satisfy users as well as possible, making
All items have the same broadcast time.
Minimize the sum of waiting times?
Scheduling Policies (heuristics)
Greedy = Longest Wait first (LWF):
Send item with largest sum of waiting times.
(vs. number of requests or longest single waiting time)
R x W: Max # requests x longest waiting time
Approximations to R x W
LWF schedules well “in practice” (in simulations)
but too expensive (linear-time)
This claim used to justify approximations to
R x W, still linear-time but with a smaller
LWF does well compared to what?
Try a competitive analysis
Can we improve the cost of LWF?
What data structure?
A collection of items, each with an associated
key (i) = aix + biai,, bi reals, x a real-valued parameter
ai = slope, bi = constant
make an empty heap h.
insert item i with key ai x + bi into heap h.
find an item i in heap h of minimum key for x = x0.
delete item i from heap h.
A parametric heap such that successive x-values
of find mins are non-decreasing.
(Think of x as time.)
xc= largest x so far (current time)
decrease the key of an item i, replacing it by a key that
is no larger for all x >(next) xc
Max-heap (replace find min by find max,
decrease key by increase key =
change sign of all keys)
Can implement LWF orR x W or any similar policy:
Broadcast decision is find min plus delete
Request is insert (if first) or decrease key (if not)
Only (at most) find min need be real-time, other ops
can proceed concurrentlywith broadcasting
Slopes are integers that count requests
A key is a line _computational geometry
maintain the lower envelope of a collection of lines
in 2 D
maintain the convex hull of a set of points in 2D
under insertion and deletion
“kinetic” restriction = “sweep line” constraint of queries
Overmars and van Leeuwen (1981)
Dynamic convex hulls and lower envelopes
in O(log n) time per query,
O(log2n) time per update, worst-case
Basch, Guibas, and Hershberger (1997)
“Kinetic” data structure paradigm
(Much other work: improvements, restrictions, etc.)
Four different data structures, each one best
in a different setting.
Simple Kinetic Heap
A balanced binary tree, with items in nodes
in symmetric order by key slope.
The tree is a tournament on items by
The tree also contains swap times (times
when winning keys change) and is a
tournament on swap times.
O(1) worst-case find min,
O(log2n) amortized insert/delete
Combines seminal ideas with our own
Is it practical?
min swap time
a: x + 10
b: 2x + 7
c: 3x +2
xc = 0
A Simple Kinetic Heap
Effective algorithm development and application
in the real world requires active, repeated interaction
between the application developer(s) and the
algorithm guy(s)/gal(s) – teaming.
Our training of students should include, or at least model,
Our training should also include cross-discipline
studies – rich sources of problems for algorithm