Hello,

I am trying solve this problem:

Get groups of three integers from a group of 7 integers. I get 35 groups. Then I need to get different sequences (lists) of those groups with some constraints. For example, that consecutive groups do not share more than 1 elements. So far (please see code attached) I get the 35 groups but I do not have a clue how to get the sequences.

Any help is very appreciated.

Cheers,

Manuel



--
Manuel J Contreras Maya

declare


proc {Comb1 Root}
   {FD.list 3 1#7 Root}
   {Nth Root 1} <: {Nth Root 2}
   {Nth Root 2} <: {Nth Root 3} 
   {FD.distinct Root}
   {FD.distribute ff Root}
end


proc {Comb2 Root}
   
   {FD.list !L 1#!L Root}
   
   {FD.distinct Root}
   {FD.distribute ff Root}
   
end





R = {SearchAll Comb1}
L = {Length R}
{Browse R}
{Browse L}

{Browse {SearchOne Comb2}}




_________________________________________________________________________________
mozart-users mailing list                               
[email protected]
http://www.mozart-oz.org/mailman/listinfo/mozart-users

Reply via email to