Paths and directed acyclic graphs