Calculates minimum number of terms by quin McCluskey method