File Exchange

image thumbnail

Restricted integer compositions with fixed number of parts

version 1.0 (1.72 KB) by

Generate all restricted integer compositions with fixed number of parts, each in the interval [a,b]

0 Downloads

Updated

View License

Matlab implementation of an algorithm that generates all restricted integer compositions of an integer n with k parts, each in the discrete interval [a,b].

The algorithm is based on
Vincent Vajnovszki, Generating permutations with a given major index, http://arxiv.org/abs/1302.6558

(Algorithm in Figure 2). The algorithm appears to be (much) faster than, e.g., the competing JD Opdyke algorithm for the same task.

Comments and Ratings (2)

abu

abu (view profile)

MATLAB Release
MATLAB 7.10 (R2010a)

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video