Choose a + site. Join it to each neighbor by a line. we need to draw gamma lines. Now do this for all + sites. So total lines = gamma*N(+). In this process i) between any (+,+) pair there will be two lines (one when we draw line from 1st + to 2nd +, other when we draw line from 2nd + to 1st +). Now there are N(++) number of (+,+) pair. So total lines between all (+,+) pair is 2N(++).. ii) between any (+,-) pair there will be one line (when drawn from + to -). There are N(+-) number of (+,-) pair. iii) between any (-,-) pair there will be no line. So total lines = 2N(++) + N(+-).