For operator precedence parsing, which one is true?

- a)For all pair of non-terminal
- b)For all pair of terminals
- c)To delimit the handle
- d)None of the mentioned

Correct answer is option 'A'. Can you explain this answer?

AMAN RAJ answered • yesterday

There are two important properties for these operator precedence parsers is that it does not appear on the right side of any production and no production has two adjacent non-terminals. Implying that no production right side is empty or has two adjacent non-terminals. So accordingly to property option (A) is correct.

Which of the following are decidable?

I. Whether the intersection of two regular languages is infinite

II. Whether a given context-free language is regular

III. Whether two push-down automata accept the same language

IV. Whether a given grammar is context-free

II. Whether a given context-free language is regular

III. Whether two push-down automata accept the same language

IV. Whether a given grammar is context-free

- a)I and II
- b)I and IV
- c)II and III
- d)II and IV

Correct answer is option 'B'. Can you explain this answer?

Rajkumar answered • yesterday

(A) Intersection of two regular languages is regular and checking if a regular language is infinite is decidable.

(B) Deciding regularity of a context free language is undecidable. We check if L(CFG) contains any string with length between n and 2n−1 , where n is the pumping lemma constant. If so, L(CFG) is infinite otherwise it is finite.

(C) Equality problem is undecidable for all languages except in case of finite automata i.e. for regular languages.

(D) We have to check if the grammar obeys the rules of CFG. If, it obeys such rules then it is decidable.** Thus, option (B) is correct.** Please comment below if you find anything wrong in the above post.

(B) Deciding regularity of a context free language is undecidable. We check if L(CFG) contains any string with length between n and 2n−1 , where n is the pumping lemma constant. If so, L(CFG) is infinite otherwise it is finite.

(C) Equality problem is undecidable for all languages except in case of finite automata i.e. for regular languages.

(D) We have to check if the grammar obeys the rules of CFG. If, it obeys such rules then it is decidable.

What is the output for the given language?

Language: A set of strings over ∑= {a, b} is taken as input and it prints 1 as an output “for every occurrence of a, b as its substring. (INPUT: abaaab)

Language: A set of strings over ∑= {a, b} is taken as input and it prints 1 as an output “for every occurrence of a, b as its substring. (INPUT: abaaab)

- a)0010001
- b)0101010
- c)0111010
- d)0010000

Correct answer is option 'A'. Can you explain this answer?

Priyanka Ranade answered • 2 days ago

A

Kavya Basavaraj asked • 2 hours ago

The probabilities that a student passes in Mathematics, Physics and Chemistry are m, p, and c respectively

. Of these subjects, the student has 75% chance of passing in atleast one, a 50% chance of passing in atleast two and a 40% chance of passing in exactly two. Following relation are drawn in m, p, c.

I. p + m + c = 27/20

II. p + m + c = 13/20

III. (p)+(m)+(C)= 1/10

- a)only relation I is true
- b)only relation II is true
- c)relations II and III are true
- d)relations I and iii are true

Correct answer is option 'D'. Can you explain this answer?

Mahidar N asked • 3 hours ago

Consider the following pseudo code, where x and y are positive integers.

begin

q := 0

r := x

while ?? ≥ ?? do

while ?? ≥ ?? do

begin

r := r – y

q := q + 1

end

end

The post condition that needs to be satisfied after the program terminates is

- a)
- b)
- c)
- d)

Correct answer is option 'B'. Can you explain this answer?

Prashant Waghwase asked • 7 hours ago

Let q, r, and s represent “You can ride the roller coaster,” “You are under 4 feet tall,” and “You are older than 16 years old,” respectively. What is the logical expression for “You cannot ride the roller coaster if you are under 4 feet tall unless you are older than 16 years old"

- a)
- b)
- c)
- d)

Correct answer is option 'A'. Can you explain this answer?

Damayanti Daule asked • 13 hours ago

Suppose a polynomial time algorithm is discovered that correctly computes the largest clique in a

given graph. In this scenario, which one of the following represents the correct Venn diagram of the

complexity classes P, NP and NP Complete (NPC)?

given graph. In this scenario, which one of the following represents the correct Venn diagram of the

complexity classes P, NP and NP Complete (NPC)?

- a)
- b)
- c)
- d)

Correct answer is option 'D'. Can you explain this answer?

Virat Kohli asked • 13 hours ago

Which of the following is true about merge sort?

