Subcontests
(5)T=sum_{i=1}^n f(i)* (fi-1)/2 and n is odd, find min(T)
Given a sequence (x1,x2,…,xn) of 0's and 1's, let A be the number of triples (xi,xj,xk) with i<j<k such that (xi,xj,xk) equals (0,1,0) or (1,0,1). For 1≤i≤n, let di denote the number of j for which either j<i and xj=xi or else j>i and xj=xi.(a) Prove that A=(3n)−i=1∑n(2di). (Of course, (ba)=b!(a−b)!a!.) [5 points](b) Given an odd number n, what is the maximum possible value of A? [15 points]