Time needed to check all possible combinations

46 Views Asked by At

Suppose we want to find the time needed to write down all possible combinations of 58 characters.

With a string of size n the possible combinations are 58^n.

We pick random characters every time we write down a string. If I write 1000 strings /second how much time will I need to write 50% of the possible strings?

How can we find the time for any percentage?

1

There are 1 best solutions below

3
On

If you want the expected time needed to write down some fraction of the possible strings, you can use the same argument as in the coupon collector's problem with $58^n$ coupons by adding the expected time to see a new coupon until you reach whatever fraction of the coupons you are aiming for.