a.
See Problem B.4.
b.
Let it be possible to choose six four-digit numbers satisfying the problem condition. By the above, any of digits 1, 2, 3, 4, 5, 6, 7, 8 must be exactly in three of these six numbers.
Further, it is not hard to prove that no two of the chosen numbers have the same three digits.
Let a1,a2,a3,a4,a5,a6 be the chosen six numbers. Let Pi denote the set consisting of six pairs formed by the digits of ai, i=1,…,6. It is easy to see that the set ⋃i=16Pi has exactly 28 elements. Moreover, either Pi∩Pk=∅ or Pi∩Pk has exactly one element, and Pi∩Pj∩Pk=∅, for all distinct i,k,j.
By inclusion-exclusion formula (N(X) is the number of elements of the set X)
N(i=1⋃6Pi)=i=1∑6N(Pi)−i,j=1i<j∑6N(Pi∩Pj).(∗)
Since N(⋃i=16Pi)=28 and N(Pi)=6 for any i=1,…,6, equality (∗) can be written as
i,j=1i<j∑6N(Pi∩Pj)=8.(∗∗)
Let x be the number of pairs (Pi,Pj), i<j, for which N(Pi∩Pj)=0, then for the remaining 15−x pairs we have N(Pi∩Pj)=1. Thus (∗) can be rewritten as 15−x=8, or x=7.
It is not very hard to prove that x=7. Thus x≤6, and so N≥7.