I have two sets
set1 = {2, 3, 4, 5};
set2 = {1, 3, 4, 5};
and I make permutations of them:
permutationsSet1 = DeleteDuplicates[Map[Sort, Permutations[set1, {2}]]];
permutationsSet2 = DeleteDuplicates[Map[Sort, Permutations[set2, {2}]]];
These commands yield
{{2, 3}, {2, 4}, {2, 5}, {3, 4}, {3, 5}, {4, 5}}
{{1, 3}, {1, 4}, {1, 5}, {3, 4}, {3, 5}, {4, 5}}
What I would like to do next is find all the possible combinations between permutationSet1 and permutationSet2 as follows:
{{2,3,1,3}, {2,3,1,4}, {2,3,1,5}, {2,3,3,4}, ..., {4,5,3,4}, {4,5,3,5}, {4,5,4,5}}
Finally, if possible, delete the repetitions in each tuple, e.g.
{{2,3,1}, {2,3,1,4}, {2,3,1,5}, {2,3,4}, ..., {4,5,3}, {4,5,3}, {4,5}}
and get the length of each tuple, e.g.
{3, 4, 4, 3, ..., 3, 3, 2}.
Thanks for your help.