SlideShare a Scribd company logo
1 of 4
Download to read offline
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

What's hot

Fundamentals of Software Engineering
Fundamentals of Software Engineering Fundamentals of Software Engineering
Fundamentals of Software Engineering Madhar Khan Pathan
 
Markov Cluster Algorithm & real world application
Markov Cluster Algorithm & real world applicationMarkov Cluster Algorithm & real world application
Markov Cluster Algorithm & real world applicationAndjela Todorovic
 
Analyzing social media networks with NodeXL - Chapter-04 images
Analyzing social media networks with NodeXL - Chapter-04 imagesAnalyzing social media networks with NodeXL - Chapter-04 images
Analyzing social media networks with NodeXL - Chapter-04 imagesMarc Smith
 
Analyzing social media networks with NodeXL - Chapter-03 images
Analyzing social media networks with NodeXL - Chapter-03 imagesAnalyzing social media networks with NodeXL - Chapter-03 images
Analyzing social media networks with NodeXL - Chapter-03 imagesMarc Smith
 
The method of comparing two image files
 The method of comparing two image files The method of comparing two image files
The method of comparing two image filesMinh Anh Nguyen
 
Analyzing social media networks with NodeXL - Chapter-07 Images
Analyzing social media networks with NodeXL - Chapter-07 ImagesAnalyzing social media networks with NodeXL - Chapter-07 Images
Analyzing social media networks with NodeXL - Chapter-07 ImagesMarc Smith
 
Analyzing social media networks with NodeXL - Chapter- 08 images
Analyzing social media networks with NodeXL - Chapter- 08 imagesAnalyzing social media networks with NodeXL - Chapter- 08 images
Analyzing social media networks with NodeXL - Chapter- 08 imagesMarc Smith
 

What's hot (15)

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

Viewers also liked

Herramientas colaborativas administración de cursos de formación online
Herramientas colaborativas administración de cursos de formación onlineHerramientas colaborativas administración de cursos de formación online
Herramientas colaborativas administración de cursos de formación onlineDIONISIA BERMEJO SANCHEZ
 
Entrevista Hector Robles revista MED PLUS n99
Entrevista Hector Robles revista MED PLUS n99Entrevista Hector Robles revista MED PLUS n99
Entrevista Hector Robles revista MED PLUS n99Hector Robles
 
CMIS 320 RESEARCH PAPER
CMIS 320 RESEARCH PAPERCMIS 320 RESEARCH PAPER
CMIS 320 RESEARCH PAPERHamesKellor
 
CMIT 321 FINAL EXAM (2016 VERSION)
CMIT 321 FINAL EXAM (2016 VERSION)CMIT 321 FINAL EXAM (2016 VERSION)
CMIT 321 FINAL EXAM (2016 VERSION)HamesKellor
 
CMIT 350 FINAL EXAM CCNA CERTIFICATION PRACTICE EXAM
CMIT 350 FINAL EXAM CCNA CERTIFICATION PRACTICE EXAMCMIT 350 FINAL EXAM CCNA CERTIFICATION PRACTICE EXAM
CMIT 350 FINAL EXAM CCNA CERTIFICATION PRACTICE EXAMHamesKellor
 
CMIT 321 WEEK 2 QUIZ
CMIT 321 WEEK 2 QUIZCMIT 321 WEEK 2 QUIZ
CMIT 321 WEEK 2 QUIZHamesKellor
 
Финал конкурса "Учитель года-2016"
Финал конкурса "Учитель года-2016"Финал конкурса "Учитель года-2016"
Финал конкурса "Учитель года-2016"Zinaida Alexandrova
 
Todo proyecto es un trabajo, pero no todo trabajo es un proyectos
Todo proyecto es un trabajo, pero no todo trabajo es un proyectosTodo proyecto es un trabajo, pero no todo trabajo es un proyectos
Todo proyecto es un trabajo, pero no todo trabajo es un proyectosAndrea Vera Vilatuña
 
