SlideShare ist ein Scribd-Unternehmen logo
1 von 33
Using Shortest Path problem to study
social networks
nipun
Social network
HOW DOES A DISEASE SPREAD IN A
NETWORK?
Simulation pseudo-code
infect a random person
for neighbor in neighbours:
rand = randBetween(0,1):#uniform
if (rand <= .30):
infect the person
elseif(rand > .30):
do not infect the person
Number of people with the disease
Frequency
Probability of contacting the
disease
.30
Number of simulations 1000
Average # sick patients 42/350
Simulating the spread of a disease in a network
VACCINATION
How to stop the disease from spreading?
RANDOM VACCINATION
How to stop the disease from spreading?
Simulation pseudo-code
remove n random people from the network
infect a random person
for neighbor in neighbours:
rand = randBetween(0,1):#uniform
if (rand <= .30):
infect the person
elseif(rand > .30):
do not infect the person
Number of people with the disease
Frequency
Probability of contacting the
disease
.30
Number of simulations 1000
Average # sick patients 33/350
# of vaccinations 50
Simulating the spread of a disease in a network
– random vaccination
This was 300
in the
previous
histogram.
Nothing in
the range
90-100
VACCINATE THE MORE CENTRAL
NODES
How to stop the disease from spreading?
Measures of centrality of a node
1. Closeness Centrality
2. Clustering coefficient
3. Degree
Closeness Centrality
• Closeness centrality of the node = Sum of the
lengths of the shortest path from one node to
all the other nodes
How to find the shortest path?
• In an undirected graph where all the nodes
are equidistant (all distances = 1)
• Breadth first search
Breath first search
1. Start with Beth
2. Distance between Beth and her immediate
neighbor is 1
3. Distance between their immediate neighbor
and Beth is two
4. Distance between their immediate neighbor
and Beth is three
Closeness centrality is the sum
of all these numbers
Beth’s closeness
centrality is 24
Simulation pseudo-code
remove n closest people from network
infect a random person
for neighbor in neighbours:
rand = randBetween(0,1):#uniform
if (rand <= .30):
infect the person
elseif(rand > .30):
do not infect the person
Number of people with the disease
Frequency
Random vaccination Closeness centrality
Probability of contacting the
disease
.30 .30
Number of simulations 1000 1000
Average # sick patients 33 13
# of vaccinations 50 50
Simulating the spread of a disease in a network
– closeness centrality
This was 350
in the
random
vaccination
case
Nothing in
the range
70-100!
Measures of centrality in a network
1. Closeness Centrality
2. Clustering coefficient
3. Degree
Clustered vs. non clustered graph
.192/3 = .67
Local clustering
coefficient of a node
number of links between its neighbors
total number of possible links
Remove nodes with a
low clustering coefficient
=
n*(n-1)/2
Bigger size corresponds to a larger
clustering coefficient
I want to vaccinate nodes with a
small clustering coefficient
These hold the network together
Number of people with the disease
Frequency
Random vaccination Closeness centrality Clustering coefficient
Probability of
contacting the disease
.30 .30 .30
Number of simulations 1000 1000 1000
Average # sick patients 33 13 41
# of vaccinations 50 50 50
Simulating the spread of a disease in a network
– clustering coefficient
This was 350
in the
random
vaccination
case
Even worse
than random
vaccination!
Measures of centrality in a network
1. Closeness Centrality
2. Clustering coefficient
3. Degree
value
count
Degree Distribution
Degree Distribution
Simulation pseudo-code
remove n people with the highest degree
infect a random person
for neighbor in neighbours:
rand = randBetween(0,1):#uniform
if (rand <= .30):
infect the person
elseif(rand > .30):
do not infect the person
Number of people with the disease
Frequency
Random Closeness centrality Clustering coefficient Degree
Probability .30 .30 .30 .30
Number of
simulations
1000 1000 1000 1000
Average # sick
patients
33 13 41 11
# of vaccinations 50 50 50 50
Simulating the spread of a disease in a network
– degree
Looks like a
negative
exponential
distribution
Simplest
method with
best results
Summary
• Studying social networks which have a special
property that the all the distances are one
• BFS : Shortest Path Problem
• Clustering Co-efficient of a node
• Degree of a node. Best results!
Resources

Weitere ähnliche Inhalte

Ähnlich wie Presentation nipun puri

Epidemiological modelling
Epidemiological modellingEpidemiological modelling
Epidemiological modelling
Sumit Das
 
