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
>
_________________________________________________________________________________
mozart-users mailing list                               
[email protected]
http://www.mozart-oz.org/mailman/listinfo/mozart-users

Reply via email to