1 / 17

336C, March 7 2012

336C, March 7 2012. Tandy Warnow. Topics for today. Reviewing Exam 2 Writing mathematics Graph theory. Graph Theory. Vertex Cover : a subset X of vertices so that every edge has at least one of its endpoints in X Clique : a subset X of vertices that are pairwise adjacent

shakti
Download Presentation

336C, March 7 2012

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 336C, March 7 2012 Tandy Warnow

  2. Topics for today • Reviewing Exam 2 • Writing mathematics • Graph theory

  3. Graph Theory • Vertex Cover: a subset X of vertices so that every edge has at least one of its endpoints in X • Clique: a subset X of vertices that are pairwise adjacent • Independent Set: a subset X of vertices that have no edges between them • Vertex Coloring: an assignment of colors to the vertices so that no two adjacent vertices are assigned the same color • Matching: a subset E’ of the edges so that no two edges in E’ share an endpoint

  4. Optimization problems • Min Vertex Cover: Finding a smallest vertex cover • Max Clique: Finding a largest clique • Max Independent Set: Finding a largest independent set • Min Vertex Coloring: Finding the smallest number of colors that suffices to vertex-color a graph • Maximum Matching: Finding a largest matching

  5. Optimization problems, cont • All of these problems are NP-hard for the general case. • Some special cases (problems on trees, for example) can be solved in polynomial time. • These problems are often related to each other (e.g., for any graph G, the complement of a vertex cover is an independent set)

  6. Approximation algorithms • An approximation algorithm is used to find a solution that may not be optimal, but whose “score” is within some factor of optimal. • For example, a 2-approximation algorithm for Minimum Vertex Cover would produce a vertex cover with at most twice the number of vertices of a smallest vertex cover

  7. Minimum vertex cover • How do matchings and vertex covers relate to each other? • Think: if a graph has a matching of size k, then what can you say about the size of a minimum vertex cover?

  8. Maximal matching • A maximal matching is a matching E’ (subset of the edge set) that cannot be enlarged by adding more edges to it • Note: maximal is not the same as maximum!

  9. Finding maximal matching • Greedy algorithm is just fine! • Start with any edge in the graph • Keep adding edges until you run out of edges to add

  10. Maximal matchings and vertex cover • Let G be a graph and let E’ be a maximal matching. Suppose |E’|=k. • What can you say about the size of a minimum vertex cover?

  11. Maximal matching and minimum vertex cover • If E’ has k edges, then any vertex cover has to have at least one endpoint of each of these edges. • Hence the minimum vertex cover size is at least k. • Algorithm: Given maximal matching, take one endpoint from each edge. Is this a vertex cover?

  12. Maximal matching and minimum vertex cover • The size of a minimum vertex cover can be larger than k (the number of edges in a maximal matching), so this is not an algorithm to solve minimum vertex cover!

  13. Finding a vertex cover • What happens if we take both endpoints from each edge in a maximal matching?

  14. How big is this vertex cover? • Note: if you take both endpoints from each edge of a maximal matching, you get a vertex cover. • How bad an approximation ratio is this?

  15. 2-approximating Min Vertex-Cover • Input: graph G=(V,E) • Output: vertex cover V’ (subset of V) that has at most twice as many vertices as a min vertex cover • Algorithm: • Find a maximal matching E’. • Take both endpoints from each edge in E’.

  16. Exact algorithms • Solving any NP-hard problem exactly isn’t all that easy. • Exhaustive search is reliable • Heuristics may not be reliable • Let’s analyze exhaustive search algorithms!

  17. Combinatorial counting • How many subsets of size k in a set of n elements? • How many permutations of a set of n elements? • Techniques for counting

More Related