How many of each kind of fruit was bought?

1.3k Views Asked by At

A customer bought a dozen of apples and oranges $\$1.32$. If an apple costs $3$ cents more than oranges and more apple than oranges were bought, using linear diophantine equation find,how many of each kind of fruit was bought.

My Attempt:

$$x \leftarrow number\ of\ apples$$

$$y \leftarrow number \ of\ oranges$$ $$z \leftarrow cost \ of \ an \ orange \ in \ \underline{dollar}$$ so then I get $$x+y=12$$ and $$x(z+0.03)+yz=1.32$$ $$0.03x+12z=1.32$$ multiplying the both sides by 100 then $$3x+1200z=132$$ $$x+400z=44$$ then the general solution of $x+400z=44$ is $z=t,x=44-400t$ where $t \in \mathbb{Z}$

since $z,x>0$ $$t>0 \ and \ t<0.11$$ then I stuck, answer of this problem got $z$ as cost of an orange in cents but here I got $z$ as cost of an orange in dollar where am I wrong? why my method is wrong?

2

There are 2 best solutions below

9
On BEST ANSWER

You are assuming that $z=t$ (the price of an orange in dollars) is an integer (why?) and you conclude that $0<t<0.11$ which implies that such integer does not exist.

On the other hand, by assumption $100z$ is an integer (the price of an orange in cents) and $x$ is an integer in $(0,12)$ such that, by your work, $$x=44-400z=4\underbrace{(11-100z)}_{\in\mathbb{N}^+}\in \{4,8\}.$$ Since $x>y$ (more apples than oranges), it follows that $x=8$ and $z=0.09$.

0
On

More apples were bought than oranges.

Say, number of apples bought $= 6+x$, number of oranges bought $= 6-x \,$ where $0 \lt x \lt 6$

$ (6+x)(z+3)+(6-x)z = 132$ where $z$ is in cents.

$ 4z + x = 38$

$ 32 \lt 4z \lt 38$

$ z = 9$

Now you can find $x = 2$ so $8$ apples and $4$ oranges.