1
GATE CSE 2008
MCQ (Single Correct Answer)
+2
-0.6
The subset-sum problem is defined as follows:
Given a set S of n positive integers and a positive integer W, determine whether there is a subset of S Whose elements sum to W. An algorithm Q solves this problem in O(nW) time. Which of the following statements is false?
A
Q solves the subset-sum problem in polynomial time when the input is encoded in unary
B
Q solves the subset-sum problem in polynomial time when the input is encoded in binary
C
The subset sum problem belongs to the class NP
D
The subset sum problem is NP-hard
2
GATE CSE 2008
MCQ (Single Correct Answer)
+2
-0.6
Which of the following are true?

I. A programming language which does not permit global variables of any kind and has no nesting of procedures/functions, but permits recursion can be implemented with static storage allocation

II. Multi-level access link (or display) arrangement is needed to arrange activation records only if the programming language being implemented has nesting of procedures/functions

III. Recursion in programming languages cannot be implemented with dynamic storage allocation

IV. Nesting procedures/functions and recursion require a dynamic heap allocation scheme and cannot be implemented with a stack-based allocation scheme for activation records

V. Programming languages which permit a function to return a function as its result cannot be implemented with a stack-based storage allocation scheme for activation records

A
II only
B
I, III and IV only
C
I, II and V only
D
II, III and V only
3
GATE CSE 2008
MCQ (Single Correct Answer)
+1
-0.3
Which of the following describes a handle (as applicable to LR-parsing) appropriately?
A
It is the position in a sentential form where the next shift or reduce operation will occur
B
It is non-terminal whose production will be used for reduction in the next step
C
It is a production that may be used for reduction in a future step along with a position in the sentential form where the next shift or reduce operation will occur
D
It is the production p that will be used for reduction in the next step along with a position in the sentential form where the right hand side of the production may be found
4
GATE CSE 2008
MCQ (Single Correct Answer)
+2
-0.6
An LALR(1) parser for a grammar G can have shift-reduce (S-R) conflicts if and only if
A
The SLR(1) parser for G has S - R conflicts
B
The LR(1) parser for G has S - R conflicts
C
The LR(0) parser for G has S - R conflicts
D
The LALR(1) parser for G has reduce-reduce conflicts
EXAM MAP
Medical
NEET
Graduate Aptitude Test in Engineering
GATE CSEGATE ECEGATE EEGATE MEGATE CEGATE PIGATE IN
CBSE
Class 12