# CSE - Questions and solutions set-6

Computer science and engineering(CSE) - Question & solution set-6
Question:-
Option (A)
log2n
Option (B)
n-1
Option (C)
n
Option (D)
2n
Correct Option:
B
Question:-
Option (A)
right most derivation
Option (B)
right most derivation in reverse
Option (C)
left most derivation
Option (D)
left most derivation in reverse
Correct Option:
B
Question:-
Option (A)
-232to 232
Option (B)
-231to 232
Option (C)
-231to 231-1
Option (D)
-232to 231
Correct Option:
Question Solution:
2's complement represented by
-2n-1 < N < 2n-1 +1
So, for 32 bit word, n = 32
Question:-
Option (A)
L is necessarily a regular language.
Option (B)
L is necessarily a context-free language, but not necessarily a regular language.
Option (C)
L is necessarily a non-regular language.
Option (D)
None of the above
Correct Option:
Question Solution:
Obviously if a language is regular than also context free.
Question:-
Option (A)

16

Option (B)

19

Option (C)

20

Option (D)

37

Correct Option:
Question Solution:

There are four free blocks of sizes 4k, 8k 20k, 2k
Request No. - J1, J2, J3, J4, J5, J6, J7
Allocate block – 2K, 20K, 4K, 6K, 8K, 20K, 10K
Usage time - 4, 10, 2, 8, 4, 1, 8
it will wait to free block used by J2. So it will wait for 10 unit time, then J6 will complete in 1 unit time. So total time 11 unit is taken to process request of J7 and J7 takes unit time to complete the request.
Total time taken by J7 = 10 + 1 + 8 = 19 unit time