  In this paper, we mathematically model the multi-hop Peer-to-Peer (P2P)
ride-matching problem as a binary program. We formulate this problem as a
many-to-many problem in which a rider can travel by transferring between
multiple drivers, and a driver can carry multiple riders. We propose a
pre-processing procedure to reduce the size of the problem, and devise a
decomposition algorithm to solve the original ride-matching problem to
optimality by means of solving multiple smaller problems. We conduct extensive
numerical experiments to demonstrate the computational efficiency of the
proposed algorithm and show its practical applicability to reasonably-sized
dynamic ride-matching contexts. Finally, in the interest of even lower solution
times, we propose heuristic solution methods, and investigate the trade-offs
between solution time and accuracy.