- a)Merge Sort works better than quick sort if data is accessed from slow sequential memory.
- b)Merge Sort is stable sort by nature
- c)Merge sort outperforms heap sort in most of the practical situations.
- d)All of the above.

Correct answer is option 'D'. Can you explain this answer?

Richa Thakur asked • 14 hours ago

Consider a computer system with 40-bit virtual addressing and page size of sixteen kilobytes. If the computer system has a one-level page table perprocess and each page table entry requires48 bits,then the size of the per-process page table is megabytes.

- a)384.0 : 384.0
- b)385.0 : 385.0
- c)386.0 : 386.0
- d)387.0 : 387.0

Correct answer is '384'. Can you explain this answer?

Damayanti Daule asked • 15 hours ago

consider the directed graph given below

which one of the following is true

- a)the graph does not have any topological ordering
- b)Both PQRS and SRQP are topological ordering
- c)Both PSRQ and SPRQ are topological ordering
- d)PSRQ is the only topological ordering

Correct answer is option 'C'. Can you explain this answer?

Javed Ahmad asked • 15 hours ago

Which of the following is not true about comparison based sorting algorithms?

- a)The minimum possible time complexity of a comparison based sorting algorithm is O(nLogn) for a random input array
- b)Any comparison based sorting algorithm can be made stable by using position as a criteria when two elements are compared
- c)Counting Sort is not a comparison based sorting algortihm
- d)Heap Sort is not a comparison based sorting algorithm

Correct answer is option 'D'. Can you explain this answer?

Manan Athneriya asked • 17 hours ago

A hard disk is connected to a 50 MHz processor through a DMA controller. Assume that the initial set-up of a DMA transfer takes 1000 clock cycles for the processor, and assume that the handling of the interrupt at DMA completion requires 500 clock cycles for the processor. The hard disk has a transfer rate of 2000 Kbytes/sec and average block transferred is 4 K

bytes. What fraction of the processor time is consumed by the disk, if the disk is actively transferring 100% of the time?

bytes. What fraction of the processor time is consumed by the disk, if the disk is actively transferring 100% of the time?

Correct answer is '30 us for initialisation and termination and 2 ms for data transferCpu time is consumed only for initialisation and termination % of cpu time consumed = 30us/ (30us +2ms)* 100 = 1.5%'. Can you explain this answer?

Pooja Daphal asked • 19 hours ago

A computer has a 256 KByte, 4-way set associative, write back data cache with block size of 32 Bytes. The

processor sends 32 bit addresses to the cache controller. Each cache tag directory entry contains, in

addition to address tag, 2 valid bits, 1 modified bit and 1 replacement bit.

processor sends 32 bit addresses to the cache controller. Each cache tag directory entry contains, in

addition to address tag, 2 valid bits, 1 modified bit and 1 replacement bit.

- a)11
- b)14
- c)16
- d)27

Correct answer is option 'C'. Can you explain this answer?

Apurva Patel asked • yesterday

Consider the relation "enrolled(student, course)" in which (student, course) is the primary key, and the relation "paid(student, amount)" where student is the primary key. Assume no null values and no foreign keys or integrity constraints. Given the following four queries:

- a)All queries return identical row sets for any database
- b)Query2 and Query4 return identical row sets for all databases but there exist databases for which Query1 and Query2 return different row sets.
- c)There exist databases for which Query3 returns strictly fewer rows than Query2
- d)There exist databases for which Query4 will encounter an integrity violation at runtime.

Correct answer is option 'B'. Can you explain this answer?

Apurva Patel asked • yesterday

Maximum Subarray Sum problem is to find the subarray with maximum sum. For example, given an array {12, -13, -5, 25, -20, 30, 10}, the maximum subarray sum is 45. The naive solution for this problem is to calculate sum of all subarrays starting with every element and return the maximum of all. We can solve this using Divide and Conquer, what will be the worst case time complexity using Divide and Conquer.

- a)O(n)
- b)O(nLogn)
- c)O(Logn)
- d)O(n^2)

Correct answer is option 'B'. Can you explain this answer?

Sai Kumar asked • yesterday

Which of the following is true about Kruskal and Prim MST algorithms? Assume that Prim is implemented for adjacency list representation using Binary Heap and Kruskal is implemented using union by rank.

- a)Worst case time complexity of both algorithms is same.
- b)Worst case time complexity of Kruskal is better than Prim
- c)Worst case time complexity of Prim is better than Kruskal

Correct answer is option 'A'. Can you explain this answer?

