2. (16 points) A warehouse has 50 containers of the same specification, which are to be delivered to the dock by a transportation company. The transportation company has three types of trucks that can carry 1, 2, and 3 containers per trip, respectively. The charges for each trip are 120 yuan, 160 yuan, and 180 yuan, respectively. Now, it is required to arrange 20 trucks to transport all the containers in one trip. How many trucks of each type are needed, and how many ways can this be arranged? Which arrangement requires the least amount of freight cost? What is the minimum freight cost?
2. Let the number of trucks needed to transport 1, 2, and 3 containers be $x$, $y$, and $z$ respectively. According to the problem, we have
$$
\left\{\begin{array}{l}
x+y+z=20, \\
x+2 y+3 z=50 .
\end{array}\right.
$$
(1) $\times 3$ - (2) gives $2 x+y=10$.

Then $\left\{\begin{array}{l}y=10-2 x, \\ z=10+x .\end{array}\right.$
Since $y \geqslant 0$, we have $0 \leqslant x \leqslant 5$.
Thus, $x$ can only take the values $0, 1, 2, 3, 4, 5$. Therefore, there are
$$
\begin{array}{l}
\left\{\begin{array} { l } 
{ x = 0 , } \\
{ y = 1 0 , } \\
{ z = 1 0 ; }
\end{array} \quad \left\{\begin{array} { l } 
{ x = 1 , } \\
{ y = 8 , } \\
{ z = 1 1 ; }
\end{array} \quad \left\{\begin{array}{l}
x=2, \\
y=6, \\
z=12 ;
\end{array}\right.\right.\right. \\
\left\{\begin{array} { l } 
{ x = 3 , } \\
{ y = 4 , } \\
{ z = 1 3 ; }
\end{array} \quad \left\{\begin{array} { l } 
{ x = 4 , } \\
{ y = 2 , } \\
{ z = 1 4 ; }
\end{array} \quad \left\{\begin{array}{l}
x=5, \\
y=0, \\
z=15
\end{array}\right.\right.\right. \\
\end{array}
$$
these six arrangements.
Let the total transportation cost be $w$ yuan. Then
$$
\begin{array}{l}
w=120 x+160 y+180 z \\
=120 x+160(10-2 x)+180(10+x) \\
=3400-20 x .
\end{array}
$$

When $x=5$, the total transportation cost is the lowest, and the lowest cost is
$$
w=3400-20 \times 5=3300 \text { yuan. }
$$