Бібліографічний запис-Бібліографічний опис Gost7 1-06
Бібліографічний запис-Бібліографічний опис Gost7 1-06Бібліографічний запис-Бібліографічний опис Gost7 1-06
Бібліографічний запис-Бібліографічний опис Gost7 1-06Lana Nazarieva
 
Child labour in pakistan
Child labour in pakistan Child labour in pakistan
Child labour in pakistan imsciences
 
Ftp (file transfer protocol)
Ftp (file transfer protocol)Ftp (file transfer protocol)
Ftp (file transfer protocol)Raghu nath
 

Viewers also liked (13)

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

Similar to Social Graphs Application

Graph Analyses with Python and NetworkX
Graph Analyses with Python and NetworkXGraph Analyses with Python and NetworkX
Graph Analyses with Python and NetworkXBenjamin Bengfort
 
Graph convolutional networks in apache spark
Graph convolutional networks in apache sparkGraph convolutional networks in apache spark
Graph convolutional networks in apache sparkEmiliano Martinez Sanchez
 
Social network-analysis-in-python
Social network-analysis-in-pythonSocial network-analysis-in-python
Social network-analysis-in-pythonJoe OntheRocks
 
Analysis of Impact of Graph Theory in Computer Application
Analysis of Impact of Graph Theory in Computer ApplicationAnalysis of Impact of Graph Theory in Computer Application
Analysis of Impact of Graph Theory in Computer ApplicationIRJET Journal
 
Data visualization using R
Data visualization using RData visualization using R
Data visualization using RUmmiya Mohammedi
 
RDataMining slides-network-analysis-with-r
RDataMining slides-network-analysis-with-rRDataMining slides-network-analysis-with-r
RDataMining slides-network-analysis-with-rYanchang Zhao
 
A SYSTEM FOR VISUALIZATION OF BIG ATTRIBUTED HIERARCHICAL GRAPHS
A SYSTEM FOR VISUALIZATION OF BIG ATTRIBUTED HIERARCHICAL GRAPHSA SYSTEM FOR VISUALIZATION OF BIG ATTRIBUTED HIERARCHICAL GRAPHS
A SYSTEM FOR VISUALIZATION OF BIG ATTRIBUTED HIERARCHICAL GRAPHSIJCNCJournal
 
Transformations and actions a visual guide training
Transformations and actions a visual guide trainingTransformations and actions a visual guide training
Transformations and actions a visual guide trainingSpark Summit
 
Using spectral radius ratio for node degree
Using spectral radius ratio for node degreeUsing spectral radius ratio for node degree
Using spectral radius ratio for node degreeIJCNCJournal
 
Challenges in Migrating Imperative Deep Learning Programs to Graph Execution:...
Challenges in Migrating Imperative Deep Learning Programs to Graph Execution:...Challenges in Migrating Imperative Deep Learning Programs to Graph Execution:...
Challenges in Migrating Imperative Deep Learning Programs to Graph Execution:...Raffi Khatchadourian
 
Create swath profiles in GRASS GIS
Create swath profiles in GRASS GISCreate swath profiles in GRASS GIS
Create swath profiles in GRASS GISSkyler Sorsby
 
Numerical_Analysis_of_Semiconductor_PN_Junctions_U.pdf
Numerical_Analysis_of_Semiconductor_PN_Junctions_U.pdfNumerical_Analysis_of_Semiconductor_PN_Junctions_U.pdf
Numerical_Analysis_of_Semiconductor_PN_Junctions_U.pdfDeveshSinghal13
 
Abstracting Strings For Model Checking Of C Programs
Abstracting Strings For Model Checking Of C ProgramsAbstracting Strings For Model Checking Of C Programs
Abstracting Strings For Model Checking Of C ProgramsMartha Brown
 
Final Design Project - Memo (with GUI)
Final Design Project - Memo (with GUI)Final Design Project - Memo (with GUI)
Final Design Project - Memo (with GUI)Alex Larcheveque
 
