Assume there are 2021 kinds of colors, and for each color, we dye 2021 cards with this color. Now we put these 2021*2021 cards in a straight line. We define a card as "good" card, if the numbers of different colors on its left side and its right side are both odd.
P1. What's minimum number of "good" cards?
P2. If for each card, there is at least one same color adjacent to it(i.e. there are no other cards between these two cards), What's minimum number of "good" cards?
I guess answer for first problem is two since there has to be two good card on left and right side. This should be proved by construction method.
Some trial on small n, bold number are "good" card:
$n=3, 2 \textbf{1} 1 1 2 3 3 \textbf{3} 2$: two good card for P1
$n=3, 1 \textbf{1} 1 2 2 2 3 \textbf{3} 3$: two good card for P2
$n=5, 4 \textbf{1} 1 1 1 1 2 2 2 2 3 3 3 3 3 4 4 4 4 5 5 5 5 \textbf{5} 2$: two good card for P1
$n=5, 4 \textbf{4} \textbf{1} 1 1 1 1 2 2 2 3 3 3 3 3 4 4 4 5 5 5 5 \textbf{5} \textbf{2} 2$: four good card for P2
$n=7, 6 \textbf{1}...1 2...2 3...3 5 4...4 3 5...5 6...6 7...\textbf{7} 2$: two good card for P1
$n=7, 6 \textbf{6}\textbf{1}...1 2...2 3...3 5 4...4 3 5...5 6...6 7...\textbf{7}\textbf{2} 2$: four good card for P2
$n=9, 8 \textbf{1}...1 2...2 3...3 5 \textbf{4}...4 5...5 6...\textbf{6} 5 7...7 8...8 9...\textbf{9} 2$: four good card for P1
I am not sure the construction for P2 is minimum. Can anyone give a hint on it? For n>=9, construction of two good cards seems unaccessible, but I am not sure.