Browse Prior Art Database

Algorithm for Generation of Combinations

IP.com Disclosure Number: IPCOM000076596D
Original Publication Date: 1972-Mar-01
Included in the Prior Art Database: 2005-Feb-24
Document File: 2 page(s) / 32K

Publishing Venue

IBM

Related People

Kellerman, E: AUTHOR

Abstract

An algorithm is shown for generating the combination of J things out of K. The flow chart describes the individual steps in the algorithm in the sequence in which they will be performed.

This text was extracted from a PDF file.
At least one non-text object (such as an image or picture) has been suppressed.
This is the abbreviated version, containing approximately 100% of the total text.

Page 1 of 2

Algorithm for Generation of Combinations

An algorithm is shown for generating the combination of J things out of K. The flow chart describes the individual steps in the algorithm in the sequence in which they will be performed.

The algorithm is called with an initial selection which appears at step 10. The algorithm returns at step 20 with a new combination.

I represents a particular element in the combination that is being examined. J represents the number of elements to be selected. K represents the total sample from which J elements are selected.

I is set equal to J at step 11. A test is made to determine whether the Ith element is less than the quantity K minus J plus I at step 12. If so, the Ith element in the selection is determined at step 14.

If I plus 1 is greater than J, a subroutine is exited at 18 to return step 20. If I plus 1 is not greater than J, the nth element is set equal to the next higher position than the n minus 1 element. When this has been completed the subroutine is exited via the return step 20.

1

Page 2 of 2

2

[This page contains 2 pictures or other non-text objects]