Four. (50 points) In the $m$-element subsets of $\{1,2, \cdots, n\}$, subsets whose elements sum to an even number are called even sets, and subsets whose elements sum to an odd number are called odd sets. Try to find the difference between the number of even sets and the number of odd sets, $f(n, m)$.


First, divide the subsets of $2b+1$ elements from the set $\{1,2, \cdots, 2a+1\}$ into two groups based on whether they contain $2a+1$.

In the group that does not contain $2a+1$, there exists a one-to-one correspondence between even and odd sets:
$$
\begin{array}{l}
f\left(x_{1}, x_{2}, \cdots, x_{2b+1}\right) \\
\quad=\left(2a+1-x_{1}, 2a+1-x_{2}, \cdots, 2a+1-x_{2b+1}\right).
\end{array}
$$

Therefore, in this group, the difference between the number of even sets and the number of odd sets is 0.

Thus, $f(2a+1,2b+1)$ is the difference between the number of even sets and the number of odd sets in the group that contains $2a+1$. These sets are composed of $2a+1$ and $2b$ elements from the set $\{1,2, \cdots, 2a\}$.
$$
\text{Hence } f(2a+1,2b+1)=-f(2a, 2b) \text{.}
$$

Similarly,
$$
f(2a+1,2b)=f(2a, 2b)-f(2a, 2b-1) \text{.}
$$

Notice that, in the subsets of $2b-1$ elements from the set $\{1,2, \cdots, 2a\}$, the number of even sets is equal to the number of odd sets.
$$
\begin{array}{l}
\text{If } 2a+1=1 \text{, then} \\
f\left(x_{1}, x_{2}, \cdots, x_{2b-1}\right) \\
=\left(1+x_{1}, 2+x_{2}, \cdots, 1+x_{2b-1}\right)
\end{array}
$$

is a one-to-one correspondence between even and odd sets.
Thus, $f(2a, 2b-1)=0$.
Therefore, $f(2a+1,2b)=f(2a, 2b)$.
Next, consider $f(2a, 2b)$.
Still, divide the subsets of $2b$ elements from the set $\{1,2, \cdots, 2a\}$ into two groups based on whether they contain $2a$.
Combining equations (1) and (3), we get
$$
\begin{array}{l}
f(2a, 2b) \\
=f(2a-1,2b-1)+f(2a-1,2b) \\
=-f(2a-2,2b-2)+f(2a-2,2b).
\end{array}
$$

Let $F(a, b)=(-1)^{b} f(2a, 2b)$. Then equation (4) becomes
$$
F(a, b)=F(a-1, b)+F(a-1, b-1) \text{.}
$$

By $F(k, 1)=-f(2k, 2)$
$$
=-\left(2 \mathrm{C}_{k}^{2}-\mathrm{C}_{k}^{1} \mathrm{C}_{k}^{1}\right)=\mathrm{C}_{k}^{1} \text{,}
$$

and $\mathrm{C}_{a}^{b}=\mathrm{C}_{a-1}^{b}+\mathrm{C}_{a-1}^{b-1}$, comparing equation (5), we get
$$
F(a, b)=\mathrm{C}_{a}^{b}, f(2a, 2b)=(-1)^{b} \mathrm{C}_{a}^{b} \text{.}
$$

By equations (1), (2), (3), and conclusion (6), we get
$$
f(n, m)=\left\{\begin{array}{ll}
(-1)^{b} \mathrm{C}_{a}^{b}, & n=2a, m=2b; \\
0, & n=2a, m=2b+1; \\
(-1)^{b} \mathrm{C}_{a}^{b}, & n=2a+1, m=2b; \\
(-1)^{b+1} \mathrm{C}_{a}^{b}, & n=2a+1, m=2b+1,
\end{array}\right.
$$

where $a, b \in \mathbf{Z}_{+}$.
(Zhang Huidong, Yushan No.1 High School, Jiangxi, 334700)