Optimal strategies in waiting for common bus lines