The new forums will be named Coin Return (based on the most recent vote)! You can check on the status and timeline of the transition to the new forums here.
The Guiding Principles and New Rules document is now in effect.
Does anyone know the formula to determine the possible permutations of a given number of switches?
In other words each switch a, b, c, d or e is either on or off. Order doesn't matter.
In figuring it out for five, this is what I have so far:
And if the switches can be set to on, off, or unknown, then it is 3^5. In fact, it is (number of positions a single element can have)^(number of said elements). This is for like elements. If you had X switches (on/off) and Y dials (5 settings), you'd say (2^X) * (5^Y).
A more complicated version of this exists for sets such as a deck of cards (where you are removing elements as you go). I loved my discrete math class in college. Unfortunately, it is a dark voodoo which exits the brain upon completion of the semester.
Good times.
MurphysParadox on
Murphy's Law: Whatever can go wrong will go wrong.
Murphy's Paradox: The more you plan, the more that can go wrong. The less you plan, the less likely your plan will succeed.
I feel really, really dumb for not figuring this out. It seems so obvious...
Thanks muchly guys.
I just typed five X's or O's over and over to get all the possibilities in a trial and error fashion. If that's thinking in binary than look what I can do. :winky:
I just typed five X's or O's over and over to get all the possibilities in a trial and error fashion. If that's thinking in binary than look what I can do. :winky:
A better way to order it (with only three switches, because I'm lazy) would be:
000 0
001 1
010 2
011 3
100 4
101 5
110 6
111 7
Where 1 is on and zero is off. Note the patterns in the columns - The least significant bit (rightmost) alternates on and off. One full cycle of on and offs toggles the middle bit, which has a pattern of two off and two on. One full cycle of that toggles the most significant bit.
Klorgnum on
0
MetalbourneInside a cluster b personalityRegistered Userregular
edited February 2010
In the fifth grade I was taught to draw a box for each "digit"
then in each box, put the number of possible answers for it (in this case 2; on and off)
Then multiply all the boxes together and you have the number of possible combinations.
Yup, it helps to draw little place markers for each element such as this:
_ _ _ _ _
and then in each element, think about what you are doing. How many different things can go into this element? 2 (either on or off). What about the next element? Well, you still have two choices, either on or off.
After you fill all of the elements, you multiply them together.
2 * 2 * 2 * 2 * 2 = 2^5
And there you go.
Let's do it now for the alphabet. Aka how many combination of 5 letters can you make, given you can reuse the same letter (as in aaaaa counts).
Make your elements:
_ _ _ _ _
Then put numbers in your elements. (26 possible letters in the alphabet.. contrast this to 2 possible positions in a switch (either on or off))
26 * 26 * 26 * 26 * 26 = 26^5
Not too bad.
Demerdar on
0
ChanusHarbinger of the Spicy Rooster ApocalypseThe Flames of a Thousand Collapsed StarsRegistered User, Moderatormod
Yup, it helps to draw little place markers for each element such as this:
_ _ _ _ _
and then in each element, think about what you are doing. How many different things can go into this element? 2 (either on or off). What about the next element? Well, you still have two choices, either on or off.
After you fill all of the elements, you multiply them together.
2 * 2 * 2 * 2 * 2 = 2^5
And there you go.
Let's do it now for the alphabet. Aka how many combination of 5 letters can you make, given you can reuse the same letter (as in aaaaa counts).
Make your elements:
_ _ _ _ _
Then put numbers in your elements. (26 possible letters in the alphabet.. contrast this to 2 possible positions in a switch (either on or off))
26 * 26 * 26 * 26 * 26 = 26^5
Not too bad.
It's even more useful if you have a situation where you can't reuse the same letter. You'd end up with something like 26*25*24*23*22
And they could throw a hook in there where theyd ask for the number of possible five digit numbers that don't reuse the same digit: 9*9*8*7*6
Or trying to figure out how many area codes there are: 9*2*9
It's the multiplication counting principle. When you first learn it you're like "you have 3 shirts, 6 pairs of pants, and 8 ties how many outfits can you wear." You just multiply the number of each choice you have.
If you can make a tree diagram for it, you should multiply!
musanman on
0
MetalbourneInside a cluster b personalityRegistered Userregular
edited February 2010
but one of the shirts is a tshirt and two pairs of pants are white and it's after labor day!
I just typed five X's or O's over and over to get all the possibilities in a trial and error fashion. If that's thinking in binary than look what I can do. :winky:
No, the point was that you weren't thinking in Binary, which not only made it confusing to look at, but had you missing a few.
Count in binary and it goes like this:
1
10
11
100
101
110
111
1000
etc.
Other way to look at it:
(00000)
(0000)1
(000)10
(000)11
(00)100
(00)101
(00)110
(00)111
(0)1000
etc.
Now just replace the 1s and 0s with xs and os if that's what you want to use
xxxxx
xxxxo
xxxox
xxxoo
xxoxx
xxoxo
xxoox
xxooo
etc.
In the fifth grade I was taught to draw a box for each "digit"
then in each box, put the number of possible answers for it (in this case 2; on and off)
Then multiply all the boxes together and you have the number of possible combinations.
That's a rather visual representation of 2^n
It sounds like it's more intended for multiple combinations (like, you're trying to figure out how many different outfits you can make with 3 pairs of pants, 8 shirts and 7 pairs of shoes). It's called combinatorics.
Posts
So for 5 it's 32 possible combinations.
edit:
xxxxx
xxxxo
xxxox
xxxoo
xxoxx
xxoxo
xxoox
xxooo
xoxxx
xoxxo
xoxox
xoxoo
xooxx
xooxo
xooox
xoooo
oxxxx
oxxxo
oxxox
oxxoo
oxoxx
oxoxo
oxoox
oxooo
ooxxx
ooxxo
ooxox
ooxoo
oooxx
oooxo
oooox
ooooo
Is the actual list of solutions for 5.
2^(number of switches)
So you should have a total of 32 for 5 switches, 64 for 6 switches, 128 for 7 switches.
Edit: Woah, beaten. Well played gents, well played.
I was going to say exactly like this. Think in binary (1,2,4,8,16,32,etc.)
A more complicated version of this exists for sets such as a deck of cards (where you are removing elements as you go). I loved my discrete math class in college. Unfortunately, it is a dark voodoo which exits the brain upon completion of the semester.
Good times.
Murphy's Paradox: The more you plan, the more that can go wrong. The less you plan, the less likely your plan will succeed.
Thanks muchly guys.
I just typed five X's or O's over and over to get all the possibilities in a trial and error fashion. If that's thinking in binary than look what I can do. :winky:
A better way to order it (with only three switches, because I'm lazy) would be:
000 0
001 1
010 2
011 3
100 4
101 5
110 6
111 7
Where 1 is on and zero is off. Note the patterns in the columns - The least significant bit (rightmost) alternates on and off. One full cycle of on and offs toggles the middle bit, which has a pattern of two off and two on. One full cycle of that toggles the most significant bit.
then in each box, put the number of possible answers for it (in this case 2; on and off)
Then multiply all the boxes together and you have the number of possible combinations.
_ _ _ _ _
and then in each element, think about what you are doing. How many different things can go into this element? 2 (either on or off). What about the next element? Well, you still have two choices, either on or off.
After you fill all of the elements, you multiply them together.
2 * 2 * 2 * 2 * 2 = 2^5
And there you go.
Let's do it now for the alphabet. Aka how many combination of 5 letters can you make, given you can reuse the same letter (as in aaaaa counts).
Make your elements:
_ _ _ _ _
Then put numbers in your elements. (26 possible letters in the alphabet.. contrast this to 2 possible positions in a switch (either on or off))
26 * 26 * 26 * 26 * 26 = 26^5
Not too bad.
That's a rather visual representation of 2^n
It's even more useful if you have a situation where you can't reuse the same letter. You'd end up with something like 26*25*24*23*22
And they could throw a hook in there where theyd ask for the number of possible five digit numbers that don't reuse the same digit: 9*9*8*7*6
Or trying to figure out how many area codes there are: 9*2*9
If you can make a tree diagram for it, you should multiply!
No, the point was that you weren't thinking in Binary, which not only made it confusing to look at, but had you missing a few.
Count in binary and it goes like this:
1
10
11
100
101
110
111
1000
etc.
Other way to look at it:
(00000)
(0000)1
(000)10
(000)11
(00)100
(00)101
(00)110
(00)111
(0)1000
etc.
Now just replace the 1s and 0s with xs and os if that's what you want to use
xxxxx
xxxxo
xxxox
xxxoo
xxoxx
xxoxo
xxoox
xxooo
etc.
It sounds like it's more intended for multiple combinations (like, you're trying to figure out how many different outfits you can make with 3 pairs of pants, 8 shirts and 7 pairs of shoes). It's called combinatorics.
http://www.youtube.com/watch?v=w0i_ZFlGTVY