Aspire Faculty ID #18779 · Topic: UGC NET Computer Science Sep 2022 (Paper II) · Just now
UGC NET Computer Science Sep 2022 (Paper II)

Consider the grammar $S\to SbS\mid a$.

Consider the following statements:

The string $abababa$ has

(A) two parse trees

(B) two left most derivations

(C) two right most derivations

Which of the following is correct?

Solution

Given grammar is:

$S\to SbS\mid a$

This grammar is ambiguous.

The string is:

$abababa$

It contains $4$ symbols $a$ and $3$ symbols $b$.

This is like combining four $a$'s using three $b$ operators.

Because the grammar does not define a fixed grouping rule, the string can be derived in more than one way.

For example, one possible grouping is:

$(((a)b(a))b(a))b(a)$

Another possible grouping is:

$(a)b((a)b((a)b(a)))$

So, the string has more than one parse tree.

For every different parse tree, there is a corresponding different left most derivation.

So, it has more than one left most derivation.

Similarly, for every different parse tree, there is a corresponding different right most derivation.

So, it has more than one right most derivation.

Therefore, all three statements are true in the sense of ambiguity.

Previous 10 Questions — UGC NET Computer Science Sep 2022 (Paper II)

Nearest first
1
 Consider the following related to Fourth Generation Technique $(4GT)$:(A) It controls efforts.(B) It controls res…
Topic: UGC NET Computer Science Sep 2022 (Paper II)
2
Consider the following : List IList II(A) Activation record(I) Linker Loader(B) Location counter(II) Garbage Collection…
Topic: UGC NET Computer Science Sep 2022 (Paper II)
3
Consider the properties of recursively enumerable sets:(A) Finiteness(B) Context Freedom(C) EmptinessWhich of the follo…
Topic: UGC NET Computer Science Sep 2022 (Paper II)
4
Consider two lists A and B of three strings on $\{0,1\}$X:List AList B11111011110100Y:List AList B1010101111101011Which…
Topic: UGC NET Computer Science Sep 2022 (Paper II)
5
A magnetic tape drive has a transport speed of $200$ inches per second and a recording density of $1600$ bytes per inch…
Topic: UGC NET Computer Science Sep 2022 (Paper II)
6
For the following page reference string $4,3,2,1,4,3,5,4,3,2,1,5$, the number of page faults that occur in the least Re…
Topic: UGC NET Computer Science Sep 2022 (Paper II)
7
A trigger is
Topic: UGC NET Computer Science Sep 2022 (Paper II)
8
Let $R(ABCDEFGH)$ be a relation schema and $F$ be the set of dependencies$F=\{A\to B,\ ABCD\to E,\ EF\to G,\ EF\to H,\ …
Topic: UGC NET Computer Science Sep 2022 (Paper II)
9
Consider the following two lists:List IList II(A) Stack overflow(I) Software Interrupt(B) Timer(II) Internal interrupt(…
Topic: UGC NET Computer Science Sep 2022 (Paper II)
10
How many rotations are required during the construction of an AVL tree if the following elements are to be added in the…
Topic: UGC NET Computer Science Sep 2022 (Paper II)

Next 10 Questions — UGC NET Computer Science Sep 2022 (Paper II)

Ascending by ID
1
In a game playing search tree, upto which depth $\alpha-\beta$ pruning can be applied?(A) Root $(0)$ level(B) $6$ level…
Topic: UGC NET Computer Science Sep 2022 (Paper II)
2
Consider $\alpha,\beta,\gamma$ as logical variables. Identify which of the following represents correct logical equival…
Topic: UGC NET Computer Science Sep 2022 (Paper II)
3
Let $(\{a,b\},*)$ be a semigroup, where $a*a=b$.(A) $a*b=b*a$(B) $b*b=b$Choose the most appropriate answer from the opt…
Topic: UGC NET Computer Science Sep 2022 (Paper II)
4
For the graph; the following sequences of depth first search $(DFS)$ are given(A) $abcghf$(B) $abfchg$(C) $abfhgc$(D) $…
Topic: UGC NET Computer Science Sep 2022 (Paper II)
5
Let $\epsilon=0.0005$ and Let $R_e$ be the relation $\{(x,y)\in R^2:|x-y|<\epsilon\}$, $R_e$ could be interpreted as…
Topic: UGC NET Computer Science Sep 2022 (Paper II)
6
Match List I with List II:List-IList-IIA. BCNFI. It removes multivalued dependency.B. 3NFII. It is not always dependenc…
Topic: UGC NET Computer Science Sep 2022 (Paper II)
7
Match List I with List II:List-IList-IIA. BCNFI. It removes multivalued dependency.B. 3NFII. It is not always dependenc…
Topic: UGC NET Computer Science Sep 2022 (Paper II)
8
Match List I with List II:List-IList-IIA. LocalizationI. EncapsulationB. Packaging or binding of a collection of items.…
Topic: UGC NET Computer Science Sep 2022 (Paper II)
9
Match List I with List II:List IList II(A) Type 0(I) Finite Automata(B) Type 1(II) Turing Machine(C) Type 2(III) Linear…
Topic: UGC NET Computer Science Sep 2022 (Paper II)
10
Match List I with List II:List-IList-II(A) Ontological Engineering(I) Organizing subclass relations(B) Taxonomy Hierarc…
Topic: UGC NET Computer Science Sep 2022 (Paper II)
Ask Your Question or Put Your Review.

loading...