Question for the math whizzes: how many possibilities are there?
Asked by
Jeruba (
56061)
July 6th, 2022
I’ve been playing a version of Wordle called Wordplay that’s a little bit more free-flowing than the original. I always start with the same two words that together check all the vowels and several of the most common letters. So the first two rows are basic.
Together those two rows contain ten boxes, or two five-letter words. Each box can be in one of three states:
green (in the target word and in the correct position),
orange (in the target word but not in the correct position), and
gray (not in the target word).
How many possibilities are there—how many combinations exist within those first two rows?
Also bear in mind that a maximum of five letters can be either green or orange (combined) because the target word is five letters long. I don’t know how to figure that in, but it is a restriction on how many boxes can be in a nongray state.
AND at least one box must be nongray because my two basic words contain all the vowels. Minimum is therefore one orange letter.
If I ever knew how to compute the answer to this, which I doubt, I have no chance of recalling it now. So I’m curious to see your answers. The closest I can come is “a lot.”
If you can explain how you arrived at your answer, I’m interested in that too.
Observing members:
0
Composing members:
0
11 Answers
I get 12,585.
To see where that comes from, consider the case where there are 3 letters that are either green or orange. The number of ways of choosing 3 letters out of 10 is C(10,3). If this is unfamiliar to you, this is basic combinatorics and C(10,3) = 10!/(7!3!). For each combination of 3 letters, each letter can be either orange or green, 2**3 possibilities, giving a total of C(10,3)x8.
Following up on this, the total is Sum, from 0 to 5, of C(10,i) x 2**i
The Python code for this is:
sum(math.comb(10,i)*2***i for i in range(6))
Note that in Python, range(6) represents the 6 values from 0 to 5.
That number 12,585 is larger than I expected. Vocabulary size is given to be about 40,000. That means an average of about 3 or 4 words per possibility.
Of course not all the possibilities are the same size. Each of the ways of having 5 green letters gives one possibility each, since all the letters of your guesses are different. 10 black letters have no possibilities since every word must have at least one vowel. On the other hand, having an orange e or an orange e and a may have several possibilities.
My answer is not quite right since it allows for green letters in the same position for both words, which is not possible for the words you use. Let me work on this.
@LostInParadise Your calculations may be correct except that not all letter combinations result in valid words nor are any two letter pairs necessarily a valid combination.
For instance, the first two letters of a five letter word cannot be “L C” or “H T”.
As to answering @Jeruba‘s question, I can’t figure it out.
@zenvelo, As I mentioned originally, there are cases where there will be no matching words. The calculation can be used as an average, with some cases having no matches and other cases having several matches. It would take a fair amount of effort to only choose pronounceable letter combinations. I will have to give that some thought.
I revised the calculation to eliminate cases where same word positions are chosen for both words. Without knowing anything about the English language, these cases must be eliminated since it is illogical to say that a word has two different letters in the same position.
The revised number is 9830. The calculation is a little bit involved, but I would be glad to share it with anyone who is interested.
Thanks for all the brainpower being expended here. Let’s go back to the question, which is not about language or legal words or letter combinations. It’s about numbers.
Each of ten squares can be in one of three states: green, orange, or gray. Gray is the default. There is a minimum of one nongray and a maximum of five.
The matter of whether each row of five makes a word is irrelevant. Each must make a word, but they are just a way of testing available letters. They are not the target word. The target word is found by using the information I gather by testing.
I just want to know how many combinations of the three states are possible among those ten squares, which will produce clues to the solution but which will not (except with rare luck) be a solution. There are four more rows for actually finding the solution, and I’m not asking about them.
For example, I might get a green S and an orange I and O. The rest are gray. Eventually I will hit the word SPOIL. But my question has nothing to do with the word SPOIL. It’s not about solving the puzzle. It’s about how many combinatorial possibilities are present in the ten squares, given the limitations.
It will be easiest to understand my description if you try the game a few times.
@Jeruba Within ten squares for two words, do you repeat any letters at all? If you do not repeat, then there are at least five gray squares out of ten.
Also, within the ten letters, do you use all 6 vowels? Then one square has to be non-gray.
But as I said before, I can’t figure it out.
@zenvelo, the game has six rows of five letters. It’s linked in my question. Have a look.
My first row is A D I E U.
My second row is S T O R Y.
This gives me all the vowels plus D, S, T, and R. So I will have to get one square right out of ten. That’s all I had when the word was B E E C H – just the E in A D I E U, orange – but I got it in the fifth row.
So let’s say in the first row I get an orange A. So it’s in the word, but not in first place.
In the second row I get a green S and an orange O. Therefore the word starts with S, and it has an A and an O, but not in the positions they now occupy.
I then guess S A L O N, and it’s all green: I won. I could have used three more rows, but I didn’t need to.
I’m thinking about all the word-related things as I make my guesses, but they are not factors in my question about the number of possible combinations.
@Jeruba , I was counting arrangements and eliminated the cases where there were green boxes in the same position for both words. All I assumed was that all the letters are different in the two words, which would imply that the solution has 2 different letters in the same position, which is obviously not possible. If, alternatively, there was a word position with the same letter in each word, then there can now be 6 green squares, since the single letter in the shared position counts twice.
I have what I hope is the last revision. You have to eliminate cases where one word has 4 green and one orange. This is logically impossible. There are 5 ways this can occur in each word, which eliminates a total of 10 possibilities. The final count I get is 9820.
Okay, one more elimination for anyone still paying attention. This has to be the last. You can’t have 4 greens in one word and an orange in the remaining position but in the second word. That orange letter would have to match one of the other letters in the word being guessed, which would mean that it would have to be the same as one of the green letters from the first word. This is not possible since we are assuming that all the letters in the two guesses are different. That brings the total down to 9810.
I know nobody is following this anymore, but I need to set the record straight for the removal of cases of getting 4 greens and 1 orange.
For any combination of 4 greens between the two words, we already know that the greens must be non-overlapping since you can’t have two different letters in the same position. For the cases where the greens do not overlap and there is an orange in either word in the one position not chosen by either word, this would result in a duplicate letter in the two words, which is not allowed, because we are assuming all the letters are different.
There are 160 ways of doing this. Subtracting from the 9830 that was computed to eliminate overlapping greens, this gives 9670 possibilities.
There could be a case of having 4 non-overlapping greens in the two words and an orange that overlaps the greens of the other word. This letter would have to go in the unfilled position in order to avoid duplicate letters in the two words and would therefore provide a solution.
Answer this question