Steiner Triple System 
A Steiner Triple System, denoted by $STS(v),$ is a pair $(S,T)$ consisting of a set $S$ with $v$ elements, and a set $T$ consisting of triples of $S$ such that every pair of elements of $S$ appear together in a unique triple of $T$.

Now, my book goes on to say that the number of triples of a $STS(n)$ disjoint from a given triple is $(n-3)(n-7)/6$ but I am not sure how they got that result?
I know that there are $n(n-1)/6$ triples altogether where each point of a triple lies in $(n-1)/2$ triples but I am not sure how they got that $(n-3)(n-7)/6$.
 A: Consider

there are $n(n−1)/6$ triples altogether

so we take a tuple(=triple) $T$ to exclude

each point of a triple lies in $(n−1)/2$ triples

call these tuples a "tuple line". Each "tuple line" containing $T$ does not intersect with an other (if any 2 did, say in $T'$ , we would have, say $a,b\in T$, and $T'$ in a "$a$-tuple line" and "$b$-tuple line", so $a,b\in T'$ that's impossible by definition since $T\neq T'$).
So we exclude $3(n-1)/2$ tuples, but we excluded tuple $T$ thrice, while we need to do it only once, so we get
$$n(n−1)/6−3(n−1)/2+3−1=(n−3)(n−7)/6$$
A: The inclusion-exclusion argument given here should probably be ignored.  Alexey Burdin gives a much cleaner answer.
There are $\binom{n}{2}$ pairs that can be formed from elements of $S$, and each pair is in exactly one triple of $T$.  But each triple contains three pairs.  So there are $\frac{1}{3}\binom{n}{2}=\frac{n(n-1)}{6}$ triples in $T$.
Let $\{a,b,c\}\in T$.  Now there are $n-1$ pairs containing $a$, each of which appears in one triple of $T$.  Since there are two elements apart from $a$ in each such triple, there are $\frac{n-1}{2}$ triples containing $a$ and $\frac{n(n-1)}{6}-\frac{n-1}{2}=\frac{(n-1)(n-3)}{6}$ triples of $T$ that do not contain $a$.  The same number do not contain $b$; likewise the same number do not contain $c$.
Let $T_s$ be the set of triples in $T$ that do not have the set $s$ as a subset.  We want $\lvert T_{\{a\}}\cap T_{\{b\}}\cap T_{\{c\}}\rvert$.  By inclusion-exclusion, this is
$$
\begin{aligned}
\lvert T_{\{a\}}\cap T_{\{b\}}\cap T_{\{c\}}\rvert=&\lvert T_{\{a\}}\rvert+\lvert T_{\{b\}}\rvert+\lvert T_{\{c\}}\rvert-\lvert T_{\{a\}}\cup T_{\{b\}}\rvert-\lvert T_{\{a\}}\cup T_{\{c\}}\rvert-\lvert T_{\{b\}}\cup T_{\{c\}}\rvert\\
&+\lvert T_{\{a\}}\cup T_{\{b\}}\cup T_{\{c\}}\rvert\\
=&\lvert T_{\{a\}}\rvert+\lvert T_{\{b\}}\rvert+\lvert T_{\{c\}}\rvert-\lvert T_{\{a,b\}}\rvert-\lvert T_{\{a,c\}}\rvert-\lvert T_{\{b,c\}}\rvert+\lvert T_{\{a,b,c\}}\rvert.
\end{aligned}
$$
But $\lvert T_{\{a,b\}}\rvert=\lvert T_{\{a,c\}}\rvert=\lvert T_{\{b,c\}}\rvert=\lvert T_{\{a,b,c\}}\rvert=\frac{n(n-1)}{6}-1=\frac{(n+2)(n-3)}{6}$ since the only triple containing two or more of $a$, $b$, $c$ is $\{a,b,c\}$.
So the number is
$$
3\cdot\frac{(n-1)(n-3)}{6}-3\frac{(n+2)(n-3)}{6}+\frac{(n+2)(n-3)}{6}=\frac{n-3}{6}(3(n-1)-2(n+2))=\frac{(n-3)(n-7)}{6}.
$$
A: Here's a derivation that explains the factors $n-3$ and $n-7$ directly.  Consider the triple $\{a,b,c\}\in T$.  There are $n-3$ elements in $S\setminus\{a,b,c\}$.   Each such element $d$ appears in one triple with $a$, in one triple with $b$, and in one triple with $c$.  These three triples are distinct, since the only triple containing two or more of $a$, $b$, $c$ is $\{a,b,c\}$.  Let these three triples be $\{d,a,e\}$, $\{d,b,f\}$, and $\{d,c,g\}$.  The elements $e$, $f$, and $g$ are distinct since, for example, $e$ can appear in only one triple with $d$.  Hence there are $n-7$ elements in $S\setminus\{a,b,c,d,e,f,g\}$.
Each pair consisting of $d$ and one element $h$ of $S\setminus\{a,b,c,d,e,f,g\}$ appears in exactly one triple.  The triple containing $d$ and $h$ cannot contain $a$, $b$, $c$, $e$, $f$, or $g$ since if it contained, say, $a$, it would have to be the triple $\{d,a,e\}$, but $e\ne h$.
Hence a triple not containing $a$, $b$, or $c$ is specified by making one of $n-3$ choices for the element $d$, and one of $n-7$ choices for the element $h$.  But such a triple is not uniquely specified by this procedure: any of its three elements can play the role of $d$, and any of the two remaining elements can play the role of $h$.  So the number of triples is
$$
\frac{1}{3\cdot2}(n-3)(n-7).
$$
