[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1343
  • Last Modified:

pseudo code and runtime for set cover brute force method

Can someone please share a brute-force pseudo code and runtime for the set-covering problem?
0
sarah2248
Asked:
sarah2248
  • 2
  • 2
1 Solution
 
sarah2248Author Commented:
that link does not provide a solution, it explains the set cover problem.
0
 
ozoCommented:
It provides C and Pascal code to solve the problem
0
 
sarah2248Author Commented:
I'm actually looking for the pseudo code and runtime for a paper I'm writing I don't need the code. Thanks
0
 
TommySzalapskiCommented:
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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now