Abstract:
In this paper, we propose a listing and counting algorithm for compositions of a natural number based on combinatorial objects of a hierarchical structure, such as Pascal's triangle, Pascal's pyramid, and Pascal's hyperpyramids. We obtain the recurrent relation that is the basis for listing and counting of compositions of a natural number with an arbitrary constraints on the values of its natural parts and the formula for explicit counting of compositions and a generating function for the number of compositions.