Is there an easy way to solve the problem?
How many ways can all six numbers in the set $S = \{4, 3, 2, 12, 1, 6\}$ be ordered so that $a$ comes before $b$ whenever $a$ is a divisor of $b$?
By analyzing each number in $S$, I get the answer, but I don't like the way I solved the problem.
$$1, 2, 3, 4, 6, 12$$ $$1, 2, 3, 6, 4, 12$$ $$1, 2, 4, 3, 6, 12$$ $$1, 3, 2, 4, 6, 12$$ $$1, 3, 2, 6, 4, 12$$

Using graph is easier. In all possibilities, 1 is always the first, and 12 is always the last. There are 5 ways to connect all the numbers from 1 to 12 as shown in the graph. You are unlikely to make a mistake or miss a line if you solve the problem this way.