instanceoptimality
Instance optimality is a concept in algorithm analysis that measures how well an algorithm performs on each input instance relative to the best possible algorithm for that same instance. An algorithm A is instance-optimal with respect to a class of algorithms C and a cost function cost(.,.) if there exists a constant c ≥ 1 such that for every input instance x, cost(A, x) ≤ c · min_{B ∈ C} cost(B, x). In words, A never does worse than the optimal algorithm for the same input by more than a fixed multiplicative factor c.
In many formulations the constant c is required to be independent of the instance and the problem
The notion is often discussed in contexts where algorithms can adapt to input structure or distribution, such
Existence and usefulness of instance-optimal algorithms depend on the problem class and the chosen comparison set.