As an OSM contributor, I beg to differ. "Just an algorithm" needs to take into account all the different ways in which the data is input, guess at possible transfers (again, stops might be mapped, but are they reachable from each other?), and that's before we get to the issue of stale data (infrastructure might be mapped, but the line numbering and routing changes at a moment's notice).
So yeah, it looks easy at first glance.