SlideShare una empresa de Scribd logo
1 de 36
Networks
           Part I

            Sharad Goel
        Columbia University
Computational Social Science: Lecture 5

          February 22, 2013
High School Dating Network
[ Bearman, Moody, & Stovel, 2004 ]
Image by Mark Newman, via Easley & Kleinberg
Corporate E-mail Communication
[ Adamic & Adar, 2004 ]
via Easley & Kleinberg
“Internet map 2004” from Math Insight
http://mathinsight.org/image/internet_map_jurvetson_2004
Networks/Graphs

             Nodes/vertices
people, organizations, webpages, computers

                  Edges
represent connections between pairs of nodes
2            5

                11
                     1
4       9

            6            2
1                   2

                        4
                6                4
2   1
            2
                                 3
                    7
                            13
3
1       2


                5

    4

                            1   2   3   4   5   6   7
                    7   1   0   1   0   1   0   0   0
            6
                        2   1   0   1   0   1   0   0
                        3   0   1   0   0   1   0   0
                        4   1   0   0   0   1   0   0
                        5   0   1   1   1   0   1   1
                        6   0   0   0   0   1   0   0
                        7   0   0   0   0   1   0   0
3
1       2


                5

    4


                    7   1   {2, 4}
            6
                        2   {1, 3, 5}
                        3   {2, 5}
                        4   {1, 5}
                        5   {2, 3, 4, 6, 7}
                        6   {5}
                        7   {5}
3
1       2


                5

    4

                        (1, 2)
                    7   (1, 4)
            6
                        (2, 3)
                        (2, 5)
                        (3, 5)
                        (4, 5)
                        (5, 6)
                        (5, 7)
2                   5           3
1               2
                        11
                                1
4           9           5

    4                               2
                6

                                        7
                    6                       1   {2:2, 4:4}
                                            2   {1:2, 3:5, 5:11}
                                            3   {2:5, 5:1}
                                            4   {1:4, 5:9}
                                            5   {2:11, 3:1, 4:9, 6:6, 7:2}
                                            6   {5:6}
                                            7   {5:2}
2                   5           3
1               2
                        11
                                1
4           9           5

    4                               2
                6
                                            (1, 2, 2)
                                        7   (1, 4, 4)
                    6
                                            (2, 3, 5)
                                            (2, 5, 11)
                                            (3, 5, 1)
                                            (4, 5, 9)
                                            (5, 6, 6)
                                            (5, 7, 2)
Adjacency list  edge list
(weighted) directed network

          Input
       Adjacency list

         Output
         Edge list
Adjacency list  edge list
(weighted) directed network

           Map
    input: u {w1, …, wk}
    foreach wi:
       output (u, wi)

         Reduce
           pass
Edge list  adjacency list
(weighted) undirected network

           Input
          Edge list

          Output
        Adjacency list
Edge list  adjacency list
(weighted) undirected network

            Map
       input: (u, w)
   output: (u, w), key := u
   output: (w, u), key := w

          Reduce
     input: u, {w1, …, wk}
           identity
3
1       2


                5

    4


                              7
            6



                Degree of node u
                # of edges incident on u
Edge list  node degrees
   undirected network

         Input
        Edge list

        Output
      Node degrees
Edge list  node degrees
   undirected network

           Map
      input: (u, w)
  output: (u, w), key := u
  output: (w, u), key := w

         Reduce
   input: u, {w1, …, wk}
       output: u, k
Edge list  degree distribution
       undirected network

             Input
            Edge list

            Output
       Degree distribution
Edge list  degree distribution
       undirected network

              Map
         input: (u, w)
     output: (u, w), key := u
     output: (w, u), key := w

            Reduce
      input: u, {w1, …, wk}
          output: u, k
Edge list  degree distribution
       undirected network

              Map
           input: u, k
        identity, key := k

            Reduce
       input: k, {u1, …, um}
          output: k, m
3
1           2


                    5

    4


                               7
                6



                        Path
            Sequence of nodes with each
        consecutive pair connected by an edge
3
1                2


                         5

    4


                                      7
                     6



                             Cycle
        Path with at least three edges with first and last
          nodes the same and all other nodes distinct
Connected Graph
There is a path between every pair of nodes
Connected Graph
There is a path between every pair of nodes
Connected Component
 A connected subset of nodes that is not
