Advertisement

Generating Sequences and Subsets

  • Tom Jenkyns
  • Ben Stephenson
Chapter
Part of the Undergraduate Topics in Computer Science book series (UTICS)

Abstract

Algorithms are devised to generate lists of objects in Lexicographic-Order: k-sequences on {1..n}, all nonempty subsets of {1..n}, k-subsets of {1..n}, full permutations, and k-permutations on {1..n}. We include calculations of average-case complexity because in each case the average cost is less than 2 or 3 operations no matter how big k and n are.

Copyright information

© Springer International Publishing AG, part of Springer Nature 2018

Authors and Affiliations

  • Tom Jenkyns
    • 1
  • Ben Stephenson
    • 2
  1. 1.Department of MathematicsBrock UniversitySt. CatharinesCanada
  2. 2.Department of Computer ScienceUniversity of CalgaryCalgaryCanada

Personalised recommendations