This post has been de-listed
It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.
I have been trying for a few weeks to read this Algorithm book by Steven Skiena to brush up on long forgotten CS concepts from college. Today I came across this Programming Puzzle on Spotify and thought I'd take a shot at identifying the algorithm that could be used to solve this problem. So I dug into the Catalog which is the second part of the book and felt like I narrowed it down to Set cover/Set packing problem. But after an hour of digging into them, I realized that neither of the algorithms fit the problem.
So I have 2 questions: 1) Am I doing it right? Is this the correct way to solve problems like these? i.e., Try and identify the underlying algorithm that would solve the problem and then use that as the starting point. Or should I just try and solve the puzzle using my logical abilities and forget about trying to apply algorithms altogether.
2) I feel like I've abstracted the problem to something that would already have a standard algorithm for:
Given a Universal Set U = {A, B, C...Z} and a bunch of subsets S1 ={A,B}, S2 ={B, C}, S3 = {A, C} ...etc. Find a subset S with the smallest number of items that would include at least one item from each of the subsets.
Ideas?
Subreddit
Post Details
- Posted
- 12 years ago
- Reddit URL
- View post on reddit.com
- External URL
- reddit.com/r/algorithms/...