4 Nodes and Edges In a social graph, nodes are people and any pair of people connected denotes the friendship, relationships, social ties between them In a web graph, nodes represent sites and the connection between nodes indicates web-links between them The size of the graph is V = n Number of edges (size of the edge-set E =m Measures Graph and Essentials Metrics 4 4

5 Directed Edges and Directed Graphs Edges can have directions. A directed edge is sometimes called an arc Edges are represented using their end-points e(v2,v1). In undirected graphs both representations are the same Measures Graph and Essentials Metrics 5 5

6 Neighborhood and Degree (In-degree, outdegree) For any node v, the set of nodes it is connected to via an edge is called its neighborhood and is represented as N(v) The number of edges connected to one node is the degree of that node (the size of its neighborhood) Degree of a node i is usually presented using notation di In case of directed graphs In-degrees is the number of edges pointing towards a node Out-degree is the number of edges pointing away from a node Measures Graph and Essentials Metrics 6 6

7 Degree and Degree Distribution Theorem 1. The summation of degrees in an undirected graph is twice the number of edges Lemma 1. The number of nodes with odd degree is even Lemma 2. In any directed graph, the summation of in-degrees is equal to the summation of out-degrees, Measures Graph and Essentials Metrics 7 7

8 Degree Distribution When dealing with very large graphs, how nodes degrees are distributed is an important concept to analyze and is called Degree Distribution Where is the number of nodes with degree d Degree distribution can be computed from degree sequence: Degree distribution histogram The x-axis represents the degree and the y-axis represents the number of nodes (frequency) having that degree Measures Graph and Essentials Metrics 8 8

9 Subgraph Graph G can be represented as a pair G(V, E), where V is the node set and E is the edge set G (V, E ) is a subgraph of G(V, E) (induced subgraph) Measures Graph and Essentials Metrics 9 9

11 Adjacency Matrix A ij 1, if there is an edge between nodes vi and vj 0, otherwise Diagonal Entries are self-links or loops Social media networks have very sparse adjacency matrices Measures Graph and Essentials Metrics 11 11

12 Adjacency List In an adjacency list for every node, we maintain a list of all the nodes that it is connected to The list is usually sorted based on the node order or other preferences Measures Graph and Essentials Metrics 12 12

13 Edge List In this representation, each element is an edge and is usually represented as (u, v), denoting that node u is connected to node v via an edge Measures Graph and Essentials Metrics 13 13

16 Simple Graphs and Multigraphs Simple graphs are graphs where only a single edge can be between any pair of nodes Multigraphs are graphs where you can have multiple edges between two nodes and loops Simple graph Multigraph The adjacency matrix for multigraphs can include numbers larger than one, indicating multiple edges between nodes Measures Graph and Essentials Metrics 16 16

17 Weighted Graph A weighted graph is one where edges are associated with weights For example, a graph could represent a map where nodes are cities and edges are routes between them The weight associated with each edge could represent the distance between these cities G(V, E, W) A ij w,w R 0, There is no edge between i and j Measures Graph and Essentials Metrics 17 17

18 Signed Graph When weights are binary (0/1, -1/1, +/-) we have a signed graph It is used to represent friends or foes It is also used to represent social status Measures Graph and Essentials Metrics 18 18

20 Adjacent nodes and Incident Edges Two nodes are adjacent if they are connected via an edge. Two edges are incident, if they share on endpoint When the graph is directed, edge directions must match for edges to be incident Measures Graph and Essentials Metrics 20 20

21 Walk, Path, Trail, Tour, and Cycle Walk: A walk is a sequence of incident edges visited one after another Open walk: A walk does not end where it starts Close walk: A walk returns to where it starts Representing a walk: A sequence of edges: e 1, e 2,, e n A sequence of nodes: v 1, v 2,, v n Length of walk: the number of visited edges Length of walk= 8 Measures Graph and Essentials Metrics 21 21

22 Path A walk where nodes and edges are distinct is called a path and a closed path is called a cycle The length of a path or cycle is the number of edges visited in the path or cycle Length of path= 4 Measures Graph and Essentials Metrics 22 22

23 Random walk A walk that in each step the next node is selected randomly among the neighbors The weight of an edge can be used to define the probability of visiting it For all edges that start at v i the following equation holds Measures Graph and Essentials Metrics 23 23

24 Connectivity A node v i is connected to node v j (or reachable from v j ) if it is adjacent to it or there exists a path from v i to v j. A graph is connected, if there exists a path between any pair of nodes in it In a directed graph, a graph is strongly connected if there exists a directed path between any pair of nodes In a directed graph, a graph is weakly connected if there exists a path between any pair of nodes, without following the edge directions A graph is disconnected, if it not connected. Measures Graph and Essentials Metrics 24 24

25 Connectivity: Example Measures Graph and Essentials Metrics 25 25

26 Component A component in an undirected graph is a connected subgraph, i.e., there is a path between every pair of nodes inside the component In directed graphs, we have a strongly connected components when there is a path from u to v and one from v to u for every pair (u,v). The component is weakly connected if replacing directed edges with undirected edges results in a connected component Measures Graph and Essentials Metrics 26 26

28 Shortest Path Shortest Path is the path between two nodes that has the shortest length. The concept of the neighborhood of a node can be generalized using shortest paths. An n-hop neighborhood of a node is the set of nodes that are within n hops distance from the node. Measures Graph and Essentials Metrics 28 28

29 Diameter The diameter of a graph is the length of the longest shortest path between any pair of nodes between any pairs of nodes in the graph How big is the diameter of the web? Measures Graph and Essentials Metrics 29 29

30 Special Graphs Measures Graph and Essentials Metrics 30 30

31 Trees and Forests Trees are special cases of undirected graphs A tree is a graph structure that has no cycle in it In a tree, there is exactly one path between any pair of nodes In a tree: V = E + 1 A set of disconnected trees is called a forest A forest containing 3 trees Measures Graph and Essentials Metrics 31 31

32 Special Subgraphs Measures Graph and Essentials Metrics 32 32

33 Spanning Trees For any connected graph, the spanning tree is a subgraph and a tree that includes all the nodes of the graph There may exist multiple spanning trees for a graph. For a weighted graph and one of its spanning tree, the weight of that spanning tree is the summation of the edge weights in the tree. Among the many spanning trees found for a weighted graph, the one with the minimum weight is called the minimum spanning tree (MST) Measures Graph and Essentials Metrics 33 33

34 Steiner Trees Given a weighted graph G : (V, E, W) and a subset of nodes V V (terminal nodes ), the Steiner tree problem aims to find a tree such that it spans all the V nodes and the weight of this tree is minimized Measures Graph and Essentials Metrics 34 34

35 Complete Graphs A complete graph is a graph where for a set of nodes V, all possible edges exist in the graph In a complete graph, any pair of nodes are connected via an edge Measures Graph and Essentials Metrics 35 35

36 Planar Graphs A graph that can be drawn in such a way that no two edges cross each other (other than the endpoints) is called planar Planar Graph Non-planar Graph Measures Graph and Essentials Metrics 36 36

37 Bipartite Graphs A bipartite graph G(V; E) is a graph where the node set can be partitioned into two sets such that, for all edges, one end-point is in one set and the other end-point is in the other set. Measures Graph and Essentials Metrics 37 37

38 Affiliation Networks An affiliation network is a bipartite graph. If an individual is associated with an affiliation, an edge connects the corresponding nodes. Measures Graph and Essentials Metrics 38 38

39 Regular Graphs A regular graph is one in which all nodes have the same degree Regular graphs can be connected or disconnected In a k-regular graph, all nodes have degree k Complete graphs are examples of regular graphs Measures Graph and Essentials Metrics 39 39

43 Graph/Tree Traversal Traversal 1. All users are visited; and 2. No user is visited more than once. There are two main techniques: Depth-First Search (DFS) Breadth-First Search (BFS) Measures Graph and Essentials Metrics 44 44

44 Depth-First Search (DFS) Depth-First Search (DFS) starts from a node i, selects one of its neighbors j from N(i) and performs Depth-First Search on j before visiting other neighbors in N(i). The algorithm can be used both for trees and graphs The algorithm can be implemented using a stack structure Measures Graph and Essentials Metrics 45 45

47 Breadth-First Search (BFS) BFS starts from a node, visits all its immediate neighbors first, and then moves to the second level by traversing their neighbors. The algorithm can be used both for trees and graphs The algorithm can be implemented using a queue structure Measures Graph and Essentials Metrics 48 48

50 Shortest Path When a graph is connected, there is a chance that multiple paths exist between any pair of nodes In many scenarios, we want the shortest path between two nodes in a graph Dijkstra s Algorithm It is designed for weighted graphs with non-negative edges It finds shortest paths that start from a provided node s to all other nodes It finds both shortest paths and their respective lengths Measures Graph and Essentials Metrics 51 51

51 Dijkstra s Algorithm: Finding the shortest path 1. Initiation: Assign zero to the source node and infinity to all other nodes Mark all nodes unvisited Set the source node as current 2. For the current node, consider all of its unvisited neighbors and calculate their tentative distances If tentative distance (current node s distance + edge weight) is smaller than neighbor s distance, then Neighbor s distance = tentative distance 3. After considering all of the neighbors of the current node, mark the current node as visited and remove it from the unvisited set A visited node will never be checked again and its distance recorded now is final and minimal 4. If the destination node has been marked visited or if the smallest tentative distance among the nodes in the unvisited set is infinity, then stop 5. Set the unvisited node marked with the smallest tentative distance as the next "current node" and go to step 2 Measures Graph and Essentials Metrics 52 52

53 Dijkstra s Algorithm Dijkstra s algorithm is source-dependent and finds the shortest paths between the source node and all other nodes. To generate all-pair shortest paths, one can run dijsktra s algorithm n times or use other algorithms such as Floyd-Warshall algorithm. If we want to compute the shortest path from source v to destination d, we can stop the algorithm once the shortest path to the destination node has been determined Measures Graph and Essentials Metrics 54 54

54 Other slides Measures Graph and Essentials Metrics 55 55

55 Internet Measures Graph and Essentials Metrics 56 56

56 Phoenix Road Network Measures Graph and Essentials Metrics 57 57

57 Social Networks and Social Network Analysis A social network A network where elements have a social structure A set of actors (such as individuals or organizations) A set of ties (connections between individuals) Social networks examples: your family network, your friend network, your colleagues,etc. To analyze these networks we can use Social Network Analysis (SNA) Social Network Analysis is an interdisciplinary field from social sciences, statistics, graph theory, complex networks, and now computer science Measures Graph and Essentials Metrics 58 58

58 Social Networks: Examples High school friendship High school dating Measures Graph and Essentials Metrics 59 59

59 Webgraph A webgraph is a way of representing how internet sites are connected on the web In general, a web graph is a directed multigraph Nodes represent sites and edges represent links between sites. Two sites can have multiple links pointing to each other and can have loops (links pointing to themselves) Measures Graph and Essentials Metrics 60 60

61 Prim s Algorithm: Finding Minimum Spanning Tree It finds minimal spanning trees in a weighted graph It starts by selecting a random node and adding it to the spanning tree. It then grows the spanning tree by selecting edges which have one endpoint in the existing spanning tree and one endpoint among the nodes that are not selected yet. Among the possible edges, the one with the minimum weight is added to the set (along with its end-point). This process is iterated until the graph is fully spanned Measures Graph and Essentials Metrics 62 62

2.3 Scheduling jobs on identical parallel machines There are jobs to be processed, and there are identical machines (running in parallel) to which each job may be assigned Each job = 1,,, must be processed

What is a Network? Network/Graph Theory Network = graph Informally a graph is a set of nodes joined by a set of lines or arrows. 1 1 2 3 2 3 4 5 6 4 5 6 Graph-based representations Representing a problem

Beyond Watson: Predictive Analytics and Big Data U.S. National Security Agency Research Directorate - R6 Technical Report February 3, 2014 300 years before Watson there was Euler! The first (Jeopardy!)

Klout Measures and Metrics 22 Why Do We Need Measures? Who are the central figures (influential individuals) in the network? What interaction patterns are common in friends? Who are the like-minded users

. iscuss following. Graph graph G consist of a non empty set V called the set of nodes (points, vertices) of the graph, a set which is the set of edges and a mapping from the set of edges to a set of pairs

136 TER 4. INDUCTION, GRHS ND TREES 4.3 Graphs In this chapter we introduce a fundamental structural idea of discrete mathematics, that of a graph. Many situations in the applications of discrete mathematics

Zachary Monaco Georgia College Olympic Coloring: Go For The Gold Coloring the vertices or edges of a graph leads to a variety of interesting applications in graph theory These applications include various

Chapter 6: Graph Theory Graph theory deals with routing and network problems and if it is possible to find a best route, whether that means the least expensive, least amount of time or the least distance.

CS2 Algorithms and Data Structures Note 11 Breadth-First Search and Shortest Paths In this last lecture of the CS2 Algorithms and Data Structures thread we will consider the problem of computing distances

A Review And Evaluations Of Shortest Path Algorithms Kairanbay Magzhan, Hajar Mat Jani Abstract: Nowadays, in computer networks, the routing is based on the shortest path problem. This will help in minimizing

Finding and counting given length cycles Noga Alon Raphael Yuster Uri Zwick Abstract We present an assortment of methods for finding and counting simple cycles of a given length in directed and undirected

Distributed Computing over Communication Networks: Maximal Independent Set What is a MIS? MIS An independent set (IS) of an undirected graph is a subset U of nodes such that no two nodes in U are adjacent.

Divide-and-Conquer Three main steps : 1. divide; 2. conquer; 3. merge. 1 Let I denote the (sub)problem instance and S be its solution. The divide-and-conquer strategy can be described as follows. Procedure

Graph theory and network analysis Devika Subramanian Comp 140 Fall 2008 1 The bridges of Konigsburg Source: Wikipedia The city of Königsberg in Prussia was set on both sides of the Pregel River, and included

Unit I (Analysis of Algorithms) 1. What are algorithms and how they are useful? 2. Describe the factor on best algorithms depends on? 3. Differentiate: Correct & Incorrect Algorithms? 4. Write short note:

Euler Paths and Euler Circuits An Euler path is a path that uses every edge of a graph exactly once. An Euler circuit is a circuit that uses every edge of a graph exactly once. An Euler path starts and

Class One: Degree Sequences For our purposes a graph is a just a bunch of points, called vertices, together with lines or curves, called edges, joining certain pairs of vertices. Three small examples of

UPPER BOUNDS ON THE L(2, 1)-LABELING NUMBER OF GRAPHS WITH MAXIMUM DEGREE ANDREW LUM ADVISOR: DAVID GUICHARD ABSTRACT. L(2,1)-labeling was first defined by Jerrold Griggs [Gr, 1992] as a way to use graphs

SECIONS.5-.6 NOES ON GRPH HEORY NOION ND IS USE IN HE SUDY OF SPRSE SYMMERIC MRICES graph G ( X, E) consists of a finite set of nodes or vertices X and edges E. EXMPLE : road map of part of British Columbia

COMBINATORIAL PROPERTIES OF THE HIGMAN-SIMS GRAPH ZACHARY ABEL 1. Introduction In this survey we discuss properties of the Higman-Sims graph, which has 100 vertices, 1100 edges, and is 22 regular. In fact

Social Media Mining An Introduction Reza Zafarani Mohammad Ali Abbasi Huan Liu Draft Version: April 20, 2014 By permission of Cambridge University Press, this preprint is free. Users can make one hardcopy

Dynamic Programming Applies when the following Principle of Optimality holds: In an optimal sequence of decisions or choices, each subsequence must be optimal. Translation: There s a recursive solution.

Detection of local affinity patterns in big data Andrea Marinoni, Paolo Gamba Department of Electronics, University of Pavia, Italy Abstract Mining information in Big Data requires to design a new class

CS787: Advanced Algorithms Lecture 5: Applications of Network Flow In the last lecture, we looked at the problem of finding the maximum flow in a graph, and how it can be efficiently solved using the Ford-Fulkerson

Graph Theoretic Models and Tools for the Analysis of Dynamic Wireless Multihop Networks Guoqiang Mao School of Electrical and Information Engineering The University of Sydney National ICT Australia Limited[1],

A -factor in which each cycle has long length in claw-free graphs Roman Čada Shuya Chiba Kiyoshi Yoshimoto 3 Department of Mathematics University of West Bohemia and Institute of Theoretical Computer Science

Disjoint Compatible Geometric Matchings Mashhood Ishaque Diane L. Souvaine Csaba D. Tóth Abstract We prove that for every even set of n pairwise disjoint line segments in the plane in general position,

A Fast Algorithm For Finding Hamilton Cycles by Andrew Chalaturnyk A thesis presented to the University of Manitoba in partial fulfillment of the requirements for the degree of Masters of Science in Computer

To ensure the functioning of the site, we use cookies. We share information about your activities on the site with our partners and Google partners: social networks and companies engaged in advertising and web analytics. For more information, see the Privacy Policy and Google Privacy &amp Terms.
Your consent to our cookies if you continue to use this website.