form a string from characters

47 Views Asked by At
  1. I need to form a string from 8 characters using (a-z) (A-Z) and (0-9) That is 62 characters in total. In an 8 character string there needs to be at least one digit, at least one lowercase letter, and at least one uppercase letter. No character repetition is allowed. How many ways are there to form such a password?

I came up with this answer while trying to understand the problem: (628-368-368-528)*8!

I'm afraid my answer to question is not correct and I need help understanding what I'm doing wrong.

  1. I need to form a string from 8 characters using (a-z) (A-Z) and (0-9), where the digits have to come before the letters. Repetition of characters is allowed, and I believe there can also be a string where there are only digits and where its all letters

This one I am really struggling with. Couldn't think of a way it could be expressed.

Any help would be appreciated!

1

There are 1 best solutions below

2
On

For part one:

$$\frac{8*7*6*59!}{54!}$$

8 possible places for the decimal. 7 and then 6 places remain for each the upper and lower case. 59 possible characters remain. With 8 characters total and three from each class divide by $(59-5)!$.

Part two:

$$\sum_{i=0}^8 10^i *52^{8-i}$$

Sum of 8 iterations for 8 number of possible places the numerical part ends.

You will probably need a pen and paper or calculator if you want to find the final value of the sum.