main page — COMP 526 Efficient Algorithms
Unit 9: Range-Minimum Queries
This is an archived version of this module from Spring 2021.
Click here for the current iteration.
This unit covers the range-minimum query (RMQ) problem:
- trivial solutions, sparse table
- longest common extensions in strings and RMQ
- linear-time preprocessing via “Four-Russian” tables
Material
- slides (preliminary)
- Video 9-1 · transcript (2021-05-04, 15:01): §9.1 RMQ introduction
- Video 9-2 · transcript (2021-05-04, 13:08): §9.2 LCE using RMQ
- Video 9-3 · transcript (2021-05-04, 3:54): §9.3 Primitive RMQ solutions
- Video 9-4 · transcript (2021-05-05, 12:44): §9.3 Sparse table RMQ
- Video 9-5 · transcript (2021-05-05, 37:33): §9.4 Cartesian trees
- Video 9-6 · transcript (2021-05-05, 21:29): §9.5 Four Russians lookup table
Further reading and sources
The presentation is based on own work. It takes inspiration from the following paper on the related level-ancestor problem:
A more detailed exposition (with slightly different codes for the lookup table) appears here: