Jump to content

Wikipedia:Reference desk/Archives/Mathematics/2009 February 26

From Wikipedia, the free encyclopedia
Mathematics desk
< February 25 << Jan | February | Mar >> February 27 >
Welcome to the Wikipedia Mathematics Reference Desk Archives
The page you are currently viewing is an archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages.


February 26[edit]

Probability?[edit]

This is not a homework question; it is a U.I.L. question and neither I nor my coaches can figure it out. "A donut shop sells 6 different types of donuts. How many different ways are there to buy a dozen?" We've tried many combinations and permutations, but still can't figure it out. TIA for a response, Ζρς ι'β' ¡hábleme! 00:36, 26 February 2009 (UTC)[reply]

This is extremely basic probability. Think about it in terms of dice. Say you rolled a die twice - how many possible different results are there? If you can't figure it out in your head, try drawing a diagram. Then just scale the results up - it's the exact same thing. --Aseld talk 01:25, 26 February 2009 (UTC)[reply]
Well number the dozen from 1-12. The first donut can be chosen in six possible ways (because there are six different types of donuts). Similarly, each donut from 2-12 can be chosen in six possible ways. Now, just multiply six by itself 12 times so the answer is 612 possible dozens. (P.S Good to see some Spanish on the English WP!). --PST 01:26, 26 February 2009 (UTC)[reply]
You probably want to identify combinations that only differ by ordering. A jam doughnut, 10 ring doughnuts and a jam doughnut isn't really different from two jam doughnuts and 10 ring doughnuts. --Tango (talk) 01:44, 26 February 2009 (UTC)[reply]
Tango is right. This is where the problem arises for us. For this problem, "ABBA" is the same as "AABB" or "ABAB". Ζρς ι'β' ¡hábleme! 01:50, 26 February 2009 (UTC)[reply]
I don't care what order the clerk puts my donuts into the box, I just care that I have what I ordered. Here's a good way to think about this problem: imagine you have 12 plain donuts lined up on a table, and you get to put 5 marks between them (i.e. 00|00000|00|0|00|). Everything before the first mark gets turned into donut type 1, everything between mark 1 and 2 gets turned into donut type 2, etc. You can convince yourself that there is a one to one correspondence between ways to put the marks on the table, and ways to order your donuts. How many ways is that?76.126.116.54 (talk) 01:53, 26 February 2009 (UTC)[reply]
I don't understand what you are trying to say. Ζρς ι'β' ¡hábleme! 01:57, 26 February 2009 (UTC)[reply]
A standard trick for basic combinatorics questions is to come up with a type of diagram that corresponds to each thing you're trying to count. 00|00000|00|0|00| means order 2 of type 1, 5 of type 2, 2 of type 3, 1 of type 4, 2 of type 5 and 0 of type 6. |||||000000000000 means order 12 of type 6. So you're trying to count the number of ways to insert the |'s between the 0's. This can be expressed via the appropriate binomial coefficient. 76.126.116.54 (talk) 02:02, 26 February 2009 (UTC)[reply]
Say you have a dozen doughnuts and five chocolate bars, and you arrange them in a line. You can have any order you like, but there must be 5 chocolate bars. So how many ways of doing that are there? Now, consider that all doughnuts before the first chocolate bar are type one, all between 1 and 2 are type 2, etc. You now have a dozen doughnuts, divided into six types by the placement of your chocolate bars. Do you see where this is going? -mattbuck (Talk) 02:04, 26 February 2009 (UTC)[reply]
Sorry, I'm really horrible at probability, but we tried all kinds of combinations and permutations. None of them agreed with the answer key; however, the answer on the answer key was verfied by a U.I.L. official. Also, a coach from another school explained this to one of our students (the student couldn't remember what the coach had said today), but the student did remember that it was not a normal probability question (combinations, permutations, etc.). Ζρς ι'β' ¡hábleme!
Using 76.126.116.54's technique, I find 6188. Is that what the answer sheet gave? Eric. 131.215.158.184 (talk) 08:34, 26 February 2009 (UTC)[reply]

You may like to study the article on multiset. (The answer is 12376). Bo Jacoby (talk) 08:48, 26 February 2009 (UTC).[reply]

I don't believe that 12376 is incorrect. See later in thread. -- SGBailey (talk) 14:58, 26 February 2009 (UTC)[reply]
You don't believe that 12376 is correct, right? (Neither do I) --NorwegianBlue talk 22:51, 26 February 2009 (UTC)[reply]
This isn't a probability question, it's a combinatorics question. Instead of working with a line of 12 objects split into six categories, we're going to work with a line of 17 split into two - 0s and |s for lack of a better terminology. 0s will represent the doughnuts, and |s will represent a change in doughnut type. Since we have six types of doughnuts, we therefore need 5 changes, so there will be 5 |s. Added to the 12 doughnuts, that makes a line of 17 objects. Instead of working directly on how many doughnuts, work out how many ways there are to arrange the 5 |s and 12 0s. This is equivalent to saying "I have 17 objects, and I want to pick five of them. How many ways of doing this are there?". If you pick one particular set of five, then because the 0s are identical and so can be interchanged (ditto the |s), you've uniquely determined where the 0s are. They'll be split into six groups (including groups of 0 in the case of ||), and this is one possible doughnut pick. Now you need to assure yourself that there aren't any picks which cannot be represented by a unique distribution of 0s and |s, and you'll find there's a 1:1 correspondence between possible doughnut combinations, and possible combinations of 12 0s and 5 |s. -mattbuck (Talk) 13:55, 26 February 2009 (UTC)[reply]


