# A general derivation for a combinatoric problem

Is there any derivation for the problems:

$1.$Dividing $n$ identical things into $r$ identical groups where some groups may be empty or all $n$ things can go to any one group.

$2.$Dividing $n$ identical items into $r$ identical groups where there is at-least one item in every group.

I am not sure if this is modeled as some other known problem,what I am looking for, is a nice approach/derivation for solving these kind of models.

-

## 1 Answer

I think you are refering to partitions and compositions.

Edited: The restriction of "r groups" introduce a restriction. The second problem would correspond to counting $p(n,r)$, number of partitions of a number $n$ in $r$ parts. This is not trivial (see here or here, our counting corresponds to $p(n,k)$ there). The first problem would correspond to the number of partions of size up to $r$, hence it can be expressed as a sum $\sum_{k=1}^r p(n,k)$

-

May be related but I think not exactly as there is a restriction of $r$ which needs to be considered explicitly?! – Quixotic Aug 21 '11 at 17:46
YOu are right, added info. – leonbloy Aug 21 '11 at 20:22
I agree that this is not trivial,thanks for the infos. :-) – Quixotic Sep 3 '11 at 15:44
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 14, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "github"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.9308152198791504, "perplexity_flag": "middle"}