Tuesday, 24 January 2017

CBSE UGC NET Computer Science Paper II January 2017 - Part 2

11.       Which of the following cannot be passed to a function in C++?
(1) Constant
(2) Structure
(3) Array
(4) Header file
Answer: 4
12.       Which one of the following is correct for overloaded functions in C++?
(1) Compiler sets up a separate function for every definition of function.
(2) Compiler does not set up a separate function for every definition of function.
(3) Overloaded functions cannot handle different types of objects.
(4) Overloaded functions cannot have same number of arguments.
Answer: 1
13.       Which of the following storage classes have global visibility in C/C++?
(1) Auto
(2) Extern
(3) Static
(4) Register
Answer: 2
14.       Which of the following operators cannot be overloaded in C/C++?
(1) Bitwise right shift assignment
(2) Address of
(3) Indirection
(4) Structure reference
Answer: 4
15.       If X is a binary number which is power of 2, then the value of
X&(X-1) is:
(1) 11....11
(2) 00.....00
(3) 100.....0
(4) 000.....1
Answer: 2
16.       An attribute A of datatype varchar(20) has value 'Ram' and the attribute B of datatype char(20) has value 'Sita' in oracle. The attribute A has .......... memory spaces and B has .......... memory spaces.
(1) 20, 20
(2) 3, 20
(3) 3, 4
(4) 20, 4
Answer: 2
17.       Integrity constraints ensure that changes made to the database by authorized users do not result into loss of data consistency. Which of the following statement(s) is (are) true w.r.t. the examples of integrity constraints?
(A) An instructor Id. No. cannot be null, provided Instructor Id. No. being primary key.
(B) No two citizens have same Adhar-Id.
(C) Budget of a company must be zero.
(1) (A), (B) and (C) are true.
(2) (A) false, (B) and (C) are true.
(3) (A) and (B) are true; (C) false.
(4) (A), (B) and (C) are false.
Answer: 3
18.       Let M and N be two entities in an E-R diagram with simple single vale attributes. R1 and R2 are two relationship between M and N, whereas
R1 is one-to-many and R2 is many-to-many.
The minimum number of tables required to represent M, N, R1 and R2 in the relational model are ..........
(1) 4
(2) 6
(3) 7
(4) 3
Answer: 4
19.       Consider a schema R(MNPQ) and functional dependencies M→N, P→Q. Then the decomposition of R into R1(MN) and R2(PQ) is .............
(1) Dependency preserving but not lossless join.
(2) Dependency preserving and lossless join
(3) Lossless join but not dependency preserving
(4) Neither dependency preserving nor lossless join.
Answer: 1
20.    The order of a leaf node in a B+ tree is the maximum number of children it can have. Suppose that block size is 1 kilobytes, the child pointer takes 7 bytes long and search field value takes 14 bytes long. The order of the leaf node is ............
(1) 16
(2) 63
(3) 64
(4) 65

CBSE UGC NET Computer Science Paper II January 2017 - Part 1

1.       Consider a sequence F00 defined as:
Then what shall be the set of values of the sequence F00?
(1) (1, 110, 1200)
(2) (1, 110, 600, 1200)
(3) (1, 2, 55, 110, 600, 1200)
(4) (1, 55, 110, 600, 1200)
Answer: 1
2.       Match the following:
List-I                  List-II
a. Absurd          i. Clearly impossible being
contrary to some evident truth.
b. Ambiguous   ii. Capable of more than one
interpretation or meaning.
c. Axiom            iii. An assertion that is accepted
and used without a proof.
d. Conjecture    iv. An opinion Preferably based
on some experience or wisdom.
     a   b   c    d
