SlideShare a Scribd company logo
Buy here:
http://theperfecthomework.com/cmsc-350-final-project/
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.
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 graphs’ 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
This value measures how close wrapped are the persons in the social graph around the
given person.
averageClustering for the social graph is 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.
isAcquaintance determines whether two persons supplied as parameters can establish
social contact direct or
through a chain of transitive acquaintance relationships (in terms of graphs it means that
there is a path
between the two nodes representing the two persons).
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 data.txt. 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)
isIndirectAcquaintance, (7) addVertex, (8) addEdge, (9) printEdges and (0) 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 the data input file content, its format and the corresponding social graph
layout is shown in the attached file SocialGraph_Example.pdf.
The programs should compile without errors.
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

More Related Content

PDF
Using Mathematica for computational learning
PPSX
Geographical information system unit 6
PDF
Iterative Closest Point Algorithm - analysis and implementation
PPTX
Ppt 2 d ploting k10998
PDF
poster
PPTX
Graph theory
PPTX
System approach in civil engg slideshare.vvs
PPTX
Parameters of t SNE
Using Mathematica for computational learning
Geographical information system unit 6
Iterative Closest Point Algorithm - analysis and implementation
Ppt 2 d ploting k10998
poster
Graph theory
System approach in civil engg slideshare.vvs
Parameters of t SNE

What's hot (15)

PPT
Fundamentals of Software Engineering
PDF
Matlab vectors
PDF
Markov Cluster Algorithm & real world application
DOCX
Excel Training
PDF
Project Poster
PPT
Analyzing social media networks with NodeXL - Chapter-04 images
PPT
Analyzing social media networks with NodeXL - Chapter-03 images
PDF
Project 1
PDF
Decorator Design Pattern in C#
PDF
Singleton Design Pattern in C#
PDF
Cause effect graphing.ppt
PDF
Project 2
DOCX
The method of comparing two image files
PPT
Analyzing social media networks with NodeXL - Chapter-07 Images
PPT
Analyzing social media networks with NodeXL - Chapter- 08 images
Fundamentals of Software Engineering
Matlab vectors
Markov Cluster Algorithm & real world application
Excel Training
Project Poster
Analyzing social media networks with NodeXL - Chapter-04 images
Analyzing social media networks with NodeXL - Chapter-03 images
Project 1
Decorator Design Pattern in C#
Singleton Design Pattern in C#
Cause effect graphing.ppt
Project 2
The method of comparing two image files
Analyzing social media networks with NodeXL - Chapter-07 Images
Analyzing social media networks with NodeXL - Chapter- 08 images
Ad

Viewers also liked (13)

PPT
Herramientas colaborativas administración de cursos de formación online
PDF
Entrevista Hector Robles revista MED PLUS n99
PDF
CMIS 320 RESEARCH PAPER
PDF
CMIT 321 FINAL EXAM (2016 VERSION)
PDF
CMIT 350 FINAL EXAM CCNA CERTIFICATION PRACTICE EXAM
PDF
CMIT 321 WEEK 2 QUIZ
PPTX
Финал конкурса "Учитель года-2016"
PDF
Todo proyecto es un trabajo, pero no todo trabajo es un proyectos
PPT
Методы и программа исследования _ занятие Тамары Кулинкович _ www.businessres...
PPT
Бібліографічний запис-Бібліографічний опис Gost7 1-06
PPTX
Highlights: 2016 Enrollment Estimates
PPTX
Child labour in pakistan
PDF
Ftp (file transfer protocol)
Herramientas colaborativas administración de cursos de formación online
Entrevista Hector Robles revista MED PLUS n99
CMIS 320 RESEARCH PAPER
CMIT 321 FINAL EXAM (2016 VERSION)
CMIT 350 FINAL EXAM CCNA CERTIFICATION PRACTICE EXAM
CMIT 321 WEEK 2 QUIZ
Финал конкурса "Учитель года-2016"
Todo proyecto es un trabajo, pero no todo trabajo es un proyectos
Методы и программа исследования _ занятие Тамары Кулинкович _ www.businessres...
Бібліографічний запис-Бібліографічний опис Gost7 1-06
Highlights: 2016 Enrollment Estimates
Child labour in pakistan
Ftp (file transfer protocol)
Ad

