Lecture 4: Mathematics of Networks CS 790g: Complex Networks Slides are modified from Networks: Theory and Application by Lada Adamic.

Slides:



Advertisements
Similar presentations
Great Theoretical Ideas in Computer Science
Advertisements

Chapter 9 Graphs.
8.3 Representing Relations Connection Matrices Let R be a relation from A = {a 1, a 2,..., a m } to B = {b 1, b 2,..., b n }. Definition: A n m  n connection.
Introduction to Graph “theory”
CompSci 102 Discrete Math for Computer Science April 19, 2012 Prof. Rodger Lecture adapted from Bruce Maggs/Lecture developed at Carnegie Mellon, primarily.
C++ Programming: Program Design Including Data Structures, Third Edition Chapter 21: Graphs.
1 Representing Graphs. 2 Adjacency Matrix Suppose we have a graph G with n nodes. The adjacency matrix is the n x n matrix A=[a ij ] with: a ij = 1 if.
Graph & BFS.
Lists A list is a finite, ordered sequence of data items. Two Implementations –Arrays –Linked Lists.
Chapter 9 Graph algorithms Lec 21 Dec 1, Sample Graph Problems Path problems. Connectedness problems. Spanning tree problems.
Graphs G = (V,E) V is the vertex set. Vertices are also called nodes and points. E is the edge set. Each edge connects two different vertices. Edges are.
W. D. Grover TRLabs & University of Alberta © Wayne D. Grover 2002, 2003 Graph theory and routing (initial background) E E Lecture 4.
CS/ENGRD 2110 Object-Oriented Programming and Data Structures Fall 2014 Doug James Lecture 17: Graphs.
Chapter 9: Graphs Basic Concepts
Graph: Relations There are many kinds of social relations. For example: Role-based : brother of, father of, sister of, etc. : friend of, acquaintance of,
School of Information University of Michigan SI 614 Basic network concepts and intro to Pajek Lecture 2 Instructor: Lada Adamic.
Social Media Mining Graph Essentials.
ALG0183 Algorithms & Data Structures Lecture 18 The basics of graphs. 8/25/20091 ALG0183 Algorithms & Data Structures by Dr Andy Brooks.
Graph. Data Structures Linear data structures: –Array, linked list, stack, queue Non linear data structures: –Tree, binary tree, graph and digraph.
Let G be a pseudograph with vertex set V, edge set E, and incidence mapping f. Let n be a positive integer. A path of length n between vertex v and vertex.
Chapter 2 Graph Algorithms.
Lecture 12: Network Visualization Slides are modified from Lada Adamic, Adam Perer, Ben Shneiderman, and Aleks Aris.
Network properties Slides are modified from Networks: Theory and Application by Lada Adamic.
GRAPHS CSE, POSTECH. Chapter 16 covers the following topics Graph terminology: vertex, edge, adjacent, incident, degree, cycle, path, connected component,
1 ELEC692 Fall 2004 Lecture 1b ELEC692 Lecture 1a Introduction to graph theory and algorithm.
Foundations of Discrete Mathematics
7.1 and 7.2: Spanning Trees. A network is a graph that is connected –The network must be a sub-graph of the original graph (its edges must come from the.
Lecture 10: Graphs Graph Terminology Special Types of Graphs
Week 11 - Wednesday.  What did we talk about last time?  Graphs  Euler paths and tours.
Nyhoff, ADTs, Data Structures and Problem Solving with C++, Second Edition, © 2005 Pearson Education, Inc. All rights reserved Graphs.
Vertices and Edges Introduction to Graphs and Networks Mills College Spring 2012.
1 CS104 : Discrete Structures Chapter V Graph Theory.
Lecture 13: Network centrality Slides are modified from Lada Adamic.
Mathematics of Networks (Cont)
Week 11 - Monday.  What did we talk about last time?  Binomial theorem and Pascal's triangle  Conditional probability  Bayes’ theorem.
Data Structures & Algorithms Graphs
Agenda Review: –Planar Graphs Lecture Content:  Concepts of Trees  Spanning Trees  Binary Trees Exercise.
1 12/2/2015 MATH 224 – Discrete Mathematics Formally a graph is just a collection of unordered or ordered pairs, where for example, if {a,b} G if a, b.
Most of contents are provided by the website Graph Essentials TJTSD66: Advanced Topics in Social Media.
Network Questions: Structural 1. How many connections does the average node have? 2. Are some nodes more connected than others? 3. Is the entire network.
School of Information University of Michigan Unless otherwise noted, the content of this course material is licensed under a Creative Commons Attribution.
Graphs A ‘Graph’ is a diagram that shows how things are connected together. It makes no attempt to draw actual paths or routes and scale is generally inconsequential.
Graph Theory and Applications
Graphs A graphs is an abstract representation of a set of objects, called vertices or nodes, where some pairs of the objects are connected by links, called.
Graph theory and networks. Basic definitions  A graph consists of points called vertices (or nodes) and lines called edges (or arcs). Each edge joins.
Data Structures & Algorithms Graphs Richard Newman based on book by R. Sedgewick and slides by S. Sahni.
Graphs 황승원 Fall 2010 CSE, POSTECH. 2 2 Graphs G = (V,E) V is the vertex set. Vertices are also called nodes and points. E is the edge set. Each edge connects.
GRAPHS. Graph Graph terminology: vertex, edge, adjacent, incident, degree, cycle, path, connected component, spanning tree Types of graphs: undirected,
Graphs Basic properties.
Class 2: Graph Theory IST402. Can one walk across the seven bridges and never cross the same bridge twice? Network Science: Graph Theory THE BRIDGES OF.
Chapter 9: Graphs.
Introduction to Graph Theory By: Arun Kumar (Asst. Professor) (Asst. Professor)
Class 2: Graph Theory IST402.
Great Theoretical Ideas in Computer Science for Some.
COMPSCI 102 Introduction to Discrete Mathematics.
Graph Theory Graph Theory - History Leonhard Euler's paper on “Seven Bridges of Königsberg”, published in 1736.
Graphs and Matrices Spring 2012 Mills College Dan Ryan Lecture Slides by Dan Ryan is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike.
Lecture 20. Graphs and network models 1. Recap Binary search tree is a special binary tree which is designed to make the search of elements or keys in.
1 Data Structures and Algorithms Graphs. 2 Graphs Basic Definitions Paths and Cycles Connectivity Other Properties Representation Examples of Graph Algorithms:
Matrix Representation of Graphs
Lecture 19: CONNECTIVITY Sections
Mathematics of Networks
Network Science: A Short Introduction i3 Workshop
Chapter 9: Graphs Basic Concepts
GRAPHS Lecture 17 CS2110 Spring 2018.
Discrete Mathematics for Computer Science
Chapter 9: Graphs Basic Concepts
Agenda Review Lecture Content: Shortest Path Algorithm
Heaps Chapter 6 Section 6.9.
Presentation transcript:

Lecture 4: Mathematics of Networks CS 790g: Complex Networks Slides are modified from Networks: Theory and Application by Lada Adamic

What are networks? Networks are collections of points joined by lines. “Network” ≡ “Graph” pointslinesDomain verticesedges, arcsmath nodeslinkscomputer science sitesbondsphysics actorsties, relationssociology node edge 2

Network elements: edges Directed (also called arcs) A -> B (E BA ) A likes B, A gave a gift to B, A is B’s child Undirected A B or A – B A and B like each other A and B are siblings A and B are co-authors Edge attributes weight (e.g. frequency of communication) ranking (best friend, second best friend…) type (friend, relative, co-worker) properties depending on the structure of the rest of the graph: e.g. betweenness Multiedge: multiple edges between two pair of nodes Self-edge: from a node to itself 3

Directed networks Ada Cora Louise Jean Helen Martha Alice Robin Marion Maxine Lena Hazel Hilda Frances Eva Ruth Edna Adele Jane Anna Mary Betty Ella Ellen Laura Irene girls’ school dormitory dining-table partners (Moreno, The sociometry reader, 1960) first and second choices shown 4

Edge weights can have positive or negative values One gene activates/ inhibits another One person trusting/ distrusting another Research challenge: How does one ‘propagate’ negative feelings in a social network? Is my enemy’s enemy my friend? Transcription regulatory network in baker’s yeast 5

Adjacency matrices Representing edges (who is adjacent to whom) as a matrix A ij = 1 if node i has an edge to node j = 0 if node i does not have an edge to j A ii = 0 unless the network has self-loops If self-loop, A ii =? A ij = A ji if the network is undirected, or if i and j share a reciprocated edge i j i i j Example: A = 6

Adjacency lists Edge list Adjacency list is easier to work with if network is large sparse quickly retrieve all neighbors for a node 1: 2: 3 4 3: 2 4 4: 5 5:

Nodes Node network properties from immediate connections indegree how many directed edges (arcs) are incident on a node outdegree how many directed edges (arcs) originate at a node degree (in or out) number of edges incident on a node outdegree=2 indegree=3 degree=5 8

HyperGraphs Edges join more than two nodes at a time (hyperEdge) Affliation networks Examples Families Subnetworks Can be transformed to a bipartite network 9 CD AB CD AB

Bipartite (two-mode) networks edges occur only between two groups of nodes, not within those groups for example, we may have individuals and events directors and boards of directors customers and the items they purchase metabolites and the reactions they participate in

in matrix notation B ij = 1 if node i from the first group links to node j from the second group = 0 otherwise B is usually not a square matrix! for example: we have n customers and m products i j B =

going from a bipartite to a one-mode graph One mode projection two nodes from the first group are connected if they link to the same node in the second group naturally high occurrence of cliques some loss of information Can use weighted edges to preserve group occurrences Two-mode network group 1 group 2

Collapsing to a one-mode network i and k are linked if they both link to j P ij =  k B ki B kj P’ = B B T the transpose of a matrix swaps B xy and B yx if B is an nxm matrix, B T is an mxn matrix i j=1 k j=2 B =B T =

Matrix multiplication general formula for matrix multiplication Z ij =  k X ik Y kj let Z = P’, X = B, Y = B T P’ = = = 1*1+1*1 + 1*0 + 1*0 = 2

Collapsing a two-mode network to a one mode-network Assume the nodes in group 1 are people and the nodes in group 2 are movies The diagonal entries of P’ give the number of movies each person has seen The off-diagonal elements of P’ give the number of movies that both people have seen P’ is symmetric P’ =

Trees Trees are undirected graphs that contain no cycles For n nodes, number of edges m = n-1 A node can be dedicated as the root

examples of trees In nature trees river networks arteries (or veins, but not both) Man made sewer system Computer science binary search trees decision trees (AI) Network analysis minimum spanning trees from one node – how to reach all other nodes most quickly may not be unique, because shortest paths are not always unique depends on weight of edges

Planar graphs A graph is planar if it can be drawn on a plane without any edges crossing

Kuratowski’s theorem Every non-planar network contains at least one subgraph that is an expansion of K 5 or K 3,3. K 5 K 3,3 Expansion: Addition of new node in the middle of edges. Research challenge: Degree of planarity? 19

#s of planar graphs of different sizes 1:1 2:2 3:4 4:11 Every planar graph has a straight line embedding

Edge contractions defined A finite graph G is planar if and only if it has no subgraph that is homeomorphic or edge-contractible to the complete graph in five vertices (K 5 ) or the complete bipartite graph K 3, 3. (Kuratowski's Theorem)

Peterson graph Example of using edge contractions to show a graph is not planar

Cliques and complete graphs K n is the complete graph (clique) with K vertices each vertex is connected to every other vertex there are n*(n-1)/2 undirected edges K5K5 K8K8 K3K3

Bi-cliques (cliques in bipartite graphs) K m,n is the complete bipartite graph with m and n vertices of the two different types K 3,3 maps to the utility graph Is there a way to connect three utilities, e.g. gas, water, electricity to three houses without having any of the pipes cross? K 3,3 Utility graph

Node degree Outdegree = A = example: outdegree for node 3 is 2, which we obtain by summing the number of non- zero entries in the 3 rd row Indegree = A = example: the indegree for node 3 is 1, which we obtain by summing the number of non-zero entries in the 3 rd column

Degree sequence and Degree distribution Degree sequence: An ordered list of the (in,out) degree of each node In-degree sequence: [2, 2, 2, 1, 1, 1, 1, 0] Out-degree sequence: [2, 2, 2, 2, 1, 1, 1, 0] (undirected) degree sequence: [3, 3, 3, 2, 2, 1, 1, 1] Degree distribution: A frequency count of the occurrence of each degree In-degree distribution: [(2,3) (1,4) (0,1)] Out-degree distribution: [(2,4) (1,3) (0,1)] (undirected) distribution: [(3,3) (2,2) (1,3)] 26

Structural Metrics: Degree distribution 27 What if it is directed ?

Graph density 28

Characterizing networks: How dense are they?

network metrics: graph density Of the connections that may exist between n nodes directed graph e max = n*(n-1) undirected graph e max = n*(n-1)/2 What fraction are present? density = e/ e max For example, out of 12 possible connections, this graph has 7, giving it a density of 7/12 = Would this measure be useful for comparing networks of different sizes (different numbers of nodes)? 30