Welcome to CS5234, the Combinatorial and Graph Algorithms course! This course covers essential algorithms, problem sets, and a challenging programming assignment focused on graph partitioning. Key information includes submission details for problem sets (PS1 and PS2), a distributed grading scheme, and tool suggestions for drawing algorithms. Prepare for a mid-term exam on October 8 and a final exam on November 19. Explore key concepts like Vertex Cover and Set Cover, both NP-complete problems, to sharpen your problem-solving skills!
Une image / un lien ci-dessous est fourni (tel quel) pour télécharger la présentation
Politique de téléchargement : le contenu du site vous est fourni TEL QUEL pour votre information et votre usage personnel ; il ne peut être vendu, concédé sous licence ni partagé sur d’autres sites sans l’accord de son auteur.Le contenu vous est fourni TEL QUEL, pour votre information et votre usage personnel uniquement.Téléchargez la présentation en cliquant sur ce lien.Lors du téléchargement, si vous ne parvenez pas à télécharger une présentation, l’éditeur a peut-être supprimé le fichier de son serveur.Pendant le téléchargement, si vous ne parvenez pas à obtenir une présentation, le fichier a peut-être été supprimé par l’éditeur.
Problem Sets • Programming Assignment • Exams Administrative
CS5234 Overview • Problem set 1 due PS1: Hand it in now! • Problem set 2 released tonight PS2: Submit next week • IVLE (optional, electronic submission) Soon: Once registration completes…
CS5234 Overview • Problem set grading Distributed grading scheme: Once registration completes, there will be an IVLE survey where you choose a week. Grading supervised (and verified) by the TA.
CS5234 Overview • How to draw pictures? By hand: Either submit hardcopy, or scan, or take a picture with your phone! Or use a tablet / iPad… Digitally: 1. xfig (ugh) 2. OmniGraffle (mac) 3. Powerpoint (hmmm) 4. ???
CS5234 Overview • Programming assignment(s): Berth assignment problem: Last 3-4 weeks of the semester. Very hard algorithmic problem (related to graph partitioning). Design the best solution you can! Must know or learn: C++ More details later…
CS5234 Overview • Mid-term exam October 8 In class • Final exam November 19Reading Week Exams will be graded and returned.
Vertex Cover • Definition: Given: graph G = (V,E) Find: smallest cover C ⊆ V such that every edge e ∈ E is covered by some node v ∈ V. • Challenge: NP-complete: No polynomial time algorithm unless P = NP.
Vertex Cover • Greedy approximation algorithm: repeat: until every edge is covered 1. Let e = (u,v) be an uncovered edge. 2. Add u and v to the cover. • Details: Graph representation: Sorted adjacency list…
Vertex Cover Analysis: 1. For every matching M: OPT ≥ |M|. 2. The cover C contains a matching of size |C|/2. 3. Therefore: OPT ≥ |C|/2. Conclusion:|C| ≤ 2OPT 2-approximation algorithm
Set Cover • Definition: Given: set X subsets S1, S2, …, Smwhere Sj⊆ X Find: smallest collection I ⊆ {1, …, m} such that: • Challenge: NP-complete: No polynomial time algorithm unless P = NP.
Set Cover X = {C, C++, Java, Ruby, Python} • Example: Alice: C, C++ Bob:C++, Java Collin:C++, Ruby, Python Dave:C, Java • Choose a good team: Collin and Dave: optimal solution.
Set Cover set that contains the most uncovered elements
Notation Assume GREEDY covers elements in order: x1, x2, x3, x4, x5, x6, x7, x8, …, xn cost(xj) = 1/cj= amount payed to cover xj 2 2 1 3
Set Cover Example: Note: 6 uncovered elements ≤ 3 elements per set OPT ≥ 2
Analysis Assume (x1, x2, …, xj-1) are covered: • How does OPT cover (xj, xj+1, …, xn)?
Analysis Assume (x1, x2, …, xj-1) are covered: • How does OPT cover (xj, xj+1, …, xn)? Fact: No set covers more than c(xj) elements in the set (xj, xj+1, …, xn). Why? If it did, GREEDY would have chosen it! (Tip: use the fact that algorithm is GREEDY.)
Analysis Assume (x1, x2, …, xj-1) are covered: • How does OPT cover (xj, xj+1, …, xn)? As before: n – j + 1 uncovered elements ≤ c(xj) elements per set OPT ≥ (n – j + 1) / c(xj) = (n – j + 1)cost(xj)
Analysis Assume (x1, x2, …, xj-1) are covered: • How does OPT cover (xj, xj+1, …, xn)? As before: n – j + 1 uncovered elements ≤ c(xj) elements per set OPT ≥ (n – j + 1) / c(xj) = (n – j + 1)cost(xj) cost(xj) ≤ OPT / (n – j + 1)
A Warm-Up Problem • Problem Statement: Given: 2d (Euclidean) map & set of points of interest Find: shortest set of roads connecting all points
A Warm-Up Problem • Problem Statement: Given: 2d (Euclidean) map & set of points of interest Find: shortest set of roads connecting all points
A Warm-Up Problem • Algorithm: Compute: for every pair (u,v): distance(u,v) Build: complete graph G = (V, E) where w(u,v) = distance(u,v) Find: minimum spanning tree of G.
Spanning Tree Definition: a spanning tree is an acyclic subset of the edges that connects all nodes Weight: 32 13 4 5 9 9 1 2 8
Minimum Spanning Tree Definition: a spanning tree with minimum weight 13 4 5 9 9 1 2 8
Minimum Spanning Tree Definition: a spanning tree with minimum weight Weight: 20 13 4 5 9 9 1 2 8