Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

pseudo code and runtime  for set cover brute force method

Posted on 2010-11-26
5
Medium Priority
?
1,285 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 2000 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

What’s Wrong with Your Cloud Strategy ?

Even as many CIOs are embracing a cloud-first strategy, the reality is that moving to the cloud is a lengthy process and the end-state is likely to be a blend of multiple clouds—public and private. Learn why multicloud solutions matter in this webinar by Nimble Storage.

Question has a verified solution.

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

The greatest common divisor (gcd) of two positive integers is their largest common divisor. Let's consider two numbers 12 and 20. The divisors of 12 are 1, 2, 3, 4, 6, 12 The divisors of 20 are 1, 2, 4, 5, 10 20 The highest number among the c…
Article by: evilrix
Looking for a way to avoid searching through large data sets for data that doesn't exist? A Bloom Filter might be what you need. This data structure is a probabilistic filter that allows you to avoid unnecessary searches when you know the data defin…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Suggested Courses

636 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