contained in any larger connected subset
Distance
Length of the shortest path between two nodes
Distance
Length of the shortest path between two nodes
Breadth-first Search
iteratively explore nodes one layer at a time
# initialize distances
dist = {}
for u in G:
   dist[u] = NA

dist [u1] = 0

d=0
periphery = { u1 }
while len(periphery) > 0:
  # find nodes one step away from the periphery
  next_level = {}
  for u in periphery:
     next_level += { w for w in neighbors[u] if dist[w] == NA }

   # update distances
   d += 1
   for u in next_level:
     dist[u] = d

  # update periphery
  periphery = next_level
BFS @ scale
    undirected network

           Input
 edge list, starting node u0

          Output
Distance to all nodes from u0
BFS @ scale
        undirected network

Input: distances (u, d)
1. join distances with edge list
2. foreach (u, d, w) output (w, d+1)
  [ also output (u0, 0) ]
3. group by w, and output min d

Más contenido relacionado

La actualidad más candente

La actualidad más candente (14)

Order of operations practice puzzle
Order of operations practice puzzleOrder of operations practice puzzle
Order of operations practice puzzle
 
Inecuaciones - matematicas
Inecuaciones - matematicasInecuaciones - matematicas
Inecuaciones - matematicas
 
Datamining r 1st
Datamining r 1stDatamining r 1st
Datamining r 1st
 
Precalculus 6th edition blitzer test bank
Precalculus 6th edition blitzer test bankPrecalculus 6th edition blitzer test bank
Precalculus 6th edition blitzer test bank
 
Kelantan mtambahan + skema
Kelantan mtambahan + skemaKelantan mtambahan + skema
Kelantan mtambahan + skema
 
E1 f1 bộ binh
E1 f1 bộ binhE1 f1 bộ binh
E1 f1 bộ binh
 
E1 f7 bộ binh
E1 f7 bộ binhE1 f7 bộ binh
E1 f7 bộ binh
 
7-7 Equivalent Fractions
7-7 Equivalent Fractions7-7 Equivalent Fractions
7-7 Equivalent Fractions
 
College algebra 7th edition by blitzer solution manual
College algebra 7th edition by blitzer solution manualCollege algebra 7th edition by blitzer solution manual
College algebra 7th edition by blitzer solution manual
 
E1 f9 bộ binh
E1 f9 bộ binhE1 f9 bộ binh
E1 f9 bộ binh
 
PFDS 6.4.3
PFDS 6.4.3PFDS 6.4.3
PFDS 6.4.3
 
E2 f6 bộ binh
E2 f6 bộ binhE2 f6 bộ binh
E2 f6 bộ binh
 
E1 f6 bộ binh
E1 f6 bộ binhE1 f6 bộ binh
E1 f6 bộ binh
 
MATH: REV. QUIZ INEQUALITIES
MATH: REV. QUIZ INEQUALITIESMATH: REV. QUIZ INEQUALITIES
MATH: REV. QUIZ INEQUALITIES
 

Destacado

Computational Social Science, Lecture 10: Online Experiments
Computational Social Science, Lecture 10: Online ExperimentsComputational Social Science, Lecture 10: Online Experiments
Computational Social Science, Lecture 10: Online Experimentsjakehofman
 
Computational Social Science, Lecture 08: Counting Fast, Part II
Computational Social Science, Lecture 08: Counting Fast, Part IIComputational Social Science, Lecture 08: Counting Fast, Part II
Computational Social Science, Lecture 08: Counting Fast, Part IIjakehofman
 
Computational Social Science, Lecture 13: Classification
Computational Social Science, Lecture 13: ClassificationComputational Social Science, Lecture 13: Classification
Computational Social Science, Lecture 13: Classificationjakehofman
 
Computational Social Science, Lecture 11: Regression
Computational Social Science, Lecture 11: RegressionComputational Social Science, Lecture 11: Regression
Computational Social Science, Lecture 11: Regressionjakehofman
 
Computational Social Science, Lecture 07: Counting Fast, Part I
Computational Social Science, Lecture 07: Counting Fast, Part IComputational Social Science, Lecture 07: Counting Fast, Part I
Computational Social Science, Lecture 07: Counting Fast, Part Ijakehofman
 
Computational Social Science, Lecture 09: Data Wrangling
Computational Social Science, Lecture 09: Data WranglingComputational Social Science, Lecture 09: Data Wrangling
Computational Social Science, Lecture 09: Data Wranglingjakehofman
 