Kavya Basavaraj asked • yesterday

The chain snatchers "

- a)took shelter in a thick jungle
- b)open indiscriminate fire
- c)took to flight
- d)unconditionally surrendered

Correct answer is option 'C'. Can you explain this answer?

ADITYA DATTATRAY asked • yesterday

Consider the grammar with the following translation rules and E as the start symbol.

E → E1 # T { E.value = E1.value * T.value }

| T{ E.value = T.value }

T → T1 & F { T.value = T1.value + F.value }

| F{ T.value = F.value }

F → num { F.value = num.value }

Compute E.value for the root of the parse tree for the expression:2 # 3 & 5 # 6 &4.

- a)200
- b)180
- c)160
- d)40

Correct answer is option 'C'. Can you explain this answer?

Swati Rao asked • yesterday

Suppose we have a block-addressable disk drive. With such block-organized disk nondata overhead of subblocks and interblock gaps have to be accounted for. There are 40000 bytes per track and the amount of space taken up/by subblocks and interblocks gaps equivalent to 250 bytes per block. A file contains records and record size is 200 bytes to be stored on the disk, if a total of 32 blocks can be stored per track then what is the blocking factor? The term "blocking factor” is used to indicate the number of records that are to the stored in each block in a file. A block is organized to hold an integral number of logical records.

- a)3
- b)4
- c)5
- d)6

Correct answer is option 'C'. Can you explain this answer?

Manikant Sharma asked • yesterday

Consider the pushdown automaton (PDA) below which runs over the input alphabet (a, b, c). It has the stack alphabet {Z_{0}, X} where Z_{0} is the bottom-of-stack marker. The set of states of the PDA is (s, t, u, f} where s is the start state and f is the final state. The PDA accepts by final state. The transitions of the PDA given below are depicted in a standard manner. For example, the transition (s, b, X) → (t, XZ_{0}) means that if the PDA is in state s and the symbol on the top of the stack is X, then it can read b from the input and move to state t after popping the top of stack and pushing the symbols Z_{0} and X (in that order) on the stack.

Rasazna Kls asked • yesterday

A priority queue can efficiently implemented using which of the following data structures? Assume that the number of insert and peek (operation to see the current highest priority item) and extraction (remove the highest priority item) operations are almost same.

- a)Array
- b)Linked List
- c)Heap Data Structures like Binary Heap, Fibonacci Heap
- d)None of the above

Correct answer is option 'C'. Can you explain this answer?

Nisi Gupta asked • yesterday

Consider six memory partitions of size 200 KB, 400 KB, 600 KB, 500 KB, 300 KB, and 250 KB, where KB refers to kilobyte. These partitions need to be allotted to four processes of sizes 357 KB, 210 KB, 468 KB and 491 KB in that order. If the best fit algorithm is used, which partitions are NOT allotted to any process?

Correct answer is between '200 KB,300 KB'. Can you explain this answer?

Anonymous Keepprivacy asked • yesterday

A relation (from the relational database model) consists of a set of tuples, which implies that

- a)Relational model supports multi-valued attributes whose values can be represented in sets.
- b)For any two tuples, the values associated with all of their attributes may be the same.
- c)For any two tuples, the value associated with one or more of their attributes must differ.
- d)All tuples in a particular relation may have different attributes.

Correct answer is option 'C'. Can you explain this answer?

Shweta Sonkar asked • 2 days ago

Given an unsorted array. The array has this property that every element in array is at most k distance from its position in sorted array where k is a positive integer smaller than size of array. Which sorting algorithm can be easily modified for sorting this array and what is the obtainable time complexity?

- a)Insertion Sort with time complexity O(kn)
- b)Heap Sort with time complexity O(nLogk)
- c)Quick Sort with time complexity O(kLogk)
- d)Merge Sort with time complexity O(kLogk)

Correct answer is option 'B'. Can you explain this answer?

Adepu Veena asked • 2 days ago

The temporal aspect of the locality of reference means

- a)That the recently executed instruction wont be executed soon
- b)That the recently executed instruction is temporarily not referenced
- c)That the recently executed instruction will be executed soon again
- d)None of the mentioned

Correct answer is option 'C'. Can you explain this answer?

Damayanti Daule asked • 2 days ago

Which one of the following is FALSE?

- a)A basic block is a sequence of instructions where control enters the sequence at the beginning and exits at the end.
- b)Available expression analysis can be used for common subexpression elimination.
- c)Live variable analysis can be used for dead code elimination.
- d)x = 4 ∗ 5 ⇒ x = 20 is an example of common subexpression elimination.

