# Set of subsets

**Discrete Mathematics**Level 4

Let \(X=\{1;2;3;4;5;6;7\}\), and let \(A=\{F_1;F_2;\ldots;F_n\}\) be a collection of distinct subsets of \(X\) such that the intersection \(F_i\cap F_j\) contains exactly one element whenever \(i\ne j\). For each \(i\in X\),let \(r_i\) be the number of elements in \(A\) which contains \(i\).

Suppose \(r_1=r_2=1; r_3=r_4=r_5=r_6=2\) and \(r_7=4\).

Find the value of \(n^2-n\).