The longest almost-increasing subsequence

  • Authors:
  • Amr Elmasry

  • Affiliations:
  • Max-Planck Institut für Informatik, Saarbrücken, Germany

  • Venue:
  • Information Processing Letters
  • Year:
  • 2010

Quantified Score

Hi-index 0.89

Visualization

Abstract

Given a sequence of n elements, we introduce the notion of an almost-increasing subsequence as the longest subsequence that can be converted to an increasing subsequence by possibly adding a value, that is at most a fixed constant, to each of the elements. We show how to optimally construct such subsequence in O(nlogk) time, where k is the length of the output subsequence.