[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1316
  • 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

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

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