What is the longest path in a directed graph, with distinct nodes, that connects two specific nodes?

67 Views Asked by At

Given the directed graph $G$ with $6$ nodes, we have the following directed edges:

  • From each node numbered $i$ ($i>1$) that is not prime to all nodes that are numbered as a number that is a proper divisor of $i$ (From this I understood that if we are talking about the node numbered $6$, we have to draw a directed arc from $6$ to $2$ and from $6$ to $3$, which are the proper divisors of $6$).
  • From the node numbered $1$ to the node numbered $6$
  • From each node numbered $i$, where $i$ is a prime number, to the node numbered $i-1$

I have to find the longest path, that has only distinct nodes, and which connects the node numbered $6$ with the node numbered $1$. This is the graph that I drew according to the given information:

enter image description here

Given all of this, I tought that the longest path with distinct nodes that connects the node $6$ with the node $1$ is $5-4-2-1-6-3$ which has a length of $5$, but the answer given to this exercise is actually $3$, and I don't understand why and to which path is this answer referring to. So, why is my answer wrong? Why is the actual answer $3$ and what is that path?