The R (programming language) has functionality for this:

> summary(blockparts(rep(12,6),12))
                                                            
[1,] 12 11 10 9 8 7 6 5 4 3 ... 0  0  0  0  1  0  0  0  0  0 
[2,] 0  1  2  3 4 5 6 7 8 9 ... 1  0  0  0  0  1  0  0  0  0 
[3,] 0  0  0  0 0 0 0 0 0 0 ... 0  1  0  0  0  0  1  0  0  0 
[4,] 0  0  0  0 0 0 0 0 0 0 ... 0  0  1  0  0  0  0  1  0  0 
[5,] 0  0  0  0 0 0 0 0 0 0 ... 1  1  1  2  0  0  0  0  1  0 
[6,] 0  0  0  0 0 0 0 0 0 0 ... 10 10 10 10 11 11 11 11 11 12
> 

Each column shows a possible box of donuts. So the first is 12 donuts of type 1, the second column shows 11 of type 1 and one of type 2, and so on to the last column which is 12 of type 6. HTH, Robinh (talk) 10:56, 26 February 2009 (UTC)[reply]

By the way, the Greek numeral for 12 is ιβʹ, not ι'β'. Sorry for being OT. — Emil J. 12:36, 26 February 2009 (UTC)[reply]

The pick any 5 out of 17 seems like a good approach and 17C5 gives 17! / ( 5! * 12! ) which is 6188. Do a simpler problem: 3 doughnuts and 3 types of doughnuts, so we need to change type twice, so we have 5 items (3 doughnuts with two type changes) and need to choose 2 of them. We could choose 12,13,14,15,23,24,25,34,35,45 which is 10 things. 5C2 gives 5! / ( 2! * 3! ) which is indeed 10. Thus I believe the 6188 answer. -- SGBailey (talk) 14:58, 26 February 2009 (UTC)[reply]

As far as I can see, exactly this question is answered in Combinations; Number of combinations with repetition, which agrees with the results of SGBailey and Eric. According to that article, the answer is choose(n+k-1,k), where n is the number of items on the menu, and k is the number you buy.

choose(6+12-1,12)= 6188

--NorwegianBlue talk 15:22, 26 February 2009 (UTC)[reply]

Ah. Sorry, I haven't had a chance to be on lately. Thank you all for your responses. 6188 is the answer that was given on the answer sheet. Good job explaining the problem, too. I will let my coaches know why that is the answer, and we'll study combinatorics. Ζρς ι'β' ¡hábleme! 02:01, 1 March 2009 (UTC)[reply]

I am sorry I could not take part in the discussion before; I hope all is clear now. But, out of curiosity: what does "U.I.L." mean? Thanks, Goochelaar (talk) 13:09, 1 March 2009 (UTC)[reply]
U.I.L. means University Interscholastic League. Ζρς ιβ' ¡hábleme! 01:16, 2 March 2009 (UTC)[reply]

Algebra for a card game[edit]

What values for a, b, c, d and m are the "fit best" for the formulas below? Is there a software I can plug it in, and it will calculate for me?

2c+d=2
c+2a=3
b+2m=3
2a+b+2m=5
3c=4
2c+a=5
c+a+b+m=5

--Sonjaaa (talk) 16:11, 26 February 2009 (UTC)[reply]

No exact solution exists. What do you mean by '"fit best"'? Algebraist 16:16, 26 February 2009 (UTC)[reply]
Hi Sonjaaa. I guess "fit best" is in the sense of linear least squares; then you want the Moore-Penrose pseudoinverse. The software is very common; but if it is only that system one can try and do it by hands... not me! --pma (talk) 18:35, 26 February 2009 (UTC)[reply]
Well, (with maple): a=1, b=2, c=3/2, d=-1, m=1/2. This gives as output in your system: [2, 7/2, 3, 5, 9/2, 4, 5], making the minimal distance from the data [2,3,3,5,4,5,5]. --pma (talk) 19:15, 26 February 2009 (UTC)[reply]
I'm very curious about the card game... where does that system come from? --84.221.68.150 (talk) 20:33, 26 February 2009 (UTC)[reply]
I wish I had a card game as homework too...--131.114.73.83 (talk) 13:03, 27 February 2009 (UTC)[reply]
Dominion (card game) --Sonjaaa (talk) 20:29, 27 February 2009 (UTC)[reply]
There are also linear regression calculators on line. Here is one, should you need it again [1]. You have to choose the option LSQ-RREF and introduce the augmented matrix, that is in your case, (ordering the variables a, b, c, d, m):
0 0 2 1 0 2
2 0 1 0 0 3
0 1 0 0 2 3
2 1 0 0 2 5
0 0 3 0 0 4
1 0 2 0 0 5
1 1 1 0 1 5
--pma (talk) 21:06, 27 February 2009 (UTC)[reply]