1. We have sticks of lengths $1, 2, \ldots, 12$, with a sufficient number of each length available. We need to select four sticks (not necessarily of different lengths) from which a tangential quadrilateral with a perimeter of 24 can be formed. In how many ways can this be done?
1. Let a tangential quadrilateral be formed from the given sticks, with side lengths $a, b, c$, and $d$ in order. Since in any tangential quadrilateral, the sums of the opposite sides are equal, we have $a+c=b+d$, and considering the condition $a+b+c+d=24$, it follows that $a+c=b+d=12$. Note that the number 12 can be represented as the sum of the lengths of two existing sticks in the following ways: $12=1+11=2+10=3+9=4+8=5+7=6+6$ (a total of 6 combinations). Therefore, we need to choose one of these combinations for the numbers $a$ and $c$, and one for the numbers $b$ and $d$. If we choose two different combinations, we can do this in $\frac{6 \cdot 5}{2}=15$ ways; if we choose the same combination twice, we can do this in 6 ways. Thus, we have a total of 21 ways.