Counting Passwords with Restrictions

Click For Summary
SUMMARY

The discussion focuses on calculating the number of ways to create an 8-letter password using the letters A-Z, with the restriction that at most one letter can repeat. The solution involves two cases: Case A, where no letters repeat, calculated using the formula (26!)/(26-8)!, and Case B, where one letter repeats, calculated as 26 * (7!)/(7-7)!. The final answer is obtained by summing the results of both cases. This structured approach ensures all possible combinations are considered while adhering to the specified restrictions.

PREREQUISITES
  • Understanding of combinatorial mathematics
  • Familiarity with factorial notation
  • Knowledge of permutations and combinations
  • Basic algebra for manipulating equations
NEXT STEPS
  • Study combinatorial counting principles in depth
  • Learn about permutations and combinations in detail
  • Explore advanced topics in factorial calculations
  • Practice problems involving restrictions in counting
USEFUL FOR

Mathematicians, computer scientists, and anyone involved in cryptography or password security who seeks to understand combinatorial counting methods and restrictions.

Curiouspoet
Messages
2
Reaction score
0
Counting Lists With Repetition

Homework Statement


How many ways can you create an 8 letter password using A - Z where at most 1 letter repeats?


Homework Equations





The Attempt at a Solution


I'm not sure how to attack this problem but first I thought that A-Z considers 26 letters so with no restrictions on passwords we can create 268 passwords. I'm thinking it's 268 - X, where X is a term or a series of terms, but I'm not sure how to determine them, or if this is even the correct setup.

Well there are two cases given by the restrictions as follows:
A) No letter repeats in which we have a k list without repetition which is given by (n)k = n!/(n-k)!

B) One letter repeats in which case I think it's 26*[(n-1)!/(n-k-1)!].

And of course in this case n = 26 k = 8. Is this correct? If not could someone give me a hint?
 
Last edited:
Physics news on Phys.org
In the case of taking an 8-list of 26 letters where at most 1 letter repeats, would it just be the sum of case A and case B as I wrote?
 
i think you almost nailed it. i would separate it to 2 sections.
one - no repeating. in this particular case, we choose 8 letters from 26 and count all the ways we can order them, which is what you've mentioned \frac{26!}{(26-8)!}

two - one letter repeats. in this one, we choose only 7 letters from 26 and count all the way we can order 8 letters and subtract the number of ways we order the letters when the two similar letters are together.

why is that? i'll let you ponder about it. :)

then - as you've already typed, you will add what you've gotten from the 1st section and add it to the result of the 2nd section and that's the
answer to your question.
 

Similar threads

  • · Replies 9 ·
Replies
9
Views
13K
  • · Replies 12 ·
Replies
12
Views
2K
  • · Replies 6 ·
Replies
6
Views
5K
Replies
17
Views
2K
Replies
6
Views
3K
Replies
2
Views
1K
  • · Replies 18 ·
Replies
18
Views
2K
Replies
2
Views
2K
  • · Replies 11 ·
Replies
11
Views
2K
  • · Replies 14 ·
Replies
14
Views
2K