Lexicographical Ordering of k-Subsets of a Set

From MaRDI portal





A recursive algorithm for generating all k-subsets (1\(\leq k\leq m\leq n)\) of a set \(\{\) 1,2,3,...,n\(\}\) in lexicographical order is described. The algorithm runs at O(1) units of time. An empirical testing shows that the recursive algorithm runs faster than Nijenhuis and Wilf's iterative algorithm for doing the same task.











This page was built for publication: Lexicographical Ordering of k-Subsets of a Set

Report a bug (only for logged in users!)Click here to report a bug for this page (MaRDI item Q3742726)