English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

qw & qwertyuiopasdfghjklzxcvbnm are both key combinations.

2007-03-07 02:52:12 · 5 answers · asked by Anonymous in Science & Mathematics Mathematics

5 answers

By stating "combinations" rather than "permutations", then it is a given that "qw" and "wq" are ONE combination (although they are two permutations.) (In a combination, which you stated, order does NOT matter. Only in a permutation does order matter.)

Therefore, we must take the sum of all combinations of 26 elements taken n at a time where n is an integer from 1 through 26.
C superscript m, sub n = n! / m!((n-m )! )
(Of note is that you can only have ONE combination of 26 elements taken 26 at a time, and you can have 26 different combinations of 26 elements taken one at a time. If selecting them 13 at a time, there are 10,400,600 combinations available.)


The short answer is that there 67,108,863 *combinations* possible. (One could also argue that there is only one way to take 0 characters from a pool of 26 elements, in that 'you don't', so you could say there are 67,108,864 ways to make your combinations-- but that's a bit nit-picky and isn't exactly practical for this exercise.)

(Again, this is using the mathematical definition of combination vs permutation.)

(If you REALLY meant permutations (such that qw and wq are two permutations), then there are 1.09626E+27 possible permutations.)

You also mentioned using a QWERTY keyboard, but your two examples didn't use any characters other than letters.

If we are to include the numbers, the space bar, and punctuation marks and other normal symbols (like *, ^ and ~m etc) and exclude SHIFT, ALT, CTRL, Function Keys and ESC (as they do not print a character to the screen (Under certain conditions F6 will, but not in a word processor)), then the number of combinations and permutations changes greatly. I count an additional 42 printable characters.) 2.95148E+20 combinations, and 6.74144E+96 permutations.

2007-03-07 03:26:40 · answer #1 · answered by Sevateem 4 · 0 0

Count the number of keys with characters on them, and get the factorial of that number. So if there are say... 50 characters, then it's 50! ( !=factorial )
or 50x49x48....x2x1=???

you have 26 letters, 10 numbers, 10 characters above the numbers, then a few extra scattered around.

Not sure if this solution counts combinations where you have smaller strings. Generally, the formula for how many combos you can have of a 3 character string with 50 possible characters in each place would be 50^3. So if it's a 5 character string, 50^5. Not sure what formula would get you every single possible combo with no reps from 1 character all the way to 50 characters strings.


Ralfcoder, you basically just described a factorial again.

2007-03-07 11:02:52 · answer #2 · answered by Anonymous · 1 0

If n = the # of keys, then the answer is:

n * (n-1) * (n-2) * (n-3) * .... until you get to the point where (n-x) = 2.

So if you have 26 keys, the answer would be 26 * 25 * 24 * ... 2 = the answer you want.

Make sure your calculator has a lot of digits in the display window - you're gonna need them.

2007-03-07 11:03:15 · answer #3 · answered by Ralfcoder 7 · 1 0

I'm assuming that the order matters. While I am not going to spend the time to calculate the exact number, the way to calculate the answer is as follows:

26! / (26! - 1!) + 26! / (26! - 2!) + .... + 26! / (26! - 26!)

Where n! is n factorial. You can read more about this calculation by viewing the Combinatorics page on Wikipedia http://en.wikipedia.org/wiki/Combinatorics

For this answer I used the "Permutation without repetition" equation.

2007-03-07 11:21:52 · answer #4 · answered by Nick O 2 · 1 0

summation i = 1 to 25 of 26!/i!
covers all 26 length combos, 25 length...down to the 26 1 letter combos. If 1 letter doesn't count then summation is 1 to 24.

2007-03-07 11:01:31 · answer #5 · answered by Gypsy Doctor 4 · 1 1

fedest.com, questions and answers