(1) i    ii   iii   iv
(2) i    iii  iv   ii
(3) ii   iii  iv   i
(4) ii   i    iii   iv
Answer: 1
3.       The functions mapping R into R are defined as:
f(x) = x3-4x, g(x)=1/(x2+1) and h(x)=x4
Then find the value of the following composite functions:
hog(x) and hogof(x)
(1) (x2+1)4 and [(x3-4x)2+1]4
(2) (x2+1)4 and [(x3-4x)2+1]- 4
(3) (x2+1)- 4 and [(x3-4x)2+1]4
(4) (x2+1)‑ 4 and [(x3-4x)2+1]- 4
Answer: 4
4.       How many multiples of 6 are there between the following pairs of numbers?
0 and 100          and     -6 and 34
(1) 16 and 6
(2) 17 and 6
(3) 17 and 7
(4) 16 and 7
Answer: 3
5.       Consider a Hamiltonian Graph G with no loops or parallel edges and with |V(G)|=n≥3. Then which of the following is true?
(1) deg(v) ≥ n/2 for each vertex v.
(2) |E(G)| ≥ 1/2(n-1)(n-2)+2
(3) deg(v)+deg(w) ≥ n whenever v and w are not connected by an edge.
(4) All of the above
Answer: 4
6.       In propositional logic if (P→Q)˄(R→S) and (P˅R) are two premises such that
Y is the premise:
(1) P˅R
(2) P˅S
(3) Q˅R
(4) Q˅S
Answer: 4
7.       ECL is the fastest of all logic families. High Speed in ECL is possible because transistors are used in difference amplifier configuration, in which they are never driven into ...............
(1) Race condition
(2) Saturation
(3) Delay
(4) High impedance
Answer: 2
8.       A binary 3-bit down counter uses J-K flip-flops, FFi with inputs Ji, Ki and outputs Qi, i=0,1,2 respectively. The minimized expression for the input from following, is
I. J0=K0=0
II. J0=K0=1
III. J1=K1=Q0
IV. J1=K1=Q'0
V. J2=K2=Q1Q0
Vl. J2=K2=Q'1Q'0
(1) I, Ill, V
(2) I, IV, VI
(3) Il, III, V
(4) Il, IV, Vl
Answer: 4
9.       Convert the octal number 0.4051 into its equivalent decimal number.
(1) 0.5100098
(2) 0.2096
(3) 0.52
(4) 0.4192
Answer: 1
10.    The hexadecimal equivalent of the octal number 2357 is:
(1) 2EE
(2) 2FF
(3) 4EF
(4) 4FE
Answer: 3

Wednesday, 11 January 2017

Computer Networks problems and solutions for UGC NET/GATE exam - Set 6

26.       Using the generator (divisor) polynomial x3 + x + 1 for CRC, what frame will be transmitted for the data M = x7 + x5 + x3 + 1?
T(x) = 10101001 111
Cyclic Redundancy Check: A major goal in designing error detection algorithms is to maximize the probability of detecting errors using only a small number of redundant bits.

Add k bits of redundant data to an n-bit message

Represent n-bit message as n-1 degree polynomial

Algorithm for computing the checksum
1. shift left r bits (append r zero bits to low order end of the frame), i.e., M(x)xr
2. divide the bit string corresponding to G(x) into (xr)M(x).
3. subtract (or add) remainder of M(x)xr / G(x) from M(x)xr using XOR, call the result T(x). Transmit T(x).
27.       Using the generator (divisor) polynomial x4 + x + 1 for CRC, what frame will be transmitted for the data M = x7 + x5 + x3 + 1?
T(x) = 10101001 1100
28.       A disadvantage of a broadcast subnet is the capacity wasted when multiple hosts attempt to access the channel at the same time. As a simplistic example, suppose that time is divided into discrete slots, with each of the n hosts attempting to use the channel with probability p during each slot. What fractions of the slots are wasted due to collisions?
The fraction of the slots are wasted due to collisions is

1 - the fraction of the slots without collisions.

Two situations are without collisions:

1) Successful transmission. One station transmits and the rest of them idle. The probability is n x p x (1 - p)^(n - 1).
2) All stations are idle. The probability is (1 - p)^n.

Hence, the fraction that are wasted is
1 - n x p x (1 - p)^(n - 1) - (1 - p)^n.
29.       What is the maximum data rate for a noiseless 1-MHz channel if QAM-256 is used?
Maximum data rate = 2 B log2 V
= 2 x 1 x log2 256
= 2 x 8 = 16 Mbps
30.       If a binary signal is sent over a 1-MHz channel whose signal-to-noise ratio is 20 dB, what is the maximum achievable data rate?
Signal-to-Noise ratio (S/N) = 20 dB
    => 10 log10(S/N)=20
