Home computickets Count the number of combinations

# Count the number of combinations

Author

Date

Category

How to count the number of combinations of a string consisting of 10 characters, where only Latin letters in lower case and numbers are used.

I’d love to know the formula.

Total characters – 36.

If repetitions can be – in the first place, how many ways can you choose a character? 36. For each first, how many can you choose the second? 36. Total – 36 * 36. For every first two … – well, and so on.

Total – 36 10 .

For an alphabet of N characters and line length m – If there can be no repetitions, then only 35 are in second place (one has already been selected), in third – 34 (two have already been selected) … And so on. Total – 36 * 35 * 34 * 33 * 32 * 31 * 30 * 29 * 28 * 27 = 36! / 26 !.

For an alphabet of N characters and line length m – the number of placements Two formulas can be used.

If characters can be repeated, then any of 10 characters can take one 36 values ​​(26 Latin letters plus 10 digits). We can say that this is a 10-digit number in the 36-ary number system. The number of combinations will be 36 10 or 3.6561584 × 10 15 .

If symbols cannot be repeated, then we are dealing with placements . There are also combinations , but in this case they are not suitable because the placement of `123abc `and `abc123 `will be different, but the combination will be the same same.

The number of placements from n to k is calculated using the formula A k n = n! / (n – k) !, that is, in your case it will be 36! / 26! or 9.2239326 × 10 14

The alphabet used contains 36 characters: 26 letters and 10 numbers.

Number of placements without repeats = n! / (n-k)! = 36! / 26!
Number of placements with duplicates = n k = 36 10

number of combinations = C!

Ie in your case 10! combinations …

Why spend time searching for the correct question and then entering your answer when you can find it in a second? That's what CompuTicket is all about! Here you'll find thousands of questions and answers from hundreds of computer languages.