title: Fast way of determining whether two nodes in a JUNG graph are connected by more than one path?
body: <p>Given two nodes <code>A</code> and <code>B</code> from a directed JUNG graph, I want to determine whether there is more than one path from <code>A</code> to <code>B</code> (not necessarely a <em>shortest</em> path).</p>
  
  <p>I can think of two approaches only, both very       time-consuming.</p>
  
  <ol>
  <li><p>Retrieve all paths connecting the two nodes (question <a href="https://stackoverflow.com/questions/5778176/finding-all-paths-in-jung/14983018#14983018">Finding all
  paths in JUNG?</a>) and check if there is more than one.</p></li>
  <li><p>Retrieve the shortest path by using the class
  <code>DijkstraShortestPath</code>, then break this path and search for the
  shortest path again. If there is still one, it means there were
  multiple paths.
  Note that this also requires to clone the graph, since I do not want to alter the original graph.</p></li>
  </ol>
  
  <p>How can I do this smarter (i.e. <em>faster</em>)?</p>