title: Counting Number of Paths (Length N) in Bipartite Graph
body: <p>I am currently counting the number of paths of length $n$ in a bipartite graph by doing a depth first search (up to 10 levels). However, my implementation of this takes 5+ minutes to count 7 million paths of length 5 from a bipartite graph with 3000+ elements. I am looking for a more efficient way to do this counting problem, and I am wondering if there is any such algorithm in the literature.</p>
  
  <p>These are undirected bipartite graphs, so there can be cycles in the paths.</p>
  
  <p>My goal here is to count the number of paths of length $n$ in a bipartite graph of 1 million elements under a minute.</p>
  
  <p>Thank you in advance for any suggested answers.</p>