3. It is known that a parliament has 30 members, where any two are either friends or enemies, and each member has exactly 6 enemies. Any three members form a committee. Find the total number of such committees where the three members are either all friends or all enemies.
3. Let the set of all three-member committees that satisfy the requirements of the problem be denoted as $X$, and the number of elements in set $X$ be denoted as $x$. The number of other three-member committees is denoted as $y$, thus
$$
x+y=C_{30}^{s}=4060 \text {. }
$$

For any senator $a$, we denote the set of committees in which $a$ participates as $S_{\mathrm{a}}$. In $S_{\mathrm{a}}$, the number of committees where the other two members are both friends or both enemies of $a$ is $C_{B}^{2}+C_{2}^{2}=268$. For the 30 senators, there are a total of 8040 such committees. Clearly, in the above counting process, the committees in $X$ are counted three times, while the other committees are counted only once, hence we also have
$$
3 x+y=8040 \text { . }
$$

By solving the equations (1) and (2) simultaneously, we get $x=1990$.