P12458 link reply
You and a friend are discussing how you choose four-digit PINs. You establish that neither of you would ever use the digit 0.

“I like to choose four different random digits,” you say.

“I like to choose three different random digits,” they reply, “so one of the digits is used twice.”

Which strategy gives the largest pool of possible four-digit PINs?
P12497 link reply
I solved it but I'll let someone else answer.
P12571 link reply
This is an easy combinatorics problem
The first strategy has 8*8*8*8 = 4096 combinations
The second strategy has (4 choose 3)*8*8*8 = 2048 combinations

Clearly by choosing two digits to be the same you are limiting yourself
P12572 link reply
P12571
actually i realized i made a mistake, it should be 3*(4 choose 3)*8*8*8=6144 so i was wrong, hmm, i need to think more about this
P12573 link reply
P12572
Ok silly me, i need to read questions more carefully
The first strategy should have 8*7*6*5=1680 combinations
for the second one we first choose two positions for the two digits that are the same then fill the rest so the seconds strategy has (4 choose 2)*8*7*6=2016 combinations, still feels a little counter-intuitive?
P12667 link reply
P12573
Why are you starting with 8?
P12674 link reply
P12573
>still feels a little counter-intuitive?
ig it makes sense
the first strategy you are simply picking 4 different numbers
the second, even though you ar picking only 3, you are also scrambling their positions, which gives you more possibilities than just picking an extra number
P20871 link reply
bump
P23327 link reply
I would just use password generator like [bold: apg] which is customizable and can generate 4 digit string.
The PIN needs to be just secure enough not to be brute-forced in 10 or so attempts before login ability gets blocked.
P23337 link reply
P23327
>Password generators
When you forget the generated password, you are in trouble. Locksmith might be the only solution...
x