21. Graphs Apps

# 21. Graphs Apps - Maggie Johnson CS103B Handout#21 Graph...

This preview shows pages 1–3. Sign up to view the full content.

Maggie Johnson CS103B Handout #21 Graph Applications Key Topics: * Deadlock Detection * Cliques * The Chinese Postman Problem * Instant Insanity Deadlock Detection Deadlock: Waiting for an event that will never happen. Law passed in Kansas legislature (1910): "When two trains approach each other at a crossing, both will come to a complete stop and neither shall start up again until the other has gone." Cliques A clique in a simple undirected graph G is a set of nodes such that there is in G an edge between every pair of nodes in the set. A clique of k nodes is called a k-clique . The size of the largest clique in the graph is called the clique number of that graph. As a simple example, every complete graph K n is a clique consisting of all n nodes. What are all possible cliques of the following graph? What is the clique number of this graph? Cliques can be used in scheduling problems. For example, suppose we are faced with the problem of scheduling final exams. Thus, we must assign course exams to time slots so that two courses may have their exams scheduled at the same time only if there is no student taking both courses.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Each course is a node in the graph. An edge between two nodes indicates that the two courses do not have a student in common. So, two courses connected by an edge could have their exams scheduled at the same time. We could then look for maximal cliques , i.e., cliques that are not subsets of larger cliques, and we could schedule all exams for a maximal clique at the same time. What is a maximal clique in the graph above? What is the relationship between the clique number of a graph and the chromatic number of a graph? An orientation of an undirected simple graph is an assignment of directions to its edges so that the resulting directed graph is strongly connected (i.e., there is a path from any vertex in the graph to any other vertex in the graph). When an orientation of an undirected graph exists, this graph is called orientable . Is the following graph orientable? An application of orientation is in the modeling of street systems. Because traffic is growing heavy in the central part of a city, traffic engineers are planning to change all the streets, which are currently two-way, into one-way streets. How would you model this problem? A graph that is not connected is the union of two or more connected subgraphs, each pair of which has no vertex in common. These disjoint connected subgraphs are called connected components of the graph. An edge whose removal produces a graph with more connected components than in the original graph is called a cut edge . Is a graph orientable if it has a cut edge? An application of connected components and cut edges: A communications link in a network
This is the end of the preview. Sign up to access the rest of the document.

## This note was uploaded on 10/01/2011 for the course CS 103B taught by Professor Sahami,m during the Winter '08 term at Stanford.

### Page1 / 8

21. Graphs Apps - Maggie Johnson CS103B Handout#21 Graph...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online