=> log10 S/N = 2,
=> S/N =102 = 100
Now, from Shannon's theorem we know,
Max. data rate = B log2(1 + S/N) bits/sec
= 1 x log2 101 = 6.658 Mbps or about 7 Mbps
The Shannon-Hartley theorem states that the channel capacity is given by
C = B log2(1 + S/N)
where C is the capacity in bits per second, B is the bandwidth of the channel in Hertz, and S/N is the signal-to-noise ratio.

Tuesday, 10 January 2017

Computer Networks problems and solutions for UGC NET/GATE exam - Set 5

21.       A movie DVD holds 120 minutes' movie and takes 5 GB (G is specified as 109 in this case). What is the bandwidth to play this movie DVD?
5 x 109 x 8 / (120 x 60) = 5.556 Mbps (1 GB = 109 B)
5 x 230 x 8 / (120 x 60) = 5.965 Mbps (1 GB = 230 B)
22.       It is desired to send a sequence of computer screen images over an optical fiber. The screen is 480 x 640 pixels, each pixel being 24 bits. There are 60 screen images per second. How much bandwidth is needed, and how many microns of wavelength are needed for this band at 1.30 microns?
The data rate Δf is 480 x 640 x 24 x 60 bps, which is 442 Mbps. For simplicity, let us assume 1 bps/Hz.
Δf = c Δλ/λ2
Δλ = λ2 Δf/c
where Δf is the bandwidth range, c is the light speed, Δλ is the wavelength range, and lambda is a certain wavelength.
We have Δf = 4.42 x 108, so
          Δλ = 2.5 x 10-6 microns.
The range of wavelengths used is very short.
or If we assume 8 bps/Hz, Δλ = 0.17 x 10-6 microns.
23.       An ADSL system using DMT allocates 3/4 of the available data channels to the downstream link. It uses QAM-64 modulation on each channel. What is the capacity of the downstream link?
There are 256 channels in all, minus 6 for POTS and 2 for control, leaving 248 for data. If 3/4 of these are for downstream, that gives 186 channels for downstream. ADSL modulation is at 4000 baud, so with QAM-64 (6 bits/baud) we have 24,000 bps in each of the 186 channels.
The total bandwidth is then 4.464 Mbps downstream.
Discrete multitone (DMT) is a method of separating a Digital Subscriber Line (DSL) signal so that the usable frequency range is separated into 256 frequency bands (or channels) of 4.3125 KHz each. DMT uses the fast Fourier transform (FFT) algorithm for modulation and demodulation. Dividing the frequency spectrum into multiple channels allows DMT to work better when AM radio transmitters are present. Within each channel, modulation uses quadrature amplitude modulation (QAM).
QAM (quadrature amplitude modulation) is a method of combining two amplitude-modulated (AM) signals into a single channel, thereby doubling the effective bandwidth. QAM is used with pulse amplitude modulation (PAM) in digital systems, especially in wireless applications.
POTS, Short for plain old telephone service, which refers to the standard telephone service that most homes use. In contrast, telephone services based on high-speed, digital communications lines, such as ISDN and FDDI, are not POTS. The main distinctions between POTS and non-POTS services are speed and bandwidth.

24.       In a typical mobile phone system with hexagonal cells, it is forbidden to reuse a frequency band in an adjacent cell. If 840 frequencies are available, how many can be used in a given cell?
Each cell has six other adjacent cells, in a hexagonal grid. If the central cell uses frequency group A, its six adjacent cells can use B, C, B, C, B, and C respectively. In other words, only 3 unique cells are needed. So the answer is 840/3 = 280 frequencies.
25.       If the bit string 0111110111110111110 is subjected to bit stuffing, what output string will be transmitted?
The output is 0111110011111001111100.
In data transmission and telecommunication, bit stuffing is the insertion of non information bits into data. Stuffed bits should not be confused with overhead bits (nondata bits).
- Call a flag six consecutive 1s
- On transmit, after five 1s in the data, insert a 0
- On receive, a 0 after five 1s is deleted

Thursday, 5 January 2017

Circuit Switching, Message Switching and Packet Switching

Circuit Switching, Message Switching and Packet Switching

Switching is a technology to connect two end-points.

In circuit switching a physical path is set up between two end-points duration of the connection.

In message switching no physical path is established. The message is stored and forwarded to the destination.

In packet switching no physical path is established. The message is divided into packets, stored and forwarded to the destination.

Packet switching can reduce delay and improve throughput.