# S.O.S. Mathematics CyberBoard

Your Resource for mathematics help on the web!
 It is currently Tue, 31 Mar 2015 17:49:00 UTC

 All times are UTC [ DST ]

 Page 1 of 1 [ 11 posts ]
 Print view Previous topic | Next topic
Author Message
 Post subject: Try this!Posted: Sat, 14 Mar 2009 18:47:10 UTC
 Member of the 'S.O.S. Math' Hall of Fame

Joined: Sun, 24 Jul 2005 20:12:39 UTC
Posts: 4491
Location: Ottawa Ontario
12 candies: 2 black, 2 blue, 2 purple, 2 red, 2 white, 2 yellow.

6 jars: jar A, jar B, jar C, jar D, jar E, jar F.

The 12 candies are dropped at random in the jars, 2 in each jar.

What's the probability that AT LEAST one jar contains 2 candies of same color?

_________________
I'm just an imagination of your figment...

Top

 Post subject: Re: Try this!Posted: Sun, 15 Mar 2009 02:38:16 UTC
 Member of the 'S.O.S. Math' Hall of Fame

Joined: Mon, 19 May 2003 19:55:19 UTC
Posts: 8211
Location: Lexington, MA
Hello, Denis!

I think I've got it, but normally I miscount somewhere . . . *blush*

Quote:
12 candies: 2 black, 2 blue, 2 purple, 2 red, 2 white, 2 yellow.
6 jars: jar A, jar B, jar C, jar D, jar E, jar F.
The 12 candies are dropped at random in the jars, 2 in each jar.
What's the probability that AT LEAST one jar contains 2 candies of same color?

There are: . ways to place the candles.

How many of these have no matching pairs of colors?

Place one of each color in each of the jars.
. . There are: ways.

The other six must be placed so there are no matching pairs.
This is a derangement of the six candles. . There are: ways.

Then there are: . ways with no matching pairs.

Hence, there are: . ways with some matching pairs.

Therefore: .

Top

 Post subject: Posted: Sun, 15 Mar 2009 03:26:24 UTC
 Member of the 'S.O.S. Math' Hall of Fame

Joined: Sun, 24 Jul 2005 20:12:39 UTC
Posts: 4491
Location: Ottawa Ontario
Nope; way off; probability is below 1/2.

Try a shorter one: 2 red and 2 blue with 2 jars: probability is 1/3, right?

Btw, they're CANDIES, not CANDLES

_________________
I'm just an imagination of your figment...

Top

 Post subject: Posted: Tue, 17 Mar 2009 09:57:37 UTC
 Member of the 'S.O.S. Math' Hall of Fame

Joined: Sat, 7 Jan 2006 18:29:24 UTC
Posts: 1401
Location: Leeds, UK
Is there a neat way to approach this problem? The only method I could find was a laborious listing of cases that can occur. Following Denis's suggestion of building up to the case of six colours and six jars by starting with two of each and working upwards, I got the answer . But like Soroban I'm not good at counting, so I'm not that confident of the accuracy of that answer. I'd be a lot happier if I could find a conceptually cleaner way to get the result.

Top

 Post subject: Posted: Tue, 17 Mar 2009 20:02:14 UTC
 Member of the 'S.O.S. Math' Hall of Fame

Joined: Sun, 24 Jul 2005 20:12:39 UTC
Posts: 4491
Location: Ottawa Ontario
That's what I got too, Opalg, but by writing a program.

Labelling the 12 candies 1 to 12 (1-2 = black .... 11-12 = yellow),
say a random result is (Jar A to F order):
7-3, 11-5, 6-1, 2-12, 9-8, 4-10
That's really the same as:
1-6, 2-12, 3-7, 4-10, 5-11, 8-9 (keep left < right)

Then check each "jar" for a difference of 1, highest being even.

Assigning variables A to L for 1 to 12, the looping goes:

