Question: C++ Graphs Help! The Assignment: Reachability from a source vertex s is the problem to find the set of vertices S such that v S
C++ Graphs Help!
The Assignment:
Reachability from a source vertex s is the problem to find the set of vertices S such that v S if exists a path from s to v. You will create a C++ program to find reachable vertices using Breath First Search (BFS) algorithm.
There is an imput file with an sparse matrix. Given the source the program needs to display all reachable vertices.

I really dont know how to approach this problem since our professor did not touch graph theory with us.
I would really appreciate the help.
The graph looks like this:

Input example for Figure 1 (the last line indicates the matrix dimension n 11) 2 1 1 2 3 1 3 5 1 4 5 1 5 6 1 5 7 1 5 8 1 64 1 7 6 1 9 5 1 10 9 1 11 2 1 Output example (source 2) 1 3 4 5 6 7 8
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
