# amir734jj/classic-graph-theory-problem

Three Glass Puzzle: exhaustive solution
Java
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
 Failed to load latest commit information. .settings bin src .classpath .project README.md jgraph-5.13.0.0.jar jgrapht-core-0.9.0.jar jgrapht-demo-0.9.0.jar jgrapht-ext-0.9.0-uber.jar jgrapht-ext-0.9.0.jar jgraphx-2.0.0.1.jar

# Classic-Graph-Theory-Problem

Three Glass Puzzle: Find all possible solutions for 3 containers with capacities: 10, 7, 4

``````Looking For: TupleContainer [X=< Capacity: 10 , Current Volume: 2 >, Y=< Capacity: 7 , Current Volume: 5 >, Z=< Capacity: 4 , Current Volume: 4 >]
Depth Level: 5.0
(TupleContainer [X=< Capacity: 10 , Current Volume: 0 >, Y=< Capacity: 7 , Current Volume: 7 >, Z=< Capacity: 4 , Current Volume: 4 >] : TupleContainer [X=< Capacity: 10 , Current Volume: 4 >, Y=< Capacity: 7 , Current Volume: 7 >, Z=< Capacity: 4 , Current Volume: 0 >])
(TupleContainer [X=< Capacity: 10 , Current Volume: 4 >, Y=< Capacity: 7 , Current Volume: 7 >, Z=< Capacity: 4 , Current Volume: 0 >] : TupleContainer [X=< Capacity: 10 , Current Volume: 10 >, Y=< Capacity: 7 , Current Volume: 1 >, Z=< Capacity: 4 , Current Volume: 0 >])
(TupleContainer [X=< Capacity: 10 , Current Volume: 10 >, Y=< Capacity: 7 , Current Volume: 1 >, Z=< Capacity: 4 , Current Volume: 0 >] : TupleContainer [X=< Capacity: 10 , Current Volume: 6 >, Y=< Capacity: 7 , Current Volume: 1 >, Z=< Capacity: 4 , Current Volume: 4 >])
(TupleContainer [X=< Capacity: 10 , Current Volume: 6 >, Y=< Capacity: 7 , Current Volume: 1 >, Z=< Capacity: 4 , Current Volume: 4 >] : TupleContainer [X=< Capacity: 10 , Current Volume: 6 >, Y=< Capacity: 7 , Current Volume: 5 >, Z=< Capacity: 4 , Current Volume: 0 >])
(TupleContainer [X=< Capacity: 10 , Current Volume: 6 >, Y=< Capacity: 7 , Current Volume: 5 >, Z=< Capacity: 4 , Current Volume: 0 >] : TupleContainer [X=< Capacity: 10 , Current Volume: 2 >, Y=< Capacity: 7 , Current Volume: 5 >, Z=< Capacity: 4 , Current Volume: 4 >])
****************************************
Looking For: TupleContainer [X=< Capacity: 10 , Current Volume: 2 >, Y=< Capacity: 7 , Current Volume: 7 >, Z=< Capacity: 4 , Current Volume: 2 >]
Depth Level: 6.0
(TupleContainer [X=< Capacity: 10 , Current Volume: 0 >, Y=< Capacity: 7 , Current Volume: 7 >, Z=< Capacity: 4 , Current Volume: 4 >] : TupleContainer [X=< Capacity: 10 , Current Volume: 4 >, Y=< Capacity: 7 , Current Volume: 7 >, Z=< Capacity: 4 , Current Volume: 0 >])
(TupleContainer [X=< Capacity: 10 , Current Volume: 4 >, Y=< Capacity: 7 , Current Volume: 7 >, Z=< Capacity: 4 , Current Volume: 0 >] : TupleContainer [X=< Capacity: 10 , Current Volume: 10 >, Y=< Capacity: 7 , Current Volume: 1 >, Z=< Capacity: 4 , Current Volume: 0 >])
(TupleContainer [X=< Capacity: 10 , Current Volume: 10 >, Y=< Capacity: 7 , Current Volume: 1 >, Z=< Capacity: 4 , Current Volume: 0 >] : TupleContainer [X=< Capacity: 10 , Current Volume: 6 >, Y=< Capacity: 7 , Current Volume: 1 >, Z=< Capacity: 4 , Current Volume: 4 >])
(TupleContainer [X=< Capacity: 10 , Current Volume: 6 >, Y=< Capacity: 7 , Current Volume: 1 >, Z=< Capacity: 4 , Current Volume: 4 >] : TupleContainer [X=< Capacity: 10 , Current Volume: 6 >, Y=< Capacity: 7 , Current Volume: 5 >, Z=< Capacity: 4 , Current Volume: 0 >])
(TupleContainer [X=< Capacity: 10 , Current Volume: 6 >, Y=< Capacity: 7 , Current Volume: 5 >, Z=< Capacity: 4 , Current Volume: 0 >] : TupleContainer [X=< Capacity: 10 , Current Volume: 2 >, Y=< Capacity: 7 , Current Volume: 5 >, Z=< Capacity: 4 , Current Volume: 4 >])
(TupleContainer [X=< Capacity: 10 , Current Volume: 2 >, Y=< Capacity: 7 , Current Volume: 5 >, Z=< Capacity: 4 , Current Volume: 4 >] : TupleContainer [X=< Capacity: 10 , Current Volume: 2 >, Y=< Capacity: 7 , Current Volume: 7 >, Z=< Capacity: 4 , Current Volume: 2 >])
****************************************
Looking For: TupleContainer [X=< Capacity: 10 , Current Volume: 9 >, Y=< Capacity: 7 , Current Volume: 0 >, Z=< Capacity: 4 , Current Volume: 2 >]
Depth Level: 7.0
(TupleContainer [X=< Capacity: 10 , Current Volume: 0 >, Y=< Capacity: 7 , Current Volume: 7 >, Z=< Capacity: 4 , Current Volume: 4 >] : TupleContainer [X=< Capacity: 10 , Current Volume: 4 >, Y=< Capacity: 7 , Current Volume: 7 >, Z=< Capacity: 4 , Current Volume: 0 >])
(TupleContainer [X=< Capacity: 10 , Current Volume: 4 >, Y=< Capacity: 7 , Current Volume: 7 >, Z=< Capacity: 4 , Current Volume: 0 >] : TupleContainer [X=< Capacity: 10 , Current Volume: 10 >, Y=< Capacity: 7 , Current Volume: 1 >, Z=< Capacity: 4 , Current Volume: 0 >])
(TupleContainer [X=< Capacity: 10 , Current Volume: 10 >, Y=< Capacity: 7 , Current Volume: 1 >, Z=< Capacity: 4 , Current Volume: 0 >] : TupleContainer [X=< Capacity: 10 , Current Volume: 6 >, Y=< Capacity: 7 , Current Volume: 1 >, Z=< Capacity: 4 , Current Volume: 4 >])
(TupleContainer [X=< Capacity: 10 , Current Volume: 6 >, Y=< Capacity: 7 , Current Volume: 1 >, Z=< Capacity: 4 , Current Volume: 4 >] : TupleContainer [X=< Capacity: 10 , Current Volume: 6 >, Y=< Capacity: 7 , Current Volume: 5 >, Z=< Capacity: 4 , Current Volume: 0 >])
(TupleContainer [X=< Capacity: 10 , Current Volume: 6 >, Y=< Capacity: 7 , Current Volume: 5 >, Z=< Capacity: 4 , Current Volume: 0 >] : TupleContainer [X=< Capacity: 10 , Current Volume: 2 >, Y=< Capacity: 7 , Current Volume: 5 >, Z=< Capacity: 4 , Current Volume: 4 >])
(TupleContainer [X=< Capacity: 10 , Current Volume: 2 >, Y=< Capacity: 7 , Current Volume: 5 >, Z=< Capacity: 4 , Current Volume: 4 >] : TupleContainer [X=< Capacity: 10 , Current Volume: 2 >, Y=< Capacity: 7 , Current Volume: 7 >, Z=< Capacity: 4 , Current Volume: 2 >])
(TupleContainer [X=< Capacity: 10 , Current Volume: 2 >, Y=< Capacity: 7 , Current Volume: 7 >, Z=< Capacity: 4 , Current Volume: 2 >] : TupleContainer [X=< Capacity: 10 , Current Volume: 9 >, Y=< Capacity: 7 , Current Volume: 0 >, Z=< Capacity: 4 , Current Volume: 2 >])
****************************************
Looking For: TupleContainer [X=< Capacity: 10 , Current Volume: 9 >, Y=< Capacity: 7 , Current Volume: 2 >, Z=< Capacity: 4 , Current Volume: 0 >]
Depth Level: 8.0
(TupleContainer [X=< Capacity: 10 , Current Volume: 0 >, Y=< Capacity: 7 , Current Volume: 7 >, Z=< Capacity: 4 , Current Volume: 4 >] : TupleContainer [X=< Capacity: 10 , Current Volume: 4 >, Y=< Capacity: 7 , Current Volume: 7 >, Z=< Capacity: 4 , Current Volume: 0 >])
(TupleContainer [X=< Capacity: 10 , Current Volume: 4 >, Y=< Capacity: 7 , Current Volume: 7 >, Z=< Capacity: 4 , Current Volume: 0 >] : TupleContainer [X=< Capacity: 10 , Current Volume: 10 >, Y=< Capacity: 7 , Current Volume: 1 >, Z=< Capacity: 4 , Current Volume: 0 >])
(TupleContainer [X=< Capacity: 10 , Current Volume: 10 >, Y=< Capacity: 7 , Current Volume: 1 >, Z=< Capacity: 4 , Current Volume: 0 >] : TupleContainer [X=< Capacity: 10 , Current Volume: 6 >, Y=< Capacity: 7 , Current Volume: 1 >, Z=< Capacity: 4 , Current Volume: 4 >])
(TupleContainer [X=< Capacity: 10 , Current Volume: 6 >, Y=< Capacity: 7 , Current Volume: 1 >, Z=< Capacity: 4 , Current Volume: 4 >] : TupleContainer [X=< Capacity: 10 , Current Volume: 6 >, Y=< Capacity: 7 , Current Volume: 5 >, Z=< Capacity: 4 , Current Volume: 0 >])
(TupleContainer [X=< Capacity: 10 , Current Volume: 6 >, Y=< Capacity: 7 , Current Volume: 5 >, Z=< Capacity: 4 , Current Volume: 0 >] : TupleContainer [X=< Capacity: 10 , Current Volume: 2 >, Y=< Capacity: 7 , Current Volume: 5 >, Z=< Capacity: 4 , Current Volume: 4 >])
(TupleContainer [X=< Capacity: 10 , Current Volume: 2 >, Y=< Capacity: 7 , Current Volume: 5 >, Z=< Capacity: 4 , Current Volume: 4 >] : TupleContainer [X=< Capacity: 10 , Current Volume: 2 >, Y=< Capacity: 7 , Current Volume: 7 >, Z=< Capacity: 4 , Current Volume: 2 >])
(TupleContainer [X=< Capacity: 10 , Current Volume: 2 >, Y=< Capacity: 7 , Current Volume: 7 >, Z=< Capacity: 4 , Current Volume: 2 >] : TupleContainer [X=< Capacity: 10 , Current Volume: 9 >, Y=< Capacity: 7 , Current Volume: 0 >, Z=< Capacity: 4 , Current Volume: 2 >])
(TupleContainer [X=< Capacity: 10 , Current Volume: 9 >, Y=< Capacity: 7 , Current Volume: 0 >, Z=< Capacity: 4 , Current Volume: 2 >] : TupleContainer [X=< Capacity: 10 , Current Volume: 9 >, Y=< Capacity: 7 , Current Volume: 2 >, Z=< Capacity: 4 , Current Volume: 0 >])
****************************************
Looking For: TupleContainer [X=< Capacity: 10 , Current Volume: 5 >, Y=< Capacity: 7 , Current Volume: 2 >, Z=< Capacity: 4 , Current Volume: 4 >]
Depth Level: 8.0
(TupleContainer [X=< Capacity: 10 , Current Volume: 0 >, Y=< Capacity: 7 , Current Volume: 7 >, Z=< Capacity: 4 , Current Volume: 4 >] : TupleContainer [X=< Capacity: 10 , Current Volume: 4 >, Y=< Capacity: 7 , Current Volume: 7 >, Z=< Capacity: 4 , Current Volume: 0 >])
(TupleContainer [X=< Capacity: 10 , Current Volume: 4 >, Y=< Capacity: 7 , Current Volume: 7 >, Z=< Capacity: 4 , Current Volume: 0 >] : TupleContainer [X=< Capacity: 10 , Current Volume: 4 >, Y=< Capacity: 7 , Current Volume: 3 >, Z=< Capacity: 4 , Current Volume: 4 >])
(TupleContainer [X=< Capacity: 10 , Current Volume: 4 >, Y=< Capacity: 7 , Current Volume: 3 >, Z=< Capacity: 4 , Current Volume: 4 >] : TupleContainer [X=< Capacity: 10 , Current Volume: 8 >, Y=< Capacity: 7 , Current Volume: 3 >, Z=< Capacity: 4 , Current Volume: 0 >])
(TupleContainer [X=< Capacity: 10 , Current Volume: 8 >, Y=< Capacity: 7 , Current Volume: 3 >, Z=< Capacity: 4 , Current Volume: 0 >] : TupleContainer [X=< Capacity: 10 , Current Volume: 8 >, Y=< Capacity: 7 , Current Volume: 0 >, Z=< Capacity: 4 , Current Volume: 3 >])
(TupleContainer [X=< Capacity: 10 , Current Volume: 8 >, Y=< Capacity: 7 , Current Volume: 0 >, Z=< Capacity: 4 , Current Volume: 3 >] : TupleContainer [X=< Capacity: 10 , Current Volume: 1 >, Y=< Capacity: 7 , Current Volume: 7 >, Z=< Capacity: 4 , Current Volume: 3 >])
(TupleContainer [X=< Capacity: 10 , Current Volume: 1 >, Y=< Capacity: 7 , Current Volume: 7 >, Z=< Capacity: 4 , Current Volume: 3 >] : TupleContainer [X=< Capacity: 10 , Current Volume: 1 >, Y=< Capacity: 7 , Current Volume: 6 >, Z=< Capacity: 4 , Current Volume: 4 >])
(TupleContainer [X=< Capacity: 10 , Current Volume: 1 >, Y=< Capacity: 7 , Current Volume: 6 >, Z=< Capacity: 4 , Current Volume: 4 >] : TupleContainer [X=< Capacity: 10 , Current Volume: 5 >, Y=< Capacity: 7 , Current Volume: 6 >, Z=< Capacity: 4 , Current Volume: 0 >])
(TupleContainer [X=< Capacity: 10 , Current Volume: 5 >, Y=< Capacity: 7 , Current Volume: 6 >, Z=< Capacity: 4 , Current Volume: 0 >] : TupleContainer [X=< Capacity: 10 , Current Volume: 5 >, Y=< Capacity: 7 , Current Volume: 2 >, Z=< Capacity: 4 , Current Volume: 4 >])
****************************************
``````