Mathematical Model of Varicella Zoster Virus - Abbie Jakubovic
Mathematical Model of Varicella Zoster Virus - Abbie JakubovicMathematical Model of Varicella Zoster Virus - Abbie Jakubovic
Mathematical Model of Varicella Zoster Virus - Abbie Jakubovic
Abbie Jakubovic
 
The role of treatment and counseling in an HIV/AIDS, Malaria and Tuberculosis...
The role of treatment and counseling in an HIV/AIDS, Malaria and Tuberculosis...The role of treatment and counseling in an HIV/AIDS, Malaria and Tuberculosis...
The role of treatment and counseling in an HIV/AIDS, Malaria and Tuberculosis...
iosrjce
 
Scott 校外口試
Scott 校外口試Scott 校外口試
Scott 校外口試
jilung hsieh
 
MEASURES OF ASSOCIATION.docx
MEASURES OF ASSOCIATION.docxMEASURES OF ASSOCIATION.docx
MEASURES OF ASSOCIATION.docx
kihembopamelah
 

Ähnlich wie Presentation nipun puri (20)

Mathematical Modeling Of Syphilis Disease A Case Study With Reference To Anan...
Mathematical Modeling Of Syphilis Disease A Case Study With Reference To Anan...Mathematical Modeling Of Syphilis Disease A Case Study With Reference To Anan...
Mathematical Modeling Of Syphilis Disease A Case Study With Reference To Anan...
 
Epidemiological modelling
Epidemiological modellingEpidemiological modelling
Epidemiological modelling
 
Mathematical Model of Varicella Zoster Virus - Abbie Jakubovic
Mathematical Model of Varicella Zoster Virus - Abbie JakubovicMathematical Model of Varicella Zoster Virus - Abbie Jakubovic
Mathematical Model of Varicella Zoster Virus - Abbie Jakubovic
 
The role of treatment and counseling in an HIV/AIDS, Malaria and Tuberculosis...
The role of treatment and counseling in an HIV/AIDS, Malaria and Tuberculosis...The role of treatment and counseling in an HIV/AIDS, Malaria and Tuberculosis...
The role of treatment and counseling in an HIV/AIDS, Malaria and Tuberculosis...
 
Statistics
StatisticsStatistics
Statistics
 
The comparison of immunization
The comparison of immunizationThe comparison of immunization
The comparison of immunization
 
06_AJMS_387_22_Revised.pdf
06_AJMS_387_22_Revised.pdf06_AJMS_387_22_Revised.pdf
06_AJMS_387_22_Revised.pdf
 
The Mathematics of Memes
The Mathematics of MemesThe Mathematics of Memes
The Mathematics of Memes
 
A COMPUTER VIRUS PROPAGATION MODEL USING DELAY DIFFERENTIAL EQUATIONS WITH PR...
A COMPUTER VIRUS PROPAGATION MODEL USING DELAY DIFFERENTIAL EQUATIONS WITH PR...A COMPUTER VIRUS PROPAGATION MODEL USING DELAY DIFFERENTIAL EQUATIONS WITH PR...
A COMPUTER VIRUS PROPAGATION MODEL USING DELAY DIFFERENTIAL EQUATIONS WITH PR...
 
Mathematics Model Development Deployment of Dengue Fever Diseases by Involve ...
Mathematics Model Development Deployment of Dengue Fever Diseases by Involve ...Mathematics Model Development Deployment of Dengue Fever Diseases by Involve ...
Mathematics Model Development Deployment of Dengue Fever Diseases by Involve ...
 
Cohort study design.ppt Epidemiology medical
Cohort study design.ppt Epidemiology medicalCohort study design.ppt Epidemiology medical
Cohort study design.ppt Epidemiology medical
 
F0623642
F0623642F0623642
F0623642
 
Modeling and qualitative analysis of malaria epidemiology
Modeling and qualitative analysis of malaria epidemiologyModeling and qualitative analysis of malaria epidemiology
Modeling and qualitative analysis of malaria epidemiology
 
Scott 校外口試
Scott 校外口試Scott 校外口試
Scott 校外口試
 
OS18 - 8.b.3 Modelling the Impact of Farming Practices upon Vaccine Effecti...
OS18 - 8.b.3   Modelling the Impact of Farming Practices upon Vaccine Effecti...OS18 - 8.b.3   Modelling the Impact of Farming Practices upon Vaccine Effecti...
OS18 - 8.b.3 Modelling the Impact of Farming Practices upon Vaccine Effecti...
 
