You have to fill a large bag with 2018 fruits—apples, bananas, cantaloupes, durians, and raspberries—under the following restrictions:
How many different ways are there to fill the bag?
Note : This problem can be solved without having to grind all the possibilities. Generating functions may help you.
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.
I believe your (second to) last line is incorrect. 1010 x 2019 already equals 2039190. Where does the extra 20190 come from?
Log in to reply
I split it as ( 1 0 0 0 + 1 0 ) × 2 0 1 9 = 1 0 0 0 × 2 0 1 9 + 1 0 × 2 0 1 9 , etc.
Log in to reply
I understand. If I were doing it I would either leave that second to last step out or add another step before it (e.g. your reply above.
That intermediate step, along with the parenthetical comment at the end, is probably just in response to a comment criticizing my solution as being "too calculative" (a criticism I still don't understand, but oh well).
If you do it the way Arjen shows, the multiplication is trivial, so the only calculation of any substance is the final addition, which is still easy to do.
3 + 8 + 2001 = my birthday x + y + 20ZD = my final day so my life = ⏰? assume: death is imminent : death is unpredictable : death looks at you every day waiting for an order : you live in africa : you love mathematics : you are using this app obsessively thinking you will change who you are. ANSWER : don't waste your time solving problems that were solved hundreds of years ago, our life is shorter than we think . start studying offline ,buy books,learn languages, play music and have fun . Tip: using your mind too much is a psychological disorder called OCD . I mean a black dog, a nightmare ,insomnia and depression . they all are capable of killing you ! believe me a disease in the brain makes you insane so when we overload our brains with unnecessary trivial things . it collapses over it self like a dead star then explode or turn to a black hole . you don't wanna be a black hole, do you ?
Log in to reply
An unusual comment.
"You live in Africa." True for you, not for me.
Solving problems that were solved hundreds of years ago is not a waste of time. The fact that we still think about these problems means that learning to solve them is probably important.
Your checklist:
[X] Study off-line. Most of what I post here is the result of off-line study.
[X] Buy books. I have 2000 books, most of them read. They cover math, science, language, theology, and more.
[X] Learn languages. I read about 15 languages, at various levels of proficiency, and converse in about 6. Arabic is in the making, as is first-century Coptic.
[X] Play music. Absolutely. Gimme a piano or organ, or guitar. Lots of math and science in the music, too.
"Using your mind too much is ... OCD." Not necessarily. OCD is using your mind too much in a particular way.
I hope you do not suffer of nightmares, insomnia, depression, or collapsing like a dead star.
Log in to reply
Mr.Arjen( nice name by the way ) this "comment" is not unusual - with all due respect - you made it personal unnecessarily by talking about yourself . it is just a message that fights atheism which is pretty common among you and us as well 😢 . Not you in particular . you snubbed the death part of the comment . and that emphasizes my point of view . I KNOW THIS ANYWAY ! but I found you very remarkable on this site ,that's why I made this comment . I didn't have the opportunity to study advanced mathematics , I wish I had but I enjoy sharing my ideas with understanding people and improving my English too 😎.
Log in to reply
@Omar Khalifa – This is a place where people come and talk about mathematics, not about the Big Questions about life, death, God, good and evil, salvation, and so on. Your point is worthy of a discussion, but not here.
Personally, I too am concerned about atheism, and I love to talk to people and show them that there is a way out of the futility of life and death, a way to Eternal Life. Some of the people I talk with I know through this Brilliant site. But we have those discussions through Facebook or e-mail, not here. There is a proper place for everything.
I was going to reply, but I think you have covered the aspects I would have commented upon.
Impressive
I believe you are incorrect since we all know that it should be 2018+1 possible locations for the bars instead of 2018+2 possible locations. Moreove, both bars can be put together in one position.
Log in to reply
Following this article , we have:
The number of ways to place n indistinguishable balls into k labelled urns is ( k − 1 n + k − 1 ) . □
Our problem is equivalent to placing n = 2 0 1 8 indistinguishable items into k = 3 labelled urns ( x , y , z ), so that we have ( 3 − 1 2 0 1 8 + 3 − 1 ) ways of doing so.
sadly i did not get this problem, i should have been wary of the 41 40, 2 1 pair
Log in to reply
Not pair, combination.
Log in to reply
I mean the 41 and 40 can be grouped together as a pair that can be equal to all numbers in 1 way and so can the 2 and 1
This solution is a clever use of partitioning motivated by the fact that raspberries can be used to fill out the remaining space in the bag and the coprimality of the pairs put together as x and y that allows us to uniquely determine those quantities once x , y are known. Really like it.
The generating functions for...
It follows that the generating function for the number of ways to choose n pieces of fruit is the product ( 1 − x 4 1 1 ) ( 1 − x 2 1 ) ( 1 − x 1 − x 4 1 ) ( 1 + x ) ( 1 − x 1 ) = ( 1 − x ) 3 1 = n = 0 ∑ ∞ ( 2 n + 2 ) x n so the number of ways to fill the bag with 2 0 1 8 pieces of fruit is ( 2 2 0 1 8 + 2 ) = 2 0 3 9 1 9 0
Notes :
Nice solution but too calculative.It made me use my calculator.
Log in to reply
I'm honestly confused with your comment. Aside from the final step of computing ( 2 2 0 2 0 ) , where would a calculator even help?
I totally forgot about raspberries because they weren't among the restrictions and ended up with generating function ( 1 − x ) 2 1 .
Log in to reply
I actually did the same thing on my first attempt; then had to re-read the problem when I was told the answer wasn't 2 0 1 9
Log in to reply
I made some silly mistakes on my first two attempts and when I finally made sure everything in my calculations was okay, I was shocked to find out that I forgot about one type of fruit… Never mind
My answer with all restrictions on fruits a,b,c and d is 2019. However, raspberrys is not mentioned in the conditions and completely missed. The problem without raspberrys is more challenging.
Log in to reply
It definitely is easy to miss the raspberries in the initial list by just skipping to the bullet-point restrictions. As I mentioned in another comment thread, even I missed it initially.
It is good
Let us create a generating function for each restriction.
apples: (1+x^41+x^82+...)=1/(1-x^41) bananas: (1+x^2+x^4+...)=1/(1-x^2) cantaloupes: 1+x+x^2+...x^41= (x^41-1)/(x-1) durian: (1+x) raspberries: 1+x+x^2+...=1/(1-x)
When we multiply these, we obtain -1/(x-1)^3.
We want the coefficient of x^2018, which we can obtain by the negative binomial theorem:
Problem Loading...
Note Loading...
Set Loading...
Any filling of the bag can be described uniquely by three non-negative integers,
x = total number of apples + cantaloupes,
y = total number of bananas + durians,
z = total number of raspberries.
Note that each value of x gives a unique number of apples and cantaloupes ( x = 4 1 a + c ), and similarly y gives a unique number of bananas and durians ( y = 2 b + d ).
The constraint x + y + z = 2 0 1 8 can be viewed as placing 2018 "stars" in a line and separating them anywhere with 2 "bars". Thus we must choose two out of 2 0 1 8 + 2 possible locations for the bars; the number of possibilities is ( 2 2 0 1 8 + 2 ) = 2 1 ⋅ 2 0 2 0 ⋅ 2 0 1 9 = 1 0 1 0 ⋅ 2 0 1 9 = 2 0 1 9 0 0 0 + 2 0 1 9 0 = 2 0 3 9 1 9 0 . (No calculators were touched in the process.)