toms448


toms448, a FORTRAN77 code which implements ACM toms algorithm 448, which determines the number of partitions of an integer into parts restricted to a given set.

This routine can be used to solve various problems in counting the number of ways of making change with a given set of coin denominations, for instance.

The text of many ACM toms algorithms is available online through ACM: http://www.acm.org/pubs/calgo or NETLIB: http://www.netlib.org/toms/index.html.

Usage:

call count ( c, k, p, n )
where C, is a vector of K positive integers, and N is an integer larger than the largest value in C. On return P(I) contains the number of partitions of I restricted to entries from C.

Licensing:

The computer code and data files described and made available on this web page are distributed under the GNU LGPL license.

Languages:

toms448 is available in a FORTRAN77 version.

Related Data and Programs:

toms448_test

Reference:

  1. Terry Beyer, Donald Swinehart,
    Algorithm 448: Number of Multiply-Restricted Partitions,
    Communications of the ACM,
    June 1973, Volume 16, Number 6, page 379.

Source Code:


Last revised on 17 November 2023.