リソース · ガイド・記事
Integer Partition
順序を区別せずに n を和として表す方法である整数の分割を定義し、順序を区別する合成(composition)と対比しています。
確認日
元のサイトを開く: Integer Partition (元のサイトを新しいタブで開きます)ロードマップに追加
取り組んでいるロードマップにこのリソースを追加できます。自分用の追加リソースとして表示され、ロードマップの手順は変わらず、記録した手順数にも数えられません。
出典コンテンツの言語:英語
In number theory and combinatorics, a partition of a positive integer n, also called an integer partition, is a way of writing n as a sum of positive integers. Two sums that differ only in the order of their summands are considered the same partition. For example, 4 can be partitioned in five distinct ways: The order-dependent composition 1 + 3 is the same partition as 3 + 1, while the two distinct compositions 1 + 2 + 1 and 1 + 1 + 2 represent the same partition 2 + 1 + 1.
PrepKit の概要
この概要は PrepKit 編集部がソースリポジトリをもとに執筆・確認したもので、リソース本文の引用ではありません。
- 対象
- ソースにレベルの記載はありません
- 形式
- リファレンス
扱っている内容
- 4 の5通りの分割すべて
- 1 + 3 と 3 + 1 が1つの分割として数えられる理由
- 1 から 8 までの分割のヤング図形と、共役の関係
使い方
PrepKit の学習アドバイスであり、ソースの主張ではありません。
n の分割数を数える DP を書き、n = 4 で 5 になることを確かめてください。ループの順序によって 1 + 3 と 3 + 1 を二重に数えずに済む理由を説明します。
範囲と制約
数え上げのアルゴリズム、漸化式、計算量はなく、それらは Wikipedia と YouTube へのリンク先にあります。
利用方法と形式
GitHub の MIT ライセンスの trekhleb/javascript-algorithms リポジトリにある、英語の無料 README です。
PrepKit が 2026/10/02 に確認しました。 リソースの出典のコミット: 85293e3e2b88
この概要の根拠
- src/algorithms/math/integer-partition/README.md
この項目を掲載しているページ
PrepKit ニュースレターを受け取る
任意です。PrepKit の利用には必要ありません。