Chp11 - Research Methods for Business By Authors Uma Sekaran and Roger Bougie
Chp11  - Research Methods for Business By Authors Uma Sekaran and Roger BougieChp11  - Research Methods for Business By Authors Uma Sekaran and Roger Bougie
Chp11 - Research Methods for Business By Authors Uma Sekaran and Roger Bougie
 
Dr. Amy Kinsley - Movement Matters: Using Swine Shipment Patterns to Identify...
Dr. Amy Kinsley - Movement Matters: Using Swine Shipment Patterns to Identify...Dr. Amy Kinsley - Movement Matters: Using Swine Shipment Patterns to Identify...
Dr. Amy Kinsley - Movement Matters: Using Swine Shipment Patterns to Identify...
 
MEASURES OF ASSOCIATION.docx
MEASURES OF ASSOCIATION.docxMEASURES OF ASSOCIATION.docx
MEASURES OF ASSOCIATION.docx
 
How Should We Target Prevention Interventions?
How Should We Target Prevention Interventions?How Should We Target Prevention Interventions?
How Should We Target Prevention Interventions?
 
Non compartmental s-i-s modeling of hiv prevalence in 7 countries of the world
Non compartmental s-i-s modeling of hiv prevalence in 7 countries of the worldNon compartmental s-i-s modeling of hiv prevalence in 7 countries of the world
Non compartmental s-i-s modeling of hiv prevalence in 7 countries of the world
 

Kürzlich hochgeladen

VIP Call Girls Agra 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Agra 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Agra 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Agra 7001035870 Whatsapp Number, 24/07 Booking
dharasingh5698
 
Call Girls in Sarita Vihar Delhi Just Call 👉👉9873777170 Independent Female ...
Call Girls in  Sarita Vihar Delhi Just Call 👉👉9873777170  Independent Female ...Call Girls in  Sarita Vihar Delhi Just Call 👉👉9873777170  Independent Female ...
Call Girls in Sarita Vihar Delhi Just Call 👉👉9873777170 Independent Female ...
adilkhan87451
 
Call Girls In datia Escorts ☎️7427069034 🔝 💃 Enjoy 24/7 Escort Service Enjoy...
Call Girls In datia Escorts ☎️7427069034  🔝 💃 Enjoy 24/7 Escort Service Enjoy...Call Girls In datia Escorts ☎️7427069034  🔝 💃 Enjoy 24/7 Escort Service Enjoy...
Call Girls In datia Escorts ☎️7427069034 🔝 💃 Enjoy 24/7 Escort Service Enjoy...
nehasharma67844
 

Kürzlich hochgeladen (20)

An Atoll Futures Research Institute? Presentation for CANCC
An Atoll Futures Research Institute? Presentation for CANCCAn Atoll Futures Research Institute? Presentation for CANCC
An Atoll Futures Research Institute? Presentation for CANCC
 
The U.S. Budget and Economic Outlook (Presentation)
The U.S. Budget and Economic Outlook (Presentation)The U.S. Budget and Economic Outlook (Presentation)
The U.S. Budget and Economic Outlook (Presentation)
 
1935 CONSTITUTION REPORT IN RIPH FINALLS
1935 CONSTITUTION REPORT IN RIPH FINALLS1935 CONSTITUTION REPORT IN RIPH FINALLS
1935 CONSTITUTION REPORT IN RIPH FINALLS
 
VIP Call Girls Agra 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Agra 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Agra 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Agra 7001035870 Whatsapp Number, 24/07 Booking
 
Call Girls Chakan Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Chakan Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Chakan Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Chakan Call Me 7737669865 Budget Friendly No Advance Booking
 
VIP Model Call Girls Narhe ( Pune ) Call ON 8005736733 Starting From 5K to 25...
VIP Model Call Girls Narhe ( Pune ) Call ON 8005736733 Starting From 5K to 25...VIP Model Call Girls Narhe ( Pune ) Call ON 8005736733 Starting From 5K to 25...
VIP Model Call Girls Narhe ( Pune ) Call ON 8005736733 Starting From 5K to 25...
 
Call Girls in Sarita Vihar Delhi Just Call 👉👉9873777170 Independent Female ...
Call Girls in  Sarita Vihar Delhi Just Call 👉👉9873777170  Independent Female ...Call Girls in  Sarita Vihar Delhi Just Call 👉👉9873777170  Independent Female ...
Call Girls in Sarita Vihar Delhi Just Call 👉👉9873777170 Independent Female ...
 
