0

I how many ways can I buy fish for 10 euros if I have?: 5€ - 3pcs 2€ - 6pcs 1€ - 2pcs

I try with primitive aproach:

5+5=10------1

5+2+2+1-----2

2+2+2+2-----3

2+2+2+2+1+1-4

Is there any other combination? How to calculate that?

Cigls
  • 3
  • 1
    Welcome to MSE. You'll get a lot more help, and fewer votes to close, if you show that you have made a real effort to solve the problem yourself. What are your thoughts? What have you tried? How far did you get? Where are you stuck? This question is likely to be closed if you don't add more context. Please respond by editing the question body. Many people browsing questions will vote to close without reading the comments. You must be able to figure out some ways to pay the bill, for example. – saulspatz Mar 17 '20 at 17:11
  • 1
    The problem is small enough that you should be able to brute force it. Break into cases on the number of $5$'s used, then on the number of $1$'s used, noting that there must be an even number of odd numbers used to have the total be $10$. So, you have $5+5, 5+1+2+2$ and $2+2+2+2+1+1$ and $2+2+2+2+2$ and you are done. If you are wanting a "more mathematical approach" then look at the expansion of $(1+x^5+x^{10})(1+x^2+x^4+x^6+\dots+x^{12})(1+x+x^2)$ and the coefficient of $x^{10}$ there. – JMoravitz Mar 17 '20 at 17:17

2 Answers2

0

We need to find the coefficient of $x^{10}$ in the $(1+x^5+x^{10}+x^{15})(1+x^2+x^4+...+x^{12})(1+x+x^2)$

coefficient of $x^{10}$ in the $(1+x^5+x^{10}+..)(1+x+x^2)(1+x^2+x^4+...+x^{12})$

coefficient of $x^{10}$ in the $(1+x+x^2+x^5+x^6+x^7+x^{10}+..)(1+x^2+x^4+...+x^{12})$

$=1.x^{10}+x^2.x^8+x^6.x^4+x^{10}.1=4$

0

Another method: Number of non-negative integral solutions of the equation $$5x+2y+z=10; x \le 3, y\le 6, z\le2$$

Case i: $x=0 \Rightarrow 2y+z=10 \Rightarrow z\in$ even so either z=0, y=5 or z=2, y=4

Case ii: $x=1 \Rightarrow 2y+z=5 \Rightarrow z\in$ odd so z=1, y=2$

Case iii: $x=2 \Rightarrow 2y+z=0 \Rightarrow z=0, y=0$

Four solutions $(0,5,0),(0,4,2),(1,2,1),(2,0,0)$