Find Maximal/Minimal (w.r.t. set inclusion)

Help
David
2012-06-15
2013-05-30
  • David

    David - 2012-06-15

    Hi,

    how to find all subsets of a solution that are not related by a relationship of inclusion?
    for example, there is a solution

          {0, 2, 4}
          {0, 2}
          {1, 3}
          {0, 3}
          {3}
          {1}
          {1, 4}
          {}
          {0}
          {4}
          {0, 4}

    the solution to the problem we have posed is

          {1, 4}
          {0, 2, 4}
          {0, 3}
          {1, 3}

    i don't select {0} or {} or {0,2} because are subset of {0, 2, 4}

     
  • kris

    kris - 2012-06-15

    I do not see the original problem and cannot answer your question. Do you use set constraints? What are the constraints?

    /Kris

     
  • David

    David - 2012-06-15

    that numbers above identify the nodes of a graph.

    solutions which gives Jacop are a series of 1 and 0 (BooleanVar) which tell us that a node is selected or not

    in this example there are 5 nodes and solution  {0, 2, 4} corresponds to Jacop's solution 1 0 1 0 1

    i don't take solution 1 0 0 0 0  because it's included in 1 0 1 0 1

     
  • David

    David - 2012-06-15

    no idea?

     
  • kris

    kris - 2012-06-15

    Sorry but I work as well ;)

    I have no clear idea right now since I do not know exactly your constraints and the way you model your problem. It seems that you try to find **maximal** solutions and discard subsumed solutions but the solver finds all solutions.

    Sorry,
    /Kris.

     
  • David

    David - 2012-06-15

    I paste the code as soon as i can. thank you very much

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks