Breadth First Search (BFS): Run a breadth first search on a directed graph starting at a specified source vertex and return a bfs-tree. Duplicate input edges are allowed. The input is in adjacency array format with an ordering among the outgoing edges. If the graph is not connected then only the tree over the vertices reachable from the source should be returned.
Inputs:
- Directed edges selected uniformly with n edges and n/10 vertices
- Rmat graph with n edges and n/10 vertices
- K-nearest neighbor graph (3d) with n/10 vertices and 10 neighbors for each vertex.
Output:
- The output must be the same BFS tree returned by the sequential execution over the ordering of outedges specified in the input graph.
- (-U) The BFS tree is any BFS tree for the graph regardless of the ordering of outedges.