LawMint Sign in

Jammu & Kashmir and Ladakh SET (JKSET/LASET) Theory of Computation and Compilers Previous Year Questions

Try the preview and open any solution for a worked explanation.

Jammu & Kashmir and Ladakh SET (JKSET/LASET) practice pack

The practice pack for Jammu & Kashmir and Ladakh SET (JKSET/LASET) is coming soon to LawMint.

Question 1

Given below are two statements, one labelled as Assertion (a) and the other labelled as Reason (r). Read the statements and choose the correct answer from the code given below:
Assertion (a): Turing machine is more powerful than PDA.
Reason (r): The Turing Machine has a more flexible form of memory than does the PDA.

Select one answer

Question 2

Given below are two statements :
Statement-I: Top down parsing is an attempt to find a leftmost derivation for an input string.
Statement-II: Top down parsing methods handle left recursive grammar efficiently.
Choose the most appropriate answer from the options given below:

Select one answer

Question 3

Which of the following is/are correct?
I. A language is context-free if and only if it is accepted by the PDA.
II. PDA is a finite automaton with push-down stack.

Select one answer

Question 4

Which two of the following four regular expressions are equivalent?
(i) (00)*(ε\varepsilon + 0)
(ii) (00)*
(iii) 0*
(iv) 0(00)*

Select one answer

Question 5

If strings of a language L can be effectively enumerated in lexicographic (i.e., alphabetic) order, which of the following statements is true?

Select one answer

Question 6

The following diagram represents a finite state machine which takes as input a binary number from the least significant bit:

Finite state machine with two states Q0 and Q1. An initial arrow enters Q0. State Q0 has a self-loop labelled 0/0 and a transition arrow to state Q1 labelled 1/1. State Q1 has a self-loop labelled 0/1 and 1/0.

Which one of the following is True?

Select one answer

Question 7

S -> AC|CB, C ->aCb|ε\varepsilon, A ->aA|a, B ->Bb|b
In the correct grammar above, what is the length of the derivation (number of steps starting from S) to generate the string albm with l ≠\neq m?

Select one answer

Question 8

The regular expression (ε\varepsilon+0)(ε\varepsilon+1) refers to the set of strings/characters:

Select one answer

Question 9

Consider the following statements about the context-free grammar :
GG ={S→SS,S→ab,S→ba,S→ε}= \{S \to SS, S \to ab, S \to ba, S \to \varepsilon\}
I. G is ambiguous.
II. G produces all strings with equal number of a’s and b’s.
III. G can be accepted by a deterministic PDA
Which combination below expresses all the true statements about G?

Select one answer

Question 10

In the two lists given below, List-I provides the list of peephole optimization techniques and List-II provides description/example of those techniques. Match the two lists and choose the correct answer from the code given below:

List-I
(Peephole Optimization Technique)
List-II
(Description)
P Unreachable Code1. Y=Y*1 or Y=Y+0
Q Reduction in Strength2. Jumps to conditional Jumps
R Algebraic simplification3. Replacing expensive operations by equivalent cheaper ones
S Flow of Control Optimization4. An unlabeled instruction immediately following an unconditional Jump
5. Hardware instructions to implement certain specific operations
Select one answer

Continue practising

The practice pack for Jammu & Kashmir and Ladakh SET (JKSET/LASET) is coming soon to LawMint.

Jammu & Kashmir and Ladakh SET (JKSET/LASET) practice pack

The practice pack for Jammu & Kashmir and Ladakh SET (JKSET/LASET) is coming soon to LawMint.