An optimal algorithm for finding all the jumps of a monotone step-function

Refael Hassin, Nimrod Megiddo

Research output: Contribution to journalArticlepeer-review

Abstract

The idea of binary search is generalized as follows. Given f{hook}: {0, 1,..., N} → {0,..., K} such that f{hook}(0) = 0, f{hook}(N) = K, and f{hook}(i) ≤ f{hook}(j) for i < j, all the "jumps" of f, i.e., all is such that f{hook}(i) > f{hook}(i - 1) together with the difference f{hook}(i) - f{hook}(i - 1) are recognized within K[log2( N K)] + [(N - 1)2-[log2( N K)]]f-evaluations. This is proved to be the exact bound in the non-trivial case when K ≤ N. An optimal strategy is as follows: The first query will be at i = 2m, where m = [log2( N K)]. An adversary will then respond either f{hook}(i) = 0 or f{hook}(i) - 1 as explained in the paper.

Original languageEnglish
Pages (from-to)265-274
Number of pages10
JournalJournal of Algorithms
Volume6
Issue number2
DOIs
StatePublished - Jun 1985

Fingerprint

Dive into the research topics of 'An optimal algorithm for finding all the jumps of a monotone step-function'. Together they form a unique fingerprint.

Cite this