The Math Forum

Ask Dr. Math - Questions and Answers from our Archives
Associated Topics || Dr. Math Home || Search Dr. Math

The Case of the 90 Apples

Date: 11/19/2002 at 09:53:11
From: Mark Milovanovic
Subject: 3 sons have to sell different numbers of apples, but come up 
with the same amount of money

A father takes his 3 sons to a small town nearby. He places the oldest 
son at the first corner, the second son at the second corner, and the 
youngest son at the third corner. He then gives the oldest son a 
basket of 50 apples, the second son a basket of 30 apples, and the 
youngest son a basket of 10 apples. He tells them that the oldest son 
has the right to put up a sign that states how much each apple costs, 
or how much as many apples as he prefers can be sold for. The other 
sons have to follow that sign and sell that same amount for the same 
price. The sons cannot exchange or trade apples. They still have to 
come up with the same amount of money at the end of the day when the 
father comes to collect.

They each have to sell their full stock of apples. The first has to 
sell 50, the second 30, and the third 10, and they all have to give 
the father the same amount of money without sharing among themselves.

What throws me off is that the 50 apples can cost the same number of 
dollars. Please help.

Date: 11/19/2002 at 12:17:56
From: Doctor Peterson
Subject: Re: 3 sons have to sell different numbers of apples, but come 
up with the same amount of money

Hi, Mark.

I thought it would be interesting to go back and see how the puzzle 
has been phrased in Dr. Math submissions, to see if it sheds any light 
on what is intended. The result is an interesting study.

This recent version seems essentially the same as yours:

   A Father has three children. He gives each of them some mangoes as 
     He gives 50 mangoes to his first son,
     He gives 30 mangoes to his second son, and lastly
     He gives 10 mangoes to his third son.
   They have to sell the mangoes at the same price and they should 
   bring home the same amount of money.
   For example, if the first son sells 5 mangoes for $10.00, the 
   second and third sons also have to sell 5 mangoes for $10.00.  
   However, they should bring the equal amount of money when they come 
   back home. None of them can share mangoes with each other.
   How is this possible?

This one appears to be the original, and is considerably more 

   There once lived in Damascus a peasant who bragged to a 'qadi', 
   a judge, that his daughters were not only very intelligent, but 
   blessed with rare skills of the imagination. 

   The qadi had the three girls brought before him. Then he said to 
   them, "Here are 90 apples for you to sell in the market. Fatima the 
   oldest, you will take 50; Cunda you will take 30; and Shia, the 
   youngest, you will take 10. If Fatima sells her apples at a price 
   of 7 to the dinar, you other two will have to sell yours at the 
   same price. And if Fatima sells her apples for 3 dinar each, you
   two will have to do the same. But no matter what you do, each of 
   you must end up with the same amount of money from your different 
   numbers of apples." 

   "But can I not give away some of the apples that I have?" asked 
   Fatima. "Under no circumstances." said the qadi. "These are the 
   terms: Fatima must sell 50 apples. Cunda must sell 30 apples. And 
   Shia must sell the 10 apples that remain. And all of you must earn 
   exactly the same profit in the end." 

   The three sisters need directions to resolve the problem of the 90 
   apples before they get to the market.

Here each has to sell all her apples. The solution is simple, but 
tricky: We want a price per apple, say X, for which

    50X = 30X = 10X

The only solution to this equation is

    X = 0

That is, if Fatima gives away all her apples for free, and the others 
do the same, then they will all bring home the same amount of money: 
zero. Since she was told she can't give away some of her apples, it 
will be necessary to use some trick wording to get around this: I 
didn't sell SOME, but ALL; or, I sold them, but not for money, or 
something like that.

Considering that zero was discovered in the Arabic setting given to 
the story, this answer seems quite fitting.

(I should add that, depending on the rules, it may be possible to 
make an alternative solution, by having some or all buy from one 
another. Your version seems to disallow this.)

