I have a context where I would like to guess a tuple of numbers, drawn from a list of integers with replacement. Say the tuple is $(14, 3, 6)$. I know that there are three numbers in the tuple. Assume that my ideal guessing strategy is to guess the lowest numbers first, i.e.,
1 1 1
1 1 2
1 2 1
2 1 1
2 2 1
2 1 2
1 2 2
2 2 2
3 1 1
1 3 1
1 1 3
3 3 1
3 1 3
1 3 3
3 1 2
3 2 1
And so on.
My question is, how long would it take me to guess $(14,3,6)$? What math principles can I use to approach this problem? What I think I have worked out so far this this:
With this guessing approach, the length of the Cartesian product of $1..13$ repeated 3 times will be guessed first, before any 14's are guessed. In python,
base_num_guesses = len([p for p in itertools.product(range(1,14), repeat=num_words_remaining)])
Which is $2197$.
I'm not sure what follows though. 14 having been reached, I think that the number of guesses before the next-highest target should be accounted for first: the length of the Cartesian product of $1..5$ repeated two times (because 14 will be present in all of these guesses, leaving only two unfixed numbers). This is $184$
Once this has been reached, the remaining number, 3, will take another 3 guesses.
I am not sure how to account for the uncertainty in the order of these later guess-counts. The number $14$ will be injected among the numbers for each of the
$1..5$ repeated twice Cartesian-product guesses. $14$ will also be injected into different positions for the last 3 guesses. I know that $3!$ will give me the number of possible combinations for the last three numbers once they have been reached. Do I simply multiply $(184+5)*3!$ , and then add this result to $2197$?
I realize that this will be the "maximum" number of guesses for the round following reaching $14$, and that the guessing might get lucky earlier on, once $6$ is also reached, and if the order is guessed correctly earlier on also.
I am especially interested in general math combinatorics principles that I can apply to a situation like this. Thank you for any insights you can provide.