A store sells packs of pencils with 4 different colors: red, blue, green, and yellow. Each pack contains 3 pencils of each color. If you buy 2 packs and randomly select 6 pencils, what is the probability that you have at least one pencil of each color?
First, let's determine the total number of ways to choose 6 pencils from the 24 available pencils (4 colors * 3 pencils/color * 2 packs):

Total combinations = C(24, 6) = 24! / (6! * (24 - 6)!)
                                      = 24! / (6! * 18!)
                                      = 134,596

Next, we'll calculate the complementary probability, which is the probability of not having at least one pencil of each color. This occurs when we're missing one or more colors in our selection. There are three cases to consider:

1. Missing one color: We can choose 6 pencils without any pencils of one specific color. There are 4 ways to choose which color to exclude, and then C(18, 6) ways to choose 6 pencils from the remaining 18 pencils (3 colors * 3 pencils/color * 2 packs).

Combinations for case 1 = 4 * C(18, 6) = 4 * (18! / (6! * 12!)) = 4 * 18,564 = 74,256

2. Missing two colors: We can choose 6 pencils without any pencils of two specific colors. There are C(4, 2) ways to choose which two colors to exclude, and then C(12, 6) ways to choose 6 pencils from the remaining 12 pencils (2 colors * 3 pencils/color * 2 packs).

Combinations for case 2 = C(4, 2) * C(12, 6) = (4! / (2! * 2!)) * (12! / (6! * 6!)) = 6 * 924 = 5,544

3. Missing three colors: This case is not possible since we're selecting 6 pencils, so there would be at least two colors present.

Now, we'll sum up the combinations for cases 1 and 2:

Total combinations for missing colors = Combinations for case 1 + Combinations for case 2
                                                       = 74,256 + 5,544
                                                       = 79,800

Finally, we'll subtract this value from the total combinations to find the number of combinations with at least one pencil of each color:

Combinations with at least one pencil of each color = Total combinations - Total combinations for missing colors
                                                                             = 134,596 - 79,800
                                                                             = 54,796

The probability of having at least one pencil of each color in our selection is:

Probability = Combinations with at least one pencil of each color / Total combinations
                   = 54,796 / 134,596
                   ≈ 0.4074

So, the probability of having at least one pencil of each color when randomly selecting 6 pencils from 2 packs is approximately 40.74%.