A = 1
Loop B from A+1 to 12
Loop C from A+1 to 7
Loop D from C+1 to 12
Loop E from C+1 to 8
Loop F from E+1 to 12
Loop G from E+1 to 9
Loop H from G+1 to 12
Loop I from G+1 to 10
Loop J from I+1 to 12
Loop K from I+1 to 11
Loop L from K+1 to 12
Check each jar for at least one "yes":
Is B-A = 1 and B even?
...
Is L-K = 1 and L even?

Results in 4355 "yes" out of 10395 combos, hence 871/2079

Haven't been able to come up with a "neat way"...the way Soroban does!
Maybe he'll be back with one: to make up for his terrible goof in his post

_________________
I'm just an imagination of your figment...

Top

 Post subject: Posted: Wed, 18 Mar 2009 01:15:17 UTC
 Senior Member

Joined: Mon, 21 Mar 2005 02:57:16 UTC
Posts: 140
I couldn't find a neat general solution for n candies and n/2 jars. It's way beyond my ability. I vaguely remember once looking for but not finding a solution to the menage problem excluding the typical restriction that the seating must alternate man/woman. That seems to be a very similar problem.

I'll show my work. Not because it's any good. I'm just hoping that it might give some ideas to many of you here who are smarter and better educated than me. I doubt if this leads anywhere - so I apologize in advance if this is way off and a complete waste of everyone's time.

First I create a sequence for the color of candies drawn , and assume they are put in the jars in order: ( and in Jar 1, and in Jar 2, ...)

I list the six possible arrangements of four candies in a matrix:

I then have a matrix which describes the match status of each element in the matrix (i.e., whether or not the element matches its partner in the jar).

For odd values of :

For even values of :

So my "match-status" matrix for n=4 corresponding to the above outcomes is:

There needs to be a second status matrix which shows the potential new partner for each element if that particular element is shifted to the right by one space (assuming one candy is placed to the left and one is placed to the right). Candies can be displaced by 0, 1 or 2 spaces. If they are displaced by 0 or 2 spaces they are paired with the same candy as before. If they are displaced by 1 space, they have a new partner. For odd numbered candies, this new partner will be to the left; for even numbered candies it will be to the right.

For the above matrix, this "alternate status" matrix is as follows:

Now I want to get from a matrix for to a matrix for , but there are possible transformations. Leaving spaces for the possible locations of the next two candies we have spaces:

Let represent the position of occupies in the expanded string, so and the empty spaces are possible locations for and .

So, let represent the transformation matrix when and and .

If then . There is a 4th case which is a subset of the 3rd case above, and that is when and either or . In this case, .

I can't take it from here. I don't know whether it goes anywhere from here, and I apologize again for my severe shortcomings in linear algebra. I hope it gives someone some ideas on another tack.

Top

 Post subject: Posted: Wed, 18 Mar 2009 01:41:49 UTC
 Member of the 'S.O.S. Math' Hall of Fame

Joined: Sun, 22 Feb 2004 23:09:47 UTC
Posts: 651
Location: 40.47N 73.58W
I have a feeling that there is no simple solution, but that possibly the probability approaches 1/2 as . I wonder if that is any easier to prove.

_________________
"If I have not seen as far as others, it is because giants were standing on my shoulders." - Hal Abelson

Top

 Post subject: Posted: Wed, 18 Mar 2009 14:35:19 UTC
 Member of the 'S.O.S. Math' Hall of Fame

Joined: Sun, 24 Jul 2005 20:12:39 UTC
Posts: 4491
Location: Ottawa Ontario
Looking at 3 jars, 3 colors (color1 = 1,2; color2 = 3,4; color3 = 5,6):
as example, if 4,3,6,1,2,5 are random results, then Jars A,B,C = 4-3, 6-1, 2-5;
can be rearranged as 1-6, 2-5, 3-4.
There's 15 possible results:
12 34 56 yes
12 35 46 yes
12 36 45 yes
13 24 56 yes
13 25 46 no
13 26 45 no
14 23 56 yes
14 25 36 no
14 26 35 no
15 23 46 no
15 24 36 no
15 26 34 yes
16 23 45 no
16 24 35 no
16 25 34 yes

7 yes, 8 no; so probability = 7/15

