Efficient algorithms
The longest alternating subsequence problem is solvable in time , where is the length of the original sequence.Distributional results
If is a random permutation of the integers and , then it is possible to show that : Moreover, as , the random variable , appropriately centered and scaled, converges to a standard normal distribution.Online algorithms
The longest alternating subsequence problem has also been studied in the setting of online algorithms, in which the elements of are presented in an online fashion, and a decision maker needs to decide whether to include or exclude each element at the time it is first presented, without any knowledge of the elements that will be presented in the future, and without the possibility of recalling on preceding observations. Given a sequence of independent random variables with common continuous distribution , it is possible to construct a selection procedure that maximizes the expected number of alternating selections. Such expected values can be tightly estimated, and it equals . As , the optimal number of online alternating selections appropriately centered and scaled converges to a normal distribution.See also
* Alternating permutation * Permutation pattern and pattern avoidance * Counting local maxima and/or local minima in a given sequence * Turning point tests for testing statistical independence of observations * Number of alternating runs * Longest increasing subsequence * Longest common subsequence problemReferences
{{reflist * * * * Problems on strings Permutations Combinatorics Dynamic programming