11. (16 points) For a convex $n$-sided polygon $(n \geqslant 3)$ with unequal side lengths, color each side using one of three colors: red, yellow, or blue, but no two adjacent sides can have the same color. How many different coloring methods are there?
11. Let the number of different coloring methods be $p_{n}$. It is easy to know that $p_{3}=6$.

When $n \geqslant 4$, first for edge $a_{1}$, there are 3 different coloring methods. Since the color of edge $a_{2}$ is different from that of edge $a_{1}$, there are 2 different coloring methods for edge $a_{2}$. Similarly, there are 2 different coloring methods for edges $a_{3}, a_{4}, \cdots, a_{n-1}$.

For edge $a_{n}$, use 2 different colors that are different from the color of edge $a_{n-1}$, but this also includes the case where it has the same color as edge $a_{1}$. The number of different coloring methods where edge $a_{1}$ and edge $a_{n}$ have the same color is the number of different coloring methods for a convex $(n-1)$-gon, which is $p_{n-1}$. Therefore, we have
$$
\begin{array}{l}
p_{n}=3 \times 2^{n-1}-p_{n-1}, \\
p_{n}-2^{n}=-\left(p_{n-1}-2^{n-1}\right) . \\
\text { Then } p_{n}-2^{n}=(-1)^{n-3}\left(p_{3}-2^{3}\right)=(-1)^{n-2} \times 2 . \\
\text { Hence } p_{n}=2^{n}+(-1)^{n} \times 2(n \geqslant 3) .
\end{array}
$$

In summary, the number of different coloring methods is
$$
p_{n}=2^{n}+(-1)^{n} \times 2 \text {. }
$$