Modeling Aspects with AP&P Components
Modeling Aspects with AP&P ComponentsModeling Aspects with AP&P Components
Modeling Aspects with AP&P Componentsmukhtarhudaya
 

Similar to Social Graphs Application (20)

HalifaxNGGs
HalifaxNGGsHalifaxNGGs
HalifaxNGGs
 
Graph Analyses with Python and NetworkX
Graph Analyses with Python and NetworkXGraph Analyses with Python and NetworkX
Graph Analyses with Python and NetworkX
 
Graph convolutional networks in apache spark
Graph convolutional networks in apache sparkGraph convolutional networks in apache spark
Graph convolutional networks in apache spark
 
Social network-analysis-in-python
Social network-analysis-in-pythonSocial network-analysis-in-python
Social network-analysis-in-python
 
Analysis of Impact of Graph Theory in Computer Application
Analysis of Impact of Graph Theory in Computer ApplicationAnalysis of Impact of Graph Theory in Computer Application
Analysis of Impact of Graph Theory in Computer Application
 
Intake 37 6
Intake 37 6Intake 37 6
Intake 37 6
 
Data visualization using R
Data visualization using RData visualization using R
Data visualization using R
 
RDataMining slides-network-analysis-with-r
RDataMining slides-network-analysis-with-rRDataMining slides-network-analysis-with-r
RDataMining slides-network-analysis-with-r
 
Intake 38 6
Intake 38 6Intake 38 6
Intake 38 6
 
A SYSTEM FOR VISUALIZATION OF BIG ATTRIBUTED HIERARCHICAL GRAPHS
A SYSTEM FOR VISUALIZATION OF BIG ATTRIBUTED HIERARCHICAL GRAPHSA SYSTEM FOR VISUALIZATION OF BIG ATTRIBUTED HIERARCHICAL GRAPHS
A SYSTEM FOR VISUALIZATION OF BIG ATTRIBUTED HIERARCHICAL GRAPHS
 
Transformations and actions a visual guide training
Transformations and actions a visual guide trainingTransformations and actions a visual guide training
Transformations and actions a visual guide training
 
Using spectral radius ratio for node degree
Using spectral radius ratio for node degreeUsing spectral radius ratio for node degree
Using spectral radius ratio for node degree
 
Challenges in Migrating Imperative Deep Learning Programs to Graph Execution:...
Challenges in Migrating Imperative Deep Learning Programs to Graph Execution:...Challenges in Migrating Imperative Deep Learning Programs to Graph Execution:...
Challenges in Migrating Imperative Deep Learning Programs to Graph Execution:...
 
JFree chart
JFree chartJFree chart
JFree chart
 
Create swath profiles in GRASS GIS
Create swath profiles in GRASS GISCreate swath profiles in GRASS GIS
Create swath profiles in GRASS GIS
 
Numerical_Analysis_of_Semiconductor_PN_Junctions_U.pdf
Numerical_Analysis_of_Semiconductor_PN_Junctions_U.pdfNumerical_Analysis_of_Semiconductor_PN_Junctions_U.pdf
Numerical_Analysis_of_Semiconductor_PN_Junctions_U.pdf
 
R basics
R basicsR basics
R basics
 
Abstracting Strings For Model Checking Of C Programs
Abstracting Strings For Model Checking Of C ProgramsAbstracting Strings For Model Checking Of C Programs
Abstracting Strings For Model Checking Of C Programs
 
Final Design Project - Memo (with GUI)
Final Design Project - Memo (with GUI)Final Design Project - Memo (with GUI)
Final Design Project - Memo (with GUI)
 
Modeling Aspects with AP&P Components
Modeling Aspects with AP&P ComponentsModeling Aspects with AP&P Components
Modeling Aspects with AP&P Components
 

More from HamesKellor

