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 7786989
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T20:31:40+00:00 2026-06-01T20:31:40+00:00

The Test Cover problem can be defined as follows: Suppose we have a set

  • 0

The Test Cover problem can be defined as follows:

Suppose we have a set of n diseases and a set of m tests we can perform to check for symptoms. We also are given the following:

  • an nxn matrix A where A[i][j] is a binary value representing the result of running the jth test on a patient with the the ith disease (1 indicates a positive result, 0 indicates negative);
  • the cost of running test j, c_j; and that
  • any patient will have exactly one disease

The task is to find a set of tests that can uniquely identify each of the the n diseases at minimal cost.


This problem can be formulated as an Integer Linear Program, where we want to minimize the objective function \sum_{j=1}^{m} c_j x_j, where x_j = 1 if we choose to include test j in our set, and 0 otherwise.

My question is:

What is the set of linear constraints for this problem?

Incidentally, I believe this problem is NP-hard (as is Integer Linear Programming in general).

  • 1 1 Answer
  • 0 Views
  • 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-06-01T20:31:42+00:00Added an answer on June 1, 2026 at 8:31 pm

    Let T be the matrix that results from deleting the jth column of A for all j such that x_j = 0.

    Then choosing a set of tests that can uniquely distinguish any two diseases is equivalent to ensuring that every row of T is unique.

    Observe that two rows k and l are identical if and only if (T[k][j] XOR T[l][j]) = 0 for all j.

    So, the constraints we want are

    \sum_{j=1}^{m} x_j(A[k][j] XOR A[l][j]) >= 1

    for all 1 <= k <= m and 1 <= l <= 1 such that k != l.

    Note that the constraints above are linear, since we can just pre-compute the coefficient (A[k][j] XOR A[l][j]).

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

Sidebar

Related Questions

Trying to add tests to the gobject-introspection test suite to cover more of the
I want that my unit tests to cover my POCO's. How should I test
I have some legacy stuff and want to cover it by tests. There is
What test text do you try and type into your web forms to check
I'm trying to write integration tests to cover a big refactoring of my application
I have a set of nodes, each of which is connected to at least
I am having trouble getting NCover to properly cover a .dll. I have several
I've written this small test class just to illustrate my problem When working with
Recently we have been adding automated tests to our existing java applications. What we
I have a method which is used to check if the given class is

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.