I created an x by y non-symmetric matrix in which, for values 1-5, "O" denotes a "preference to match". A "match" occurs only if both values reciprocate the preference (1 and 2 are a "match" because both prefer the other, while 1 and 3 are NOT a match because the preference isn't reciprocated).
[TABLE="width: 500"]
<tbody>[TR]
[TD="align: center"][/TD]
[TD="align: center"]1[/TD]
[TD="align: center"]2[/TD]
[TD="align: center"]3[/TD]
[TD="align: center"]4[/TD]
[TD="align: center"]5[/TD]
[TD="align: center"].[/TD]
[TD="align: center"].[/TD]
[TD="align: center"].[/TD]
[TD="align: center"]x[/TD]
[/TR]
[TR]
[TD="align: center"]1[/TD]
[TD="align: center"]NULL[/TD]
[TD="align: center"]O[/TD]
[TD="align: center"]-[/TD]
[TD="align: center"]O[/TD]
[TD="align: center"]O[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]2[/TD]
[TD="align: center"]O[/TD]
[TD="align: center"]NULL[/TD]
[TD="align: center"]O[/TD]
[TD="align: center"]O[/TD]
[TD="align: center"]O[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]3[/TD]
[TD="align: center"]O[/TD]
[TD="align: center"]-[/TD]
[TD="align: center"]NULL[/TD]
[TD="align: center"]-[/TD]
[TD="align: center"]O[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]4[/TD]
[TD="align: center"]O[/TD]
[TD="align: center"]-[/TD]
[TD="align: center"]O[/TD]
[TD="align: center"]NULL[/TD]
[TD="align: center"]O[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]5[/TD]
[TD="align: center"]O[/TD]
[TD="align: center"]O[/TD]
[TD="align: center"]O[/TD]
[TD="align: center"]O[/TD]
[TD="align: center"]NULL[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"].[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"]NULL[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"].[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"]NULL[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"].[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"]NULL[/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]y[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"]NULL[/TD]
[/TR]
</tbody>[/TABLE]
1 and 2 match
1 and 4 match
1 and 5 match
2 and 5 match
3 and 5 match
4 and 5 match
1 and 3 do NOT match
2 and 3 do NOT match
2 and 4 do NOT match
3 and 4 do NOT match
First question - Is there a "match" function that lists the unique 1x1 set of matches?
Second question - Is there an "iterative match" function that lists the unique set of matches after 'n' iterations?
For example, since 1 and 4 both match with 5, then I would like to group 1, 4, and 5. I'd like the function to apply to an x by y matrix and have matches for 1 by 1, 1 by 1 by 1, 1 by 1 by 1 by ... z iterations.
[TABLE="width: 500"]
<tbody>[TR]
[TD="align: center"][/TD]
[TD="align: center"]1[/TD]
[TD="align: center"]2[/TD]
[TD="align: center"]3[/TD]
[TD="align: center"]4[/TD]
[TD="align: center"]5[/TD]
[TD="align: center"].[/TD]
[TD="align: center"].[/TD]
[TD="align: center"].[/TD]
[TD="align: center"]x[/TD]
[/TR]
[TR]
[TD="align: center"]1[/TD]
[TD="align: center"]NULL[/TD]
[TD="align: center"]O[/TD]
[TD="align: center"]-[/TD]
[TD="align: center"]O[/TD]
[TD="align: center"]O[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]2[/TD]
[TD="align: center"]O[/TD]
[TD="align: center"]NULL[/TD]
[TD="align: center"]O[/TD]
[TD="align: center"]O[/TD]
[TD="align: center"]O[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]3[/TD]
[TD="align: center"]O[/TD]
[TD="align: center"]-[/TD]
[TD="align: center"]NULL[/TD]
[TD="align: center"]-[/TD]
[TD="align: center"]O[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]4[/TD]
[TD="align: center"]O[/TD]
[TD="align: center"]-[/TD]
[TD="align: center"]O[/TD]
[TD="align: center"]NULL[/TD]
[TD="align: center"]O[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]5[/TD]
[TD="align: center"]O[/TD]
[TD="align: center"]O[/TD]
[TD="align: center"]O[/TD]
[TD="align: center"]O[/TD]
[TD="align: center"]NULL[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"].[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"]NULL[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"].[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"]NULL[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"].[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"]NULL[/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]y[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"]NULL[/TD]
[/TR]
</tbody>[/TABLE]
1 and 2 match
1 and 4 match
1 and 5 match
2 and 5 match
3 and 5 match
4 and 5 match
1 and 3 do NOT match
2 and 3 do NOT match
2 and 4 do NOT match
3 and 4 do NOT match
First question - Is there a "match" function that lists the unique 1x1 set of matches?
Second question - Is there an "iterative match" function that lists the unique set of matches after 'n' iterations?
For example, since 1 and 4 both match with 5, then I would like to group 1, 4, and 5. I'd like the function to apply to an x by y matrix and have matches for 1 by 1, 1 by 1 by 1, 1 by 1 by 1 by ... z iterations.