Computational Social Science, Lecture 06: Networks, Part II
Computational Social Science, Lecture 06: Networks, Part IIComputational Social Science, Lecture 06: Networks, Part II
Computational Social Science, Lecture 06: Networks, Part IIjakehofman
 
Computational Social Science, Lecture 03: Counting at Scale, Part I
Computational Social Science, Lecture 03: Counting at Scale, Part IComputational Social Science, Lecture 03: Counting at Scale, Part I
Computational Social Science, Lecture 03: Counting at Scale, Part Ijakehofman
 
Computational Social Science, Lecture 04: Counting at Scale, Part II
Computational Social Science, Lecture 04: Counting at Scale, Part IIComputational Social Science, Lecture 04: Counting at Scale, Part II
Computational Social Science, Lecture 04: Counting at Scale, Part IIjakehofman
 
Computational Social Science, Lecture 02: An Introduction to Counting
Computational Social Science, Lecture 02: An Introduction to CountingComputational Social Science, Lecture 02: An Introduction to Counting
Computational Social Science, Lecture 02: An Introduction to Countingjakehofman
 
Modeling Social Data, Lecture 6: Regression, Part 1
Modeling Social Data, Lecture 6: Regression, Part 1Modeling Social Data, Lecture 6: Regression, Part 1
Modeling Social Data, Lecture 6: Regression, Part 1jakehofman
 
Modeling Social Data, Lecture 2: Introduction to Counting
Modeling Social Data, Lecture 2: Introduction to CountingModeling Social Data, Lecture 2: Introduction to Counting
Modeling Social Data, Lecture 2: Introduction to Countingjakehofman
 
Modeling Social Data, Lecture 1: Overview
Modeling Social Data, Lecture 1: OverviewModeling Social Data, Lecture 1: Overview
Modeling Social Data, Lecture 1: Overviewjakehofman
 
Catastrophic Cancellation
Catastrophic CancellationCatastrophic Cancellation
Catastrophic CancellationC4Media
 
Matrices in computer applications
Matrices in computer applicationsMatrices in computer applications
Matrices in computer applicationsRayyan777
 
Profitable growth via adjacency - Guest lecture on Zook by Peter Spung
Profitable growth via adjacency - Guest lecture on Zook by Peter SpungProfitable growth via adjacency - Guest lecture on Zook by Peter Spung
Profitable growth via adjacency - Guest lecture on Zook by Peter SpungPeter Spung
 
Multiplication of matrices and its application in biology
Multiplication of matrices and its application in biologyMultiplication of matrices and its application in biology
Multiplication of matrices and its application in biologynayanika bhalla
 

Destacado (20)

Computational Social Science, Lecture 10: Online Experiments
Computational Social Science, Lecture 10: Online ExperimentsComputational Social Science, Lecture 10: Online Experiments
Computational Social Science, Lecture 10: Online Experiments
 
Computational Social Science, Lecture 08: Counting Fast, Part II
Computational Social Science, Lecture 08: Counting Fast, Part IIComputational Social Science, Lecture 08: Counting Fast, Part II
Computational Social Science, Lecture 08: Counting Fast, Part II
 
Computational Social Science, Lecture 13: Classification
Computational Social Science, Lecture 13: ClassificationComputational Social Science, Lecture 13: Classification
Computational Social Science, Lecture 13: Classification
 
Computational Social Science, Lecture 11: Regression
Computational Social Science, Lecture 11: RegressionComputational Social Science, Lecture 11: Regression
Computational Social Science, Lecture 11: Regression
 
Computational Social Science, Lecture 07: Counting Fast, Part I
Computational Social Science, Lecture 07: Counting Fast, Part IComputational Social Science, Lecture 07: Counting Fast, Part I
Computational Social Science, Lecture 07: Counting Fast, Part I
 
Computational Social Science, Lecture 09: Data Wrangling
Computational Social Science, Lecture 09: Data WranglingComputational Social Science, Lecture 09: Data Wrangling
Computational Social Science, Lecture 09: Data Wrangling
 
Computational Social Science, Lecture 06: Networks, Part II
Computational Social Science, Lecture 06: Networks, Part IIComputational Social Science, Lecture 06: Networks, Part II
Computational Social Science, Lecture 06: Networks, Part II
 
