Menu

#109 Behaviour of struct::graph walk

open
7
2005-09-30
2003-04-20
Anonymous
No

The current implementation (tcllib1.3) of ::struct::graph:
:_walk with options -order both -type dfs create a forest
of disjunct predecessor subgraph trees [1] .

[2] Says that if G is a graph G=(V,E) then we can do one
of three possibilities:

1. No restrictions (walk)

2. Each edge E of G traversed at most once. (trail)

3. Each vertex V visited at most once (path)

In tcllib a vertex is a node and an edge is an arc.

I think the current implementation of walk is actually a
path as each node is visited only once. In order to
implement a walk as defined in [2] an extra line 1834
array unset visited $node could be inserted.

See http://mini.net/tcl/8787 for more info.

Could the walk proc be extended to cover all three
cases?

[1] Cormen, Leiserson, Rivest: Introduction to Algorithms,
p477

[2] Kreystig, Advanced Engineering Mathematics, Sixth
Edition, p1139

Discussion

  • Andreas Kupries

    Andreas Kupries - 2003-08-06
    • priority: 5 --> 8
     
  • Andreas Kupries

    Andreas Kupries - 2005-09-30
    • priority: 8 --> 7