Optimality-guaranteed algorithms on the dynamic shared-taxi problem