Computational Social Science, Lecture 03: Counting at Scale, Part I
Computational Social Science, Lecture 03: Counting at Scale, Part IComputational Social Science, Lecture 03: Counting at Scale, Part I
Computational Social Science, Lecture 03: Counting at Scale, Part I
 
Computational Social Science, Lecture 04: Counting at Scale, Part II
Computational Social Science, Lecture 04: Counting at Scale, Part IIComputational Social Science, Lecture 04: Counting at Scale, Part II
Computational Social Science, Lecture 04: Counting at Scale, Part II
 
Computational Social Science, Lecture 02: An Introduction to Counting
Computational Social Science, Lecture 02: An Introduction to CountingComputational Social Science, Lecture 02: An Introduction to Counting
Computational Social Science, Lecture 02: An Introduction to Counting
 
Modeling Social Data, Lecture 6: Regression, Part 1
Modeling Social Data, Lecture 6: Regression, Part 1Modeling Social Data, Lecture 6: Regression, Part 1
Modeling Social Data, Lecture 6: Regression, Part 1
 
Modeling Social Data, Lecture 2: Introduction to Counting
Modeling Social Data, Lecture 2: Introduction to CountingModeling Social Data, Lecture 2: Introduction to Counting
Modeling Social Data, Lecture 2: Introduction to Counting
 
Modeling Social Data, Lecture 1: Overview
Modeling Social Data, Lecture 1: OverviewModeling Social Data, Lecture 1: Overview
Modeling Social Data, Lecture 1: Overview
 
Design lesson not taught in schools
Design lesson not taught in schoolsDesign lesson not taught in schools
Design lesson not taught in schools
 
Catastrophic Cancellation
Catastrophic CancellationCatastrophic Cancellation
Catastrophic Cancellation
 
Matrices in computer applications
Matrices in computer applicationsMatrices in computer applications
Matrices in computer applications
 
Profitable growth via adjacency - Guest lecture on Zook by Peter Spung
Profitable growth via adjacency - Guest lecture on Zook by Peter SpungProfitable growth via adjacency - Guest lecture on Zook by Peter Spung
Profitable growth via adjacency - Guest lecture on Zook by Peter Spung
 
Multiplication of matrices and its application in biology
Multiplication of matrices and its application in biologyMultiplication of matrices and its application in biology
Multiplication of matrices and its application in biology
 
presentacion
presentacionpresentacion
presentacion
 
10trucosparainternet
10trucosparainternet10trucosparainternet
10trucosparainternet
 

Similar a Network Analysis Concepts and Algorithms

Powerpoint ประกอบการบรรยาย
Powerpoint ประกอบการบรรยายPowerpoint ประกอบการบรรยาย
Powerpoint ประกอบการบรรยายevaluation47
 
Chapter 11 16 solucionario larson
Chapter 11 16 solucionario larson  Chapter 11 16 solucionario larson
Chapter 11 16 solucionario larson Bruno Ignacio
 
Section 7 practice b
Section 7 practice bSection 7 practice b
Section 7 practice bjslloyd23
 
Sports festival 2010 Results
Sports festival 2010 ResultsSports festival 2010 Results
Sports festival 2010 Resultssajanshare
 
14 +3+practice+b+adv
14 +3+practice+b+adv14 +3+practice+b+adv
14 +3+practice+b+advNene Thomas
 
Equation of a Circle
Equation of a CircleEquation of a Circle
Equation of a CircleLily Maryati
 
Using flash type questions – stroke of luck or curse for data quality?
Using flash type questions – stroke of luck or curse for data quality?Using flash type questions – stroke of luck or curse for data quality?
Using flash type questions – stroke of luck or curse for data quality?QuestBack AG
 
Calculo y geometria analitica (larson hostetler-edwards) 8th ed - solutions m...
Calculo y geometria analitica (larson hostetler-edwards) 8th ed - solutions m...Calculo y geometria analitica (larson hostetler-edwards) 8th ed - solutions m...
Calculo y geometria analitica (larson hostetler-edwards) 8th ed - solutions m...ELMIR IVAN OZUNA LOPEZ
 
Day 1 intro to functions
Day 1 intro to functionsDay 1 intro to functions
Day 1 intro to functionsErik Tjersland
 
