Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

In limited versions of BASIC, identifiers can be 1 or 2 characters long, but the first must be a letter and the second a letter or digit.

I thought that there are 26 possibilities for the first position and 36 for the second (26 + 10 for the digits), which would give 26*36 = 936 possible identifiers. The book however says the answer 962, so I'm not sure what I'm doing wrong.

share|improve this question
1  
Or more precisely 2.5 from Frederick Solomon's Probability and Stochastic Processes. –  the_enigma Oct 23 '12 at 23:29
    
Great! Thanks for that. I think it's worthwhile mentioning these references in case it saves the reader time. [I'll delete my original comment, since yours is the real source.] –  Douglas S. Stones Oct 23 '12 at 23:33
add comment

1 Answer

You overlooked the $37$-th possibility for the second character: no second character at all, (i.e., a one-character identifier).

share|improve this answer
    
Ah, that makes sense. Thanks. –  the_enigma Oct 23 '12 at 23:20
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.