Suppose you have a custom deck of cards. In a traditional deck of cards, each card has 1 of 4 suits and 1 of 13 numbers (ignoring jokers). "Suits" and "numbers" are what I will refer to as attributes and the respective suit and number of each card is what I will refer to as "value."
In this custom deck of cards, we have 4 attributes, each with 3 possible values. So there are $3^4$ different types of cards. You draw cards from an infinite shuffled deck of these custom cards. Without looking at the cards you drew, what is the minimum number of draws that guarantee that you've got 3 cards (from the ones you've drawn, not necessarily consecutively drawn) that satisfy the following criteria:
(1) For each attribute of the 3 cards, they all have different values.
or
(2) For each attribute of the 3 cards, they have all of the same values.
Here is an example. Suppose the 4 attributes and corresponding values are:
(a) Color: red, green, blue
(b) Number: 1, 2, 3
(c) Suit: circle, square, triangle
(d) Roman numeral: I, II, III
Say we have 3 cards. The first card is "red 2 circle I." Second card is "green 2 square II." Third card is "blue 2 triangle III." This is a set of 3 cards that satisfies all the criteria because each attribute of the 3 cards either has all different values (Color, suit, roman numeral) or have the same value (Number).
I want to know the minimum number of draws that guarantees I have 3 cards that satisfy these conditions. Obviously, if you draw 163 cards, you'll definitely have 3 cards that satisfy these conditions because 163 cards guarantees that you have 3 identical cards since there are only 81 different cards, and by the pigeon whole principle with each of the 81 different card types as a hole, one of the holes will certainly have 3 pigeons after 163 draws.
But I don't think 163 is the minimum. I think there should be a smaller number of draws. With 163, we are guaranteed there are 3 cards such that all 4 attributes satisfies criteria (2). So I think I need to apply the pigeon pigeon principle to such that all 4 attributes satisfies criteria (1), and also for the case where the 4 attributes satisfies a mixture of criteria (1) and (2), and perhaps one of these will give a lower bound than 163. How can I go about this?
I tried to think about using combinations, but there too many variables to keep track of that I'm getting lost.