Collaboration In Distributed Systems: Robots, Ants, And Matchings