I can do this fine for passwords of a uniform nature, such as 8 letters of an a-z range is:
26(a-z)^8(length) = 208,827,064,576
Then to bits:
log2 (208,827,064,576) = 37.6035177451 = 38,
So it's guassable entropy S is 38 - 1 = 37 bits.
Now, I have a password made up of the following structure:
A-z, 0-9, a-z, 0-9 .... to ten characters long (5 of each type).
I figure the entropy value of that would be:
(b): 26 * 10 * 26 * 10 * 26 * 10 * 26 * 10 * 26 * 10 = 1,188,137,600,000
I had tried other variations for shorter syntax such as
(26 * 10)^5 but these figures didn't seem to corellate.
Anyhow the above gives entropy bits of:
log2(1.1881376e+12) = 40.1118390651
So S is 40. This strikes me as being only a tiny bit larger than the first example, and I think I'm working this correctly, and I am aware the numeric characters do severely limit the potential entropy of the whole password.
Is my caculation and conclusion (S~40) correct?
If so; is there a more efficient way of working out equation (b)?