[Webinar] Streamline your web hosting managementRegister Today

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

# 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
• 2
• 2
1 Solution

Commented:
0

Author Commented:
that link does not provide a solution, it explains the set cover problem.
0

Commented:
It provides C and Pascal code to solve the problem
0

Author 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

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

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