For n∈N let Qn={0,1}n denote the set of all 0−1 sequences of length n. We define the distance d(x,y) between two elements x and y of Qn to be the number of coordinates in which they differ. Show that d(x,z)⩽d(x,y)+d(y,z) for all x,y,z∈Qn.
For x∈Qn and 1⩽j⩽n let B(x,j)={y∈Qn:d(y,x)⩽j}. Show that ∣B(x,j)∣=∑i=0j(ni).
A subset C of Qn is called a k-code if d(x,y)⩾2k+1 for all x,y∈C with x=y. Let M(n,k) be the maximum possible value of ∣C∣ for a k-code C in Qn. Show that
2n(i=0∑2k(ni))−1⩽M(n,k)⩽2n(i=0∑k(ni))−1
Find M(4,1), carefully justifying your answer.