Associated Topics || Dr. Math Home || Search Dr. Math

How Many Pieces of Candy in Each Jar?

```
Date: 09/30/97 at 23:21:12
From: Anonymous
Subject: How Many?

Dear Dr. Math,

My Mom and I tried this logic question for about three hours and we
still don't have the right answer.

Here's the question:

At the annual Cumberland County fair, one of the more popular booths
is the Candy Contest. Five jars, each of which contains a different
type of candy (one is bonbons) and has a different-colored lid, are
lined up on a shelf, and contestants guess how many pieces of candy
are in each jar. From the information provided, can you determine the
color of the lid (one is pink) on each jar A,B,C,D, or E), the type
of candy in the jar, and the number of pieces in it (125, 150, 175,
200, or 225)?

1. Gumdrops are in the jar to the immediate right of the one with
the blue lid and to the left of the one containing 175 candies.

2. The white-lidded jar is on one end of the shelf and the jar
containing 150 pieces of candy is on the other end.

3. There are 225 jellybeans in the jar to the immediate right of the
licorice sticks and to the left of at least one other jar.

4. The butterscotch candies are in the jar with the yellow lid.

5. The jar with the green lid, which is not next to the jar with
the white lid, is to the immediate left of the jar containing
200 candies.

6. The jar with the white lid does not contain 125 pieces of candy.

The jars are:  A    B   C   D    E

green    yellow    blue  pink   white
150      200       225    125    175
bonbons  L.S.      jelly  gum    butterscotch
beans  drops

A        B         C       D       E

The butterscotch is supposed to be yellow and there never seems to be
a place for it. Can you help?

Thanks so much.

Anne Hemstock
```

```
Date: 10/02/97 at 16:16:05
From: Doctor Rob
Subject: Re: How Many?

Ahhh! Another logic puzzle. These are usually fairly straightforward.

The clues give us various useful facts, and some less useful but
important relations between the locations, numbers, colors, and candy
types.  I will deal with the clues in turn.

Clue
1 ==> F1:  Gumdrops are not in the jar with the blue lid.
1 ==> F2:  Gumdrops are not in the jar with 175 candies.
1 ==> F3:  The jar with the blue lid doesn't have 175 candies.
1 ==> F4:  Gumdrops are not at A.
1 ==> F5:  Gumdrops are not at E.
1 ==> F6:  175 candies are not at A.
1 ==> F7:  175 candies are not at B.
1 ==> F8:  The blue lid is not at D.
1 ==> F9:  The blue lid is not at E.
(There is more location information, too.)

2 ==> F10:  The white lid is not at B.
2 ==> F11:  The white lid is not at C.
2 ==> F12:  The white lid is not at D.
2 ==> F13:  150 candies are not at B.
2 ==> F14:  150 candies are not at C.
2 ==> F15:  150 candies are not at D.
2 ==> F16:  The jar with the white lid doesn't have 150 candies.

3 ==> F17:  There are 225 jellybeans.
3 ==> F18:  There are not 225 bonbons.
3 ==> F19:  There are not 225 licorice sticks.
3 ==> F20:  There are not 225 gumdrops.
3 ==> F21:  There are not 225 butterscotches.
3 ==> F22:  There are not 125 jellybeans.
3 ==> F23:  There are not 150 jellybeans.
3 ==> F24:  There are not 175 jellybeans.
3 ==> F25:  There are not 200 jellybeans.
3 ==> F26:  The jellybeans are not at A.
3 ==> F27:  The 225 candies are not at A.
3 ==> F28:  The jellybeans are not at E.
3 ==> F29:  The 225 candies are not at E.
3 ==> F30:  The licorice sticks are not at E.
3 ==> F31:  The licorice sticks are not at D.
(There is more location information, too).

4 ==> F32:  The butterscotches are under the yellow lid.
4 ==> F33:  The bonbons are not under the yellow lid.
4 ==> F34:  The licorice sticks are not under the yellow lid.
4 ==> F35:  The jellybeans are not under the yellow lid.
4 ==> F36:  The gumdrops are not under the yellow lid.
4 ==> F37:  The butterscotches are not under the green lid.
4 ==> F38:  The butterscotches are not under the blue lid.
4 ==> F39:  The butterscotches are not under the pink lid.
4 ==> F40:  The butterscotches are not under the white lid.

5 ==> F41:  The green lid is not at E.
5 ==> F42:  The 200 candies is not at A.
5 ==> F43:  The 200 candies are not under the green lid.
(There is more location information, too).

6 ==> F44:  The 125 candies are not under the white lid.

Now we derive a fact from others:

F21 & F32 ==> F45:  The 225 candies are not under the yellow lid.

Since there are just two places for the white lid, let us assume one
of them.  Assume:

A1: The jar with the white lid is at A.

Derive the following consequences:

A1 & F44 ==> C1:  125 candies are not at A.
A1 & F16 ==> C2:  150 candies are not at A.

C1, C2, F6, F42 & F27 together are a contradiction.  The conclusion is
that the assumption A1 is wrong.  Thus we have the following:

F46:  The white lid is not at A.

F46, F10, F11 & F12 ==> F47:  The white lid is at E.
F47 ==> F48:  The yellow lid is not at E.
F47 ==> F49:  The pink lid is not at E.
F47 & F29 ==> F50:  The 225 candies are not under the white lid.
F47 & F30 ==> F51:  The licorice sticks are not under the white lid.
F47 & F28 ==> F52:  The jellybeans are not under the white lid.
F47 & F5 ==> F53:  The gumdrops are not under the white lid.
F40, F51, F52 & F53 ==> F54:  The bonbons are under the white lid.
F54 ==> F55:  The bonbons are not under the green lid.
F54 ==> F56:  The bonbons are not under the blue lid.
F54 ==> F57:  The bonbons are not under the pink lid.
F54 & F47 ==> F58:  The bonbons are at E.
F58 ==> F59:  The bonbons are not at A.
F58 ==> F60:  The bonbons are not at B.
F58 ==> F61:  The bonbons are not at C.
F58 ==> F62:  The bonbons are not at D.
F58 ==> F63:  The butterscotches are not at E.
5 & F47 ==> F64:  The green lid is not at D.

Now assume the blue lid is at A. By clue no. 1, the gumdrops would be
at B. Since by clue no. 3 the licorice sticks and the jellybeans are
adjacent, they must fit into C and D, so the licorice sticks would be
at C, and the 225 jellybeans at D.  That leaves the butterscotches
at A, which means the yellow lid has to be at A, which contradicts the
assumption.  Thus:

F65: The blue lid is not at A.

Now assume the blue lid is at C. By clue no. 1, the gumdrops would be
at D, and the 175 candies at E. Since the yellow lid covers the
butterscotches, it must be at A or B, but if at B, no. 3 would be
contradicted. Thus the yellow lid and the butterscotches would have
to be at A, the licorice sticks at B, and the 225 jellybeans at C.
Now the green lid cannot be at A (the yellow lid is) or at B (since
the 200 candies would have to be at C, but the 225 are), or at C (the
blue lid is) or at D (it is next to the white lid), or at E (the white
lid is). Thus we have a contradiction, and so:

F66: The blue lid is not at C.
F8, F9, F65 & F66 ==> F67:  The blue lid is at B.

Now use the location information from clues numbers 1, 3, and 5 above
to reason as in the above two paragraphs and finish figuring out what
is where. I note that the solution is unique.

-Doctor Rob,  The Math Forum
Check out our web site!  http://mathforum.org/dr.math/
```
Associated Topics:
High School Logic
Middle School Logic

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
Math Forum Home || Math Library || Quick Reference || Math Forum Search