  We study an online hypergraph matching problem with delays, motivated by
ridesharing applications. In this model, users enter a marketplace
sequentially, and are willing to wait up to $d$ timesteps to be matched, after
which they will leave the system in favor of an outside option. A platform can
match groups of up to $k$ users together, indicating that they will share a
ride. Each group of users yields a match value depending on how compatible they
are with one another. As an example, in ridesharing, $k$ is the capacity of the
service vehicles, and $d$ is the amount of time a user is willing to wait for a
driver to be matched to them.
  We present results for both the utility maximization and cost minimization
variants of the problem. In the utility maximization setting, the optimal
competitive ratio is $\frac{1}{d}$ whenever $k \geq 3$, and is achievable in
polynomial-time for any fixed $k$. In the cost minimization variation, when $k
= 2$, the optimal competitive ratio for deterministic algorithms is
$\frac{3}{2}$ and is achieved by a polynomial-time thresholding algorithm. When
$k>2$, we show that a polynomial-time randomized batching algorithm is $(2 -
\frac{1}{d}) \log k$-competitive, and it is NP-hard to achieve a competitive
ratio better than $\log k - O (\log \log k)$.
