Let $S$ be a set of $a+b+3$ points on a sphere, where $a, b$ are nonnegative integers and no four points of $S$ are coplanar (that is, no four points lie on a plane). Determine how many planes pass through three points of $S$ and separate the remaining points into $a$ points on one side of the plane and $b$ points on the other side.
Let $f(a, b)$ be the number of oriented planes through three of the given $a+b+3$ points, such that exactly $a$ points lie above the plane (a plane divides 3D-space into two regions; an oriented plane can be thought of as a plane and a choice of one side "above" the plane). We then recover $g$ as

$$
g(a, b)=\left\{\begin{array}{cc}
f(a, b), & a \neq b \\
\frac{1}{2} f(a, b), & a=b
\end{array}\right.
$$

because each plane is counted twice when $a=b$.

We begin by calculating $f(a, 0)$. Consider the convex hull $\Sigma$ of our $a+3$ points. This is a polyhedron, so we apply Euler's formula $V-E+F=2$. Since our $a+3$ points lie on a sphere, they are all vertices of $\Sigma$ and hence $V=a+3$. No four of our points are coplanar, so each face of $\Sigma$ is a triangle and thus $2 E=3 F$. Therefore,

$$
F=3 F-2 F=2 E-2(2-V+E)=2(V-2)=2(a+1) \text {. }
$$

But a plane through three of our points has all the other points on one side iff it does not cut through the interior of $\Sigma$, i.e. iff it is a face of $\Sigma$ (the orientation should be such that the other points lie above the plane of this face). Hence $f(a, 0)=F=2(a+1)$.

Next, notice that $f(a, b)=f(b, a)$ for any $a, b \geq 0$, because reversing the orientations of all planes interchanges the roles of $a$ and $b$. Moreover, if $n=a+b+3$, then there are a total of $2\left(\begin{array}{l}n \\ 3\end{array}\right)$ oriented planes passing through three of our points, so $f(n-3,0)+f(n-4,1)+\cdots+f(1, n-4)+f(0, n-$ $3)=2\left(\begin{array}{l}n \\ 3\end{array}\right)$. Some small values of $f(a, b)$ can now be calculated directly:

|  | 0 | 1 | 2 | 3 |
| :---: | :---: | :---: | :---: | :---: |
| 0 | 2 | 4 | 6 | 8 |
| 1 | 4 | 8 | 12 |  |
| 2 | 6 | 12 |  |  |
| 3 | 8 |  |  |  |

Based on these small cases, we conjecture that

$$
f(a, b)=2(a+1)(b+1) .
$$

We will prove this by induction.

Consider a fixed arrangement of $n+1$ points (on a sphere, with no four points coplanar) and suppose that $(*)$ holds for any $n$ points (the base case of $n=3$ is trivial). Consider $a, b \geq 0$ with $a+b+3=n$. Let $S_{a, b}$ denote the set of all pairs $(P, \Pi)$, where $P$ is one of our $n+1$ points, $\Pi$ is an oriented plane through three of the other points, and precisely $a$ of the remaining points lie above $\Pi$. By first choosing $P$ and then $\Pi$, we find that

$$
\left|S_{a, b}\right|=(n+1) f(a, b)=2(n+1)(a+1)(b+1),
$$

where the second equality is by the induction hypothesis. By first choosing $\Pi$ and then $P$, we find that

$$
\left|S_{a, b}\right|=(a+1) f(a+1, b)+(b+1) f(a, b+1) .
$$

Equating these two expressions for $\left|S_{a, b}\right|$, we have

$$
(a+1) f(a+1, b)+(b+1) f(a, b+1)=2(a+b+4)(a+1)(b+1) \text {, }
$$

for any $a, b \geq 0$ such that $a+b+3=n$. But if we have $f(a+1, b)=2(a+2)(b+1)$, then (1) gives

$$
\begin{aligned}
(b+1) f(a, b+1) & =2(a+b+4)(a+1)(b+1)-(a+1) f(a+1, b) \\
& =2(a+b+4)(a+1)(b+1)-2(a+1)(a+2)(b+1) \\
& =2(a+1)(b+1)((a+b+4)-(b+2))=2(a+1)(b+1)(b+2),
\end{aligned}
$$

and thus $f(a, b+1)=2(a+1)(b+2)$. Thus, for any $a, b \geq 0$ with $a+b+3=n$,

$$
f(a+1, b) \text { satisfies }(*) \quad \Longrightarrow \quad f(a, b+1) \text { satisfies }(*) \text {. }
$$

Starting with the base case $f(n-2,0)=n-1$ (proven above) and applying another layer of induction, we see that the values $f(n-2,0), f(n-3,1), f(n-4,2), \ldots, f(0, n-2)$ all satisfy $(*)$. This proves the induction hypothesis (i.e. that $(*)$ holds for any $n+1$ points) and thus concludes the proof.