CMST 290 FINAL EXAM
CMST 290 FINAL EXAMCMST 290 FINAL EXAM
CMST 290 FINAL EXAMHamesKellor
 
CMST 301 PROJECT 1 CASE STUDY
CMST 301 PROJECT 1 CASE STUDYCMST 301 PROJECT 1 CASE STUDY
CMST 301 PROJECT 1 CASE STUDYHamesKellor
 
CMSC 350 PROJECT 3
CMSC 350 PROJECT 3CMSC 350 PROJECT 3
CMSC 350 PROJECT 3HamesKellor
 
CMSC 350 PROJECT 4
CMSC 350 PROJECT 4 CMSC 350 PROJECT 4
CMSC 350 PROJECT 4 HamesKellor
 
CMSC 350 PROJECT 4
CMSC 350 PROJECT 4CMSC 350 PROJECT 4
CMSC 350 PROJECT 4HamesKellor
 
CMSC 350 PROJECT 1
CMSC 350 PROJECT 1CMSC 350 PROJECT 1
CMSC 350 PROJECT 1HamesKellor
 
CMSC 350 HOMEWORK 2
CMSC 350 HOMEWORK 2CMSC 350 HOMEWORK 2
CMSC 350 HOMEWORK 2HamesKellor
 
CMSC 350 HOMEWORK 3
CMSC 350 HOMEWORK 3CMSC 350 HOMEWORK 3
CMSC 350 HOMEWORK 3HamesKellor
 
CMSC 350 HOMEWORK 1
CMSC 350 HOMEWORK 1CMSC 350 HOMEWORK 1
CMSC 350 HOMEWORK 1HamesKellor
 
CMSC 335 HOMEWORK 3
CMSC 335 HOMEWORK 3CMSC 335 HOMEWORK 3
CMSC 335 HOMEWORK 3HamesKellor
 
CMSC 330 PROJECT 1
CMSC 330 PROJECT 1CMSC 330 PROJECT 1
CMSC 330 PROJECT 1HamesKellor
 
CMSC 335 FINAL PROJECT
CMSC 335 FINAL PROJECTCMSC 335 FINAL PROJECT
CMSC 335 FINAL PROJECTHamesKellor
 
CMIT 425 RISK ASSESSMENT PAPER
CMIT 425 RISK ASSESSMENT PAPERCMIT 425 RISK ASSESSMENT PAPER
CMIT 425 RISK ASSESSMENT PAPERHamesKellor
 
CMIT 391 LINUX IMPLEMENTATION PROPOSAL
CMIT 391 LINUX IMPLEMENTATION PROPOSALCMIT 391 LINUX IMPLEMENTATION PROPOSAL
CMIT 391 LINUX IMPLEMENTATION PROPOSALHamesKellor
 
CMIT/265 FINAL PROJECT NETWORK DESIGN PROPOSAL
CMIT/265 FINAL PROJECT NETWORK DESIGN PROPOSALCMIT/265 FINAL PROJECT NETWORK DESIGN PROPOSAL
CMIT/265 FINAL PROJECT NETWORK DESIGN PROPOSALHamesKellor
 
CMIT 321 WEEK 2 QUIZ.
CMIT 321 WEEK 2 QUIZ.CMIT 321 WEEK 2 QUIZ.
CMIT 321 WEEK 2 QUIZ.HamesKellor
 
CMIT 370 FINAL EXAM
CMIT 370 FINAL EXAMCMIT 370 FINAL EXAM
CMIT 370 FINAL EXAMHamesKellor
 

More from HamesKellor (20)

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

Recently uploaded

Call Girls In Sikandarpur Gurgaon ❤️8860477959_Russian 100% Genuine Escorts I...
Call Girls In Sikandarpur Gurgaon ❤️8860477959_Russian 100% Genuine Escorts I...Call Girls In Sikandarpur Gurgaon ❤️8860477959_Russian 100% Genuine Escorts I...
Call Girls In Sikandarpur Gurgaon ❤️8860477959_Russian 100% Genuine Escorts I...lizamodels9
 
