Question: What are the steps and code for doing this in Java on Intellij IDEA? Any resources/code would be appreciated. The facebook_combined.txt file is at this
What are the steps and code for doing this in Java on Intellij IDEA? Any resources/code would be appreciated. The facebook_combined.txt file is at this link if you scroll down: http://snap.stanford.edu/data/egonets-Facebook.html

Facebook. Please see the file attached: facebook_combined. txt. This data contains 4039 nodes and 88234 edges. The nodes correspond to people on Facebook and the edges to friendships. As friendships in Facebook are bi-directional, this is an undirected graph. All the data has been anonymized to protect privacy. More details and background about the data are available here: http://snap.stanford.edu/data/egonets-Facebook.html (This website also has many other interesting datasets.) 1. Loading the data (10 points) The first step is to read the facebook_combined.txt file and load all the data into your Java classes. You can use either the Adjacency Matrix or Adjacency List as your data structure for storing the data. 2. Implement Breadth-First Search (25 points) Implement the BFS algorithm (as shown in class) and run it on the data that you loaded in the previous step. 3. Implement Depth-First Search (25 points) Implement the DFS algorithm (as shown in class) and run it on the data that you loaded in the previous step. 4. Questions about the data Answer the following questions using the data and the code that you implemented. a. What is the distance between nodes 40 and 3700 ? (5 points) b. Is the graph connected, i.e., is there a path from any given node u to any other given node v ? Why? (5 points) c. Run the BFS algorithm starting from an arbitrary node. How many frontiers/steps does it need such that all nodes are visited? Repeat this three more times starting from a random node every time. Does your answer change? Why? (5 points) d. How many nodes are within a distance of 4 from node 1985 ? (5 points)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
