permutation and combination advanced

1.1k Views Asked by At

I have n sets having values less than 100. I need to find how many arrangements could be made if I pick one element from each set such that in the given arrangement there are no duplicates? NOTE: A set can have no duplicate itself( set's property) and it can have maximum 100 elements.

Example: if n = 3 set 1= { 3 4 5 } set 2= { 1 } set 3= { 1 3 5}

Possible arrangements = {3 1 5} {4 1 3} {4 1 5} {5 1 3}

hence my answer is 4.