Code covered by the BSD License  

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

» Watch video

Highlights from
Restricted integer compositions with fixed number of parts

4.5
4.5 | 2 ratings Rate this file 1 Download (last 30 days) File Size: 1.72 KB File ID: #44186 Version: 1.0

Restricted integer compositions with fixed number of parts

by

 

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

| Watch this File

File Information
Description

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.

Required Products MATLAB
MATLAB release MATLAB 7.10 (R2010a)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (2)
29 Jun 2016 Henry Schütze  
10 Jul 2015 abu

abu (view profile)

 

Contact us