1
$\begingroup$

Given a directed graph G= (V,E), a pair of vertices s and t, a natural number K encoded in binary, whether the problem to decide there exists a path (not necessarily simple) from s to t of length K is NP-complete ?

$\endgroup$

closed as off-topic by Jan Johannsen, Emil Jeřábek, D.W., Aryeh, Kristoffer Arnsfelt Hansen Apr 16 '18 at 12:05

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Your question does not appear to be a research-level question in theoretical computer science. For more information about the scope, please see help center. Your question might be suitable for Computer Science which has a broader scope." – Jan Johannsen, Emil Jeřábek, D.W., Aryeh, Kristoffer Arnsfelt Hansen
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 6
    $\begingroup$ It is in P: compute the $K$th power of the adjacency matrix by repeated squaring, capping all entries by $1$. $\endgroup$ – Emil Jeřábek Apr 4 '18 at 20:46
  • $\begingroup$ You can also simply do a BFS starting from vertex $s$ and check if you reach $t$ in $K$ steps or not. $\endgroup$ – karmanaut Apr 7 '18 at 19:21