All mock tests are FREE till 31 December — register to save your progress

Find the lexicographic ordering of the bit strings 0 < 1 given below based on the ordering .

(A) 001

(B) 010

(C) 011

(D) 0001

(E) 0101

Choose the correct answer from the options given below:

Pick an option to check yourself, or open the answer below.

Show answer & explanation

Correct answer: B. 0001 < 001 < 010 < 0101 < 011

Explanation

Compare bit by bit: 0001 < 001 (at the third bit 0 < 1), then 010 < 0101 (010 is a prefix) < 011.

More Discrete Structures and Optimization questions