Browse Prior Art Database

Generation of Compositions

IP.com Disclosure Number: IPCOM000074631D
Original Publication Date: 1971-May-01
Included in the Prior Art Database: 2005-Feb-23
Document File: 2 page(s) / 28K

Publishing Venue

IBM

Related People

Kellerman, E: AUTHOR [+2]

Abstract

This algorithm can be used to compute all possible vectors L = { L[1],L[2],...,L[M] }, such that the sum of the components of L equals N. Each vector L is formally called a composition of N into M parts, whenever all its elements are nonnegative integers whose sum is N. Input to the algorithm is an M-component vector L, which represents a composition of N. The output replaces the previous value of L and corresponds to the "next" composition. The algorithm is cyclic, with a period of M+N-1 . The algorithm is completely described by the above flowchart.

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

Generation of Compositions

This algorithm can be used to compute all possible vectors L = { L[1],L[2],...,L[M] }, such that the sum of the components of L equals N. Each vector L is formally called a composition of N into M parts, whenever all its elements are nonnegative integers whose sum is N. Input to the algorithm is an M-component vector L, which represents a composition of N. The output replaces the previous value of L and corresponds to the "next" composition. The algorithm is cyclic, with a period of M+N-1 . The algorithm is completely described by the above flowchart.

1

Page 2 of 2

2

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