  Homophily is the seemingly ubiquitous tendency for people to connect with
similar others, which is fundamental to how society organizes. Even though many
social interactions occur in groups, homophily has traditionally been measured
from collections of pairwise interactions involving just two individuals. Here,
we develop a framework using hypergraphs to quantify homophily from multiway,
group interactions. This framework reveals that many homophilous group
preferences are impossible; for instance, men and women cannot simultaneously
exhibit preferences for groups where their gender is the majority. This is not
a human behavior but rather a combinatorial impossibility of hypergraphs. At
the same time, our framework reveals relaxed notions of group homophily that
appear in numerous contexts. For example, in order for US members of congress
to exhibit high preferences for co-sponsoring bills with their own political
party, there must also exist a substantial number of individuals from each
party that are willing to co-sponsor bills even when their party is in the
minority. Our framework also reveals how gender distribution in group pictures
varies with group size, a fact that is overlooked when applying graph-based
measures.
