Match the List I with list II and select the correct answer by using the codes given below the lists.
-
Solution
Transport layer functions as a communication layer for any kind of end to end communication, creation of sockets.Network layer routes the data from one node to other, till it reach to destination. Data link layer ensures reliable data transfer by error correction, duplication check ordered delivery, etc.
Which of the following assertions is false about the Internet Protocol (IP)?
Relation R is decomposed using a set of functional dependencies F, and relation S is decomposed using another set of functional dependencies G. One decomposition is definitely BCNF, the other is definitely 3NF, but it is not known which is to make a guaranteed identification, which one of the following tests should be used on the decompositions? (Assume that the closures of F and G are available).
-
Solution
BCNF is more stricter than 3NF.So if we check database for BCNF, then it will definitely be in 3NF.Hence (c) is correct option.
Suppose the adjacency relation of vertices in a graph is represented in a table Adj (X, Y). Which of the following queries cannot be expressed by a relational algebra expression of constant length?
-
Solution
Just need to have little knowledge about adjacency matrix Adjacency matrix is used as a mean to represent the vertices of a graph that are adjacent to which other vertices. Another matrix representation for a graph is the incidence matrix.
Which of the following scheduling algorithms is non-pre-emptive?
-
Solution
Round robin is preemptive since processes are cycled for CPU time, & run for a particular time stamp in one cycle.Multilevel queue scheduling maintains various queues, each having different priorities. But in FIFO scheme, only the process which enters once, would be completed first, so no preemption.Hence (b) is correct option.
Consider a virtual memory system with FIFO page replacement policy: For an arbitrary page access pattern,increasing the number of page frames in main memory will
-
Solution
During FIFO page replacement policy, due to increase in the no. of page frames in memory should decrease the no. of page faults since more frames can be kept there.
But due to Belady's Anomaly after certain limit or in some page access instances no. of page faults are high.Hence (c) is correct option.
Consider Peterson’s algorithm for mutual exclusion between two concurrent processes i and j. The program executed by process is shown below.
repeat flag [i] = true;turn = j;
while (P) do no-op;
Enter critical section, perform actions, then exit critical section
Flag [i] = false;
Perform other non-critical section actions. Until false;For the program to guarantee mutual exclusion, the predicate P in the while loop should be
-
Solution
If while loop is true predicate then the program enters in to critical region. This program enters into critical region of flag[i]=true act as semaphore,& true =j, the requirement of resource is by some other process.Hence (b) is correct option.
Consider the grammar shown below :
S → CC
C → cc/ d
This grammar is
-
Solution
Given grammar
S → CC
C → cC / d
it can't be LL since C → cC is recursive. LR(1) also known as CLR parser, and every CF grammar is CLR grammar.So (a) is false but (c) & (d) can be correct.
This grammar is CLR and also reducible to LALR without any conflicts.So (d) is false.
Only need to check for SLR(1) or LR(0)This grammar is not SLR.Hence (c) is correct option.
Which of the following derivations does a top-down parser use while parsing an input string? The input is assumed to be scanned in left to right order
-
Solution
The rightmost derivation is defined as the list that we get, if wealways replace the rightmost non-terminal first.The distinction between left most derivation and right most derivation is important. The reason is, in most parsers, the transformation of the input is defined by giving a piece of code for every grammar rule that is executed whenever the rule is applied. Therefore, it is important to know whether the parser determines a leftmost or a rightmost derivation as it determines the order in which the pieces of code would be executed.
The language {ambncm+n|m, n ≥ 1} is
-
Solution
L = {ambncm+n|m, n ≥ 1}
A DPDA can accept this language. When a’s and b’s are in input, these are pushed into the stack and when c’s appear in input the a’s and b’s are popped out. If after all c’s are finished, if stack is empty, this means nc(W) = na (W) + nb (W) and the string is accepted. Else it is rejected. Now,since a DPDA exists, the language is context-free.Clearly the language is not regular, since we must count and compare c’s with a’s and b’s which cannot be done by any FA.