Presentation is loading. Please wait.

Presentation is loading. Please wait.

Class News and Notes 1/29 Check email and web page Mon re: Tue class Start reading in “Six Degrees” –other assigned papers to follow HW1 due a week from.

Similar presentations


Presentation on theme: "Class News and Notes 1/29 Check email and web page Mon re: Tue class Start reading in “Six Degrees” –other assigned papers to follow HW1 due a week from."— Presentation transcript:

1 Class News and Notes 1/29 Check email and web page Mon re: Tue class Start reading in “Six Degrees” –other assigned papers to follow HW1 due a week from today –don’t procrastinate, esp. on computer exercises

2 A Brief Introduction to Graph Theory Networked Life CSE 112 Spring 2004 Prof. Michael Kearns

3 Undirected Graphs Recall our basic definitions: –set of vertices denoted 1,…N; size of graph is N –edge is an (unordered) pair (i,j) (i,j) is the same as (j,i) indicates that i and j are directly connected –a graph G consists of the vertices and edges –maximum number of edges: N(N-1)/2 (order N^2) –i and j connected if there is a path of edges between them –all-pairs shortest paths: efficient computation via Dijkstra's algorithm (another)Dijkstra's algorithmanother Subgraph of G: –restrict attention to certain vertices and edges between them Connected components of G: –subgraphs determined by mutual connectivity –connected graph: only one connected component –complete graph: edge between all pairs of vertices

4 Complexity Theory in One Slide size of graph computation time linear functions: tractable size of graph computation time polynomials: tractable n^2n^3 size of graph computation time exponential: intractable 2^n 1000^2 = 1 million 2^1000: not that many atoms! most known problems: either low-degree polynomial… … or exponential

5 Properties and Measures of Graphs

6 Cliques and Independent Sets A clique in a graph G is a set of vertices: –informal: that are all directly connected to each other –formal: whose induced subgraph is complete –all vertices in direct communication, exchange, competition, etc. –the tightest possible “social structure” –an edge is a clique of just 2 vertices –generally interested in large cliques Independent set: –set of vertices whose induced subgraph is empty (no edges) –vertices entirely isolated from each other without help of others Maximum clique or independent set: largest in the graph Maximal clique or independent set: can’t grow any larger

7 Some Interesting Properties Computation of cliques and independent sets: –maximal: easy, can just be greedy –maximum: difficult --- believed to be intractable (NP-hard) computation time scales exponentially with graph size –however, approximations are possible Social design and Ramsey theory: –suppose large cliques or independent sets are viewed as “bad” –e.g. in trade: large clique: too much collusion possible large independent set: impoverished subpopulation –would be natural to want to find networks with neither –Ramsey theory: may not be possible! –Any graph with N vertices will have either a clique or an independent set of size > log(N) –A nontrivial “accounting identity”; more later

8 Graph Colorings A coloring of an undirected graph is: –an assignment of a color (label) to each vertex –such that no pair connected by an edge have the same color –chromatic number of graph G: fewest colors needed Example application: –classes and exam slots –chromatic number determines length of exam period Here’s a coloring demodemo Computation of chromatic numbers is hard –(poor) approximations are possible Interesting fact: the four-color theorem for planar graphsplanar graphs

9 Matchings in Graphs A matching of an undirected graph is: –a subset of the edges –such that no vertex is “touched” more than once –perfect matching: every vertex touched exactly once –perfect matchings may not always exist (e.g. N odd) –maximum matching: largest number of edges Can be found efficiently; here is a perfect matching demodemo Example applications: –pairing of compatible partners perfect matching: nobody “left out” –jobs and qualified workers perfect matching: full employment, and all jobs filled –clients and servers perfect matching: all clients served, and no server idle

10 Cuts in Graphs A cut of a (connected) undirected graph is: –a subset of the edges (edge cut) or vertices (vertex cut) –such that the removal of this set would disconnect the graph –min/maximum cut: smallest/largest (minimal) number –computation can be done efficientlyefficiently Often related to robustness of the network –small cuts ~ vulnerability –edge cut: failure of links –vertex cut: failure of “individuals” –random versus maliciously chosen failures (terrorism)

11 Spanning Trees A spanning tree of a (connected) undirected graph is: –a subgraph G’ of the original graph G –such that G’ is connected but has no cycles (a tree) –minimum spanning tree: fewest edges –computation: can be done efficientlyefficiently Minimal subgraphs needed for complete communication Different spanning tree provide different solutions Applications: –minimizing wire usage in circuit design

12 Summary of Graph Properties objecttype of objectinterpretationcomputational status shortest paths and diameter simple paths of vertices and edges “distances” between vertices can compute efficiently cliques and independent sets sets of verticesfully connected or disconnected groups max clique and min IS intractable coloringsassignment of color to every vertex Edges are constraints, colors are resources chromatic number intractable matchingsset of edgespairing of compatiblesmax matching efficiently computable cutsset of edges or vertices measure of robustnessmin and max cut efficiently computable spanning treessubgraph with no cycles connected substructuremin spanning tree efficiently computable

13 Special Types of Graphs

14 Directed Graphs Graphs in which the edges have a direction Edge (u,v) means u  v; may also have (v,u) Common for capturing asymmetric relations Common examples: –the web –reporting/subordinate relationships corporate org charts code block diagrams –causality diagrams

15 Weighted Graphs Each edge/vertex annotated by a weight or capacity Directed or undirected Used to model –cost of transmission, latency –capacity of link –hubs and authorities (Google PageRank algorithm) Common problem: network flow, efficiently solvablenetwork flow

16 Planar Graphs Graphs which can be drawn in the plane with no edges crossing (except at vertices) Of interest for –maps of the physical world –circuit/VLSI design –data visualization Graphs of higher genus Planarity testing efficiently solvable

17 Bipartite Graphs Vertices divided into two sets Edges only between the two sets Example: affiliation networks –vertices are individuals and organizations –edge if an individual belongs to an organization Men and women, servers and clients, jobs and workers Some problems easier to compute on bipartite graphs

18 We’ll make use of these graph types… but will generally be looking at classes of graphs generated according to a probability distribution, rather than obeying some fixed set of deterministic properties.


Download ppt "Class News and Notes 1/29 Check email and web page Mon re: Tue class Start reading in “Six Degrees” –other assigned papers to follow HW1 due a week from."

Similar presentations


Ads by Google