Indian Wine Market Report - 2011
Indian Wine Market Report - 2011Indian Wine Market Report - 2011
Indian Wine Market Report - 2011david_singer
 
NCV 2 Mathematical Literacy Hands-On Training Activities Module 4
NCV 2 Mathematical Literacy Hands-On Training Activities Module 4NCV 2 Mathematical Literacy Hands-On Training Activities Module 4
NCV 2 Mathematical Literacy Hands-On Training Activities Module 4Future Managers
 
How to create an effective presentation
How to create an effective presentationHow to create an effective presentation
How to create an effective presentationJames Casella
 
Visualizing Dynamic Metrics with Profiling Blueprints
Visualizing Dynamic Metrics with Profiling BlueprintsVisualizing Dynamic Metrics with Profiling Blueprints
Visualizing Dynamic Metrics with Profiling BlueprintsESUG
 
โครงการทันตสุขภาพคนพิการ สสจ.เชียงราย
โครงการทันตสุขภาพคนพิการ สสจ.เชียงรายโครงการทันตสุขภาพคนพิการ สสจ.เชียงราย
โครงการทันตสุขภาพคนพิการ สสจ.เชียงรายNithimar Or
 

Similar a Network Analysis Concepts and Algorithms (20)

Powerpoint ประกอบการบรรยาย
Powerpoint ประกอบการบรรยายPowerpoint ประกอบการบรรยาย
Powerpoint ประกอบการบรรยาย
 
1.3.4
1.3.41.3.4
1.3.4
 
Chapter 11 16 solucionario larson
Chapter 11 16 solucionario larson  Chapter 11 16 solucionario larson
Chapter 11 16 solucionario larson
 
Section 7 practice b
Section 7 practice bSection 7 practice b
Section 7 practice b
 
1.2.4
1.2.41.2.4
1.2.4
 
Sports festival 2010 Results
Sports festival 2010 ResultsSports festival 2010 Results
Sports festival 2010 Results
 
14 +3+practice+b+adv
14 +3+practice+b+adv14 +3+practice+b+adv
14 +3+practice+b+adv
 
Equation of a Circle
Equation of a CircleEquation of a Circle
Equation of a Circle
 
Using flash type questions – stroke of luck or curse for data quality?
Using flash type questions – stroke of luck or curse for data quality?Using flash type questions – stroke of luck or curse for data quality?
Using flash type questions – stroke of luck or curse for data quality?
 
Calculo y geometria analitica (larson hostetler-edwards) 8th ed - solutions m...
Calculo y geometria analitica (larson hostetler-edwards) 8th ed - solutions m...Calculo y geometria analitica (larson hostetler-edwards) 8th ed - solutions m...
Calculo y geometria analitica (larson hostetler-edwards) 8th ed - solutions m...
 
Day 1 intro to functions
Day 1 intro to functionsDay 1 intro to functions
Day 1 intro to functions
 
Pre algebra lesson 8-7
Pre algebra lesson 8-7Pre algebra lesson 8-7
Pre algebra lesson 8-7
 
Indian Wine Market Report - 2011
Indian Wine Market Report - 2011Indian Wine Market Report - 2011
Indian Wine Market Report - 2011
 
1.2.3
1.2.31.2.3
1.2.3
 
NCV 2 Mathematical Literacy Hands-On Training Activities Module 4
NCV 2 Mathematical Literacy Hands-On Training Activities Module 4NCV 2 Mathematical Literacy Hands-On Training Activities Module 4
NCV 2 Mathematical Literacy Hands-On Training Activities Module 4
 
How to create an effective presentation
How to create an effective presentationHow to create an effective presentation
How to create an effective presentation
 
Visualizing Dynamic Metrics with Profiling Blueprints
Visualizing Dynamic Metrics with Profiling BlueprintsVisualizing Dynamic Metrics with Profiling Blueprints
Visualizing Dynamic Metrics with Profiling Blueprints
 
Dmxchart
DmxchartDmxchart
Dmxchart
 
Fact Families
Fact FamiliesFact Families
Fact Families
 
โครงการทันตสุขภาพคนพิการ สสจ.เชียงราย
โครงการทันตสุขภาพคนพิการ สสจ.เชียงรายโครงการทันตสุขภาพคนพิการ สสจ.เชียงราย
โครงการทันตสุขภาพคนพิการ สสจ.เชียงราย
 

Más de jakehofman

