The acyclic subgraph problem