Back in 1997, someone sent us a set of problems from Brazil, including 
this one:

   When I was a teenager I read a very enchanting book by a Brazilian 
   writer known by his pseudonym, "Malba Tahan," who was actually a 
   mathematics teacher. The title of this book is _The Man Who 

   The book tells the adventures of a Persian mathematician, 
   Beremiz Samir, in the Near East in the Middle Ages (the time of 
   the "1001 Nights"). A lot of interesting mathematical problems are 
   solved intuitively by this mathematical hiker in an ambiance of 
   magical mystery. I think that this marvelous book is not known 
   internationally because it is by a writer from an undeveloped 
   country, but I think it has merit. To spread the notice of this 
   book I am sending you some of its problems, which I have tried to 
   translate into English.

   The case of the 90 apples.
   To prove that three rustic daughters have great intelligence, 
   they must solve a problem proposed by a jealous Cadi. 
   The Cadi gives 90 apples to the girls and says:
   These apples you must sell in the market. Fatima, the eldest, takes 
   50, Cunda 30, and Siha, the youngest, the remainder (10). If Fatima 
   sells 7 apples for 1 dinar (the Arabian money at that time) the 
   others will sell the apples at the same price (7 for 1 dinar). If 
   Fatima sells 1 apple for 3 dinars this is the price at which the 
   others must sell their apples. The whole transaction must be 
   accomplished in such a way that the three girls get the same 
   amount of money.

   The problem seemed impossible to them because if they must sell the 
   apples at the same price, the one that sells more apples must 
   necessarily earn a greater amount of money. They go to the Ima (a 
   wise religious man) and ask the way to solve the problem. He says 
   that they must proceed exactly as the Cadi instructs, and then they 
   will earn the same amount selling the apples at the same price.

   Beremiz explains the way that the girls sold the apples and 
   performed the apparently difficult challenge.

   What happens, dear Dr. Math?

The problem has an interesting history, doesn't it? This book is now 
available in America, and may be the source of the other versions, or 
the puzzle may be found in earlier sources I haven't traced.

Here is another version that seems to be the same as the above, 
without the colorful details or restrictions:

   Three Vendors are to sell their apples at the same price. Vendor 
   (A) has 10 apples, Vendor (B) has 30 apples, and Vendor (C) has 50 
   apples. All apples must be sold at the same price. After selling 
   their apples, all vendors will end up with the same amount of 

And here's another version we received a couple of years ago that 
seems to be derived from the others:

   Farmer A has 10 eggs. He takes them to market, and writes a 
   price on the board. He sells all of his eggs and goes home.

   Farmer B has 30 eggs. He takes them to the same market. He sees 
   the price written by farmer A and decides to use that price.  
   He sells all of his eggs and goes home.

   Farmer C has 50 eggs, uses the same price, sells the eggs, and
   goes home.

   All three farmers make the same amount of money. What was the 
   selling price of the eggs?

Again, only one answer seems possible, despite the absurdity of 
selling eggs for $0 each.

Finally, here is one sent to us in 1999 from Asia:

   There are three people: the first has 10 oranges, the second has 
   30 oranges, and the third has 50 oranges. They decide they will  
   go to market and sell them. Here is what they decide: they will 
   sell each orange at the same price (if the first sells at $1 for 
   each orange, so will the second and the third). The question is, 
   in what way can they sell the oranges so that when there are no 
   oranges left, the three persons have the same amount of money?

The answer has to be zero.

If you have any further questions, feel free to write back.

- Doctor Peterson, The Math Forum 

Date: 04/16/2004 at 11:28:47
From: Paul
Subject: The Case of the 90 Apples (new solution!!!)

In all your answers to the "Case of the 90 Apples" you state that the
only possible solution is to sell them for $0.  This is only the
answer if the price that they are all selling the apples for cannot
change over time.

The way the question was stated to me was thus:

Farmer A has 50 apples
Farmer B has 30 apples
Farmer C has 10 apples

Farmer A sets the price and they all sell their apples for that price.
He may change the set price at any time.  They all sell all their
apples and go home with the same amount of money.

The solution is:

Farmer A sets the price at 7 apples/$1.  Farmer A sells 49 (makes $7),
B sells 28 (makes $4) and C sells 7 (makes $1).   Then farmer A
changes the price to $3/apple, and they all sell what they have left. 
They all end up with $10.

I believe this is the correct solution to the problem. The version you
suggest "appears to be the original" allows for varying prices and even
mentions the prices in my solution.

Date: 04/16/2004 at 14:30:35
From: Doctor Peterson
Subject: Re: The Case of the 90 Apples (new solution!!!)

Hi, Paul.

You may be right, though I am bothered by the fact that some versions 
of the problem clearly do not allow the price to be changed, and yet 
whoever posed those versions must have expected it to have a 
solution!  Also, the "original" version does not explicitly say (as 
your version does) that the price can be changed; it just isn't 
explicitly forbidden.  It may be intended as a "lateral thinking" 
problem, with that as the key.

However, doing that means that there is no longer a unique solution, 
and the problem is not so interesting.  If we arbitrarily decide that 
there will be only TWO different prices, A and B (which is not 
necessarily true, once we've opened the problem up by allowing the 
price to change at all), and call the numbers sold under the first 
price Xa, Ya, and Za, and under the second price Xb, Yb, and Zb, we 

  AXa + BXb = AYa + BYb = AZa + BZb
  Xa + Xb = 50
  Ya + Yb = 30
  Za + Zb = 10

Eliminating the "b" amounts,

  AXa + B(50 - Xa) = AYa + B(30 - Ya) = AZa + B(10 - Za)


  (A - B)Xa + 50B = (A - B)Ya + 30B = (A - B)Za + 10B