VIP Call Girl Jamshedpur Aashi 8250192130 Independent Escort Service Jamshedpur
VIP Call Girl Jamshedpur Aashi 8250192130 Independent Escort Service JamshedpurVIP Call Girl Jamshedpur Aashi 8250192130 Independent Escort Service Jamshedpur
VIP Call Girl Jamshedpur Aashi 8250192130 Independent Escort Service JamshedpurSuhani Kapoor
 
Lowrate Call Girls In Laxmi Nagar Delhi ❤️8860477959 Escorts 100% Genuine Ser...
Lowrate Call Girls In Laxmi Nagar Delhi ❤️8860477959 Escorts 100% Genuine Ser...Lowrate Call Girls In Laxmi Nagar Delhi ❤️8860477959 Escorts 100% Genuine Ser...
Lowrate Call Girls In Laxmi Nagar Delhi ❤️8860477959 Escorts 100% Genuine Ser...lizamodels9
 
Grateful 7 speech thanking everyone that has helped.pdf
Grateful 7 speech thanking everyone that has helped.pdfGrateful 7 speech thanking everyone that has helped.pdf
Grateful 7 speech thanking everyone that has helped.pdfPaul Menig
 
RE Capital's Visionary Leadership under Newman Leech
RE Capital's Visionary Leadership under Newman LeechRE Capital's Visionary Leadership under Newman Leech
RE Capital's Visionary Leadership under Newman LeechNewman George Leech
 
Sales & Marketing Alignment: How to Synergize for Success
Sales & Marketing Alignment: How to Synergize for SuccessSales & Marketing Alignment: How to Synergize for Success
Sales & Marketing Alignment: How to Synergize for SuccessAggregage
 
M.C Lodges -- Guest House in Jhang.
M.C Lodges --  Guest House in Jhang.M.C Lodges --  Guest House in Jhang.
M.C Lodges -- Guest House in Jhang.Aaiza Hassan
 
Progress Report - Oracle Database Analyst Summit
Progress  Report - Oracle Database Analyst SummitProgress  Report - Oracle Database Analyst Summit
Progress Report - Oracle Database Analyst SummitHolger Mueller
 
Vip Dewas Call Girls #9907093804 Contact Number Escorts Service Dewas
Vip Dewas Call Girls #9907093804 Contact Number Escorts Service DewasVip Dewas Call Girls #9907093804 Contact Number Escorts Service Dewas
Vip Dewas Call Girls #9907093804 Contact Number Escorts Service Dewasmakika9823
 
2024 Numerator Consumer Study of Cannabis Usage
2024 Numerator Consumer Study of Cannabis Usage2024 Numerator Consumer Study of Cannabis Usage
2024 Numerator Consumer Study of Cannabis UsageNeil Kimberley
 
Call Girls in Mehrauli Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Mehrauli Delhi 💯Call Us 🔝8264348440🔝Call Girls in Mehrauli Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Mehrauli Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
/:Call Girls In Indirapuram Ghaziabad ➥9990211544 Independent Best Escorts In...
/:Call Girls In Indirapuram Ghaziabad ➥9990211544 Independent Best Escorts In.../:Call Girls In Indirapuram Ghaziabad ➥9990211544 Independent Best Escorts In...
/:Call Girls In Indirapuram Ghaziabad ➥9990211544 Independent Best Escorts In...lizamodels9
 
Pitch Deck Teardown: NOQX's $200k Pre-seed deck
Pitch Deck Teardown: NOQX's $200k Pre-seed deckPitch Deck Teardown: NOQX's $200k Pre-seed deck
Pitch Deck Teardown: NOQX's $200k Pre-seed deckHajeJanKamps
 