Just Call Vip call girls Wardha Escorts ☎️8617370543 Starting From 5K to 25K ...
Just Call Vip call girls Wardha Escorts ☎️8617370543 Starting From 5K to 25K ...Just Call Vip call girls Wardha Escorts ☎️8617370543 Starting From 5K to 25K ...
Just Call Vip call girls Wardha Escorts ☎️8617370543 Starting From 5K to 25K ...
 
Call Girls In datia Escorts ☎️7427069034 🔝 💃 Enjoy 24/7 Escort Service Enjoy...
Call Girls In datia Escorts ☎️7427069034  🔝 💃 Enjoy 24/7 Escort Service Enjoy...Call Girls In datia Escorts ☎️7427069034  🔝 💃 Enjoy 24/7 Escort Service Enjoy...
Call Girls In datia Escorts ☎️7427069034 🔝 💃 Enjoy 24/7 Escort Service Enjoy...
 
The Economic and Organised Crime Office (EOCO) has been advised by the Office...
The Economic and Organised Crime Office (EOCO) has been advised by the Office...The Economic and Organised Crime Office (EOCO) has been advised by the Office...
The Economic and Organised Crime Office (EOCO) has been advised by the Office...
 
Get Premium Budhwar Peth Call Girls (8005736733) 24x7 Rate 15999 with A/c Roo...
Get Premium Budhwar Peth Call Girls (8005736733) 24x7 Rate 15999 with A/c Roo...Get Premium Budhwar Peth Call Girls (8005736733) 24x7 Rate 15999 with A/c Roo...
Get Premium Budhwar Peth Call Girls (8005736733) 24x7 Rate 15999 with A/c Roo...
 
best call girls in Pune - 450+ Call Girl Cash Payment 8005736733 Neha Thakur
best call girls in Pune - 450+ Call Girl Cash Payment 8005736733 Neha Thakurbest call girls in Pune - 450+ Call Girl Cash Payment 8005736733 Neha Thakur
best call girls in Pune - 450+ Call Girl Cash Payment 8005736733 Neha Thakur
 
Sustainability by Design: Assessment Tool for Just Energy Transition Plans
Sustainability by Design: Assessment Tool for Just Energy Transition PlansSustainability by Design: Assessment Tool for Just Energy Transition Plans
Sustainability by Design: Assessment Tool for Just Energy Transition Plans
 
Call Girls Sangamwadi Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Sangamwadi Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Sangamwadi Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Sangamwadi Call Me 7737669865 Budget Friendly No Advance Booking
 
Pimpri Chinchwad ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi R...
Pimpri Chinchwad ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi R...Pimpri Chinchwad ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi R...
Pimpri Chinchwad ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi R...
 
(NEHA) Call Girls Nagpur Call Now 8250077686 Nagpur Escorts 24x7
(NEHA) Call Girls Nagpur Call Now 8250077686 Nagpur Escorts 24x7(NEHA) Call Girls Nagpur Call Now 8250077686 Nagpur Escorts 24x7
(NEHA) Call Girls Nagpur Call Now 8250077686 Nagpur Escorts 24x7
 
World Press Freedom Day 2024; May 3rd - Poster
World Press Freedom Day 2024; May 3rd - PosterWorld Press Freedom Day 2024; May 3rd - Poster
World Press Freedom Day 2024; May 3rd - Poster
 
celebrity 💋 Nagpur Escorts Just Dail 8250092165 service available anytime 24 ...
celebrity 💋 Nagpur Escorts Just Dail 8250092165 service available anytime 24 ...celebrity 💋 Nagpur Escorts Just Dail 8250092165 service available anytime 24 ...
celebrity 💋 Nagpur Escorts Just Dail 8250092165 service available anytime 24 ...
 
2024: The FAR, Federal Acquisition Regulations, Part 31
2024: The FAR, Federal Acquisition Regulations, Part 312024: The FAR, Federal Acquisition Regulations, Part 31
2024: The FAR, Federal Acquisition Regulations, Part 31
 
Election 2024 Presiding Duty Keypoints_01.pdf
Election 2024 Presiding Duty Keypoints_01.pdfElection 2024 Presiding Duty Keypoints_01.pdf
Election 2024 Presiding Duty Keypoints_01.pdf
 

