  Let $G=(V, E)$ be a connected finite graph, $h$ be a positive function on $V$
and $\lambda _{1}(V)$ be the first non-zero eigenvalue of $-\Delta$. For any
given finite measure $\mu$ on $V$, define functionals \begin{eqnarray*}
  J_{ \beta }(u)&=&\frac{1}{2}\int_{V}|\nabla u|^{2}d \mu -\beta
\log\int_{V}he^{u}d \mu,
  J_{ \alpha ,\beta }(u)&=&\frac{1}{2}\int_{V}\left(|\nabla u|^{2}- \alpha
u^{2}\right) d \mu -\beta \log\int_{V}he^{u}d \mu \end{eqnarray*} on the
functional space $$ {\bf H}= \left\{ u\in{\bf W}^{1,2}(V) \Bigg| \int_{V}u\!\
d\mu =0 \right\}. $$
  For any $\beta \in \mathbb{R}$, we show that $J_{ \beta }(u)$ has a minimizer
$u\in{\bf H}$, and then, based on variational principle, the Kazdan-Warner
equation $$ \Delta u=-\frac{\beta he^{u}}{\displaystyle{\int_{V}he^{u}d \mu
}}+\frac{\beta }{\text{Vol}(V)} $$ has a solution in ${\bf H}$.
  If $\alpha < \lambda _{1}(V)$, then for any $\beta \in \mathbb{R} , J_{
\alpha ,\beta }(u)$ has a minimizer in ${\bf H}$, thus the Kazdan-Warner
equation $$ \Delta u+\alpha\!\ u=-\frac{\beta
he^{u}}{\displaystyle{\int_{V}he^{u}d \mu }}+\frac{\beta }{\text{Vol}(V)} $$
has a solution in ${\bf H}$. If $\alpha > \lambda _{1}(V)$, then for any $\beta
\in \mathbb{R}$, $\displaystyle{\inf_{u\in{\bf H}} J_{ \alpha ,\beta }(u) =-
\infty}$. When $\alpha=\lambda_{1}(V)$, the situation becomes complicated: if
$\beta=0$, the corresponding equation is $-\Delta u=\lambda_{1}(V)u$ which has
a solution in ${\bf H}$ obviously; if $\beta>0$, then $\displaystyle{\inf_{u\in
{\bf H}} J_{\alpha,\beta }(u) =- \infty}$; if $\beta<0$, $J_{ \alpha ,\beta
}(u)$ has a minimizer in some subspace of ${\bf H}$.
  Moreover, we consider the same problem where higher eigenvalues are involved.
