I would like to find path of fixed length (given while running the program) in undirected graph. I\'m using adjacency matrix of my graph.
I tried to use some algorithms like
Suppose you can find a path of length d in a graph then you can run this algorithm |V| times and find the longest path which is NP-complete. So you can try the following approach -
1) approximation algorithm 2) brute force approach (more suitable for programming). Use a GPU to accelerate your code.
Also it may be of interest to you that -
there exists a linear time algorithm for DAGs.