(8264348440) 🔝 Call Girls In Mahipalpur 🔝 Delhi NCR
(8264348440) 🔝 Call Girls In Mahipalpur 🔝 Delhi NCR(8264348440) 🔝 Call Girls In Mahipalpur 🔝 Delhi NCR
(8264348440) 🔝 Call Girls In Mahipalpur 🔝 Delhi NCRsoniya singh
 
Monte Carlo simulation : Simulation using MCSM
Monte Carlo simulation : Simulation using MCSMMonte Carlo simulation : Simulation using MCSM
Monte Carlo simulation : Simulation using MCSMRavindra Nath Shukla
 
FULL ENJOY - 9953040155 Call Girls in Chhatarpur | Delhi
FULL ENJOY - 9953040155 Call Girls in Chhatarpur | DelhiFULL ENJOY - 9953040155 Call Girls in Chhatarpur | Delhi
FULL ENJOY - 9953040155 Call Girls in Chhatarpur | DelhiMalviyaNagarCallGirl
 
VIP Kolkata Call Girl Howrah 👉 8250192130 Available With Room
VIP Kolkata Call Girl Howrah 👉 8250192130  Available With RoomVIP Kolkata Call Girl Howrah 👉 8250192130  Available With Room
VIP Kolkata Call Girl Howrah 👉 8250192130 Available With Roomdivyansh0kumar0
 
Marketing Management Business Plan_My Sweet Creations
Marketing Management Business Plan_My Sweet CreationsMarketing Management Business Plan_My Sweet Creations
Marketing Management Business Plan_My Sweet Creationsnakalysalcedo61
 
Call Girls Miyapur 7001305949 all area service COD available Any Time
Call Girls Miyapur 7001305949 all area service COD available Any TimeCall Girls Miyapur 7001305949 all area service COD available Any Time
Call Girls Miyapur 7001305949 all area service COD available Any Timedelhimodelshub1
 

Recently uploaded (20)

Call Girls In Sikandarpur Gurgaon ❤️8860477959_Russian 100% Genuine Escorts I...
Call Girls In Sikandarpur Gurgaon ❤️8860477959_Russian 100% Genuine Escorts I...Call Girls In Sikandarpur Gurgaon ❤️8860477959_Russian 100% Genuine Escorts I...
Call Girls In Sikandarpur Gurgaon ❤️8860477959_Russian 100% Genuine Escorts I...
 
VIP Call Girl Jamshedpur Aashi 8250192130 Independent Escort Service Jamshedpur
VIP Call Girl Jamshedpur Aashi 8250192130 Independent Escort Service JamshedpurVIP Call Girl Jamshedpur Aashi 8250192130 Independent Escort Service Jamshedpur
VIP Call Girl Jamshedpur Aashi 8250192130 Independent Escort Service Jamshedpur
 
Lowrate Call Girls In Laxmi Nagar Delhi ❤️8860477959 Escorts 100% Genuine Ser...
Lowrate Call Girls In Laxmi Nagar Delhi ❤️8860477959 Escorts 100% Genuine Ser...Lowrate Call Girls In Laxmi Nagar Delhi ❤️8860477959 Escorts 100% Genuine Ser...
Lowrate Call Girls In Laxmi Nagar Delhi ❤️8860477959 Escorts 100% Genuine Ser...
 
Grateful 7 speech thanking everyone that has helped.pdf
Grateful 7 speech thanking everyone that has helped.pdfGrateful 7 speech thanking everyone that has helped.pdf
Grateful 7 speech thanking everyone that has helped.pdf
 
RE Capital's Visionary Leadership under Newman Leech
RE Capital's Visionary Leadership under Newman LeechRE Capital's Visionary Leadership under Newman Leech
RE Capital's Visionary Leadership under Newman Leech
 
Sales & Marketing Alignment: How to Synergize for Success
Sales & Marketing Alignment: How to Synergize for SuccessSales & Marketing Alignment: How to Synergize for Success
Sales & Marketing Alignment: How to Synergize for Success
 
