# How to find number of combinations remaining after a selection

#### charles1234

##### New Member
Hello,

I've been wrecking my brain over this. Hope someone can help:

There are 4 bags with numbered balls in each (the total number of balls in each bag is irrelevant). You have to guess the number that is going to be selected from each bag and you will win if you match all 4 selections and also if you match 3 out of 4. You are also allowed to play combinations, meaning you can have multiple guesses for one or more of the bags. So for example, you can play something that looks like this:

Bag one: 1, 5
Bag two: 4, 6
Bag three: 1, 9
Bag four: 7, 9

In this case your play has 16 different combinations. I've used two selections in each for simplicity but there could be an arbitrary amount in each.

The question is: How can I calculate the remaining possible winning combinations in each prize category after a ball has been selected from the 1st bag, then 2nd bag etc.

So for example:

First ball chosen is number 1. The answer would be 16 combinations for 3 out of 4 and 8 combinations for 4 out of 4.
Second ball chosen is number 3. The answer would be 8 combinations for 3 out of 4 and 0 combinations for 4 out of 4.

Is there a way to do this without checking each combination?

Thanks