Subtracting 10B and dividing by (A - B),

  Xa + 40B/(A - B) = Ya + 20B/(A - B) = Za

  Za = n, Ya = n + 20B/(B - A), Xa = n + 40B/(B - A)

which gives us a solution for any given A, B, and n.

Taking A = 1/7 and B = 3 just as a guess from the problem's examples, 
we get

  B/(B - A) = 3/(20/7) = 21/20

  Xa = n + 42
  Ya = n + 21
  Za = n

Clearly, we can choose any value for n from 0 to 8 and get valid 
numbers for Xa and Ya; since we need to sell a whole number of apples 
at the second price, and thus need the differences between the 
numbers sold at the first price to be a whole number (actually, just 
a multiple of 1/3), we can choose either 0 or 7 for n.  So either

  A = 1/7, Xa = 42, Ya = 21, Za =  0
  B = 3,   Xb =  8, Yb =  9, Zb = 10
  each earns $30


  A = 1/7, Xa = 49, Ya = 28, Za = 7
  B = 3,   Xb =  1, Yb =  2, Zb = 3
  each earns $10

But these are not the only solutions.  On one hand, I can choose A and B
to be any pair of numbers whose ratio is small enough (such as A = 1, 
B = 6); and on the other hand, only the ratio of A:B matters, so once I
find a solution, I can multiply A and B by anything I want (giving
solutions like A = 1, B = 21, with the same amounts sold as above). It
takes a little work to find a solution, but then there turn out to be too

Here is one of my alternative solutions, just to make it clear that 
it is real:

  A = 1, Xa = 49, Ya = 25, Za = 1
  B = 6, Xb =  1, Yb =  5, Zb = 9
  each earns $55

Is this the intended meaning of the problem?  I have no idea. But it's 
certainly worth adding to our archive!

- Doctor Peterson, The Math Forum

Date: 10/30/2013 at 05:53:16
From: Paul Vaszocz
Subject: Case of 90 apples (2002 question on your site)

The original answer, from 2002, is very long-winded and confusing. This
problem can be answered easly if you think outside the box.

My answer:

   $2 per dozen and $1 ea for the remainder.
   50 = 4 doz at $2 a doz ( $8 ) & the remainder at $1 ea ( $2 ) = $10
   30 = 2 doz at $2 a doz ( $4 ) & the remainder at $1 ea ( $6 ) = $10
   10 = 0 doz ( $0 ) & the remainder at $1 ea ( $10 ) = $10
All sold for the same and ended up with the same profit.

Date: 11/08/2013 at 22:55:25
From: Doctor Peterson
Subject: Re: Case of 90 apples (2002 question on your site)

Hi, Paul.

Your "outside of the box" interpretation is very interesting. As I
understand it, you are taking "the same price" to mean something like "the
same price schedule, consisting of both a per-dozen and a single price."

The version I was answering says the oldest son can determine

   ... how much each apple costs, OR how much as many apples as he
   prefers can be sold for.

This doesn't give the impression that they can have both a bulk price AND
a single price, but I can imagine a different wording suggesting that.

In my discussion from 2004, I gave a formula for finding solutions if two
prices are allowed, at different times. Your solution turns out to be one
of these solutions: if we take A = 1/6 ($2 for 120), B = 1, and n = 0, we

   Za = n               =  0 (0 dozen); Zb = 10 - Za = 10 (single)
   Ya = n + 20B/(B - A) = 24 (2 dozen); Yb = 30 - Ya =  4 (single)
   Xa = n + 40B/(B - A) = 48 (4 dozen); Xb = 50 - Xa =  2 (single)

You didn't say how you came up with your solution; let's see if I can do
so. I'll interpret the problem as saying that we can set one pair of

   1 basket of N apples for X dollars, or
   1 apple for Y dollars.

Each brother sells some number of baskets (A, B, C, respectively), and the
rest of his apples individually. 

Thus we have the following:

   Total apples  Baskets, value      Singles, value       Total income
   ------------  --------------   -------------------    ---------------
        50          A      AX     50 - AN  (50 - AN)Y    AX + (50 - AN)Y
        30          B      BX     30 - BN  (30 - BN)Y    BX + (30 - BN)Y
        10          C      CX     10 - CN  (10 - CN)Y    CX + (10 - CN)Y

We want to find values of X, Y, A, B, and C so that the three totals will
be equal. There may well be many solutions, even if we restrict all the
numbers to be integers (which I will do). Very likely what you did was to
arbitrarily choose to sell by the dozen (though it appears that in the
earlier versions the natural grouping was taken to be sevens). I'll
suppose that we choose some fixed N and want to find X and Y. In your
solution, also, you took A, B, and C to be as large as possible, so that,
for example, A = [50/N], using the greatest integer function. I wouldn't
take this as required, but it's a reasonable guess.

