What I want is a little difficult to explain. So I try to it with an example.
I have 2 lists, each of which has $(n-1)^2$ elements. Each element is an integer between 0 and $n-1$, inclusive.
For example for $n=4$:
L1 = {1,2,3,2,0,2,3,2,1}
L2 = {2,3,0,3,0,1,0,1,2}
From these lists I want to compute possible elements of L2
that correspond to an
element of L1
. The result is an ordered list with $n$ elements:
{{0},{2},{1,3},{0}}
This means:
- If you select
0
fromL1
, the corresponding elements inL2
are{0}
. - If you select
1
fromL1
, the corresponding elements inL2
are{2}
. - If you select
2
fromL1
, the corresponding elements inL2
are{1,3}
. - If you select
3
fromL1
, the corresponding elements inL2
are{0}
.
n=3
max element must be 2? In your exmapleL1:={1,2,3,2,0,2,3,2,1}
withn=3
max element is 3. $\endgroup$L1
always contains whole range 0 to n-1? $\endgroup${}
. In particular, for $n$ a large prime, there could be many empty sets. $\endgroup$