Modeling Social Data, Lecture 12: Causality & Experiments, Part 2
Modeling Social Data, Lecture 12: Causality & Experiments, Part 2Modeling Social Data, Lecture 12: Causality & Experiments, Part 2
Modeling Social Data, Lecture 12: Causality & Experiments, Part 2jakehofman
 
Modeling Social Data, Lecture 11: Causality and Experiments, Part 1
Modeling Social Data, Lecture 11: Causality and Experiments, Part 1Modeling Social Data, Lecture 11: Causality and Experiments, Part 1
Modeling Social Data, Lecture 11: Causality and Experiments, Part 1jakehofman
 
Modeling Social Data, Lecture 10: Networks
Modeling Social Data, Lecture 10: NetworksModeling Social Data, Lecture 10: Networks
Modeling Social Data, Lecture 10: Networksjakehofman
 
Modeling Social Data, Lecture 8: Classification
Modeling Social Data, Lecture 8: ClassificationModeling Social Data, Lecture 8: Classification
Modeling Social Data, Lecture 8: Classificationjakehofman
 
Modeling Social Data, Lecture 7: Model complexity and generalization
Modeling Social Data, Lecture 7: Model complexity and generalizationModeling Social Data, Lecture 7: Model complexity and generalization
Modeling Social Data, Lecture 7: Model complexity and generalizationjakehofman
 
Modeling Social Data, Lecture 4: Counting at Scale
Modeling Social Data, Lecture 4: Counting at ScaleModeling Social Data, Lecture 4: Counting at Scale
Modeling Social Data, Lecture 4: Counting at Scalejakehofman
 
Modeling Social Data, Lecture 3: Data manipulation in R
Modeling Social Data, Lecture 3: Data manipulation in RModeling Social Data, Lecture 3: Data manipulation in R
Modeling Social Data, Lecture 3: Data manipulation in Rjakehofman
 
Modeling Social Data, Lecture 8: Recommendation Systems
Modeling Social Data, Lecture 8: Recommendation SystemsModeling Social Data, Lecture 8: Recommendation Systems
Modeling Social Data, Lecture 8: Recommendation Systemsjakehofman
 
Modeling Social Data, Lecture 6: Classification with Naive Bayes
Modeling Social Data, Lecture 6: Classification with Naive BayesModeling Social Data, Lecture 6: Classification with Naive Bayes
Modeling Social Data, Lecture 6: Classification with Naive Bayesjakehofman
 
Modeling Social Data, Lecture 3: Counting at Scale
Modeling Social Data, Lecture 3: Counting at ScaleModeling Social Data, Lecture 3: Counting at Scale
Modeling Social Data, Lecture 3: Counting at Scalejakehofman
 
Modeling Social Data, Lecture 2: Introduction to Counting
Modeling Social Data, Lecture 2: Introduction to CountingModeling Social Data, Lecture 2: Introduction to Counting
Modeling Social Data, Lecture 2: Introduction to Countingjakehofman
 
Modeling Social Data, Lecture 1: Case Studies
Modeling Social Data, Lecture 1: Case StudiesModeling Social Data, Lecture 1: Case Studies
Modeling Social Data, Lecture 1: Case Studiesjakehofman
 
NYC Data Science Meetup: Computational Social Science
NYC Data Science Meetup: Computational Social ScienceNYC Data Science Meetup: Computational Social Science
NYC Data Science Meetup: Computational Social Sciencejakehofman
 
Technical Tricks of Vowpal Wabbit
Technical Tricks of Vowpal WabbitTechnical Tricks of Vowpal Wabbit
Technical Tricks of Vowpal Wabbitjakehofman
 
Data-driven modeling: Lecture 10
Data-driven modeling: Lecture 10Data-driven modeling: Lecture 10
Data-driven modeling: Lecture 10jakehofman
 
Data-driven modeling: Lecture 09
Data-driven modeling: Lecture 09Data-driven modeling: Lecture 09
Data-driven modeling: Lecture 09jakehofman
 
Using Data to Understand the Brain
Using Data to Understand the BrainUsing Data to Understand the Brain
Using Data to Understand the Brainjakehofman
 

Más de jakehofman (17)

Modeling Social Data, Lecture 12: Causality & Experiments, Part 2
Modeling Social Data, Lecture 12: Causality & Experiments, Part 2Modeling Social Data, Lecture 12: Causality & Experiments, Part 2
Modeling Social Data, Lecture 12: Causality & Experiments, Part 2
 
