This is ok. We need only n-2 bits to choose edges from k and (n - 1 - k) assuming that we choose only from edges that have first node with lower id.