4. Let $a, b \in \mathbf{N}^{*},(a, b)=1$. Find the number of natural numbers $c$ such that the indeterminate equation $a x+b y=c$ has no non-negative integer solutions.
4. From the previous question, if $c \in \mathbf{N}^{*}$, such that $a x + b y = c$ has no non-negative integer solutions, then $c \in [0, a b - a - b]$. Therefore, if the solution $(x_0, y_0)$ of the equation satisfies $0 \leqslant x_0 < b$, then $y_0 < 0$, and $a b - a - b - c = a b - a - b - a x_0 - b y_0 = a (b - 1 - x_0) + b (-1 - y_0)$, which indicates that the equation $a x + b y = a b - a - b - c$ has non-negative integer solutions $(b - 1 - x_0, -1 - y_0)$. Conversely, if $c \in [0, a b - a - b]$, such that the equation $a x + b y = c$ has non-negative integer solutions, then the equation $a x + b y = a b - a - b - c$ has no non-negative integer solutions (otherwise, $a x + b y = a b - a - b$ would have non-negative integer solutions, contradicting the conclusion of the previous question).
Thus, the number of such $c$ is $\frac{1}{2}(a b - a - b + 1) = \frac{1}{2}(a - 1)(b - 1)$.