Modeling Social Data, Lecture 11: Causality and Experiments, Part 1
Modeling Social Data, Lecture 11: Causality and Experiments, Part 1Modeling Social Data, Lecture 11: Causality and Experiments, Part 1
Modeling Social Data, Lecture 11: Causality and Experiments, Part 1
 
Modeling Social Data, Lecture 10: Networks
Modeling Social Data, Lecture 10: NetworksModeling Social Data, Lecture 10: Networks
Modeling Social Data, Lecture 10: Networks
 
Modeling Social Data, Lecture 8: Classification
Modeling Social Data, Lecture 8: ClassificationModeling Social Data, Lecture 8: Classification
Modeling Social Data, Lecture 8: Classification
 
Modeling Social Data, Lecture 7: Model complexity and generalization
Modeling Social Data, Lecture 7: Model complexity and generalizationModeling Social Data, Lecture 7: Model complexity and generalization
Modeling Social Data, Lecture 7: Model complexity and generalization
 
Modeling Social Data, Lecture 4: Counting at Scale
Modeling Social Data, Lecture 4: Counting at ScaleModeling Social Data, Lecture 4: Counting at Scale
Modeling Social Data, Lecture 4: Counting at Scale
 
Modeling Social Data, Lecture 3: Data manipulation in R
Modeling Social Data, Lecture 3: Data manipulation in RModeling Social Data, Lecture 3: Data manipulation in R
Modeling Social Data, Lecture 3: Data manipulation in R
 
Modeling Social Data, Lecture 8: Recommendation Systems
Modeling Social Data, Lecture 8: Recommendation SystemsModeling Social Data, Lecture 8: Recommendation Systems
Modeling Social Data, Lecture 8: Recommendation Systems
 
Modeling Social Data, Lecture 6: Classification with Naive Bayes
Modeling Social Data, Lecture 6: Classification with Naive BayesModeling Social Data, Lecture 6: Classification with Naive Bayes
Modeling Social Data, Lecture 6: Classification with Naive Bayes
 
Modeling Social Data, Lecture 3: Counting at Scale
Modeling Social Data, Lecture 3: Counting at ScaleModeling Social Data, Lecture 3: Counting at Scale
Modeling Social Data, Lecture 3: Counting at Scale
 
Modeling Social Data, Lecture 2: Introduction to Counting
Modeling Social Data, Lecture 2: Introduction to CountingModeling Social Data, Lecture 2: Introduction to Counting
Modeling Social Data, Lecture 2: Introduction to Counting
 
Modeling Social Data, Lecture 1: Case Studies
Modeling Social Data, Lecture 1: Case StudiesModeling Social Data, Lecture 1: Case Studies
Modeling Social Data, Lecture 1: Case Studies
 
NYC Data Science Meetup: Computational Social Science
NYC Data Science Meetup: Computational Social ScienceNYC Data Science Meetup: Computational Social Science
NYC Data Science Meetup: Computational Social Science
 
Technical Tricks of Vowpal Wabbit
Technical Tricks of Vowpal WabbitTechnical Tricks of Vowpal Wabbit
Technical Tricks of Vowpal Wabbit
 
Data-driven modeling: Lecture 10
Data-driven modeling: Lecture 10Data-driven modeling: Lecture 10
Data-driven modeling: Lecture 10
 
Data-driven modeling: Lecture 09
Data-driven modeling: Lecture 09Data-driven modeling: Lecture 09
Data-driven modeling: Lecture 09
 
Using Data to Understand the Brain
Using Data to Understand the BrainUsing Data to Understand the Brain
Using Data to Understand the Brain
 

Último

Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...RKavithamani
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxRoyAbrique
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpinRaunakKeshri1
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 

Último (20)

Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpin
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 

