Download presentation
Presentation is loading. Please wait.
Published byAudrey Oliver Modified over 8 years ago
1
CS 721 Project Implementation of Hypergraph Edge Covering Algorithms By David Leung (9803328)
2
Overview Introduction of the Problem Algorithms Implemented Branch and Bound Greedy Algorithm Improved Greedy Algorithm Results and Analysis What can be improved
3
Hypergraph Edge Covering © Giovanni De Micheli (a) Hypergraph (b) minimum edge cover
4
The Problem Two-Level Logic Minimization f = a’b’c’ + a’b’c + ab’c + abc + abc’ © Giovanni De Micheli
5
The Problem f = a’b’c’ + a’b’c + ab’c + abc + abc’ Primes:Implicant table Solution: { , , } or x = [1 1 0 1] T © Giovanni De Micheli
6
Branch and Bound Exhausive search algorithm Bounds prevents the search of the solution space that is worse than current best solution Optimal solution
7
Greedy Algorithm “Single-minded” Applied the same searching rule over again Until solution is found or no solution Not optimal solution
8
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
9
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
10
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
11
Results 5x516x1632x3248x48 0.000s3 9 8 13 0.000s3 7 6 12 0.000s3 70.041s50.548s9 32x6464x6464x12872x240 0.000s130.000s200.000s210.001s29 0.000s100.000s170.000s160.000s24 1.478s920.06s147209s15?? GS1 GS2 EC GS1 GS2 EC
12
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
13
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
14
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
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.