\section*{Task 3 - 151223}

The research departments of two state-owned enterprises are to delegate exactly six employees each for a joint consultation.

A total of 6 mathematicians and 6 engineers are to participate in the consultation. In the research department of one company, there are 5 mathematicians and 7 engineers, while in the other, there are 7 mathematicians and 5 engineers.

Determine the number of all possible personnel compositions for the consultation under the given conditions.
}

If the first department sends \(m\) mathematicians, then it must send \(6-m\) engineers. Conversely, the second department must send \(6-m\) mathematicians and \(m\) engineers. Here, \(m\) is an integer and at least 0, but at most 5, since the first department has only 5 mathematicians.

There are then \(\binom{5}{m} \cdot\binom{7}{6-m} \cdot\binom{7}{6-m} \cdot\binom{5}{m}\) ways to select the people from their respective groups. The desired number is the sum of all these products from \(m=0\) to 5:

\[
\begin{gathered}
\sum_{m=0}^{5}\binom{5}{m}^{2} \cdot\binom{7}{6-m}^{2}=\binom{5}{0}^{2} \cdot\binom{7}{6}^{2}+\binom{5}{1}^{2} \cdot\binom{7}{5}^{2}+\binom{5}{2}^{2} \cdot\binom{7}{4}^{2}+ \\
+\binom{5}{3}^{2} \cdot\binom{7}{3}^{2}+\binom{5}{4}^{2} \cdot\binom{7}{2}^{2}+\binom{5}{5}^{2} \cdot\binom{7}{1}^{2}
\end{gathered}
\]

\(=1^{2} \cdot 7^{2}+5^{2} \cdot 21^{2}+10^{2} \cdot 35^{2}+10^{2} \cdot 35^{2}+5^{2} \cdot 21^{2}+1^{2} \cdot 7^{2}=2 \cdot\left(7^{2}+105^{2}+350^{2}\right)=2 \cdot(49+11025+122500)=267148\)

Thus, there are a total of 267148 ways to select the participants.