Similar to CMSC 350 FINAL PROJECT (20)

PPTX
UNIT-I - Coding.pptx
PDF
05 20275 computational solution...
PDF
Social network-analysis-in-python
PPT
Graphs.pptGraphs.pptGraphs.pptGraphs.pptGraphs.pptGraphs.ppt
PPTX
Data Structure and algorithms - Graph1.pptx
PDF
Graph Analyses with Python and NetworkX
PDF
ScaleGraph - A High-Performance Library for Billion-Scale Graph Analytics
PDF
graph representation.pdf
PPTX
Data Structures and Agorithm: DS 21 Graph Theory.pptx
PPTX
Semantic Data Management in Graph Databases
PPTX
Apache Spark GraphX highlights.
PPTX
UNIT IV NON LINEAR DATA STRUCTURES - GRAPH
PPTX
Graph Data Structure on social media analysis
PPTX
ICDE-2015 Shortest Path Traversal Optimization and Analysis for Large Graph C...
PDF
The Graph Abstract Data Type-DATA STRUCTURE.pdf
PDF
Can someone provide a solution for this assignmentPurpose of This.pdf
PPT
Lecture 5b graphs and hashing
PPTX
Data Structure of computer science and technology
PDF
What Makes Graph Queries Difficult?
PDF
Large Scale Graph Processing with Apache Giraph
UNIT-I - Coding.pptx
05 20275 computational solution...
Social network-analysis-in-python
Graphs.pptGraphs.pptGraphs.pptGraphs.pptGraphs.pptGraphs.ppt
Data Structure and algorithms - Graph1.pptx
Graph Analyses with Python and NetworkX
ScaleGraph - A High-Performance Library for Billion-Scale Graph Analytics
graph representation.pdf
Data Structures and Agorithm: DS 21 Graph Theory.pptx
Semantic Data Management in Graph Databases
Apache Spark GraphX highlights.
UNIT IV NON LINEAR DATA STRUCTURES - GRAPH
Graph Data Structure on social media analysis
ICDE-2015 Shortest Path Traversal Optimization and Analysis for Large Graph C...
The Graph Abstract Data Type-DATA STRUCTURE.pdf
Can someone provide a solution for this assignmentPurpose of This.pdf
Lecture 5b graphs and hashing
Data Structure of computer science and technology
What Makes Graph Queries Difficult?
Large Scale Graph Processing with Apache Giraph

More from HamesKellor (20)

PDF
CMST 290 FINAL EXAM
PDF
CMST 301 PROJECT 1 CASE STUDY
PDF
CMSC 350 PROJECT 3
PDF
CMSC 350 PROJECT 4
PDF
CMSC 350 PROJECT 4
PDF
CMSC 350 PROJECT 1
PDF
CMSC 350 HOMEWORK 2
PDF
CMSC 350 HOMEWORK 3
PDF
CMSC 350 HOMEWORK 1
PDF
CMSC 335 HOMEWORK 3
PDF
CMSC 330 PROJECT 1
PDF
CMSC 335 FINAL PROJECT
PDF
CMSC 330 QUIZ 4
PDF
CMIT 425 RISK ASSESSMENT PAPER
PDF
CMIT 391 LINUX IMPLEMENTATION PROPOSAL
PDF
CMIT/265 FINAL PROJECT NETWORK DESIGN PROPOSAL
PDF
CMIT 321 WEEK 2 QUIZ.
PDF
CMIT 370 FINAL EXAM
PDF
CMIT 321 QUIZ 4
PDF
CMIT 321 QUIZ 7
CMST 290 FINAL EXAM
CMST 301 PROJECT 1 CASE STUDY
CMSC 350 PROJECT 3
CMSC 350 PROJECT 4
CMSC 350 PROJECT 4
CMSC 350 PROJECT 1
CMSC 350 HOMEWORK 2
CMSC 350 HOMEWORK 3
CMSC 350 HOMEWORK 1
CMSC 335 HOMEWORK 3
CMSC 330 PROJECT 1
CMSC 335 FINAL PROJECT
CMSC 330 QUIZ 4
CMIT 425 RISK ASSESSMENT PAPER
CMIT 391 LINUX IMPLEMENTATION PROPOSAL
CMIT/265 FINAL PROJECT NETWORK DESIGN PROPOSAL
CMIT 321 WEEK 2 QUIZ.
CMIT 370 FINAL EXAM
CMIT 321 QUIZ 4
CMIT 321 QUIZ 7

