|
SOLUTIONS
|
MATHEMATICA 組込みシンボル
IntegerPartitions
IntegerPartitions[n]
整数
をより小さな整数に分割する可能なすべての方法のリストを返す.
IntegerPartitions[n, k]
最高で
個の整数に分割する.
IntegerPartitions[n, {k}]
厳密に
個の整数に分割する.
IntegerPartitions[n, {kmin, kmax}]
個から
個までの整数に分割する.
IntegerPartitions[n, kspec, {s1, s2, ...}]
だけを含む部分を与える.
IntegerPartitions[n, kspec, sspec, m]
結果を最初の m 通りに限定する.
詳細詳細
- IntegerPartitionsの結果は一般に辞書的順序の逆の順序で与えられる.
- Length[IntegerPartitions[n]]はPartitionsP[n]である.
- IntegerPartitions[n]はIntegerPartitions[n, All]と等価である.
- IntegerPartitions[n, {kmin, kmax, dk}]は
,
, ... の整数に分割する. - n および
は有理数でもよく,負の数でもよい. - 分割リストでは,はじめの方の
を含む部分が最後に与えられる. - IntegerPartitions[n, kspec, sspec, -m]は結果を最後の m 通りに限定する.
では,Allの kspec は{0, Infinity}に相当する.Allの sspec はRange[n]に相当する.Allの m はInfinityに相当する.
バージョン 6 の新機能 | バージョン 7 での修正機能
Mathematica 9 is now available!
New to Mathematica?
Find your learning path »
Have a question?
Ask support »