M.C Lodges -- Guest House in Jhang.
M.C Lodges --  Guest House in Jhang.M.C Lodges --  Guest House in Jhang.
M.C Lodges -- Guest House in Jhang.
 
Progress Report - Oracle Database Analyst Summit
Progress  Report - Oracle Database Analyst SummitProgress  Report - Oracle Database Analyst Summit
Progress Report - Oracle Database Analyst Summit
 
Vip Dewas Call Girls #9907093804 Contact Number Escorts Service Dewas
Vip Dewas Call Girls #9907093804 Contact Number Escorts Service DewasVip Dewas Call Girls #9907093804 Contact Number Escorts Service Dewas
Vip Dewas Call Girls #9907093804 Contact Number Escorts Service Dewas
 
2024 Numerator Consumer Study of Cannabis Usage
2024 Numerator Consumer Study of Cannabis Usage2024 Numerator Consumer Study of Cannabis Usage
2024 Numerator Consumer Study of Cannabis Usage
 
Call Girls in Mehrauli Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Mehrauli Delhi 💯Call Us 🔝8264348440🔝Call Girls in Mehrauli Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Mehrauli Delhi 💯Call Us 🔝8264348440🔝
 
/:Call Girls In Indirapuram Ghaziabad ➥9990211544 Independent Best Escorts In...
/:Call Girls In Indirapuram Ghaziabad ➥9990211544 Independent Best Escorts In.../:Call Girls In Indirapuram Ghaziabad ➥9990211544 Independent Best Escorts In...
/:Call Girls In Indirapuram Ghaziabad ➥9990211544 Independent Best Escorts In...
 
Pitch Deck Teardown: NOQX's $200k Pre-seed deck
Pitch Deck Teardown: NOQX's $200k Pre-seed deckPitch Deck Teardown: NOQX's $200k Pre-seed deck
Pitch Deck Teardown: NOQX's $200k Pre-seed deck
 
(8264348440) 🔝 Call Girls In Mahipalpur 🔝 Delhi NCR
(8264348440) 🔝 Call Girls In Mahipalpur 🔝 Delhi NCR(8264348440) 🔝 Call Girls In Mahipalpur 🔝 Delhi NCR
(8264348440) 🔝 Call Girls In Mahipalpur 🔝 Delhi NCR
 
Monte Carlo simulation : Simulation using MCSM
Monte Carlo simulation : Simulation using MCSMMonte Carlo simulation : Simulation using MCSM
Monte Carlo simulation : Simulation using MCSM
 
FULL ENJOY - 9953040155 Call Girls in Chhatarpur | Delhi
FULL ENJOY - 9953040155 Call Girls in Chhatarpur | DelhiFULL ENJOY - 9953040155 Call Girls in Chhatarpur | Delhi
FULL ENJOY - 9953040155 Call Girls in Chhatarpur | Delhi
 
VIP Kolkata Call Girl Howrah 👉 8250192130 Available With Room
VIP Kolkata Call Girl Howrah 👉 8250192130  Available With RoomVIP Kolkata Call Girl Howrah 👉 8250192130  Available With Room
VIP Kolkata Call Girl Howrah 👉 8250192130 Available With Room
 
Marketing Management Business Plan_My Sweet Creations
Marketing Management Business Plan_My Sweet CreationsMarketing Management Business Plan_My Sweet Creations
Marketing Management Business Plan_My Sweet Creations
 
Call Girls Miyapur 7001305949 all area service COD available Any Time
Call Girls Miyapur 7001305949 all area service COD available Any TimeCall Girls Miyapur 7001305949 all area service COD available Any Time
Call Girls Miyapur 7001305949 all area service COD available Any Time
 
KestrelPro Flyer Japan IT Week 2024 (English)
KestrelPro Flyer Japan IT Week 2024 (English)KestrelPro Flyer Japan IT Week 2024 (English)
KestrelPro Flyer Japan IT Week 2024 (English)
 

Social Graphs Application

  • 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