***************************************************************************** * www.FindStat.org - The Combinatorial Statistic Finder * * * * Copyright (C) 2019 The FindStatCrew * * * * This information is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * ***************************************************************************** ----------------------------------------------------------------------------- Statistic identifier: St000935 ----------------------------------------------------------------------------- Collection: Integer partitions ----------------------------------------------------------------------------- Description: The number of ordered refinements of an integer partition. This is, for an integer partition $\mu = (\mu_1,\ldots,\mu_n)$ the number of integer partition $\lambda = (\lambda_1,\ldots,\lambda_m)$ such that there are indices $1 = a_0 < \ldots < a_n = m$ with $\mu_j = \lambda_{a_{j-1}} + \ldots + \lambda_{a_j-1}$. ----------------------------------------------------------------------------- References: ----------------------------------------------------------------------------- Code: def refines(L,M): Lpartsums = set( sum(L[:i]) for i in range(1,len(L)) ) Mpartsums = set( sum(M[:i]) for i in range(1,len(M)) ) return Mpartsums.issubset(Lpartsums) def statistic(M): return sum(1 for L in Partitions(sum(M)) if refines(L,M) ) ----------------------------------------------------------------------------- Statistic values: [2] => 2 [1,1] => 1 [3] => 3 [2,1] => 2 [1,1,1] => 1 [4] => 5 [3,1] => 3 [2,2] => 3 [2,1,1] => 2 [1,1,1,1] => 1 [5] => 7 [4,1] => 5 [3,2] => 4 [3,1,1] => 3 [2,2,1] => 3 [2,1,1,1] => 2 [1,1,1,1,1] => 1 [6] => 11 [5,1] => 7 [4,2] => 7 [4,1,1] => 5 [3,3] => 5 [3,2,1] => 4 [3,1,1,1] => 3 [2,2,2] => 4 [2,2,1,1] => 3 [2,1,1,1,1] => 2 [1,1,1,1,1,1] => 1 [7] => 15 [6,1] => 11 [5,2] => 9 [5,1,1] => 7 [4,3] => 8 [4,2,1] => 7 [4,1,1,1] => 5 [3,3,1] => 5 [3,2,2] => 5 [3,2,1,1] => 4 [3,1,1,1,1] => 3 [2,2,2,1] => 4 [2,2,1,1,1] => 3 [2,1,1,1,1,1] => 2 [1,1,1,1,1,1,1] => 1 [8] => 22 [7,1] => 15 [6,2] => 15 [6,1,1] => 11 [5,3] => 10 [5,2,1] => 9 [5,1,1,1] => 7 [4,4] => 11 [4,3,1] => 8 [4,2,2] => 9 [4,2,1,1] => 7 [4,1,1,1,1] => 5 [3,3,2] => 6 [3,3,1,1] => 5 [3,2,2,1] => 5 [3,2,1,1,1] => 4 [3,1,1,1,1,1] => 3 [2,2,2,2] => 5 [2,2,2,1,1] => 4 [2,2,1,1,1,1] => 3 [2,1,1,1,1,1,1] => 2 [1,1,1,1,1,1,1,1] => 1 [9] => 30 [8,1] => 22 [7,2] => 19 [7,1,1] => 15 [6,3] => 17 [6,2,1] => 15 [6,1,1,1] => 11 [5,4] => 13 [5,3,1] => 10 [5,2,2] => 11 [5,2,1,1] => 9 [5,1,1,1,1] => 7 [4,4,1] => 11 [4,3,2] => 9 [4,3,1,1] => 8 [4,2,2,1] => 9 [4,2,1,1,1] => 7 [4,1,1,1,1,1] => 5 [3,3,3] => 7 [3,3,2,1] => 6 [3,3,1,1,1] => 5 [3,2,2,2] => 6 [3,2,2,1,1] => 5 [3,2,1,1,1,1] => 4 [3,1,1,1,1,1,1] => 3 [2,2,2,2,1] => 5 [2,2,2,1,1,1] => 4 [2,2,1,1,1,1,1] => 3 [2,1,1,1,1,1,1,1] => 2 [1,1,1,1,1,1,1,1,1] => 1 [10] => 42 [9,1] => 30 [8,2] => 29 [8,1,1] => 22 [7,3] => 21 [7,2,1] => 19 [7,1,1,1] => 15 [6,4] => 22 [6,3,1] => 17 [6,2,2] => 19 [6,2,1,1] => 15 [6,1,1,1,1] => 11 [5,5] => 15 [5,4,1] => 13 [5,3,2] => 11 [5,3,1,1] => 10 [5,2,2,1] => 11 [5,2,1,1,1] => 9 [5,1,1,1,1,1] => 7 [4,4,2] => 14 [4,4,1,1] => 11 [4,3,3] => 10 [4,3,2,1] => 9 [4,3,1,1,1] => 8 [4,2,2,2] => 11 [4,2,2,1,1] => 9 [4,2,1,1,1,1] => 7 [4,1,1,1,1,1,1] => 5 [3,3,3,1] => 7 [3,3,2,2] => 7 [3,3,2,1,1] => 6 [3,3,1,1,1,1] => 5 [3,2,2,2,1] => 6 [3,2,2,1,1,1] => 5 [3,2,1,1,1,1,1] => 4 [3,1,1,1,1,1,1,1] => 3 [2,2,2,2,2] => 6 [2,2,2,2,1,1] => 5 [2,2,2,1,1,1,1] => 4 [2,2,1,1,1,1,1,1] => 3 [2,1,1,1,1,1,1,1,1] => 2 [1,1,1,1,1,1,1,1,1,1] => 1 [11] => 56 [10,1] => 42 [9,2] => 38 [9,1,1] => 30 [8,3] => 32 [8,2,1] => 29 [8,1,1,1] => 22 [7,4] => 26 [7,3,1] => 21 [7,2,2] => 23 [7,2,1,1] => 19 [7,1,1,1,1] => 15 [6,5] => 25 [6,4,1] => 22 [6,3,2] => 19 [6,3,1,1] => 17 [6,2,2,1] => 19 [6,2,1,1,1] => 15 [6,1,1,1,1,1] => 11 [5,5,1] => 15 [5,4,2] => 16 [5,4,1,1] => 13 [5,3,3] => 12 [5,3,2,1] => 11 [5,3,1,1,1] => 10 [5,2,2,2] => 13 [5,2,2,1,1] => 11 [5,2,1,1,1,1] => 9 [5,1,1,1,1,1,1] => 7 [4,4,3] => 15 [4,4,2,1] => 14 [4,4,1,1,1] => 11 [4,3,3,1] => 10 [4,3,2,2] => 10 [4,3,2,1,1] => 9 [4,3,1,1,1,1] => 8 [4,2,2,2,1] => 11 [4,2,2,1,1,1] => 9 [4,2,1,1,1,1,1] => 7 [4,1,1,1,1,1,1,1] => 5 [3,3,3,2] => 8 [3,3,3,1,1] => 7 [3,3,2,2,1] => 7 [3,3,2,1,1,1] => 6 [3,3,1,1,1,1,1] => 5 [3,2,2,2,2] => 7 [3,2,2,2,1,1] => 6 [3,2,2,1,1,1,1] => 5 [3,2,1,1,1,1,1,1] => 4 [3,1,1,1,1,1,1,1,1] => 3 [2,2,2,2,2,1] => 6 [2,2,2,2,1,1,1] => 5 [2,2,2,1,1,1,1,1] => 4 [2,2,1,1,1,1,1,1,1] => 3 [2,1,1,1,1,1,1,1,1,1] => 2 [1,1,1,1,1,1,1,1,1,1,1] => 1 [12] => 77 [11,1] => 56 [10,2] => 54 [10,1,1] => 42 [9,3] => 42 [9,2,1] => 38 [9,1,1,1] => 30 [8,4] => 41 [8,3,1] => 32 [8,2,2] => 36 [8,2,1,1] => 29 [8,1,1,1,1] => 22 [7,5] => 29 [7,4,1] => 26 [7,3,2] => 23 [7,3,1,1] => 21 [7,2,2,1] => 23 [7,2,1,1,1] => 19 [7,1,1,1,1,1] => 15 [6,6] => 33 [6,5,1] => 25 [6,4,2] => 27 [6,4,1,1] => 22 [6,3,3] => 21 [6,3,2,1] => 19 [6,3,1,1,1] => 17 [6,2,2,2] => 23 [6,2,2,1,1] => 19 [6,2,1,1,1,1] => 15 [6,1,1,1,1,1,1] => 11 [5,5,2] => 17 [5,5,1,1] => 15 [5,4,3] => 17 [5,4,2,1] => 16 [5,4,1,1,1] => 13 [5,3,3,1] => 12 [5,3,2,2] => 12 [5,3,2,1,1] => 11 [5,3,1,1,1,1] => 10 [5,2,2,2,1] => 13 [5,2,2,1,1,1] => 11 [5,2,1,1,1,1,1] => 9 [5,1,1,1,1,1,1,1] => 7 [4,4,4] => 19 [4,4,3,1] => 15 [4,4,2,2] => 17 [4,4,2,1,1] => 14 [4,4,1,1,1,1] => 11 [4,3,3,2] => 11 [4,3,3,1,1] => 10 [4,3,2,2,1] => 10 [4,3,2,1,1,1] => 9 [4,3,1,1,1,1,1] => 8 [4,2,2,2,2] => 13 [4,2,2,2,1,1] => 11 [4,2,2,1,1,1,1] => 9 [4,2,1,1,1,1,1,1] => 7 [4,1,1,1,1,1,1,1,1] => 5 [3,3,3,3] => 9 [3,3,3,2,1] => 8 [3,3,3,1,1,1] => 7 [3,3,2,2,2] => 8 [3,3,2,2,1,1] => 7 [3,3,2,1,1,1,1] => 6 [3,3,1,1,1,1,1,1] => 5 [3,2,2,2,2,1] => 7 [3,2,2,2,1,1,1] => 6 [3,2,2,1,1,1,1,1] => 5 [3,2,1,1,1,1,1,1,1] => 4 [3,1,1,1,1,1,1,1,1,1] => 3 [2,2,2,2,2,2] => 7 [2,2,2,2,2,1,1] => 6 [2,2,2,2,1,1,1,1] => 5 [2,2,2,1,1,1,1,1,1] => 4 [2,2,1,1,1,1,1,1,1,1] => 3 [2,1,1,1,1,1,1,1,1,1,1] => 2 [1,1,1,1,1,1,1,1,1,1,1,1] => 1 ----------------------------------------------------------------------------- Created: Aug 11, 2017 at 17:14 by Christian Stump ----------------------------------------------------------------------------- Last Updated: Aug 11, 2017 at 17:42 by Christian Stump