Toufik Mansour: Restricted Compositions




This program finds the number of compositions of k≤n that avoid a list of patterns L.
  1. Input.n: composition of k with k≤n will be considered. p: the number of the patterns in the list L. L the list of the patterns.
  2. The program assumes that n≤40 and the length of each pattern in the list L is at least 3 and at most 7.
  3. Output. Table contains the number of compositions of length k that avoid each pattern in L, for k=1,2,…,n, the starting date and time of the calculations, and ending date and time of the calculations.