Correct answer is option 'D'. Can you explain this answer?

Hemant Gaikwad asked • 2 days ago

Given the relations

employee (name, salary, deptno) and department (deptno, deptname, address)

- a)Department address of every employee
- b)Employees whose name is the same as their department name
- c)The sum of all employees’ salaries
- d)All employees of a given department

Correct answer is option 'C'. Can you explain this answer?

Gaurav Kumar asked • 2 days ago

An undirected graph G has n nodes. Its adjacency matrix is given by an n × n square matrix whose (i) diagonal elements are 0‘s and (ii) non-diagonal elements are 1‘s. which one of the following is TRUE?

- a)Graph G has no minimum spanning tree (MST)
- b)Graph G has a unique MST of cost n-1
- c)Graph G has multiple distinct MSTs, each of cost n-1
- d)Graph G has multiple spanning trees of different costs

Correct answer is option 'C'. Can you explain this answer?

G Knowledge Ak asked • 2 days ago

In case Of timestamp ordering R-timestamp (Q) denotes

- a)The largest timestamp of any transaction that execute read (Q) successfully.
- b)The average timestamp of any transaction that execute read (Q) successfully.
- c)The average timestamp of any transaction that execute read (Q) unsuccessfully.
- d)The smallest timestamp of any transaction that execute read (Q) successfully.

Correct answer is option 'A'. Can you explain this answer?

Jigar Patel asked • 2 days ago

The line graph L(G) of a simple graph G is defined as follows: · There is exactly one vertex v(e) in L(G) for each edge e in G. · For any two edges e and e' in G, L(G) has an edge between v(e) and v(e'), if and only if e and e'are incident with the same vertex in G. Which of the following statements is/are TRUE?

(P) The line graph of a cycle is a cycle.

(Q) The line graph of a clique is a clique.

(R) The line graph of a planar graph is planar.

(S) The line graph of a tree is a tree.

(Q) The line graph of a clique is a clique.

(R) The line graph of a planar graph is planar.

(S) The line graph of a tree is a tree.

- a)P only
- b)P and R only
- c)R only
- d)P, Q and S only

Correct answer is option 'A'. Can you explain this answer?

Madhu Arasi asked • 2 days ago

Which of the following statements about relative addressing mode is FALSE?

A. It enables reduced instruction size

B. It allows indexing of array element with same instruction

C. It enables easy relocation of data

D. It enables faster address calculation than absolute addressing

A. It enables reduced instruction size

B. It allows indexing of array element with same instruction

C. It enables easy relocation of data

D. It enables faster address calculation than absolute addressing

- a)A
- b)B
- c)C
- d)D

Correct answer is option 'D'. Can you explain this answer?

Satish Gaikwad asked • 2 days ago

Consider the following pseudo code. What is the total number of multiplications to be performed?

- a)Half of the product of the 3 consecutive integers.
- b)One-third of the product of the 3 consecutive integers.
- c)One-sixth of the product of the 3 consecutive integers.
- d)None of the above.

Correct answer is option 'C'. Can you explain this answer?

Soumya Sanket Patra asked • 3 days ago

Choose the incorrect statements:

1. In network model, data is represented by a collection of records, and relationship among data are represented by links.

2 . In hierarchical model, data and relationships among data are represented by records and links respectively.

3. In hierarchical model, the records are organized as a collection of arbitrary graphs.

4. In network model, the records are organized as a collection of trees.

1. In network model, data is represented by a collection of records, and relationship among data are represented by links.

2 . In hierarchical model, data and relationships among data are represented by records and links respectively.

3. In hierarchical model, the records are organized as a collection of arbitrary graphs.

4. In network model, the records are organized as a collection of trees.

- a)1 and 3 only
- b)2 and 3 only
- c)3 and 4 only
- d)All are correct

Correct answer is option 'D'. Can you explain this answer?

Kajal R Patil asked • 3 days ago

"We lived in culture and denied any merit to literally works, Considering them important only when they were handmaidens to something seemingly more urgent - namely ideology. This was a country where all gestures even the most private , interpreted as political terms." The author's believes that ideology is not as important as literature is revealed by the word :

- a)culture
- b)seemingly
- c)urgent
- d)political

Correct answer is option 'B'. Can you explain this answer?

Fetching relevant content for you

Ask a question