The "1" being fixed, we have 3 combos for each of others:
so (c = nunber of candies) total combos = 3(c - 1)

Works similarly for our 12 candies: 945(c - 1) = 10,395 total combos.

BUT how is the 945 arrived at?

If we figure that out, we're still in trouble:
how is the 4355 "yes cases" arrived at?

_________________
I'm just an imagination of your figment...

Top

 Post subject: Posted: Wed, 18 Mar 2009 18:13:31 UTC
 Member of the 'S.O.S. Math' Hall of Fame

Joined: Sat, 7 Jan 2006 18:29:24 UTC
Posts: 1401
Location: Leeds, UK
My approach to the "pairs" problem was to look at this situation: Suppose that you have m+n jars, 2m+n colours and 2m+2n candies. There are n pairs of candies and 2m single candies. Each pair has one of the n colours; each of the 2m single candies has a different colour. The candies are dropped at random in the jars, 2 in each jar, and P(m,n) denotes the probability that NO jar contains two candies of the same colour.

Thinking about what happens when two random candies are dropped into the first jar, you get the recurrence relation

.

(The three terms on the right correspond to the three possibilities for the two candies: (a) they come from distinct pairs, (b) one comes from a pair and the other is single, (c) both are single.)

This recurrence relation satisfies the boundary conditions P(m,0)=1 (because if all the candies have different colours it's obviously impossible for a jar to contain two of the same colour), and P(0,1)=0 (because then there are two candies, both having the same colour, and only one jar to put them in ...).

Applying the recurrence relation recursively, we get .

After a few more recursions, the result comes out as .

The pattern for the denominator is clear enough (!), but I don't see much hope of finding a simple pattern for the numerator.

(The original problem asked for 1 â€“ P(0,6), but I think it's more natural to look at the case where there are no jars with candies of the same colour.)

Top

 Post subject: Posted: Wed, 18 Mar 2009 18:33:44 UTC
 Member of the 'S.O.S. Math' Hall of Fame

Joined: Mon, 23 Feb 2009 23:20:33 UTC
Posts: 1049
Put a pair of candies in one jar, then fill the rest randomly.

There are 6 ways to choose a pair of candies, and 6 ways to choose a jar. Then there are 10!/2^5 ways to fill the rest.

But this counts too many, because there might be two pairs. So subtract the following number...

There are 6.6.5.5/2! ways to put two pairs of candies in two different jars. Then there are 8!/2^4 ways to fill the rest.

But this counts too many, because there might be three pairs. So subtract the following number...

There are 6.6.5.5.4.4/3! ways to put three pairs of candies in three different jars. Then there are 6!/2^3 ways to fill the rest.

But this counts too many... et cetera.

Divide by 7 484 400 to get 0.41895141895...

Top

 Post subject: Posted: Wed, 18 Mar 2009 22:28:50 UTC
 Member of the 'S.O.S. Math' Hall of Fame

Joined: Sun, 24 Jul 2005 20:12:39 UTC
Posts: 4491
Location: Ottawa Ontario
aswoods wrote:
> There are 6 ways to choose a pair of candies, and 6 ways to choose a jar.
WHY choose a jar?

> Divide by 7 484 400 to get 0.41895141895...
Same as what we've already got: 871/2079 (from 4355/10395)

_________________
I'm just an imagination of your figment...

Top

 Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending
 Page 1 of 1 [ 11 posts ]

 All times are UTC [ DST ]

#### Who is online

Users browsing this forum: TurnitinBot [Bot]

 You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forum

Search for:
 Jump to:  Select a forum ------------------ High School and College Mathematics    Algebra    Geometry and Trigonometry    Calculus    Matrix Algebra    Differential Equations    Probability and Statistics    Proposed Problems Applications    Physics, Chemistry, Engineering, etc.    Computer Science    Math for Business and Economics Advanced Mathematics    Foundations    Algebra and Number Theory    Analysis and Topology    Applied Mathematics    Other Topics in Advanced Mathematics Other Topics    Administrator Announcements    Comments and Suggestions for S.O.S. Math    Posting Math Formulas with LaTeX    Miscellaneous