0% found this document useful (0 votes)
26 views9 pages

Sample Questions

The document contains a series of mathematical and programming problems along with their solutions. Topics covered include functions, predicates, linear equations, probability, algorithms, and signal processing. Each problem is numbered and provides a concise answer, demonstrating various concepts in mathematics and computer science.

Uploaded by

parikshahelpdesk
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views9 pages

Sample Questions

The document contains a series of mathematical and programming problems along with their solutions. Topics covered include functions, predicates, linear equations, probability, algorithms, and signal processing. Each problem is numbered and provides a concise answer, demonstrating various concepts in mathematics and computer science.

Uploaded by

parikshahelpdesk
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Part I: Basic Aptitude

1. There are functions and binary relations from {1, 2, . . . , 5}

to {1, 2, . . . , 100}.

Ans: 1005 , 2500 .

2. Let P (x, y) be a predicate defined as P (x, y) : (x∨y) → z. The negation of ∀x∃yP (x, y)

without “¬” in front of any quantifier is .

Ans. ∃x∀y[(x ∨ y) ∧ ¬z]

3. The equation of the tangent line at the point (2, 2) to the curve x3 − 4xy + y 3 = 0 is

Ans. y = 4 − x.

4. A point moves along the curve y = x2 for time t ∈ [0, π2 ) such that the line joining the
point and the origin makes an angle t with the positive x-axis. The position and velocity

of the point at time t is and .

1
, 2 tan t

Ans. Position: (tan t, (tan t)2 ), Velocity: 1+t2 1+t2
.

Page 2
Part I: Basic Aptitude

   
1 2 −1 5
5. Let A =  2 1 1  and b =  1 . The solution to the linear system of equations
1 2 −1 5

Ax = b, if it exists, is .

Ans. One solution is b = [0, 2, −1]T .

 
1 1 1
6. Let A =  1 0 a . The values of a for which the system of linear equations
1 −1 0

Ax = 0 will have a unique solution are .

Ans. a 6= 21 .

7. The sample space corresponding to an experiment of counting the number of voice


packets of silence produced by a group of N speakers in a 10 milli sec. period is

Ans. S = 0, 1, 2, ....., N

8. A shipment of components consists of three identical boxes. One box has 2000 components
of which 25% are defective, the second box contains 5000 components of which 20%
are defective and the third box has 2000 components of which 600 are defective. A box
is selected at random and a component removed at random. The probability that this

component is defective is . The probability that it was taken out from

the second box is .

Ans. 0.25 and 4/15

Page 4
Part I: Basic Aptitude

9. What are the values of a and b after the following statements execute?
int a = 3 ; b = 4 ;
int ∗ a p t r = &a ∗ b p t r = &b ;

bptr = aptr ;
a = ∗ btpr ;

a is and b is .

Ans. a = 3, b = 4.

[Link] the incomplete function powerOf given below. The call powerOf(n, x)
should return the quantity nx .
int powerOf ( int base , int power )
{
int r e s u l t ;

if ( )

result = ;

else

result = ∗ powerOf ( base , power − 1 ) ;

Ans. power == 0, result = 1, result = base

Page 6
Part II

[Link] algorithm takes 20 msec for an input size of 1000. If the algorithm has a quadratic
growth rate, it would take approximately msec to solve a problem of
size 10000.

Ans. 2000.

[Link] we add a directed edge to a directed graph with s strongly connected components,
the number of strongly connected components in the resulting graph can equal any
number between and .

Ans. 1 and 5.

[Link] three jobs arrive at approximately the same time, but Job A arrives slightly
before Job B, and Job B arrives slightly before Job C. Job A takes 2 seconds of CPU,
Job B takes 8 seconds, and Job C takes 7 seconds. Assume a time-slice of 1 second.
Given a Round-Robin scheduler, the turnaround time of Job B will be
seconds.

Ans. 17

[Link] the following components of program state: register values, heap memory,
global variables, and stack memory. Exactly two of these components are shared
across threads in a multi-threaded process. They are and

Ans. Global variables, heap memory.

Page 8
Part II

[Link] the relation R with attributes A, B, C, and D and with the following
functional dependencies (FDs): ABC → D, A → B. A candidate key of R is
.

Ans. AC

[Link] SQL query SELECT * FROM R1, R2; can be expressed as in relational
algebra.

Ans. R1 × R2.

[Link] language accepted by the following automaton is .

Ans. {an b : n ≥ 0}

[Link] G = ({S}, {a, b}, P, S) be a grammar with productions S → aSa, S → bSb, S → λ.

Then the language generated by the above grammar is .

Ans. (0 + 1)∗ 0(0 + 1)∗

Page 10
Part II

19.A particular computer is on an Ethernet LAN and runs TCP/IP. An application on


the computer sends some data across the LAN. The first byte in the Ethernet payload

field will be the byte of the .

Ans. first, IP header

[Link] the Go-Back-N (GBN) and Selective Repeat (SR) automatic repeat request

protocols. Let the window size be W . The sender side of GBN uses

timer(s) and the sender side of SR uses timer(s).

Ans. 1, W

Page 12
Part II

[Link] the circuit shown in Figure 1 below, Req is .

Figure 1:


Ans. 11.18Ω ( 125Ω).

[Link] the diodes D1 and D2 shown in the circuit in Figure 2 as ideal, and inputs
I1 , I2 are 0 volts for logic 0, and 10 volts for logic 1, the logic gate represented by the

circuit is .

Figure 2:

Ans. AND

Page 14
Part II

[Link] u be the discrete unit step signal. The output of a discrete-time LTI system, when
the input is u is y(n) = n · u(n). The output of the same system when the input signal
is

2, 0 ≤ n ≤ 7
p(n) =
0, n < 0, n ≥ 8

is .

Ans. 2[n u(n) − (n − 8) u(n − 8)]

[Link] x(t) is a real valued, odd periodic signal with period T = 2. It has at most
three non-zero Exponential Fourier series coefficients: {c−1 , c0 , c1 }. Moreover the signal

energy is given to be 1. The signal x(t) could be .

Ans. ± sin(π t)

[Link] mh (t) is the Hilbert transform of m(t), then the Hilbert transform of mh (t) is

Ans. −m(t)

[Link] an additive white Gaussian Noise (AWGN) channel, matched filter maximizes the
signal to noise ratio (SNR) at the output of the filter. The SNR at the input of the

filter is .

Ans. 0.

Page 15
Part II

27.A signal x(t) = 2 cos(400πt) + 6 cos(640πt) is ideally sampled at fs = 500 Hz and the
sampled signal is passed through an ideal low pass filter with a cutoff frequency of
400 Hz. The frequency components that appear at the output of the filter are (in Hz)

Ans. 180, 200, 300, 320 Hz

[Link] frequency response H(jw) of a digital filter is given by 1 + 2 cos w. It’s impulse

response is .

Ans. h[n] = 1, −1 ≤ n ≤ 1

[Link] E is the electric field intensity and H is the magnetic field intensity, the power flow

vector P can be written as .

Ans. P = E × H.

[Link] the attenuation of a transmission line is 3 nepers, the attenuation is

dB.

Ans. 26.1

Page 17

You might also like