1

For..

$1 = 1 pigeon.

$1 = 20 sparrows.

$5 = 1 chicken.

You need to buy at least one of each.

So how many to buy so you spend only 100 but get 100 birds also, and get all birds too.

Also in mathematics, what is this called? ALgebra?

K + S/20 + 5C = $100

this is the equation.. 1 pigeon (k) = $1, 20 sparrows = $1, and 1 chicken 1/5 dollars.

k + s + c = k + s/20 + 5c
21s/20 + 6c = 0

c =  -21s/120

c =  -7s/40


k+s+c = 100

k + s  + -7s/40

k = 100 - 33s/40


- 33s/40 + s + -7s/40 = 0

40s-33s/40 + -7s/40 = 0

7s/40 - 7s/40 = 0

0=0

i was hoping to get val of s ..???
  • Yes, this is algebra, and the answer is 1 pigeon, 80 sparrows and 19 chickens ; you find out by solving the system $x+y+z=100$ and $x + \frac{1}{20}y + 5z =100$ – krirkrirk Mar 07 '15 at 02:03
  • ok i've tried solving it and i got zero. can you show steps. For example i get this for z = -7y/40 – Muhammad Umer Mar 07 '15 at 02:09
  • check out edit i added calculations – Muhammad Umer Mar 07 '15 at 02:17
  • 1
    This type of problem is called integer programming. The reason that there is a solution, and not an infinite number of them, is that all three variables are positive integers. This is a restriction narrows the possible solutions to just one. "Kinda" cool! – Mark Viola Mar 07 '15 at 02:22
  • This problem can be solved using the same method I used on this question, but you probably haven't covered congruences yet. – Jack M Mar 07 '15 at 02:24
  • 1
    @MuhammadUmer The proper tag for this type of problem, BTW, is (algebra-precalculus). –  Mar 07 '15 at 03:01
  • hi , can anyone please help – Muhammad Umer Mar 07 '15 at 22:22
  • @MuhammadUmer Several of us already have tried to help. But here, I'll be more explicit. Look at your second line, again. It should be $19s/20 - 4c=0 \implies c=19s/80$. Plugging that into $k+s+c = 100$ gives you $k+s+19s/80=k+99s/80=100 \implies k=-99s/80+100$. From here, you just need to try some values. Because we need $s$ and $k$ to be non-negative integers, I'd try $s=80$ to get rid of the denominator. That would imply that $k=1$. Then check if these two values imply the same value for $c$ in $c+k+s=100$ AND $k+s/20+5c=100$. If so you're done. If not try a different value for $s$. –  Mar 07 '15 at 23:24

2 Answers2

3

Since you've tagged this with linear algebra, I'm going to solve it with matrices (just for fun) -- see if you can figure out how it works:

Let the cost per pigeon be $p$, cost per sparrow be $s$, and the cost chicken be $c$. Then we have $p=1$, $20s=1$, and $c=5$. Then we can immediately see that $p=1$, $s=1/20$, $c=5$. We also have the equations $xp+ys+zc=x+(1/20)y+5z=100$ and $x+y+z=100$, where $x, y, z$ are the number of pigeons, sparrows, and chickens bought, respectively.

So let's stick these two equations into matrix form: $$\pmatrix{1 & 1/20 & 5 \\ 1 & 1 & 1} \pmatrix{x \\ y \\ z} = \pmatrix{100 \\ 100}$$

Doing Gauss-Jordan on this matrix: $$\pmatrix{1 & 1/20 & 5 & 100 \\ 1 & 1 & 1 &100} \sim \pmatrix{1 & 1/20 & 5 & 100 \\ 0 & 19/20 & -4 & 0} \sim \pmatrix{1 & 1/20 & 5 & 100 \\ 0 & 1 & -80/19 & 0} \sim \pmatrix{1 & 0 & 99/19 & 100 \\ 0 & 1 & -80/19 & 0}$$

Therefore $y-(80/19)z=0$ and $x+(99/19)z=100$. Let $z=19t$, then the solutions are of the form $\pmatrix{x \\ y \\ z} = \pmatrix{100 - 99t \\ 80t \\ 19t} = \pmatrix{100 \\ 0 \\ 0} + t\pmatrix{-99 \\ 80 \\ 19}$

Now physically, we have a couple more constraints: each component of the solution must be a non-negative integer. You can confirm for yourself that with this constraint, there are exactly two solutions. Maybe you can figure them out.

  • +1. A followup hint: note that $19$ is prime and doesn't divide evenly into $80$. So the only way for $80t$ and $19t$ to both be integers is for $t$ to be an integer. – Ian Mar 07 '15 at 04:56
  • And by constraint $t>0$. Also, if $t>1$, then $x<0$ (e.g., $t=2$ implies $y=160$ and $x=-98$, both of which are not permissible solutions. So, thus ... – Mark Viola Mar 07 '15 at 04:59
  • Oh right. I didn't see the "at least one of each" part of the question. So that extra constraint narrows down the solution set to ONE unique answer. –  Mar 07 '15 at 14:06
1

For $(p,s,c)$ positive integers, $p+s+c=100$ and $p+0.05s+5c=100$.

Substitute $p=100-0.05s-5c$ into $p+0.05s+5c=100$ to obtain $$19s=80c$$Then eliminate $s$ from $p=100-0.05s-5c$ to reveal $$p=100-\frac{99}{19}c$$Since $p$ is an integer, it must be such that $c$ is a multiple of $19$. But it cannot be such that $c>19$ because this would imply that $p<0$, which is not possible here. Proceed from there ...

Mark Viola
  • 184,670