project

Implement the class bronkerbosch.java the interface

Info iconThis preview shows pages 8–10. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Implement the class BronKerbosch.java . The interface is given as: public BronKerbosch(); public Set<Set<Friend>> maxCliques(Map<String, Friend> people); You may implement any helper methods as you see fit. The maxCliques method should return the set of all maximal cliques (each of which is in turn a set of friends) present in the graph. Bron-Kerbosch is a recursive backtracking algorithm that is reasonably simple. It maintains three sets. The first set R will be in the clique, the second set P are vertices to add and recurse upon, and the third set X, are vertices prohibited from being in the clique (to prevent duplicates max cliques from being reported). R \\ potential clique P \\ candidates for inclusion X \\ previously found vertices ( excluded ) BronKerbosch (R,P,X) : i f P and X are both empty : report R as a maximal clique for each vertex v in P: BronKerbosch1 ( R ∪ { v } , P ∩ N ( v ) , X ∩ N ( v )) P := P \ { v } X := X ∪ { v } This algorithm is slow, so you will not be able to run it on the entire friend graph. Instead, use 50.json See h ttp://en.wikipedia.org/wiki/Bron-Kerbosch algorithm for more information. 8 5 Phase 4: Summary 5.1 Questions.txt 35pts Take another breather; it’s time to reflect on what you’ve learned. Please submit a Questions.txt file with the answers, in order, to the following problems. 1. You computed the set of connected components for both the original graph, as well as the graph with the root removed. How did these sets differ? 2. What type of graph representation was contained in the JSON files? 3. Name three differences between the graph centrality measures, making reference to each one. 4. What is a clique? 5. How does the method in which we are generating edge weights impact/influence Dijkstra’s shortest path algorithm? 6. For the following algorithms, describe your code’s big-Oh runtime and explain if they’re running optimally: • DFS • BFS • FakebookReader (graph creation) • MST • FakebookReader.getConnectedComponentsWithoutRoot() 7. Finally, write two pararaphs on design choices you made, justifying them in terms of runtime and space efficiency. 9 6 Bonus Task 6.1 Facebook - Extra Credit - 25pts EC We highly encourage you to complete this section of extra credit as it’s both fun and educational. Here your task is to create, test, and visualize the above algorithms with your own Facebook data. To get started we have provided you with a modified version of the Python script we used to generate the JSON data for the assignmnet (ExtractJSON.py). Inside you will find a number of lines where you will need to put keys from a Facebook Developer Account and application that you can find out more about here: https://developers.facebook.com/apps . You’ll need to configure the Basic Information page with your site set as localhost (seen screenshot) in order to be allowed to test it on your own machine. Once you have all that set up, visit https://developers.facebook.com/tools/explorer/421759951239696/ , choose your app from the dropdown, select some permissions and generate a token to place in the Python script. Finally, modify the script to stop scrambling names so that you can better under- stand your data (the lines to modify are marked). To run the script you will need a minimum of Python 2.7 installed; instructions on how to do this are common on the internet. Then go ahead and run the script; it should generate output.log, which is your json output file. To be eligible for extra credit, you must submit this json file, as well as a Gephi image of your data. Submit these in a zip file labelled ECFacebook.zip. 10...
View Full Document

{[ snackBarMessage ]}

Page8 / 10

Implement the class BronKerbosch.java The interface is...

This preview shows document pages 8 - 10. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online