title: Water Jug problem in Die Hard 3 into a graph
body: <p>im not too sure how to implement this...</p>
  
  <p>I need to create a weighted directed graph based on the water jug problem from the movie Die Hard 3 (<a href="http://www.wikihow.com/Solve-the-Water-Jug-Riddle-from-Die-Hard-3" rel="nofollow noreferrer">http://www.wikihow.com/Solve-the-Water-Jug-Riddle-from-Die-Hard-3</a>).</p>
  
  <p>I need to create nodes for all the possible moves (fill, empty, pour). After i need to find the shortest path to the solution. But i am have trouble creating this graph. I am using my own created linked list/node.</p>
  
  <p>Any help with the algorithm to create this graph would be great. Thanks.</p>
  
  <p>ex) given 3 gallon, 5 gallon. Get 4 gallons in the 5 gallon jug. I need to create a graph of all the possible moves to get to 4 gallons. Each different gallon represents a different node.</p>
  
  <p>Happy Thanksgiving =)</p>