Presentation is loading. Please wait.

Presentation is loading. Please wait.

Approximation algorithms

Similar presentations


Presentation on theme: "Approximation algorithms"— Presentation transcript:

1 Approximation algorithms
Giorgi Japaridze Theory of Computability Approximation algorithms Section 10.1

2 An example of an approximation algorithm
Giorgi Japaridze Theory of Computability Approximation algorithms find nearly optimal solutions. Doing so, while sufficient for most practical purposes, can also be dramatically easier than finding the best (truly optimal) solutions. We will look at one example. It is about finding a smallest vertex cover in an undirected graph. A = “On input <G>, where G is an undirected graph: 1. Repeat the following until all edges in G touch a marked edge: Find an edge in G untouched by any marked edge, and mark it. 3. Output the set X of all nodes that are endpoints of marked edges.” Obviously A runs in polynomial time (why?). And obviously its output X is indeed a vertex cover in G (why?). We further claim that X is no more than twice as large as Y, where Y is the smallest vertex cover. This is so because, where H is the set of edges that A marks, we have: (1) X is twice as large as H, and (2) H is not larger than Y. (1) holds because every edge in H contributes two nodes to X. (2) holds for the following reason. Y is a vertex cover, so every edge in H is touched by some node in Y. No such node touches two edges in H because the edges in H do not touch each other. So, for each edge of H, Y contains a different node that touches that edge. That is, Y has at least as many nodes as the number of edges in H.


Download ppt "Approximation algorithms"

Similar presentations


Ads by Google