Question textConsider a directed graph with 6 nodes and the following arcs:2, 4, i.e. arcs are (1,2), (1,4) 3, 5, i.e. arcs are (2,3), (2,5) 2, 6, i.e. arcs are (3,2), (3,6) 2, 3, 6, i.e. arcs are (4,2), (4,3), (4,6) 3, 4, 6, i.e. arcs are (5,3), (5,4), (5,6) 2, 3, 4, i.e. arcs are (6,2), (6,3), (6,4) Perform a depth-first search starting at node 1. When exploring outgoing arcs, consider neighbouring nodes in increasing order of node number. Provide the predecessor nodes found by the search for: Node 4: Answer 1 Question 1[input], Node 5: Answer 2 Question 1[input], Node 6: Answer 3 Question 1[input]. The algorithm appends each node found to a list. It next considers a node from the Answer 4 Question 1[select: , beginning of, end of] the list of active nodes. The longest path from Node 1 to any other node (measured by number of arcs) in the resulting DFS tree has a length of Answer 5 Question 1[input]. The complexity of depth-first search on a network with nodes and arcs is: Answer 6 Question 1[select: , O(n), O(n^2), O(m), O(n m)]多项填空题

题目图片

登录即可查看完整答案

我们收录了全球超50000道真实原题与详细解析,现在登录,立即获得答案。

类似问题

更多留学生实用工具

加入我们,立即解锁 海量真题独家解析,让复习快人一步!