pseudo code and runtime  for set cover brute force method

Posted on 2010-11-26
Last Modified: 2012-05-10
Can someone please share a brute-force pseudo code and runtime for the set-covering problem?
Question by:sarah2248
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
LVL 84

Expert Comment

ID: 34219986

Author Comment

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

Expert Comment

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

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
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.

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

Article by: Nadia
Linear search (searching each index in an array one by one) works almost everywhere but it is not optimal in many cases. Let's assume, we have a book which has 42949672960 pages. We also have a table of contents. Now we want to read the content on p…
Prime numbers are natural numbers greater than 1 that have only two divisors (the number itself and 1). By “divisible” we mean dividend % divisor = 0 (% indicates MODULAR. It gives the reminder of a division operation). We’ll follow multiple approac…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below.…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

687 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