Recently uploaded (20)

PDF
Outsourced Audit & Assurance in USA Why Globus Finanza is Your Trusted Choice
PPTX
HR Introduction Slide (1).pptx on hr intro
PPTX
Belch_12e_PPT_Ch18_Accessible_university.pptx
PDF
kom-180-proposal-for-a-directive-amending-directive-2014-45-eu-and-directive-...
PDF
COST SHEET- Tender and Quotation unit 2.pdf
PPT
Lecture 3344;;,,(,(((((((((((((((((((((((
DOCX
unit 1 COST ACCOUNTING AND COST SHEET
PPTX
Board-Reporting-Package-by-Umbrex-5-23-23.pptx
PDF
Unit 1 Cost Accounting - Cost sheet
PDF
Cours de Système d'information about ERP.pdf
PPTX
2025 Product Deck V1.0.pptxCATALOGTCLCIA
PPTX
New Microsoft PowerPoint Presentation - Copy.pptx
PPTX
Dragon_Fruit_Cultivation_in Nepal ppt.pptx
PDF
Solara Labs: Empowering Health through Innovative Nutraceutical Solutions
PPTX
CkgxkgxydkydyldylydlydyldlyddolydyoyyU2.pptx
PDF
BsN 7th Sem Course GridNNNNNNNN CCN.pdf
PDF
Ôn tập tiếng anh trong kinh doanh nâng cao
PPTX
job Avenue by vinith.pptxvnbvnvnvbnvbnbmnbmbh
PDF
How to Get Business Funding for Small Business Fast
PDF
Roadmap Map-digital Banking feature MB,IB,AB
Outsourced Audit & Assurance in USA Why Globus Finanza is Your Trusted Choice
HR Introduction Slide (1).pptx on hr intro
Belch_12e_PPT_Ch18_Accessible_university.pptx
kom-180-proposal-for-a-directive-amending-directive-2014-45-eu-and-directive-...
COST SHEET- Tender and Quotation unit 2.pdf
Lecture 3344;;,,(,(((((((((((((((((((((((
unit 1 COST ACCOUNTING AND COST SHEET
Board-Reporting-Package-by-Umbrex-5-23-23.pptx
Unit 1 Cost Accounting - Cost sheet
Cours de Système d'information about ERP.pdf
2025 Product Deck V1.0.pptxCATALOGTCLCIA
New Microsoft PowerPoint Presentation - Copy.pptx
Dragon_Fruit_Cultivation_in Nepal ppt.pptx
Solara Labs: Empowering Health through Innovative Nutraceutical Solutions
CkgxkgxydkydyldylydlydyldlyddolydyoyyU2.pptx
BsN 7th Sem Course GridNNNNNNNN CCN.pdf
Ôn tập tiếng anh trong kinh doanh nâng cao
job Avenue by vinith.pptxvnbvnvnvbnvbnbmnbmbh
How to Get Business Funding for Small Business Fast
Roadmap Map-digital Banking feature MB,IB,AB

CMSC 350 FINAL PROJECT

  • 1. Buy here: http://theperfecthomework.com/cmsc-350-final-project/ 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. 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 graphs’ 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.
  • 2. 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
  • 3. This value measures how close wrapped are the persons in the social graph around the given person. averageClustering for the social graph is 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. isAcquaintance determines whether two persons supplied as parameters can establish social contact direct or through a chain of transitive acquaintance relationships (in terms of graphs it means that there is a path between the two nodes representing the two persons). 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 data.txt. 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) isIndirectAcquaintance, (7) addVertex, (8) addEdge, (9) printEdges and (0) 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 the data input file content, its format and the corresponding social graph layout is shown in the attached file SocialGraph_Example.pdf. The programs should compile without errors. Notes.
  • 4. 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