Network Analysis Concepts and Algorithms

  • 1. Networks Part I Sharad Goel Columbia University Computational Social Science: Lecture 5 February 22, 2013
  • 2. High School Dating Network [ Bearman, Moody, & Stovel, 2004 ] Image by Mark Newman, via Easley & Kleinberg
  • 3. Corporate E-mail Communication [ Adamic & Adar, 2004 ] via Easley & Kleinberg
  • 4. “Internet map 2004” from Math Insight http://mathinsight.org/image/internet_map_jurvetson_2004
  • 5. Networks/Graphs Nodes/vertices people, organizations, webpages, computers Edges represent connections between pairs of nodes
  • 6.
  • 7.
  • 8.
  • 9. 2 5 11 1 4 9 6 2
  • 10. 1 2 4 6 4 2 1 2 3 7 13
  • 11. 3 1 2 5 4 1 2 3 4 5 6 7 7 1 0 1 0 1 0 0 0 6 2 1 0 1 0 1 0 0 3 0 1 0 0 1 0 0 4 1 0 0 0 1 0 0 5 0 1 1 1 0 1 1 6 0 0 0 0 1 0 0 7 0 0 0 0 1 0 0
  • 12. 3 1 2 5 4 7 1 {2, 4} 6 2 {1, 3, 5} 3 {2, 5} 4 {1, 5} 5 {2, 3, 4, 6, 7} 6 {5} 7 {5}
  • 13. 3 1 2 5 4 (1, 2) 7 (1, 4) 6 (2, 3) (2, 5) (3, 5) (4, 5) (5, 6) (5, 7)
  • 14. 2 5 3 1 2 11 1 4 9 5 4 2 6 7 6 1 {2:2, 4:4} 2 {1:2, 3:5, 5:11} 3 {2:5, 5:1} 4 {1:4, 5:9} 5 {2:11, 3:1, 4:9, 6:6, 7:2} 6 {5:6} 7 {5:2}
  • 15. 2 5 3 1 2 11 1 4 9 5 4 2 6 (1, 2, 2) 7 (1, 4, 4) 6 (2, 3, 5) (2, 5, 11) (3, 5, 1) (4, 5, 9) (5, 6, 6) (5, 7, 2)
  • 16. Adjacency list  edge list (weighted) directed network Input Adjacency list Output Edge list
  • 17. Adjacency list  edge list (weighted) directed network Map input: u {w1, …, wk} foreach wi: output (u, wi) Reduce pass
  • 18. Edge list  adjacency list (weighted) undirected network Input Edge list Output Adjacency list
  • 19. Edge list  adjacency list (weighted) undirected network Map input: (u, w) output: (u, w), key := u output: (w, u), key := w Reduce input: u, {w1, …, wk} identity
  • 20. 3 1 2 5 4 7 6 Degree of node u # of edges incident on u
  • 21. Edge list  node degrees undirected network Input Edge list Output Node degrees
  • 22. Edge list  node degrees undirected network Map input: (u, w) output: (u, w), key := u output: (w, u), key := w Reduce input: u, {w1, …, wk} output: u, k
  • 23. Edge list  degree distribution undirected network Input Edge list Output Degree distribution
  • 24. Edge list  degree distribution undirected network Map input: (u, w) output: (u, w), key := u output: (w, u), key := w Reduce input: u, {w1, …, wk} output: u, k
  • 25. Edge list  degree distribution undirected network Map input: u, k identity, key := k Reduce input: k, {u1, …, um} output: k, m
  • 26. 3 1 2 5 4 7 6 Path Sequence of nodes with each consecutive pair connected by an edge
  • 27. 3 1 2 5 4 7 6 Cycle Path with at least three edges with first and last nodes the same and all other nodes distinct
  • 28. Connected Graph There is a path between every pair of nodes
  • 29. Connected Graph There is a path between every pair of nodes
  • 30. Connected Component A connected subset of nodes that is not contained in any larger connected subset
  • 31. Distance Length of the shortest path between two nodes
  • 32. Distance Length of the shortest path between two nodes
  • 33. Breadth-first Search iteratively explore nodes one layer at a time
  • 34. # initialize distances dist = {} for u in G: dist[u] = NA dist [u1] = 0 d=0 periphery = { u1 } while len(periphery) > 0: # find nodes one step away from the periphery next_level = {} for u in periphery: next_level += { w for w in neighbors[u] if dist[w] == NA } # update distances d += 1 for u in next_level: dist[u] = d # update periphery periphery = next_level
  • 35. BFS @ scale undirected network Input edge list, starting node u0 Output Distance to all nodes from u0
  • 36. BFS @ scale undirected network Input: distances (u, d) 1. join distances with edge list 2. foreach (u, d, w) output (w, d+1) [ also output (u0, 0) ] 3. group by w, and output min d