Ranking and Unranking k-subsequence universal words
Abstract
A subsequence of a word w is a word u such that u = w[i1] w[i2] , … w[i|u|], for some set of indices 1 ≤ i1 < i2 < … < ik ≤ |w|. A word w is k-subsequence universal over an alphabet if every word in k appears in w as a subsequence. In this paper, we provide new algorithms for k-subsequence universal words of fixed length n over the alphabet = \1,2,…, σ\. Letting U(n,k,σ) denote the set of n-length k-subsequence universal words over , we provide: * an O(n k σ) time algorithm for counting the size of U(n,k,σ); * an O(n k σ) time algorithm for ranking words in the set U(n,k,σ); * an O(n k σ) time algorithm for unranking words from the set U(n,k,σ); * an algorithm for enumerating the set U(n,k,σ) with O(n σ) delay after O(n k σ) preprocessing.
Turn this paper into a lesson
ArcXiv compiles a structured reading guide from this paper's metadata: plain-English importance, contributions, prerequisite concepts, which sections to read first, flashcards, and a quiz. Grounded in the abstract, never invented.