What is the chance of randomly generating a given 10-character sentence? Suppose we have an alphabet of the following allowed characters: 


*

*the lowercase letters $a$ through $z$ (26)

*the uppercase letters $A$ through $Z$ (26)

*the numerals $0$ through $9$ (10)

*the common punctuation marks:  $.,;:'"()!?-$ ( 11)

*the white space (1)


Making a total of 74 options. 
Each character $c$ in our 10-character sequence can be a member of the set of the allowed characters, $C$. 
Suppose we have a given ten-character sequence, $S$. (For the sake of example, let $S = Abc123.,!$)
What is the probability that a randomly constructed sequence, $S'$, (with each character being randomly selected from $C$) matches $S$?
 A: Okay, so assuming repeat characters are allowed, we have a total of $26+26+10+11+1=74$ options for each character. This gives us #$options^n$ of characters needed. So in our case, we have $74^{10}=4,923,990,397,355,877,376$ options for the characters to match string $S$ exactly.
If repeated characters are not allowed, as character string $S$ leads me to assume, we may use $\frac{(\#options)!}{(\#options-n)!}$, or in our case, $\frac{74!}{(74-10)!}=2,606,955,172,242,220,800$ options for a non-repeating character sequence to match string $S$ exactly.
So to find the probability, we just do $\frac{1}{4,923,990,397,355,877,376}=2.03087317257* 10^{-21}\%$, or practically $0\%$ for all intents and purposes.
A: Since you have a set of 74 characters, each character has exactly $\frac {1}{74}$ chance to appear on a certain position in the sentence. For exmple, if you want to have $A$ on the first position, it has $\frac {1}{74}$ chance to be there if you pick at random.
Now, if you insist on having $Ab$ on position 1 and 2 (in this order), that means you have to multiply the chances of each letter appearing where you want it, meaning the chance is $\frac {1}{74} \cdot \frac {1}{74}=\frac {1}{74^2} = \frac {1}{5476}$
If you apply the same logic to 3 letters and so on, until you reach your final, 10th letter, you will see that the chance of getting this exact sentence by picking random letters from your set of 74 is $$\frac {1}{74^{10}}$$ which is a really small chance indeed :)
