why $e=e_2+v_i^2+\sum_{j=0}^{\sigma(G)}(i-j)\beta_{ij}(p)$ I need help with this problem:
DEF: Let G be a $(3,l)$-graph. We let $v_i=l−1−i$, and we define $s_i$ to be the number of vertices of G of degree $v_i$.
Let $G$ be a graph and $p$ a point of $G$. By $H_1$ we will mean the graph spanned by all points of $G$ which are joined to $p$ by an edge. $H_2$ will denote the graph spanned by all points different from $p$ which are not joined to $p$ by an edge. We will indicate this disection of $G$ by stating that $p$ is the preferred point.
Let $e_k$ be the number of edges in $H_k$ (for k = 1, 2).
DEF: Let $G$ be an $(3,y)$-graph and let $v$ be the minimum valence among all points of $G$; define $\sigma(G)=y-1−v$.

Afirmation: Let $G$ be a $(3, y)$-graph on $n$ points. For any point $p$, $p$ of valence $v_i$, let $p$ be preferred with $H_1$ and $H_2$ as before. Then $e$, the number
of edges of $G$, is given by
$$e=e_2+v_i^2+\sum_{j=0}^{\sigma(G)}(i-j)\beta_{ij}(p)$$ where $\beta_{ij}(p)$ is the number of points of $H_1$ which are of valence $v_j$. in G
I can not see where the equality comes from!! 

if $e=e_1+e_2$ then you have to prove that $e_1=v_i^2+\sum_{j=0}^{\sigma(G)}(i-j)\beta_{ij}(p)$? but, how?
 A: It is not true that $e = e_1 + e_2$. Rather, $e$ counts:


*

*The edges inside $H_1$, of which there are $e_1$;

*The edges inside $H_2$, of which there are $e_2$;

*The edges between $H_1$ and $H_2$;

*The edges out of $p$ (which all go to $H_1$).


In fact in a $(3,l)$-graph we have $e_1 = 0$: there cannot be an edge in $H_1$ because if two vertices $q,q' \in H_1$ are adjacent then $\{p,q,q'\}$ span a triangle.
Since $H_1$ is an independent set, the total number of edges out of $H_1$, which are the last two categories of edges, is equal to the sum of degrees in $H_1$. By the definition of $\beta_{ij}(p)$, this is
$$
   \sum_{j \ge 0} v_j \beta_{ij}(p) = \sum_{j \ge 0} (l-1-j) \beta_{ij}(p) = \sum_{j\ge 0} (l-1-i) \beta_{ij}(p) + \sum_{j\ge 0} (i-j) \beta_{ij}(p).
$$
(Here we break $l-1-j$ into $(l-1-i) + (i-j)$.)
The second sum is one of the terms we want in the formula. The first sum is
$$
   (l-1-i) \sum_{j \ge 0} \beta_{ij}(p) = v_i \sum_{j \ge 0} \beta_{ij}(p) = v_i |H_1| = v_i^2
$$
since $v_i = l-1-i$, the sum of $\beta_{ij}(p)$ over all $j$ is just the total number of vertices in $H_1$, and this is equal to $v_i$ because we assumed that $p$ had degree $v_i$.
Therefore the total number of edges out of vertices in $H_1$ is
$$
  v_i^2 + \sum_{j \ge 0} (i-j) \beta_{ij}(p)
$$
and when added to the $e_2$ edges inside $H_2$, this gives the formula you want.
We can make the sum go up to $\sigma(G)$ only because for $j > \sigma(g)$, $v_j = y-1-j < y-1-\sigma(G)$, so $v_j$ is less than the minimum degree in $G$. So there are no vertices, in $H_1$ or elsewhere, which have degree $v_j$ for $j>\sigma(G)$, and therefore $\beta_{ij}(p)  =0$ for such $j$.
