I have a non-weighted DAG graph. What I want to do is to find all the paths in a greedy way and the path should contain at least K nodes, and a given starting node.
Is there any existing algorithm/implmentation that does that?
For example I have the following graph:
my %graph =(36=>[31],31=>[30,22],30=>[20],22=>[20,8],20=>[1],8=>[5],5=>[2],2=>[1,20]);
So if I define K=5 and starting node 36, I hope to get:
{1,20,22,31,36}
{1,20,2,5,8,22,31,36}
{1,20,30,31,36}
{1,2,5,8,22,31,36}