# Thread:

1. ## Combinations - How many ways can you choose 20 ...

My teacher gave us this question and I'm not sure if I'm just going about it wrong, but it seems to me like there isn't enough information. The question is:

A store sells red, green, and yellow marbles. In how many ways can a child buy 20 marbles?

Wouldn't you have to know how many of each color there is or is there another way to do it?

Thanks!

2. Hello, jlt1209!

A store sells red, green, and yellow marbles.
In how many ways can a child buy 20 marbles?
We will assume that the store has at least 20 of each color.

The child could buy:

. . 1 red, 1 green, 18 yellow

. . 7 red, 5 green, 8 yellow

. . 5 red, 8 green, 7 yellow

. . 8 red, 12 green, 0 yellow

. . 20 red, 0 green, 0 yellow

The list goes on and on . . .

Here's my plan for counting all the possible combinations of colors.

Place the 20 marbles in a row.
Consider the 21 spaces that are between, before, and after the marbles.

. . $\_\,o\_\,o\_\,o\_\,o\_\,o\_\,o\_\,o\_\,o\_\,o\_\,o \_\,o\_\,o\_\,o\_\,o\_\,o\_\,o\_\,o\_\,o\_\,o\_\,o \_$

We will insert two "dividers" into the spaces.

To the left of the first divider are the Red marbles.
To the right of the second divider are the Yellow marbles.
Between the two dividers are the Green marbles.

Example: . $o\:o\:o\:o\:o\,|\,o\:o\:o\:o\:o\:o\:o\:o\:o\,|\,o\ :o\:o\:o\:o\:o$

. . This represents: .5 Red, 9 Green, 6 Yellow.

Example: . $o\:o\:o\:o\:o\:o\:o\,||\,o\:o\:o\:o\:o\:o\:o\:o\:o \:o\:o\:o\:o$

. . This represents: .7 Red, 0 Green, 13 Yellow.

Example: . $|\,o\:o\:o\:o\:o\:o\:o\:o\:o\:o\:o\:o\,|\,o\:o\:o\ :o\:o\:o\:o\:o$

. . This represents: .0 Red, 12 Green, 8 Yellow.

In this way, we can create all possible combinations of colors.

There are 21 choices for the first divider and 21 choices for the second divider.
. . It would seem that there are: . $21^2 = 441$ ways.
But there is considerable duplication in this counting.

Among the 441 items in our list, there is, for example:
. . (2,4): the first divider is in space 2, the second is in space 4.
. . (4,2): the first divider is in space 4, the second is in space 2.
But these two represent the same distribution of colors,
. . and must be removed from our count.

We find that there are 210 "symmetric pairs" in our list.

Therefore, the child can select colors in: . $441 - 210 \:=\:{\color{blue}231}$ ways.
{"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": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 6, "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.3, "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": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.9095565676689148, "perplexity_flag": "middle"}