Solution (source code)

= Solution
{c}

Let $N$ count everyone present, including the host. The grouping, seating and departure conditions give the <modular congruences>
$$
N\equiv4\pmod5,\qquad N\equiv3\pmod9,\qquad N\equiv1\pmod2.
$$
The first two imply $N=39+45k$, and oddness forces $k$ even. By the <Chinese remainder theorem>, the complete solution is
$$
\boxed{N\equiv39\pmod{90}.}
$$
Because not every invitee attended, at most $y-1$ guests came, so $N\leq y$. For $y=120$, the only positive possibility is \b[39 people]. It is feasible: seven groups of five and one of four; three tables of ten and one of nine; nineteen departing pairs and the host.

For $y=150$, both \b[39 and 129 people] are possible. The latter uses twenty-five groups of five and one of four, three tables of ten and eleven of nine, and sixty-four departing pairs. Thus the larger invitation count destroys uniqueness; it does not force a different attendance.