Pawe ł Gawrychowski* and Pat Nicholson** *University of Warsaw **Max-Planck-Institut für Informatik
Range Queries in Arrays
Encoding Range Queries in Arrays
Typical Data Structure Input Data (Relatively Big) Input Data (Relatively Big)
Typical Data Structure Input Data (Relatively Big) Input Data (Relatively Big) Data Structure Preprocess
Encoding Approach Input Data (Relatively Big) Input Data (Relatively Big)
Encoding Approach Input Data (Relatively Big) Input Data (Relatively Big) Preprocess w.r.t. Some Query Encoding (Hope: much smaller)
Encoding Approach Input Data (Relatively Big) Input Data (Relatively Big) Preprocess w.r.t. Some Query Encoding (Hope: much smaller)
Encoding Approach Input Data (Relatively Big) Input Data (Relatively Big) Preprocess w.r.t. Some Query Encoding (Hope: much smaller) Auxiliary Data Structures: (Should be smaller still)
Encoding Approach Succinct Data Structure: Minimum Space Possible Encoding (Hope: much smaller) Auxiliary Data Structures: (Should be smaller still) Input Data (Relatively Big) Input Data (Relatively Big) Preprocess w.r.t. Some Query
Encoding Approach Succinct Data Structure: Minimum Space Possible Encoding (Hope: much smaller) Auxiliary Data Structures: (Should be smaller still) Query (Hope: as fast as non- succinct counterpart) Input Data (Relatively Big) Input Data (Relatively Big) Preprocess w.r.t. Some Query
This Talk: Maximum-Sum Segments
Range Maximum-Sum Segment Queries
Now find the minimum in this range
Candidate Pairs
What Do They Store?
How to answer a query: the easy case
How to answer a query: the not so easy case
Reducing the Space
Nested Is Good ()((())(()(()))())((()(()))())
Recall The Query Algorithm
Problem: cannot store the left siblings explicitly
Idea: try to find something that is nested
What Do We Store?