Looking at the last column, and subtracting each expression from the
(equal) one above it, we find that

   20Y - (NY - X)(A - B) = 0
   20Y - (NY - X)(B - C) = 0


   20Y = (NY - X)(A - B)
   20Y = (NY - X)(B - C)

Clearly A, B, and C have to be in arithmetic progression, and the common
difference, d = A - B = B - C, has to be a factor of 20Y. We have the
restriction that AN < 50, BN < 30, and CN < 10.


   20Y = (NY - X)d
     N = 20/d + X/Y

So if we choose N = 12, then C can be at most [10/12] = 0, B can be at
most [30/12] = 2, and A can be at most [50/12] = 4, so d has to be no more
than 2; we take d = 2 and X/Y = N - 20/d = 12 - 20/2 = 2. We get your
answer if we take C = 0 as required, and Y = 1 (which is entirely

   Y = 1
   X = X/Y * Y
     = 2 * 1
     = 2
   C = 0
   B = C + d 
     = 0 + 2 
     = 2
   A = B + d 
     = 2 + 2 
     = 4

We sell 12 for $2 and 1 for $1:

    A sells 4*12 + 2  for 4*2 + 2*1  = $10
    B sells 2*12 + 6  for 2*2 + 6*1  = $10
    C sells 0*12 + 10 for 0*2 + 10*1 = $10

This is probably the only way to make it work with N = 12, because C can't
be more than 0, and B can't be more than 2, while d can't be less than 2.

Let's try N = 7. Then C can be at most [10/7] = 1, B can be at most 
[30/7] = 4, and A can be at most [50/7] = 7, so d has to be no more than
3, if we take d = 3 and X/Y = N - 20/d = 7 - 20/3 = 1/3. Y must be a
multiple of 3, and C can be 0 or 1.

Taking Y = 3 and C = 0,

   Y = 3
   X = X/Y * Y 
     = 1/3 * 3 
     = 1
   C = 0
   B = C + d 
     = 0 + 3 
     = 3
   A = B + d 
     = 3 + 3 
     = 6

We sell 7 for $1 and 1 for $3:

    A sells 6*7 + 8  for 6*1 + 8*3  = $30
    B sells 3*7 + 9  for 3*1 + 9*3  = $30
    C sells 0*7 + 10 for 0*1 + 10*3 = $30

It worked. This is what I expect might be the original intended solution
if this two-part price scheme was envisioned.

How about N = 10? Then C can be at most [10/10] = 1, B can be at most
[30/10] = 3, and A can be at most [50/10] = 5, so again d has to be no
more than 2; we take d = 2 and X/Y = N - 20/d = 10 - 20/2 = 0. Hmmm ...
can we give away groups of apples, but sell individual ones? If so,

   Y = 1
   X = X/Y * Y 
     = 0 * 1 
     = 0
   C = 1
   B = C + d 
     = 1 + 2 
     = 3
   A = B + d 
     = 3 + 2 
     = 5

We sell 10 for $0 and 1 for $1:

    A sells 5*10 + 0 for 5*0 + 0*1 = $0
    B sells 3*10 + 0 for 3*0 + 0*1 = $0
    C sells 1*10 + 0 for 1*0 + 0*1 = $0

I don't think that really counts.

How about N = 11? Then C can be at most [10/11] = 0, B can be at most
[30/11] = 2, and A can be at most [50/11] = 4, so again d has to be no
more than 2; we take d = 2 and X/Y = N - 20/d = 11 - 20/2 = 1. Taking 
C = 0 and Y = 2,

   Y = 2
   X = X/Y * Y 
     = 1 * 2 
     = 2
   C = 0
   B = C + d 
     = 0 + 2 
     = 2
   A = B + d 
     = 2 + 2 
     = 4

We sell 11 for $2 and 1 for $2:

    A sells 4*11 + 6  for 4*2 + 6*2  = $20
    B sells 2*11 + 8  for 2*2 + 8*2  = $20
    C sells 0*11 + 10 for 0*2 + 10*2 = $20

I could work out the details better, and try to list all possible
solutions, but I'm starting to get the idea. There aren't a lot of
solutions, but I was right that there are more than one.

- Doctor Peterson, The Math Forum

Associated Topics:
Elementary Puzzles
Middle School Puzzles

Search the Dr. Math Library:

Find items containing (put spaces between keywords):
Click only once for faster results:

[ Choose "whole words" when searching for a word like age.]

all keywords, in any order at least one, that exact phrase
parts of words whole words

Submit your own question to Dr. Math

[Privacy Policy] [Terms of Use]

Math Forum Home || Math Library || Quick Reference || Math Forum Search

Ask Dr. MathTM
© 1994- The Math Forum at NCTM. All rights reserved.