Thanks to both of you for the explanation.

On Thu, Jun 21, 2012 at 4:33 PM, Raul Miller <rauldmil...@gmail.com> wrote:

> Here's an illustration:
>
>   0 1 0 1 0 0 # 1 2 3 4 5 6
> 2 4
>   0 1 0 1 0 0 #inv 2 4
> 0 2 0 4 0 0
>
> #inv is a [right] inverse operation for #, but since information has
> been lost, it uses fill to represent the items at the lost positions.
>
> I hope this helps,
>
> --
> Raul
>
> On Thu, Jun 21, 2012 at 11:27 AM, David Vaughan <purpleblue...@gmail.com>
> wrote:
> > Thanks, this seems to work, however I am a little confused about what
> #inv
> > (#^:_1) actually does - could you explain that please?
> >
> > Thanks.
> >
> > On Thu, Jun 21, 2012 at 4:02 PM, Raul Miller <rauldmil...@gmail.com>
> wrote:
> >
> >> Here's one approach:
> >>
> >> OTHER=: >,{;~1 -.~i.10
> >> MASK=: (#~ 8=+/"1) #:i.2^10
> >>
> >>   ,/MASK ([ + -.@[ #inv ])"1/ OTHER
> >>
> >> --
> >> Raul
> >>
> >> On Thu, Jun 21, 2012 at 10:51 AM, David Vaughan <
> purpleblue...@gmail.com>
> >> wrote:
> >> > Hi, I'm trying to generate all permutations of length 10 with eight 1s
> >> and two other digits (not 1s).
> >> > For example,
> >> > 1 1 1 1 3 1 4 1 1 1
> >> > 5 1 1 1 1 9 1 1 1 1
> >> > ...
> >> >
> >> > Could anyone point me in the right direction?
> >> >
> >> > Many thanks.
> >> > ----------------------------------------------------------------------
> >> > For information about J forums see
> http://www.jsoftware.com/forums.htm
> >> ----------------------------------------------------------------------
> >> For information about J forums see http://www.jsoftware.com/forums.htm
> >>
> > ----------------------------------------------------------------------
> > For information about J forums see http://www.jsoftware.com/forums.htm
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to