I was going through some old posts on the Fourm (which is to say, all posts on the Fourm :3) because I was bored and I found a post in which I inadvertently did some discrete math in counting how many different badly-named clones of Gryphic there were, given that a badly-named clone of Gryphic has 7 letters, they have at least one letter in common, and that letter is in the same position in “Gryphic” and the badly-named clone. I appear to have used the Rule of Product and came up with the number 2,162,410,431. However, having now actually taken a class in discrete math, I can see that this is very wrong and in fact overcounts the number of possible Gryphics. And because I’m still bored, I’m going to write out a proof.
Let be the number of badly-named clones of Gryphic. First of all, we note that a badly-named clone of Gryphic has seven letters in its name, and at between 1 and 6 of those letters match those in “Gryphic.” If 7 letters matched, then it would not be a badly-named clone, and if 0 letters matched, the clone would have no relation to Gryphic at all. Next, we partition on the number of letters that differ. If we let be the number of badly named clones of Gryphic with letters in common with “Gryphic,” then by Rule of Sum:
To construct a badly-named clone of Gryphic with letters matching, we first choose which letters should match (there are ways to do this), and then choose unmatching letters for the remaining letters. If we let be the number of ways to choose the remaining letters, then by Rule of Product:
There are 26 letters in the alphabet, and for each of the remaining letters, we have to choose a letter that is NOT the corresponding letter in the original name, “Gryphic.” Therefore, for each of these positions, there are 25 possible other letters we could pick. By Rule of Product:
We want to use the binomial theorem to simplify this expression, but the bounds of our summation are slightly off. To remedy this, we can expand the range of the summation, and then subtract the new terms (which are simple edge cases). Therefore:
Then, by the binomial theorem:
This makes logical sense. represents all possible 7 letter words, represents all 7 letter words that share no letter positions with “Gryphic,” and 1 represents the number of words that are Gryphic. Therefore, there are 1,928,294,550 different possible badly-named clones of Gryphic, and in that original post four years ago, there must have been some clones of badly-named clones of Gryphic. Oh my. Imagine cleaning up after them. Ick.
Now, four years ago, I of course didn’t know what the Rule of Product or even discrete math were, but it appears my line of thinking was that there had to be at least one letter in common, so choose which letter it should be (7 ways to do this) and then choose any other 6 letters, possibly even correct ones, for the other positions (26 ways to choose each letter, so by Rule of Product). The reason we are allowed to pick correct letters for the other positions is because more than one (but less than 7, which I had not taken into consideration) letter is allowed to match. However, this overcounts because it is far too loose. Take, for instance, the edge case of actually forming the name “Gryphic.” I originally subtracted one for this event, but it actually happens more than once. If we are to follow the above process, we can choose any of the 7 letters to be the same, and then for each of the remaining 6 letters, pick the correct letter. Therefore, there are 7 ways to actually choose the name “Gryphic,” this being only one of the many ways the old formula overcounts.
Well, this has been your discrete math lesson that you never wanted. It was fun for me. Being on break is relaxing, but it’s nice to think sometimes too, right? This was a perfect little exercise I could do that also had to do with Four Island. And Gryphic/Drifty is going to kill me.