Hello Jorge,

Thanks for your reply.

As the combinations of (7 3) is 35 we want always a list of sequences where 
every list is 35 length. So, I really do not know if it is an input of a 
secondary process/function or if the main process would generate that list 
length implicitly due to our pair (7 3) which I think is the actual and primary 
input.

Manuel


Jorge Marques Pelizzoni wrote:
Hi,

Well, your problem is solvable, but you are on the wrong path. You'll
have to resort to FS variables and probably the Select package to
create the sequences. First of all, tell me: is the length of those
sequences an input?

Cheers,

Jorge.

2010/5/19 Manuel J Contreras Maya <[email protected]>:
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