Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

We are buying a total of 12 fruits (apples and bananas) for 132 dollars. If the apples are 3 dollars more expensive than the bananas, and we bought more apples than bananas, how many bananas we bought?

Or in other words:

  • Let $a=$ Apple price
  • Let $b=$ Banana price
  • Let $x=$ Apples bought
  • Let $y=$ Bananas bought

We know that:

$$x+y=12$$

$$x>y$$

$$a=b+3$$

$$xa+yb=132$$

therefore $$x(b+3) + yb=132$$

which yields $x=44-4b$ or $y=4b-32$

share|improve this question
    
What are your thoughts? What have you tried so far? –  Rahul Jan 20 '13 at 1:49
    
I tried to solve a system of linear equations, but as there are more variables than equations i see it can't be done that way. I don't know how to implement the modular arithmetic (most probably congruence because that's what we are studying right now) so i got stuck. –  Random Jan 20 '13 at 1:55
    
Please write it up for us, we read that easier than text:) And, I guess you also need the implicit information that we are looking for integer numbers. –  Berci Jan 20 '13 at 2:22
    
Is this more helpful? –  Random Jan 20 '13 at 2:45

1 Answer 1

up vote 0 down vote accepted

Let be $\,x=$ the number of apples, $\,a=$ price of each apple, $\,y=$number of bananas, $\,b=$ price of each banana, then you have the equations

$$x+y=12\Longleftrightarrow x = 12-y\;\;,\;\;\;ax+by=132\;\;,\;\;\;a=b+3\Longleftrightarrow$$

$$(b+3)(12-y)+by=132\Longleftrightarrow 4b-y=32$$

Do a little more algebra, take into account that $\,y>x\,$ and they both are integers...and what is a clear divisor of $\,y\,$?

share|improve this answer
    
That's as far as i got, i am stuck right there. –  Random Jan 20 '13 at 2:49
    
Ok, can you tell what a clear divisor of $\,y\,$ is? –  DonAntonio Jan 20 '13 at 2:55
    
Sorry, i don't know. –  Random Jan 20 '13 at 3:01
    
$\,y=4b-32\,$ , so if the right side is divisible by $\,4\,$ ... –  DonAntonio Jan 20 '13 at 3:02
    
Well the divisor of y has to be 4 as well then? –  Random Jan 20 '13 at 3:19

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.