  A fundamental problem is to understand why quantum theory only violates some
noncontextuality (NC) inequalities and identify the physical principles that
prevent higher-than-quantum violations. We prove that quantum theory only
violates those NC inequalities whose exclusivity graphs contain, as induced
subgraphs, odd cycles of length five or more, and/or their complements. In
addition, we show that odd cycles are the exclusivity graphs of a well-known
family of NC inequalities and that there is also a family of NC inequalities
whose exclusivity graphs are the complements of odd cycles. We characterize the
maximum noncontextual and quantum values of these inequalities, and provide
evidence supporting the conjecture that the maximum quantum violation of these
inequalities is exactly singled out by the exclusivity principle.
