Solved

# pseudo code and runtime  for set cover brute force method

Posted on 2010-11-26
1,122 Views
Can someone please share a brute-force pseudo code and runtime for the set-covering problem?
0
Question by:sarah2248
• 2
• 2

LVL 84

Expert Comment

ID: 34219986
0

Author Comment

ID: 34220018
that link does not provide a solution, it explains the set cover problem.
0

LVL 84

Expert Comment

ID: 34220030
It provides C and Pascal code to solve the problem
0

Author Comment

ID: 34220228
I'm actually looking for the pseudo code and runtime for a paper I'm writing I don't need the code. Thanks
0

LVL 37

Accepted Solution

TommySzalapski earned 500 total points
ID: 34220534
Pseudo-code for a brute force approach would be thus.
For each combination of 1 set
Check if it's a set cover
For each combination of 2 sets
Check if it's a set cover
Continue until you find a set cover.

The runtime would be the total number of combinations of sets which would be the sum of all (N choose x) where N is the number of sets and x ranges from 1 to N.

This sums to 2^N.
0

## Featured Post

Okay. So what exactly is the problem here? How often have we come across situations where we need to know if two strings are 'similar' but not necessarily the same? I have, plenty of times. Until recently, I thought any functionality like that wo…
One of Google's most recent algorithm changes affecting local searches is entitled "The Pigeon Update." This update has dramatically enhanced search inquires for the keyword "Yelp." Google searches with the word "Yelp" included will now yield Yelp a…
This video discusses moving either the default database or any database to a new volume.
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.