There are Five Groups and there is no edge between member of same group ===> it is 5-pertite graph
Maximum no.of edges possible when it is complete 5-pertite graph.
let name the as A,B,C,D,E, and their cardinalities are k,l,m,n,p respectively.
the members of A should form a edge with all members of other groups.
No.of Edges = k * ( l+m+n+p)
the members of B should form a edge with all members of other groups (for avoiding duplicates eliminate A group )
No.of Edges = l * ( m+n+p )
the members of C should form a edge with all members of other groups (for avoiding duplicates eliminate A and B group )
No.of Edges = m * ( n+p )
the members of D should form a edge with all members of other groups (for avoiding duplicates eliminate A,B,C group )
No.of Edges = n * ( p)
the members of E should form a edge with all members of other groups (for avoiding duplicates eliminate A,B,C,and D group )
No.of Edges = p * ( 0 )
Total edges = ( k * ( l+m+n+p) ) + ( l * ( m+n+p ) ) + ( m * ( n+p ) ) + ( n * ( p) ) .
Fix first the cardinalities of groups, then evaluate, For your question, answer is 39