Cannot understand the detailedly the following code

2008-04-08 Thread reachmsn
Hi, At the url http://www.python.org/doc/essays/graphs.html there is some code by Guido Van Rossum for computing paths through a graph - I have pasted it below for reference - Let's write a simple function to determine a path between two nodes. It takes a graph and the start and end nodes as argu

Re: Cannot understand the detailedly the following code

2008-04-09 Thread reachmsn
On Apr 8, 5:45 pm, "A.T.Hofkamp" <[EMAIL PROTECTED]> wrote: > On 2008-04-08, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > [deleted a long piece of text by our BDFL about recursive graph path-finding > algorithm] > > > after first writing the inductive part ... for node in > > graph[start]

Re: Cannot understand the detailedly the following code

2008-04-09 Thread reachmsn
On Apr 8, 5:45 pm, "A.T.Hofkamp" <[EMAIL PROTECTED]> wrote: > On 2008-04-08, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > [deleted a long piece of text by our BDFL about recursive graph path-finding > algorithm] > > > after first writing the inductive part ... for node in > > graph[start]

Re: Cannot understand the detailedly the following code

2008-04-10 Thread reachmsn
On Apr 9, 8:12 pm, "A.T.Hofkamp" <[EMAIL PROTECTED]> wrote: > On 2008-04-09, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > > > > > On Apr 8, 5:45 pm, "A.T.Hofkamp" <[EMAIL PROTECTED]> wrote: > > Ok following these instructions one gets > > > def find_all_paths(graph, start, end, path=[]): > >

Re: Cannot understand the detailedly the following code

2008-04-15 Thread reachmsn
On Apr 11, 10:27 am, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Thu, 10 Apr 2008 23:57:29 -0300, <[EMAIL PROTECTED]> escribió: > > > i.e. you give, the graph, the start and end vertices as inputs and you > > get the output as a listing of all the paths. This is where I got to. > > It would

Re: Cannot understand the detailedly the following code

2008-04-15 Thread reachmsn
On Apr 11, 10:27 am, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > > If you want to understand how recursion works, or how you can actually   > construct a recursive function step by step, see this excellent post by   > Neil Cerutti: > > http://groups.google.com/group/comp.lang.python/msg/9f0b1