M2: Minimum-Cost Spanning Trees & Graph Coloring

M2: Minimum-Cost Spanning Trees & Graph Coloring

MATH 181 D2: A MATHEMATICAL WORLD M2: Minimum-cost spanning trees & Graph Coloring Objectives: SWBAT Use Kruskal's Algorithm to find a minimum-cost spanning tree of a given graph r Convert a scheduling problem to a vertex coloring problem and solve Let's nowr look at a slightly different optimization problem that can also be solved by graphs. Let's say a company was trying to construct some roads in a newly built housing project. They would like it to be possible for a resident to travel between every pair of houses and they would like to minimize the cost. We can model this on a graph. Example: What needs to be true about any route that satisfies the conditions laid out by the company? Exercise: What is wrong with the routes shown in the following examples? The route must touch every vertex, be connected, and contain no cycles. If the graph contains a cycle it is not optimal, as we can always remove one edge from the cycle and still satisfy the first two requirements. A subgraph that satisfies all these requirements is called a spanning tree of the original graph. A subgraph that is connected and contains no cycles is called a tree. The cheapest route is an example of a minimum-cost spanning tree. Individual/Group Work: Worksheet M2.1 1 Kruskal's Algorithm Add links in order of cheapest cost so that no circuits form and so that every vertex belongs to some link added. Example: Use Kruskal's Algorithm to find the minimum-cost spanning tree in the following graph: Remember with all the algorithms we had to \solve" the TSP, we weren't guaranteed to find the optimal solution. In this case, Kruskal showed that the greedy algorithm described does yield the minimum answer. Individual Work: Worksheet M2.2 Example: A small university is offering 8 courses over the summer and they need to schedule the final exams. Only two air conditioned lecture halls are available for use at any given time and we would like to avoid having two exams schedule for the same time slot if a student is enrolled in both courses. The table below shows which pairs of courses have one or more students in common. F M H P E I S C French (F) X X X X X Mathematics (M) X X X History (H) X X X Philosophy (P) X X English (E) X X X Italian (I) X X X X X Spanish (S) X X Chemistry (C) X X X We would like to assign each of these courses to time slots so as to avoid conflicts. We can represent this as a graph theory problem. The vertex coloring problem for a graph requires assigning each vertex of the graph a color such that two verities joined by an edge are assigned different colors. We can represent the information given in the table by a graph, let each course become a vertex and join vertices by an edge if they share a common student. 2 Example: What is the minimum number of colors needed to color this graph? A k-coloring of a graph G is a coloring of the vertices of G using k colors and satisfying the requirement that adjacent vertices are colored with different colors. The chromatic number of a graph is the smallest number k for which a k-coloring of the vertices of G is possible. We denote this by χ(G). Individual/Group Activity: Worksheet M2.3 3.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    3 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us