fig sample weighteddirected graph problem there are two buckets in this problema gallon bucket and gallon bucket your job is to put exactly gallons in the gallon bucket the rules of the game say that you can completely fill bucket of wateryou can pour one bucket into anotherand you can completely dump bucket out on the ground you cannot partially fill up bucketbut you can pour one bucket into another you are to write program that tells you how to start with two empty buckets and end with gallons in the gallon bucket to complete this problem you must implement depth first search of graph the vertices in this problem consist of the state of the problem which is given by the amount of water in each bucket along with the search algorithm you must also implement an adjacent function that given vertex containing this state information will return list of states that may be adjacent to it it may be easier to generate some extra adjacent states and then filter out the unreasonable ones before returning the list from adjacent for instanceit may be easier to generate state with gallons in the gallon bucket and then throw that state out later this copy belongs to 'acha