Presentation nipun puri

  • 1. Using Shortest Path problem to study social networks nipun
  • 3. HOW DOES A DISEASE SPREAD IN A NETWORK?
  • 4.
  • 5. Simulation pseudo-code infect a random person for neighbor in neighbours: rand = randBetween(0,1):#uniform if (rand <= .30): infect the person elseif(rand > .30): do not infect the person
  • 6. Number of people with the disease Frequency Probability of contacting the disease .30 Number of simulations 1000 Average # sick patients 42/350 Simulating the spread of a disease in a network
  • 7. VACCINATION How to stop the disease from spreading?
  • 8. RANDOM VACCINATION How to stop the disease from spreading?
  • 9. Simulation pseudo-code remove n random people from the network infect a random person for neighbor in neighbours: rand = randBetween(0,1):#uniform if (rand <= .30): infect the person elseif(rand > .30): do not infect the person
  • 10. Number of people with the disease Frequency Probability of contacting the disease .30 Number of simulations 1000 Average # sick patients 33/350 # of vaccinations 50 Simulating the spread of a disease in a network – random vaccination This was 300 in the previous histogram. Nothing in the range 90-100
  • 11. VACCINATE THE MORE CENTRAL NODES How to stop the disease from spreading?
  • 12. Measures of centrality of a node 1. Closeness Centrality 2. Clustering coefficient 3. Degree
  • 13. Closeness Centrality • Closeness centrality of the node = Sum of the lengths of the shortest path from one node to all the other nodes
  • 14. How to find the shortest path? • In an undirected graph where all the nodes are equidistant (all distances = 1) • Breadth first search
  • 17. 2. Distance between Beth and her immediate neighbor is 1
  • 18. 3. Distance between their immediate neighbor and Beth is two
  • 19. 4. Distance between their immediate neighbor and Beth is three Closeness centrality is the sum of all these numbers Beth’s closeness centrality is 24
  • 20. Simulation pseudo-code remove n closest people from network infect a random person for neighbor in neighbours: rand = randBetween(0,1):#uniform if (rand <= .30): infect the person elseif(rand > .30): do not infect the person
  • 21. Number of people with the disease Frequency Random vaccination Closeness centrality Probability of contacting the disease .30 .30 Number of simulations 1000 1000 Average # sick patients 33 13 # of vaccinations 50 50 Simulating the spread of a disease in a network – closeness centrality This was 350 in the random vaccination case Nothing in the range 70-100!
  • 22. Measures of centrality in a network 1. Closeness Centrality 2. Clustering coefficient 3. Degree
  • 23. Clustered vs. non clustered graph
  • 24. .192/3 = .67 Local clustering coefficient of a node number of links between its neighbors total number of possible links Remove nodes with a low clustering coefficient = n*(n-1)/2
  • 25. Bigger size corresponds to a larger clustering coefficient I want to vaccinate nodes with a small clustering coefficient These hold the network together
  • 26. Number of people with the disease Frequency Random vaccination Closeness centrality Clustering coefficient Probability of contacting the disease .30 .30 .30 Number of simulations 1000 1000 1000 Average # sick patients 33 13 41 # of vaccinations 50 50 50 Simulating the spread of a disease in a network – clustering coefficient This was 350 in the random vaccination case Even worse than random vaccination!
  • 27. Measures of centrality in a network 1. Closeness Centrality 2. Clustering coefficient 3. Degree
  • 30. Simulation pseudo-code remove n people with the highest degree infect a random person for neighbor in neighbours: rand = randBetween(0,1):#uniform if (rand <= .30): infect the person elseif(rand > .30): do not infect the person
  • 31. Number of people with the disease Frequency Random Closeness centrality Clustering coefficient Degree Probability .30 .30 .30 .30 Number of simulations 1000 1000 1000 1000 Average # sick patients 33 13 41 11 # of vaccinations 50 50 50 50 Simulating the spread of a disease in a network – degree Looks like a negative exponential distribution Simplest method with best results
  • 32. Summary • Studying social networks which have a special property that the all the distances are one • BFS : Shortest Path Problem • Clustering Co-efficient of a node • Degree of a node. Best results!

Hinweis der Redaktion

  1. Explain the histogram
  2. This graph has on an average a high clustering co-efficient. Which means that there are concentrated clusters. But, there are a few, like node #5, with a low clustering co-efficient which is helping the whole network stay in touch.