Solved

pseudo code and runtime  for set cover brute force method

Posted on 2010-11-26
5
1,148 Views
Last Modified: 2012-05-10
Can someone please share a brute-force pseudo code and runtime for the set-covering problem?
0
Comment
Question by:sarah2248
  • 2
  • 2
5 Comments
 
LVL 84

Expert Comment

by:ozo
ID: 34219986
0
 

Author Comment

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

Expert Comment

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

Author Comment

by:sarah2248
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

by:
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

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
Article by: Nadia
Suppose you use Uber application as a rider and you request a ride to go from one place to another. Your driver just arrived at the parking lot of your place. The only thing you know about the ride is the license plate number. How do you find your U…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question