Consider the following problem:
Input: a simple (undirected) graph $G=(V,E)$.
Question: Is there an orientation of $G$ satisfying the property that for every $s,t in V$ there is at most one (directed) $s$-$t$ walk?
This can be equivalently phrased as:
Input: a simple (undirected) graph $G=(V,E)$.
Question: Is there an acyclic orientation of $G$ satisfying the property that for every $s,t in V$ there is at most one (directed) $s$-$t$ path?
What is the class of graphs for which the answer is “yes”? Can this problem be solved in polynomial time?
Some observations:
- If the graph is bipartite, then the answer is “yes.”
- If the graph has a triangle, then the answer is “no.”
The first observation follows by orienting the edges from one partition to the other. The second observation is easy to check. This led me to two incorrect guesses:
- The answer is “yes” if and only if the graph is bipartite. (counterexample: the 5-cycle)
- The answer is “yes” if and only if the graph is triangle-free (counterexample: the cartesian product of an edge with the 5-cycle)