recategorized by
1,710 views
3 votes
3 votes

 

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

  1. $001$
  2. $010$
  3. $011$
  4. $0001$
  5. $0101$

Choose the correct answer from the options given below:

  1. $001 < 010 < 011 < 0001 < 0101$
  2. $0001 < 001 < 010 < 0101 < 011$
  3. $0001 < 0101 < 001 < 010 < 011$
  4. $001 < 010 < 0001 < 0101 < 011$
recategorized by

1 Answer

5 votes
5 votes

 Lexicographic ordering (or dictionary ordering) since 0<1      0 appears before 1

 Right ans option  B)  0001<001<010<0101<011

for better understanding replace 0 by A and 1 by B  now arrange  alphabetically

AAAB<AAB<ABA<ABAB<ABB

Answer:

Related questions

5 votes
5 votes
1 answer
1
go_editor asked Nov 20, 2020
7,557 views
Which of the following is not an intermediate code form?Syntax treesThree address codesQuadrupulesPost fix Notation
3 votes
3 votes
3 answers
3
go_editor asked Nov 20, 2020
3,543 views
The number of positive integers not exceeding $100$ that are either odd or the square of an integer is _______$63$$59$$55$$50$
2 votes
2 votes
2 answers
4
go_editor asked Nov 20, 2020
3,259 views
How many ways are there to pack six copies of the same book into four identical boxes, where a box can contain as many as six books?$4$$6$$7$$9$