Instructions social graphs – an application of graphs

Instructions

Social Graphs – An Application of Graphs

1. Specification

The concept of Social Graph was introduced by M. Zuckerberg at the first Facebook F8 conference in 2007 when he introduced the Facebook platform to model relationships among internet users. 

Part 1
Consider the attached file Graph.java which defines a generic undirected Graph class. Click here to access/download the file 
Design and implement a class SocialGraph (in a separate source file SocialGraph.java) which extends the class Graph. In a social graph, the vertices (graph nodes) represent people names while the un-directed edges represent the acquaintance relationships between them. Class SocialGraph should define constructor(s) and enhance the behavior of the class Graph by defining the following social research specific methods:

·         normalizedDegreeOfCentrality calculates and returns the normalized degree of centrality for a given vertex v. The required value is calculated as: 
      degree(v) / (n-1)
where degree(v) represents the number of vertex incident edges and n represents the number of graph vertices. For social graphs, a high degree of centrality for a person v reflects his/her dominant position in the group or his/her social interaction skills.

·         numberOfTrianglesIncidentToVertex, calculates and returns the number of triangles incident to vertex v. The algorithm below calculates the number of triangles incident for all graph vertices (V is the set of vertices, E is the set of edges):

           foreach v in V
                foreach pair of vertices (p, q) in AdjacencyList(v)
                     if (p, q) is in E then add 1 to triangles[v]

·         listOfTrianglesIncidentToVertex calculates and returns the list of triangles incident to vertex v
A triangle should be specified by its vertices.

·         clusterIndividual for a given vertex v, calculates and returns the percentage indicating how close its neighbors are to make a complete graph and is calculated as:
[(number of edges connecting v‘s neighbor vertices) / (number of edges, potentially connecting  v‘s neighbor vertices)] * 100
where:
–    the number of edges connecting v’s neighbor vertices is calculated as:
     (number of triangles incident to vertex v)
–    the number of edges, potentially connecting v‘s neighbor vertices is calculated as:
     [degree(v) * (degree(v) – 1)] / 2

For social graphs this value measures of how close wrapped are the persons in the social graph around the given person.

·         averageClustering for the social graph, calculated as (the sum applies to all vertices v in V):
(1 / n) * ∑ clusterIndividual (v)

This value indicates the overall density of the social graph.


Additional (helper) methods and / or instance variables may be defined as necessary.
Your SocialGraph class should compile without errors.

Part 2
Design and implement a driver program TestSocialGraph (in a separate source file TestSocialGraph.java) for testing the methods implemented in Part 1. The driver program should build a social graph from an input file. After building the social graph, in a loop, the program should invite the user to select for execution one of the following operations: (1) normalizedDegreeOfCentrality, (2) numberOfTrianglesIncidentToVertex, (3) listOfTrianglesIncidentToVertex, (4) clusterIndividual, (5)averageClustering, (6) addVertex, (7) addEdge, (8) printEdges and (9) exit the loop and the program.
As a result of each operation execution, relevant information should be displayed to the user. For example, as a result of invoking clusterIndividual method, the cluster individual value for the given person should be displayed.

An example of input file content, its format and the corresponding social graph layout is shown in the attached file Example.pdf Click here to access file

Notes

1.     You may consider that there are no errors in the input file structure.

2.     If an operation requires additional information, the user will be prompted to enter it.

3.     The input file (a simple .txt file) should be generated by the students using a simple text editor such as Notepad.

4.     Person names (instead of indices) should be used in I/O operations involved by the user interface.

2. Submission Requirements

Submit the following before the due date listed in the Calendar:

1.     All .java source files and the input file(s).

2.     A document file including screenshots showing program execution as a result of test cases.

3.     A document describing your solution containing the following elements: a short problem analysis, main design decisions and assumptions, description of classes, user interface, testing and test plan, error handling, lessons learned and possible future improvements. The size of the document should be of 4 pages, single spaced, font size 12.

 

Calculate the price of your order

Choose an academic level, add pages, and the paper type you want.
To reduce the cost of our essay writing services, select the lengthier deadline.
We can't believe we just said that to you.

550 words
We'll send you the first draft for approval by September 11, 2018 at 10:52 AM
Total price:
$26
The price is based on these factors:
Academic level
Number of pages
Urgency
Basic features
  • Free title page and bibliography
  • Unlimited revisions
  • Plagiarism-free guarantee
  • Money-back guarantee
  • 24/7 support
On-demand options
  • Writer’s samples
  • Part-by-part delivery
  • Overnight delivery
  • Copies of used sources
  • Expert Proofreading
Paper format
  • 275 words per page
  • 12 pt Arial/Times New Roman
  • Double line spacing
  • Any citation style (APA, MLA, Chicago/Turabian, Harvard)

Our guarantees

Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.

Money-back guarantee

You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.

Read more

Zero-plagiarism guarantee

Each paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.

Read more

Free-revision policy

Thanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.

Read more

Privacy policy

Your email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.

Read more

Fair-cooperation guarantee

By sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.

Read more

Why is Purdue Papers the Most Helpful Essay Writing Service for You?

  1. Custom-written and plagiarism-free papers: Our authors create their work from scratch. Before presenting them to clients, we routinely verify them for signs of plagiarism. Our quality assurance group also double-checks and fixes any grammatical errors, assuring that all of our authors adhere to the same standards of writing.
  2. The significance of timely delivery cannot be overstated, and we consistently strive to meet or exceed our clients' deadlines. Regardless of the short time frame, you can count on our writers to get the job done. We always have a team of writers ready to go, even if the deadline is only six hours away.
  3. Customer Satisfaction: Our customer service representatives are the best in the business and have a wealth of knowledge in dealing with clients. All our customer service representatives are trained to listen and reply promptly until you are satisfied with their service. To ensure you're happy, our expert writers will strictly follow the criteria to generate a special report. Our customer service may be contacted by chat, email, or phone. In addition, we provide round-the-clock assistance to all of our clients.
  4. Confidentiality: Our systems are safe, and your information is always protected. We're constantly looking for new facts when it comes to finishing your work. We use a safe and secure payment channel. Since our ordering process is completely anonymous, you don't have to provide any credit card information to place a purchase with us.
  5. Highly Trained Authors: Our writers have received extensive training and are committed to delivering only the best papers. They are fluent in APA, MLA, HARVARD, IEEE, CHICAGO, and AMA referencing styles. To meet your expectations, our skilled writers always pay close attention to your instructions.
  6. Lowered prices: We have set prices that are already discounted. Our prices are the best and affordable for all our esteemed customers.

Let Professionals Take Care of your Academic Paper