depthfirstsearch课程.pptVIP

  • 3
  • 0
  • 约4.59千字
  • 约 30页
  • 2016-12-04 发布于江苏
  • 举报
15.082 and 6.855J Depth First Search The depth first search tree * * Initialize LIST Unmark all nodes in N; Mark node s 1 2 4 5 3 6 9 7 8 1 pred(1) = 0 next := 1 order(next) = 1 LIST:= {1} next 1 1 2 4 5 3 6 9 7 8 1 1 Select a node i in LIST LIST In depth first search, i is the last node in LIST 1 2 4 5 3 6 9 7 8 1 1 next 1 1 1 If node i is incident to an admissible arc… LIST Select an admissible arc (i,j) 1 2 4 5 3 6 9 7 8 1 1 next 1 2 1 1 Mark Node j pred(j) := i 2 Next := Next + 1 order(j) := next add j to LIST 2 2 Select the last node on LIST LIST 1 2 4 5 3 6 9

文档评论(0)

1亿VIP精品文档

相关文档