a.
Label all the girls by 1,2,…,m and boys by 1,2,…,n. For each show, we display the performances of this show by a m×n table in which the number lies on the intersection of ith row and jth column is
* 1 if ith girl performed with jth boy in this show.
* 0 otherwise.
Call a table "nice" if the sum of all elements on each row and column is positive. It is obvious that all the tables that related to each show has to be nice.
For a student X, without loss of generality, we assume that X is a girl. By the assumption, a show which is depended on X if on its table, there exists a column that has only one cell that is marked by 1 on Xth row. Assume that there are k columns which are depended on X hence k<n because otherwise, there must exist a row that contain all cell marked by 0. The other n−k cells on Xth row could be marked by either 0 or 1 because on their columns, thus there exists another cell that is marked by 1.
Hence the number of tables depending on X in this case is 2n−k times the number of "nice" tables that consists of m−1 other rows and n−k other columns, after removing the row of student X and all its depended column. However, on each of these tables, if we relabel (1→0,0→1) a number on the cell that on Xth row but is not depend on X, we will obtain a new table which is linked to the show and has different parity when compared to the number of songs that sung by X from the initial show. It deduces that the number of shows that depends on X where X performs even number of songs is half of the number of shows that depends on X.
b.
A table is called "odd" if there are odd number of cells marked by 1 on this table. Otherwise, the table is called "even". Let f(m,n) and g(m,n) be the number of "nice" tables that has odd and even numbers of 1 respectively. Let X be an arbitrary girl.
* If there exists a column that depends on X, then the number of even tables is equal to that of odd tables. Denoted this value by h(m,n).
* Otherwise, removing Xth row and we obtain a (m−1)×n 'nice' table.
On the other hand, the number of tables that Xth row is marked with odd and even number of 1 is respectively equal to
L=2∣a−1∑(an)andC=2∣a,a>0∑(an).
It is well-known that (x+1)n=(0n)+x(1n)+⋯+xn(nn) and by letting x=−1, we get L=C+1. Note that the parity of Xth row determines the parity of the table, hence we have the formula
{f(m,n)=h(m,n)+L⋅g(m−1,n)+C⋅f(m−1,n),g(m,n)=h(m,n)+L⋅f(m−1,n)+C⋅g(m−1,n).
Thus,
f(m,n)−g(m,n)=(L−C)(g(m−1,n)−f(m−1,n))=g(m−1,n)−f(m−1,n).
By induction, we have
f(m,n)−g(m,n)=(−1)m+n−4(f(2,2)−g(2,2)).
It is obvious that f(2,2)=3 and g(2,2)=4 hence
f(m,n)−g(m,n)=(−1)m+n−3.
Since the difference between odd and even tables is 1, it is able to arrange the shows such that the number of songs in two consecutive shows has different parity.