I have a non-weighted DAG chart. I want to do to find all the paths in the greedy path and the path must contain at least K nodes, and the given node start.
Is there any existing algorithm / implication that does this?
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 start 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}