12345 1 0100 1 2 34☑ 21 0111 3 01010 3 4 011 01 5 11010 问题1: 你能否根据这两组图解释计算机 中最主要的图表示方式? 123456 4☑ 1 010100 2 2000010 3 5☑ 3 000011 4 4010000 5 5 000100 6 6 000001
广度优先 Given a graphG=(V.E)and a distinguished source vertex s,breadth-first search systematically explores the edges of Gto"discover every vertex that is reachable from It computes the distance (smallest number of edges)from s to each reachable vertex.It also produces a"breadth-first tree"with root s that contains all reachable vertices.For any vertex vrechable froms,the simple path in the breadth-first tree froms tocorresponds to a"shortest path"froms tov in G,that is,a path containing the smallest number of edges.The algorithm works on both directed and undirected graphs 两组关键的动词 How?
广度优先 两组关键的动词 How?
广度优先 Given a graph G=(V,E)and a disting 一定是棵树 adth-first search systematically explores the edges of 吗? ex that is reachable from s.It computes the distance (sm number of edges)from s to each reachable vertex.It also produces a"breadth-first tree"with roots that contains all reachable vertices.For any vertex v reachable from s,the simple path in the breadth-first tree from s to v corresponds to a"shortest path"from s tov in G,that is,a path containing the smallest number of edges.algorithm works on both directed and undirected graphs. 定最短吗? 显然?
广度优先 一定是棵树 吗? 一定最短吗? 显然?