A Dynamic Tree Algorithm for Peer-to-Peer Ridesharing Matching

Rui Yao, Shlomo Bekhor

Research output: Contribution to journalArticlepeer-review


On-demand peer-to-peer ridesharing services provide flexible mobility options and are expected to alleviate congestion by sharing empty car seats. An efficient matching algorithm is essential to the success of a ridesharing system. The matching problem is related to the well-known dial-a-ride problem, which also tries to find the optimal pickup and delivery sequence for a given set of passengers. In this paper, we propose an efficient dynamic tree algorithm to solve the on-demand peer-to-peer ridesharing matching problem. The dynamic tree algorithm benefits from given ridesharing driver schedules and provides satisfactory runtime performances. In addition, an efficient pre-processing procedure to select candidate passenger requests is proposed, which further improves the algorithm performance. Numerical experiments conducted in a small network show that the dynamic tree algorithm reaches the same objective function values of the exact algorithm, but with shorter runtimes. Furthermore, the proposed method is applied to a larger size problem. Results show that the spatial distribution of ridesharing participants influences the algorithm performance. Sensitivity analysis confirms that the most critical ridesharing matching constraints are the excess travel times. The network analysis suggests that small vehicle capacities do not guarantee overall vehicle-kilometer travel savings.

Original languageEnglish
Pages (from-to)801-837
Number of pages37
JournalNetworks and Spatial Economics
Issue number4
StatePublished - Dec 2021


  • Dynamic tree
  • Matching
  • Peer-to-peer ridesharing
  • Vehicle routing problem

All Science Journal Classification (ASJC) codes

  • Software
  • Computer Networks and Communications
  • Artificial Intelligence


Dive into the research topics of 'A Dynamic Tree Algorithm for Peer-to-Peer Ridesharing Matching'. Together they form a unique fingerprint.

Cite this