John said:
I was after confirmation that my statement for calculation was correct
and after a program (calculator ?) that would give the result. A step
by step might have been an added bonus.
For example, I haven't used a "scientific" calculator so if 12 to the
power of 12 was the answer I wouldn't know how to arrive at the answer
using a calculator.
Well, any combination of 12 items is surely pretty clear. Isn't it ?
Not really, as exemplified below. One of the biggest problems with
probability is expressing the problem/ situation in an unambiguous way.
Had you expressed an exam question as "One has a list of 12 items. How
many "unique" combinations would that make ?" then you would end up with
quite a number of interpretations and answers. Perhaps an interesting
"how many" puzzle within itself.
Well, I would think item 1 and 3 would be the same as 3 and 1. So
"uniqueness" would mean that either (not both) would be an answer.
OK, now the ambiguity is starting to sort itself out. You seem to be
asking about selections (without regard to ordering of the selected
items) rather than arrangements. That's incidentally exactly the way the
term "combination" is used for in mathematical parlance, as opposed to
"permutation". (1,3) would be regarded as different permutation to (3,1)
but both represent the same combination.
Though I now see that the word "unique" complicates matters. For
example, suppose all "combinations" of 1 and 2 is 2 squared then the
answer should be 4.
Maybe ? :
1 or
2 or
1 and 2 or
2 and 1.
Four options.
"Uniqueness gives me 3 as the third and fourth options are effectively
the same.
That's exactly the distinction between selections/combinations (=3) and
arrangements/permutations (=4) I mentioned above. I always used the
analogy of thinking about whether you're going to be placing the
selected items into numbered / distinguishable slots, or just tossing
them into a hat... if that helps. In your case it's the hat I think.
But the "uniqueness" factor is usually more specific to what's being
sought. For instance, if there are 9 boys and 11 girls in a class, how
many different arrangements in a line are possible? The answer will
depend on whether each is treated as an individual (unique by name say)
or whether the only distinction being made is boy or girl (not all
unique). Depends on what you're looking for. In your case, I think you
*are* regarding each of the items as unique (distinguishable).
True if you're using all 12 letters, you're allowing letters to be
repeated and you're looking at the number of *arrangements* within the
group of 12, which I don't think you are from your example above.
Sorry, I don't know what the difference between 12 to the power of 12
and factorial 12 is. Come to think of it I am now not sure I even
understand the former ! :-(
12 to the power 2 is 12 x 12 (2 terms)
12 to the power 3 is 12 x 12 x 12 (3 terms)
12 to the power 4 is 12 x 12 x 12 x 12 (4 terms)
So 12 to the power 12 is 12 x 12 x 12 ... x 12 (twelve terms)
12! = 12 x 11 x 10 x 9 ... x 3 x 2 x 1
also 12 terms, but with the number of available choices reducing by one
for each term. This corresponds to the "without replacement" or "no
repeats allowed" situation - once you've used an item it's removed from
the pool of possible choices.
All that said, from the example you gave above, using the digits 1 and
2, I'm now guessing that you are actually after the total number of all
possible *selections* of *up to* 12 items from the 12 items you have.
That is, all possible groups of size 1, 2, 3, ... 12 from a pool of 12
*unique* items. For your simple example, the answer you want is 3 -
being the selections (1), (2), (1,2) with (1,2) and (2,1) being regarded
as the same thing. Also, you're not allowing repetition of something
already selected. In summary:
- 12 unique items
- all group sizes from 1 to 12 inclusive
- selection without replacement (no repeats)
- no regard to order (looking at selections rather than arrangements)
Is this right? If so, then it's actually not a trivial problem. You're
wanting to count all the selections of size 1, size 2, size 3... up to
size 12 and add the counts together. Without getting into proofs etc.,
the number of possibilities for any one of these groups (of size r) is
given by
12! / { (12-r)! x r!} or 12(C)r for short.
It's less scarey than it looks - the number of possibilities for a group
of 3 would be 12(C)3 or 12! / (9! x 3!). The good part about these
factorial expressions is that lots of stuff cancels out, so this becomes
just
(12 x 11 x 10) / (3 x 2 x 1) = 220
All you have to do then is to repeat for r = 1 to 12 and add them all
up. Easy ;-)
Actually it *is* easy because the number you're after is:
12(C)1 + 12(C)2 + 12(C)3 + ... + 12(C)10 + 12(C)11 + 12(C)12
There's a handy formula called the binomial theorem that can be applied
to this exact kind of expression, and it turns out that the answer is 2
to the power 12 minus one or 2^12 - 1. More generally, if there were n
items, the answer would be 2^n - 1. To run this through Windows
Calculator is just a matter of keying:
2
x^y button
12
- button
1
= button
Answer: 4095
Just as easy is 12! if you want it:
12
n! button
Answer: 479001600
Just for interest, the "minus one" is there to exclude the single (only)
group of size zero.
OK, since this has become a novel now anyway, and since you obviously
want explanation rather than just an answer, here's a bit of lodown on
how all this complex-looking math really just boils down to counting
things. I'll use the example of the 12 unique letters A-L. You're
interested in groups of all sizes, and counting selections/ combinations
rather than ordered permutations. It turns out that it's easiest to
count the more numerous *arrangements* first, then reduce the count so
that different arrangements of the same letters all count as one.
Consider all the groups of size 3 that are possible, by having 3
distinguishable slots to fill. The first slot can have any of 12 items,
the second any of the 11 remaining items and the third any of 10
remaining. The total number of possibilities is then 12 x 11 x 10
(=1320).
So the number of "permutations" or arrangements of 3 letters, selected
without replacement from a group of 12 unique letters is
12 x 11 x 10
In factorial terms this is 12! / (12 - 3)!
Now let's pick on a particular trio of letters, say J, A, F. How many
times do they appear within the 1320 possibilities? In other words, how
many arrangements can we make out of 3 distinct letters? Again, think of
filling 3 distinguishable slots with 3 different items. First slot - 3
choices, second 2, third 1. So there are 3 x 2 x 1 (=3!) possible
arrangements of J,A,F -
JAF, JFA, AJF, AFJ, FJA, FAJ
So the 1320 arrangements could be placed in groups of 6 like the above,
and each group of 6 would represent the same set of letters (as chucked
into a hat, as it were).
So the number of "combinations" or selections of 3 letters, selected
without replacement from a group of 12 unique letters is
12 x 11 x 10 / (3 x 2 x 1)
In factorial terms this is 12! / { (12 - 3)! x 3! }
This analysis can be repeated for groups of all sizes from 1 to 12, and
the results added to give the total number of possibilities. The
factorial expressions are used because they're a standard mathematical
function (convenience) supported on calculators, spreadsheets etc. But
the crux of the whole thing boils down to just counting and
multiplication... not scarey at all! ;-)
Finally an aside. The problem with ambiguity in the wording of such
problems is so well recognised that it's led to many "trick" puzzles and
paradoxes. One classic, relating directly to the example you gave is
this:
Family A has 2 children. The oldest is a boy. What's the probability
that both are boys? Family B has 2 children. One of them is a boy.
What's the probability that both are boys?
Interesting problem yours, ambiguities & all
... cleared a few cobwebs
off those 5¼" neural storage units that hadn't been accessed for quite a
while.