# Combinatorics Problem with Number of Web Sites

The problem I am working on is:

As of April 2006, roughly 50 million .com web domain names were registered (e.g., yahoo.com).

a. How many domain names consisting of just two letters in sequence can be formed? How many domain names of length two are there if digits as well as letters are permitted as characters? [Note:A character length of three or more is now mandated.]

b. How many domain names are there consisting of three letters in sequence? How many of this length are there if either letters or digits are permitted? [Note:All are currently taken.]

c. Answer the questions posed in (b) for four-character sequences.

d. As of April 2006, 97,786 of the four-character sequences using either letters or digits had not yet been claimed. If a four-character name is randomly selected, what is the probability that it is already owned?

What I was wondering was, say that I wanted to know the number of domains where lexicographic ordering was of concern; that is, if b was the first letter in the domain name, then a couldn't be the next one, only letters that follow b. Would I count in this manner, $25\cdot24+24\cdot23+23\cdot22+22\cdot21+...3\cdot2+2\cdot1=5152$? I'm sure there is alternate way, too. Would it involve me finding the total number of domains, both in lexicographic order and not in lexicographic order, and subtracting something from that, right? Would $26^3=17576$ be the total number of combinations?

-
That's precisely what it is. Except, my last question was one that I had thought of myself. – Mack Feb 2 '13 at 20:00
I’ve answered your last question; did you also want some hints for the rest? – Brian M. Scott Feb 2 '13 at 20:00
@BrianM.Scott Actually, now that you mention it, I am having trouble with part d. I thought the probability would simply be $97786/169616$, but it isn't. – Mack Feb 2 '13 at 20:02
We made the same mistake: that’s the probability that it’s free, so you want the complementary probability. – Brian M. Scott Feb 2 '13 at 20:04
Haha, yeah, I see. – Mack Feb 2 '13 at 20:05

The easiest way to count passwords of length $3$, say, whose letters are in alphabetical order, is to notice two things: first, the letters in such a password must all be distinct, and secondly, once you know which $3$ letters are in the password, you know the password, because there’s only one order in which they can occur. Thus, you need only count the $3$-element sets of letters, and there are $\binom{26}3$ of those.
@Eli: Consider just the passwords that start with A. There are $25$ possible choices for the second letter, but the number of choices for the third letter depends on which choice of second letter you make. If you choose B, there are $24$; if you choose C, $23$; and so on. Thus, there are $\sum_{k=1}^{24}k=\binom{25}2=\frac12(24)(25)$ passwords that start with A. You can extend this idea to deal with the other possible first letters, and then you have a bunch of binomial coefficients to sum. There’s an identity that makes this fairly easy, but it’s still way more work than necessary. – Brian M. Scott Feb 2 '13 at 20:26
This answer above is not the answer to the question asked. To count the ways that domain names consisting of just two letters in sequence one would find the product of [a combination of the first character in the sequence choosing one letter] & [a combination for the second character in the sequence combination choosing one letter] i.e. $\binom{26}1$ * $\binom{26}1$