CS 721 Project Implementation of Hypergraph Edge Covering Algorithms By David Leung ( )
Overview Introduction of the Problem Algorithms Implemented Branch and Bound Greedy Algorithm Improved Greedy Algorithm Results and Analysis What can be improved
Hypergraph Edge Covering © Giovanni De Micheli (a) Hypergraph (b) minimum edge cover
The Problem Two-Level Logic Minimization f = a’b’c’ + a’b’c + ab’c + abc + abc’ © Giovanni De Micheli
The Problem f = a’b’c’ + a’b’c + ab’c + abc + abc’ Primes:Implicant table Solution: { , , } or x = [ ] T © Giovanni De Micheli
Branch and Bound Exhausive search algorithm Bounds prevents the search of the solution space that is worse than current best solution Optimal solution
Greedy Algorithm “Single-minded” Applied the same searching rule over again Until solution is found or no solution Not optimal solution
Implementation Data structure: dynamically allocated integer arrays as matrix Test data: randomly generated matrix of 0s and 1s of arbitrary sizes There will always be a solution if all rows (vertex) has at least a 1
Implementation - BB Recursive approach 1. Reduce the matrix by eliminating dominated edges, dominating vertex and essential edges 2. Return the current solution if the matrix is empty 3. Return if the upcoming solutions are not better than the current best solution 4. Pick an edge and solve the submatrix 5. Update the solution from submatrix if it is better 6. Drop the same edge and solve the submatrix 7. Update the solution from submatrix if it is better 8. Return current best solution
Implementation - Greedy 1. Search for the vertex that has the lowest coverage a) Pick the first edge (column) that cover the vertex found above b) A better way to pick the edge is to pick the edge that has highest coverage and cover the vertex found above 2. Repeat the search until all vertices are covered
Results 5x516x1632x3248x s s s s50.548s9 32x6464x6464x12872x s s s s s s s s s920.06s147209s15?? GS1 GS2 EC GS1 GS2 EC
Analysis Branch and Bound exponential increase in time as size of problem increase exact cover: optimal solution(s) Greedy Algorithm simple fast not always reach optimal solution
What can be Improved? Change matrix data structure Bitwise storage Link list for sparse elements Create also the transpose of the matrix for column operations Heuristic for finding the bounds
Conclusion Two algorithms were implemented for the hypergraph edge covering problem Branch and bound Optimal solution, but execution time grow exponentially Greedy Algorithm Simple and fast, but does not guarantee optimal solution