Graphs Graph: Nodes and Edges • A graph is a way of specifying relationships among a collection of items. • Graph G=(V, E) – ordered pair V- set of nodes E - set of edges b a c g f d e h Graphs as Models of Networks Graphs as Models of Networks (cont.) Paths • A path is a sequence of nodes with each consecutive pair in the sequence is connected by an edge. Length of the path is the number of edges in the path. V U X W Y Z Cycles • A cycle is a path with at least three edges, in which the first and last nodes are the same, but otherwise all nodes are distinct. Connectivity • A graph is connected if, for every pair of nodes, there is a path between them Connected component • A connected component of a graph is a subset of the nodes such that (i) every node in the subset has a path to every other and (ii) the subset is not part of some larger set Giant Components • A giant component is a connected component that contains a significant fraction of all nodes Breadth-First Search • Popular algorithm for computing distances from a source node S The Small-World Phenomenon • Social network (nodes are people, link if two people are friends). • Paths are surprisingly short! • Six degrees of separation. Six degrees of separation • Stanley Milgram and his colleagues in the 1960s Microsoft Instant Messenger research Erdos number Bacon number • Three students at Albright College in Pennsylvania (1994) • Graph of movie actors and actresses: nodes are performers, an edge connects two performers if they’ve appeared together in a movie • Bacon number is the distance from the performer to Kevin Bacon Large Network Data Sets • Why to study a particular network data set? – study the actual domain that the data set comes from; – looking for network properties that appear to be common across many different domains; – proxy for a related network that is impossible to measure. Large Network Data Sets - Examples • Collaboration Graphs (who works with whom in a specific setting) • Who-Talks-to-Whom Graphs • Information Linkage Graphs • Technological Networks • Networks in the Natural World. Exercises A node X is pivotal for a pair of distinct nodes Y, Z if X lies on every shortest path between Y and Z (and X ≠ Y, Z). Question 1 (a) Give an example of a graph in which every node is pivotal for at least one pair of nodes. (b) Give an example of a graph in which every node is pivotal for at least two different pairs of nodes. (c) Give an example of a graph having at least four nodes in which there is a single node X that is pivotal for every pair of nodes (not counting pairs that include X) Exercises (cont.) • A node X is a gatekeeper if for some other nodes Y ≠ Z, every path from Y to Z passes through X. • X is a local gatekeeper if there are two neighbors of X, Y ≠ Z, that are not connected by an edge. Question 2 (a) Give an example of a graph in which more than half of all nodes are gatekeepers. (b) Give an example of a graph in which there are no gatekeepers, but in which every node is a local gatekeeper. Exercises (cont.) • A diameter is the maximum distance between any pair of nodes in the graph. • An average distance is the average distance over all pairs of nodes in the graph. Question 3 (a) Describe an example of a graph where the diameter is more than three times as large as the average distance. (b) Describe how you could extend your construction to produce graphs in which the diameter exceeds the average distance by as large a factor as you’d like. (That is, for every number c, can you produce a graph in which the diameter is more than c times as large as the average distance?)
© Copyright 2026 Paperzz