Senin, 04 Januari 2021

Math Combination Problem in Some Ways

A  problem found in an Elementary student math book: 
There are 5 empty boxes, you can put three red colors in the box. And you could fill the rest with green. How many ways can you put red colors in the box? 
Well, the kid do this by drawing squares in a piece of paper and try the combination one by one.... But can you solve with other method? 

1. This problem is just like some permutations with repeated elements. 
We could count that 5 squares could contain 5!. But this method overcounts, because there are 2 same green colors and 3 same red colors.
For red colors there are 3! possibilities and green colors 2! possibilities. Therefore we have 5!/(3!*2!) possibilities.

2. Eventually, this is an exploration problem that could be solved by 'simple Python code' (made by the kid's big sister). 
It was simple because it wasn't made by python module, only 'for loops' commands. It got 3 nested loops though(i, j, k)- it wasn't that simple at all.
Here's the code: 
So how could you explain such thing to little kids? well may be just the algorithm..(The algorithm would be explained soon. )
By the way the answer is 10.

Tidak ada komentar:

Posting Komentar