T. P(w(v-ic, I. J. , and S. , There exists a mapping p of P(w) such that q = p |I . Thus there exists an ancestor w c = w(v ic , t , I J , S ) of w in S(I) and a mapping p c of P(w c ) such that p c generates p. Let anc(q) = p c|I . If |P(w, I)| > |A|, there exist two mappings q 1 and q 2 in P(w, I) such that anc(q 1 ) = anc(q 2 )

?. J-?-1;n-\i-|j-|?capa and . |i|-s-?,

, We assume capa is fixed and want to prove that the algorithm is polynomial in |I| and T W . Note firstly that S(I) has |S(I)| = O(n · T W · n capa · n) nodes, thus Line 1 is done in time at most O(|S(I)| 2 ) = O(T W 2 · n 2·capa+4 )

A. Attanasio, J. Cordeau, G. Ghiani, and G. Laporte, Parallel tabu search heuristics for the dynamic multi-vehicle dial-a-ride problem, Parallel Computing, vol.30, pp.377-387, 2004.

S. Chan, Metaheuristics for solving the dial-a-ride problem, 2004.

J. Cordeau, A branch-and-cut algorithm for the dial-a-ride problem, Operations Research, vol.54, issue.3, pp.573-586, 2006.

J. Cordeau and G. Laporte, A tabu search heuristic for the static multi-vehicle dial-a-ride problem, Transportation Research Part B: Methodological, vol.37, pp.579-594, 2003.

J. Cordeau and G. Laporte, The dial-a-ride problem: models and algorithms, Annals of Operations Research, vol.153, pp.29-46, 2007.

L. Coslovich, R. Pesenti, and W. Ukovich, A two-phase insertion technique of unexpected customers for a dynamic dial-a-ride problem, European Journal of Operational Research, vol.175, issue.3, pp.1605-1615, 2006.

T. Crainic and F. Malucelli, Meta-heuristics for a class of demandresponsive transit systems, INFORMS Journal on Computing, vol.17, pp.10-24, 2005.

Y. Dumas, J. Desrosiers, and F. Soumis, The pickup and delivery problem with time windows, European Journal of Operational Research, vol.54, pp.7-22, 1991.

M. Garey, J. , and D. , Computers and intractability: a guide to the theory of NP-completeness, 1979.

T. Hu, C. , and C. , Exact Algorithm for Dial-A-Ride Problems with Time-Dependent Travel Cost, Journal of the Eastern Asia Society for Transportation Studies, vol.10, pp.916-933, 2013.

J. Jung, R. Jayakrishnan, and J. Park, Dynamic Shared-Taxi Dispatch Algorithm with Hybrid-Simulated Annealing, Computer-Aided Civil and Infrastructure Engineering, 2015.

A. B. Kahn, Topological sorting of large networks, Commun. ACM, vol.5, pp.558-562, 1962.

V. Kann, Maximum bounded 3-dimensional matching is MAX SNPcomplete, Information Processing Letters, vol.37, pp.27-35, 1991.

S. Ma, Y. Zheng, and O. Wolfson, Real-time city-scale taxi ridesharing. Knowledge and Data Engineering, IEEE Transactions on, vol.27, pp.1782-1795, 2015.

I. Nedregård, The Integrated Dial-a-Ride Problem-Balancing Costs and Convenience, 2015.

S. Parragh, K. Doerner, and R. Hartl, Variable neighborhood search for the dial-a-ride problem, Computers & Operations Research, vol.37, pp.1129-1138, 2010.

K. Pietrzak, On the parameterized complexity of the fixed alphabet shortest common supersequence and longest common subsequence problems, Journal of Computer and System Sciences, vol.67, pp.757-771, 2003.

W. B. Powell, C. , and Z. , A generalized threshold algorithm for the shortest path problem with time windows, Network Design: Connectivity and Facilities Location, Proceedings of a DIMACS Workshop, pp.303-318, 1997.

S. Ropke and J. Cordeau, Branch and cut and price for the pickup and delivery problem with time windows, Transportation Science, vol.43, pp.267-286, 2009.

D. Santos and E. Xavier, Dynamic taxi and ridesharing: A framework and heuristics for the optimization problem, Proceedings of the Twenty-Third International Joint Conference on Artificial Intelligence, pp.2885-2891, 2013.

D. Santos and E. Xavier, Taxi and Ride Sharing: A Dynamic Diala-Ride Problem with Money as an Incentive, Expert Systems with Applications, vol.42, pp.6728-6737, 2015.

M. Savelsbergh, S. , and M. , The General Pickup and Delivery Problem, Transportation Science, vol.29, issue.1, pp.17-29, 1995.

X. Wang, M. Dessouky, and F. Ordonez, A Pickup and Delivery Problem for Ridesharing Considering Congestion, Transportation letters, 2015.