Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 879701
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T11:58:34+00:00 2026-05-15T11:58:34+00:00

I have several lists, that you can consider as rows of integers. For example

  • 0

I have several lists, that you can consider as rows of integers.
For example :

[1 3 5]
[3 7]
[3 5 7]
[1 5 9]
[3 9]
[1 7]
[5 9 11]

I wish to find the smallest possible set of integers represented on these rows, so that :

  • each row has at least one of the selected integers,
  • in case of cardinality ties, select the set having the highest sum.

In my example, I believe the result should be [5 7 9] (preferred to [3 5 7] or [1 3 11] or … many possibilities).

The second part is trivial (selecting highest sum), but the generation of all minimal subsets in cardinality seems to be hard.

Do you know a good way to achieve this ?

Edit

Size of data is growing slowly with iterations, but I need exact matches.

  • 1 1 Answer
  • 1 View
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T11:58:34+00:00Added an answer on May 15, 2026 at 11:58 am

    The minimum cardinality version is NP-Complete. Set Cover can be reduced to this. Requiring the max among those only makes the problem harder.

    Btw, the other answer talking about boolean satisfiability is wrong! You need to reduce boolean satisfiability to this problem to show NP-Completeness, not the other way round.

    Set cover is basically:

    Give a collection of sets S1, S2, … Sn of subsets of a set X, find the smallest sub-collection (in terms of number of sets) whose union covers all the elements in S1 U S2 U … U Sn.

    To reduce this to our problem,

    Let S = S1 U S2 … U Sn. = {x1 , x2, …, xm}

    Let C_i = { j such that xi is in Sj }

    Feed the C_i to our problem.

    Now if our problem was solvable in polynomial time and we could find a minimum cardinality set of elements of C_i, then we can find a set cover for the Si and vice versa.

    This can normally be solved as an integer programming problem (which is NP-Hard too).

    For approximate solutions, this can be viewed as a linear programming problem (which has polynomial time algorithms) and randomized rounding can be done to convert fractional values (solutions to the LP) to integers.

    Also, unfortunately, it has been shown that this is NP-hard to approximate to even a constant factor (in fact I believe it is O(logn)).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have several lists that I would like to map together, but I can't
I have several unordered lists that I want to display like this: <ul> <li><img></li>
I have several lists in Matlab that I want to write to the same
I'm working at a SaaS, where any tenant can have several lists of contacts,
I'm having several lists that are sortable and I can drag elements to each
I have several sortable lists connected together, so I can drag one item from
I have a site that lists several upcoming events, and each event has a
I have several lists of strings like so, from a possible list of several
I have an object in a list that I need to rank several different
I have several different lists I want to call. They all have the same

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.