Re: [Haskell-cafe] Right tree structure for complicated problem

2012-01-22 Thread Pierre Penninckx
Not exactly: The aim is not to know which path must the water take to the least time. The fact is, the water can only take one path, due to the circuit configuration, from the source to the exit, so there is no choice for the water. It's not a graph with multiple paths, it's a tree with leafs as w

Re: [Haskell-cafe] Right tree structure for complicated problem

2012-01-21 Thread Twan van Laarhoven
On 2012-01-22 00:39, Pierre Penninckx wrote: So here is what I want to achieve: I'd like a program that calculates the time needed for water to flow out of a circuit made out of tube. The rules are : - There are multiple sources of water and only one exit. - The water can only take one path from

[Haskell-cafe] Right tree structure for complicated problem

2012-01-21 Thread Pierre Penninckx
Hello everyone, So here is what I want to achieve: I'd like a program that calculates the time needed for water to flow out of a circuit made out of tube. The rules are : - There are multiple sources of water and only one exit. - The water can only take one path from a source to the exit. - Of cou