Online Convex Hull Trick

Revision en1, by zeref_dragoneel, 2018-07-10 11:14:21

Hi,

Let's say I have a set of lines, y = ax+b and three types of online queries:

  1. Given a and b, insert the line.
  2. Given a and b, delete the line (it is assured that the line exists)
  3. Given x0, print the maximum possible value of y.

(a is distinct for all the lines, a & b are integers.)

number of lines <= 1e5.

number of queries <= 3e5.

So O(log n / log^2 n / sqrt n) should work, according to me.

Can anyone help me with this?

Tags convex hull optimization, convex hull, linear algebra

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English zeref_dragoneel 2018-07-10 11:14:21 481 Initial revision (published)