Department of Energy Argonne National Laboratory Office of Science NEWTON's Homepage NEWTON's Homepage
NEWTON, Ask A Scientist!
NEWTON Home Page NEWTON Teachers Visit Our Archives Ask A Question How To Ask A Question Question of the Week Our Expert Scientists Volunteer at NEWTON! Frequently Asked Questions Referencing NEWTON About NEWTON About Ask A Scientist Education At Argonne Permutations
Name: Ed L.
Status: student	
Age:  N/A
Location: N/A
Country: N/A
Date: N/A 

Suppose the following:

S1 = A..Z (26)
S2 = a..z (26)
s3 = 0..9 (10)

If I have an 8 character string, how many combinations of the above are possible?

I think the answer would be 218,340,105,584,896 or 62**8 Suppose that we introduce a rule which states that at least one of the eight characters must be a number, one must be an upperace letter, and one must be a lowercase letter. The position does not matter. I think the answer would be 16,101,950,655,232 or (62**5) x 26 x 26 x 10 I have been repetedly assured my calculation is incorrect because it fails to take into account the exact position for each mandated character (even though the rule itself does not care); but no one can offer me a formula to show what the correct answer would be. I do not mind being wrong, but I sure would like to know what the correct answer is and the formula used to arrive there.

I am going to assume that when you say " must be a...", you mean " least one must be a..." for letters as well as for numbers.

It is probably easiest to just subtract the number of forbidden strings:

62**8 - 52**8 - 36**8 - 36**8

Tim Mooney

Click here to return to the Mathematics Archives

NEWTON is an electronic community for Science, Math, and Computer Science K-12 Educators, sponsored and operated by Argonne National Laboratory's Educational Programs, Andrew Skipor, Ph.D., Head of Educational Programs.

For assistance with NEWTON contact a System Operator (, or at Argonne's Educational Programs

Educational Programs
Building 360
9700 S. Cass Ave.
Argonne, Illinois
60439-4845, USA
Update: June 2012
Weclome To Newton

Argonne National Laboratory