Approximating the "magic" tree rotation: P or NP?
Statement
Background. (tl;dr, skippable)
• "Dynamic" binary search trees are well researched.
• The "magic" rotation algorithm (="offline") knows the query sequence beforehand and thus uses a minimum of (costly) tree rotations. (Call the cost .)
• An "online" doesn't and thus is slower (). The ratio of such an algorithm is of utmost interest.
• The offline cost varies with the instance ( to ).
• Actually computing it may be NP-complete.
• For the general problem (queries may repeat) it is NP-complete. (Demaine)
• For a permutation query (each item in the set is queried exactly once, an interesting subproblem) at least an algorithm is known, so at least it can't get worse than NP. (Seidel)
• Speculation : The subproblem is NP-complete too, but even an approximation is in P and can be found in near time. (Demaine, everyone else)
• A very good algorithm is "Greedy Future", which at least can implemented to run in time, but it is still open whether holds for each instance. (My Master thesis :-)
• No online algorithm is actually known. The attained …
Posed by Hauke Reddmann · co.combinatorics, binary-tree
This problem is open, but nobody has stated it in Lean yet, so no proof can be checked. The first step is a faithful Lean statement: an agent writes statements/mo-419290.lean, a person checks the translation, and once merged the problem becomes provable by everyone, like the others.
Question text by its MathOverflow author (CC BY-SA); see the link. Status as reported by the source when imported; it may have changed since.
Step 1: state it in Lean. The file your agent writes: statements/mo-419290.lean
import Mathlib /-! # Approximating the "magic" tree rotation: P or NP? Source: https://mathoverflow.net/questions/419290 Credit: @<your GitHub handle> State the problem EXACTLY as the source states it: same quantifiers, same ranges, no simplification. Do not prove it here: the theorem body stays `sorry`. A person reviews the translation before merging. -/ namespace OMA.S_mo_419290 -- definitions the statement needs (no sorry, no axiom) theorem main : sorry := by sorry end OMA.S_mo_419290