In the garden of Eden, there are 8 trees which bear fruit. There is the Tree of Knowledge of good and evil, the Tree of Life, the Abiu Tree, the Babaco Tree, the Cherimoya Tree, the Durian Tree, the Emblic Tree and the Feijoa Tree. One fine day, Adam was hungry and asked Eve to pick 4 fruits for him. How many ways are there for Eve to present 4 fruits, of which at least one of them is from the Tree of Life, and none of them are from the Tree of Knowledge of good and evil?
Details and assumptions
Eve is allowed to pick several fruits from each tree.
Since Adam only sees the final selection of fruits, the order of picking doesn't matter - presenting (Durian, Durian, Durian, Life ) is the same as presenting (Durian, Life, Durian, Durian).
Apart from the first 2 trees, the rest of the names are actual fruit trees.
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
Mathematically, the question is equivalent to find number of solution to this equation-
T r e e 1 + T r e e 2 + T r e e 3 + T r e e 4 + T r e e 5 + T r e e 6 + T r e e 7 = 3
where T r e e n represent no of fruits taken from n t h tree.
The number of solutions to this equation is equivalent to find the number of ways in which 3 can be written down using 6 + signs.
For example one such way to write 3 is 1 + 1 + 1 + + + + which would mean that three fruits are taken from first three trees and 0 fruits are taken from other trees. Similarly, each new way to write 3 would imply a different solution to the above equation.
Hence, the number of ways to do that are 6 ! 3 ! 9 ! = 8 4
The best answer I have found, requiring no formula! Innovatively thought and precisely put. Well done!
There are 7 trees, and Eve must pick 3 fruits. Let t i equal the number of fruits eve picks from tree i . Thus, t 1 + t 2 + t 3 + t 4 + t 5 + t 6 + t 7 = 3 . This is equivalent to ( 3 7 + 3 − 1 ) = 8 4 .
Note: The formula for giving n things to k distinct people is ( n n + k − 1 )
We can ignore the Tree of Knowledge of good and evil. Let L represent the Tree of Life and let the 6 other trees be represented by a number between 1 and 6 . We can consider 4 cases for this problem:
Case 1 - 4 apples are picked from L :
In this case, we can see that there is only 1 combination (an apple is chosen from L each time).
Case 2 - 3 apples are picked from L :
In this case, we need the number of ways 6 can fill 1 space. This is just ( 1 6 ) = 6 combinations.
Case 3- 2 apples are picked from L :
We need to consider 2 situations in this case: if 1 or 2 apples are chosen from each tree. If 2 apples are chosen from a tree, then there are 6 combinations. If 1 apple is chosen from each tree, then there are ( 2 6 ) = 1 5 combinations. So the total number of combinations for case 3 is 1 5 + 6 = 2 1 .
Case 4- 1 apple is picked from L :
We need to consider 3 situations in this case: if 1 , 2 or 3 apples are chosen from each tree. If 3 apples are chosen from a tree, then there are 6 combinations. If 2 apples are chosen from a tree, then there are 6 × 5 = 3 0 combinations, and when 1 apple is chosen from each other tree, then there are ( 3 6 ) = 2 0 combinations. So the total number of combinations for case 4 is 6 + 3 0 + 2 0 = 5 6 .
Therefore, the total number of combinations is 1 + 6 + 2 1 + 5 6 = 8 4
My solution exactly, Oliver.....just a breakdown of cases where Eve has 1, 2, 3, or all 4 Life fruits. Only I used ordered-quadruples to chart out the possibilities (and eliminate the repeats as needed).
Let the Abiu tree be A, the Babaco tree be B, the Cherimoya tree be C, the Durian tree be D, the Emblic tree be E, the Feijoa tree be F, the Tree of Knowledge of good and evil be K, and the Tree of Life be L. We know that there are no K's, and there is at least one L. We will do casework based on the number of L's.
Case 1 (4 L's (Such as LLLL)): There is only 1 way to do this, namely all L's.
Case 2 (3 L's and another fruit (Such as LLLD)): There are 6 ways to do this, because there are 6 ways to pick the other fruit.
Case 3 (2 L's):
Case 3a: (2 L's and 2 of the same other fruit (Such as LLDD)): There are 6 ways to do this, since there are 6 ways to pick the other fruit.
Case 3b: (2 L's and 2 different other fruits (Such as LLDF)): There are 1 5 ways to do this, because you can pick the 2 other fruits in ( 2 6 ) = 1 5 different ways.
Case 4: (1 L)
Case 4a: (1 L and 3 of the same other fruit (Such as LDDD)): There are 6 ways to do this, because you can pick the other fruit in 6 ways.
Case 4b: (1 L, 1 of a different fruit, and 2 of another fruit different from the first 2 (Such as LDDF)): There are ( 2 6 ) = 1 5 ways to pick the 2 different fruits, and 2 ways to pick which one we want 2 of. (For example, LDDF is different from LDFF), for a total of 3 0 ways.
Case 4c: (One L and 3 other different fruits (Such as LDEF)): There are 2 0 ways to do this, namely the ( 3 6 ) = 2 0 ways to pick the 3 other fruits.
Since there must be at least one L, all cases are covered, and we have a total of 1 + 6 + 6 + 1 5 + 6 + 3 0 + 2 0 = 8 4 different ways to choose 4 fruits.
Sorry for the formatting issue with case 4c; instead of \dbinom{6}{3}=20 ), it should be ( 3 6 ) = 2 0 . I apologise for this!
Log in to reply
Updated. You missed 2 backslashes.
Kudos for stating that the trees corresponded to A, B, C, D, E, F. I had to look up C, E and F for strange fruit names :)
Lemma The number of ways of choosing m elements from a set of n distinct elements allowing repetition but ignoring permutations is ( m m + n − 1 ) .
Proof Let the elements of the set be labelled { a 1 , a 2 , ⋯ , a n } . For each i , suppose b i instances of the element a i appear in the set of m selections. Then we obtain the following equation: b 1 + b 2 + ⋯ + b n = m Here each b i s are non-negative integers. We now have a bijection: each solution to the above equation corresponds to a unique selection of m elements. But by the ball and bars method, we know that this equation has ( m m + n − 1 ) solutions. QED
We now go back to our original problem. Note that the Tree of Knowledge of Good and Evil is irrelevant to the problem: we might as well assume that this tree does not exist, and proceed hereupon. We divide the problem into three cases.
Case
1
:
Eve chooses exactly
1
fruit from the Tree of Life
Then Eve has to choose
3
fruits from
6
remaining trees, allowing repetition but ignoring order. By our previous lemma, this can be done in
(
3
6
+
3
−
1
)
ways.
Case
2
:
Eve chooses exactly
2
fruits from the Tree of Life
Now she has to choose
2
fruits from
6
remaining trees. Again by the lemma, she can do this in
(
2
6
+
2
−
1
)
=
2
1
ways.
Case
3
:
Eve chooses exactly
3
fruits from the Tree of Life
Now there is
1
fruit remaining, and she has to choose it from
6
trees. This can be obviously done in
6
ways.
Case
4
:
Eve chooses exactly
4
fruits from the Tree of Life
The selection is then uniquely determined: this can be done in
1
way.
We then add the possibilities to get the final result: 5 6 + 2 1 + 6 + 1 = 8 4 .
We use a technique called stars and bars, which determines the number of ways to put indistinguishable balls in distinguishable boxes. Here is a summary. Draw bars. I will draw 7-1=6. | | | | | | Now, say all objects to the left of the first bar are type A, those to the left of bar 2 are type B, and so on, until those to the right of the last divider, which are type G. Therefore, this corresponds to our task. We distribute stars (here, 4). | * | * | | | * | * The number of ways to do this is . This is the formula. Now, to the problem. Fix one fruit to be from the Tree of Life. Eve now has 3 fruits left to pick, and 7 trees to pick from. The number of ways to do this, by stars and bars, is
Since one fruit is always to be picked from the tree of Life (L) and no fruit is to be picked from the three of Knowledge (K), the problem reduces to picking 3 fruits from 7 trees viz. L, A, B, C, D, E, F.
Let's arrange the fruits picked by Eve according to their type in the order L, A, B, C, D, E, F. Let us transform fruits of different colors in a plain-fruit (p) and in order to distinguish the type associated with this plain-fruit, lets put a bar between the fruits of different types.
Hence, if Eve picked EEF, we represent it using plain-fruits notation as:
| | | | | p p |p
Since any collection of fruits from Eve can be translated into this representation, the total ways in which Eve can pick up 3 fruits from 7 trees =
Total ways to choose 3 'p' (or 6 '|') out of 9 slots = 9 C 3 = 8 4
Since there are 7 trees to choose from (excluding the Tree of Knowledge of good and evil) there are:
(7+6+5+4+3+2+1)+(6+5+4+3+2+1)+(5+4+3+2+1)+(4+3+2+1)+(3+2+1)+(2+1)+(1)=84
Why does this gives us the right answer? What the intuition behind it?
Say each apple from each tree represents a letter. Therefore, the combinations are:
AAAA, AAAB...AAAG (7 combinations)
AABA is NOT a combination since AAAB is the same thing but in a different order. So start from AABB, AABC...AABG (6 combinations)
Repeating the same method, you have AACC, AACD...AACG (5 combinations), AADA, AADB...AADG (4 combinations)...AAGG (1 combination) so with the first two apples being AA, there are (7+6+5+4+3+2+1) combinations which equals 38 combinations.
Using AB as your starting two apples now, you must start with ABBB. So the combinations are ABBB, ABBC...ABBG (6 combinations).
Next is ABCC, ABCD...ABCG (5 combinations).
As you can see, there is a pattern, so eventually, all combinations starting with A total to 84 combinations.
Since the question requires 1 apple to be chosen from Tree of Life (A) then you stop there and your answer is 84.
Here's a breadth first search approach:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
|
Problem Loading...
Note Loading...
Set Loading...
We use a technique called stars and bars , which determines the number of ways to put k indistinguishable balls in n distinguishable boxes. Here is a summary. Draw n − 1 bars. I will draw 7-1=6.
| | | | | |
Now, say all objects to the left of the first bar are type A, those to the left of bar 2 are type B, and so on, until those to the right of the last divider, which are type G. Therefore, this corresponds to our task. We distribute k stars (here, 4).
| * | * | | | * | *
The number of ways to do this is ( k n − 1 + k ) . This is the formula.
Now, to the problem. Fix one fruit to be from the Tree of Life. Eve now has 3 fruits left to pick, and 7 trees to pick from. The number of ways to do this, by stars and bars, is ( 3 7 + 3 − 1 ) = ( 3 9 ) = 8 4