˘ ˇ ˆ˙ ˝ ˆmedia.careerlauncher.com.s3.amazonaws.com/acads_download_section/gate... · t2 = k...

13
SOLVED PAPER-2014 (COMPUTER SCIENCE & INFORMATION TECHNOLOGY - CS) 1 GATE - 2014 CS : COMPUTER SCIENCE & INFORMATION TECHNOLOGY No. of Questions : 65 Maximum Marks : 100 (Q. 1 5) Carry One Mark Each. 1. Choose the most appropriate phrase from the options given below to complete the following sentence. India is a post-colonial country because ( a) it was a former British colony ( b) Indian Information Technology professionals have colonized the world (c) India does not follow any colonial practices (d) India has helped other countries gain freedom 2. Who ___________ was coming to see us this evening ? ( a) you said ( b) did you say (c) did you say that (d) had you said 3. Match the columns: Column-1 Column-2 1. eradicate P. misrepresent 2. distort Q. soak completely 3. saturate R. use 4. utilize S. destroy utterly ( a) 1 : S, 2 : P, 3 : Q, 4 : R ( b) 1 : P, 2 : Q, 3 : R, 4 : S (c) 1 : Q, 2 : R, 3 : S, 4 : P (d) 1 : S, 2 : P, 3 : R, 4 : Q 4. What is the average of all multiples of 10 from 2 to 198? (a) 90 ( b) 100 (c) 110 (d) 120 5. The value of + + + 12 12 12 ... is (a) 3.464 ( b) 3.932 (c) 4.000 (d) 4.444 (Q. 6 10) Carry Two Marks Each. 6. The old city of Koenigsberg, which had a German majority population before World War 2, is now called Kaliningrad. After the events of the war, Kaliningrad is now a Russian territory and has a predominantly Russian population. It is bordered by the Baltic Sea on the north and the countries of Poland to the south and west and Lithuania to the east respectively. Which of the statements below can be inferred from this passage? ( a) Kaliningrad was historically Russian in its ethnic make up ( b) Kaliningrad is a part of Russia despite it not being contiguous with the rest of Russia (c) Koenigsberg was renamed Kaliningrad, as that was its original Russian name (d) Poland and Lithuania are on the route from Kaliningrad to the rest of Russia 7. The number of people diagnosed with dengue fever (contracted from the bite of a mosquito) in north India is twice the number diagnosed last year. Municipal authorities have concluded that measures to control the mosquito population have failed in this region. Which one of the following statements, if true, does not contradict this conclusion? ( a) A high proportion of the affected population has returned from neighbouring countries where dengue is prevalent ( b) More cases of dengue are now reported because of an increase in the Municipal Offices administrative efficiency (c) Many more cases of dengue are being diagnosed this year since the introduction of a new and effective diagnostic test (d) The number of people with malarial fever (also contracted from mosquito bites) has increased this year 8. If x is real and |x 2 2x + 3| = 11, then possible values of | x 3 + x 2 x| include ( a) 2, 4 ( b) 2, 14 (c) 4, 52 (d) 14, 52 9. The ratio of male to female students in a college for five years is plotted in the following line graph. If the number of female students doubled in 2009, by what percent did the number of male students increase in 2009? 2008 2009 2010 2011 2012 3.5 3 2.5 2 1.5 1 0.5 0 Ratio of male to female students GENERAL APTITUDE

Transcript of ˘ ˇ ˆ˙ ˝ ˆmedia.careerlauncher.com.s3.amazonaws.com/acads_download_section/gate... · t2 = k...

Page 1: ˘ ˇ ˆ˙ ˝ ˆmedia.careerlauncher.com.s3.amazonaws.com/acads_download_section/gate... · t2 = k ∗ 4 t3 = t1 + t0 t4 = t3 + t2 t5 = X[t4] ˇ ˇ 9++C˚" ˙ ˝W D int X[32][32][8]E

������������ ��� ��������� ���������� ��������������������� �� ��� 11111

�������� ��

��� �� ������������������ ���������

����������

�������������� ��� ������������� � ���

���� �� �� ������� �����������

�� ������� ��������� ������� ����� ���� ���

������� ������������ ��� �������� ���� ��������

���������

�����������������������������������

��� ������� ��������������������

��� �������� ��������������������� ��������

�����������������������

��� �������������� ������������������������

��� ���������������������������������� ������

�� ��� !!!!!!!!!!!���� ������� ��� ���� ��� ����

��������"

��� ������� ��� ����������

������������������ ��� ����������

�� #���������������$

������� �������

%� ������� &� �����������

'� ������� (� ��)����������

*� ������ +� ���

,� ������� -� ���������������

��� %�$�-.�'�$�&.�*�$�(.�,�$�+

��� %�$�&.�'�$�(.�*�$�+.�,�$�-

��� %�$�(.�'�$�+.�*�$�-.�,�$�&

��� %�$�-.�'�$�&.�*�$�+.�,�$�(

�� ����������������� �������������� �%/� ���

�'����%01"

����0/ ��� %//

����%%/ ��� %'/

�� ���������� � + + +%' %' %' ��� ���

����*�,2, ��� *�0*'

����,�/// ��� ,�,,,

���� �� �� ��������� �����!�����

�� �������������� �3����������.�����������4����

�5���������������� ���� ����� ��'.�������

������3����������6 ���������������� �������.

3�����������������+����������������������

������������+�����������������������������

�������������-�������������������������������

� �&�����������������������������7���������

�������� ������������� ������ � ���� ���������

�������������� ������ �������������"

��� 3������������������������+������ ��� ���

��������)���

��� 3����������������� �+������������������

�������������������������������� �+����

��� 3���������������������3��������.������

���������������+���������

��� &��������7����������������������� ���

3���������������������� �+����

"� ������������ ��������������������������� ����

����������� �������������� �����8�������������������

��������������������������������������#������

�����������������������������������������������

�������8����������������� ��������������������

���������� � ���� ��������� ���������.� � � ����.

����������������������������������"

��� 6���������������� ����� �������������

��� ��������� ����������������� ���������

�����������������������

����#���� ����� � � ������� ��� ���� �������

�������� ������������������#�������9 ���:�

�������������� �������

��� #��� ����� ����� � � ������� ��� �����

������������������������������������������

��������� ���������������������

���������������� ����������������� ���������

���������� �������8�����������������������

��������

#� � �������������;�'�<�'��=�*;�>�%%.�������������

������� �;<��*�=��'�<��;��������

��� '.�, ��� '.�%,

����,.�?' ��� %,.�?'

$� ���������� �������� �������������������������

��� �������������������������� ������������������

� ������������� � �������������������������'//0.

������������������������������ �������������

�����������'//0"

2008 2009 2010 2011 2012

3 .5

3

2 .5

2

1 .5

1

0 .5

0Rat

io o

f m

ale

to f

emal

e st

ud

ents

%�&�'()�(*�+�,-�

Page 2: ˘ ˇ ˆ˙ ˝ ˆmedia.careerlauncher.com.s3.amazonaws.com/acads_download_section/gate... · t2 = k ∗ 4 t3 = t1 + t0 t4 = t3 + t2 t5 = X[t4] ˇ ˇ 9++C˚" ˙ ˝W D int X[32][32][8]E

22222 ������������ ��� ��������� ���������� ��������������������� �� ���

��� 6�������������������2���������@��������������

������������������������ ������)��)���

����������������2/A"

��� 2�$�''����� ��� 2�$�'@�����

����2�$�*1����� ��� 2�$�,?�����

�*,��'�.+�&��(&-� +&/ '�(�+ &

��0& ) %1

���� �� �� �������� �����������

�� ���������������������������� ��������������

� � %/� ��������� � � ������ �B����� ���� ��

���)����� ��� ����)� �������� ���� ������� ��

��������.� ���� � ������ ������� ���� � � ���

��������� ��)��� �� ������ ��������

��������������������������������� ��������

� ��������������� ����� ���������������������

������)�����7�������������������������������

��� ������� ��������� ��� �������� ������ ����

%//���>�!!!!!!!!!!!!!�

�� C���� ��������������������������������D��� ���

����������� ��������������������E��������������

������������� �����������������������

������)���������B��9���� ������������������

�������� ����������B�����������������������

�����������������!!!!!!!!�������������������

������������������������������

�� �����B������������ � � ������ ��� � �������

�������%'�������������!!!!!�

�� � ���������B�6������������

= −

'

6 , F% 0 ?G

@

��������������������� �6�����8������!!!!!!!�

�� 6������������������������� ��������*���������

����>%.���>�'������>�*�� ���������� ����� ��������

���������+HC"

������/����,��I�/ ��� ��/����,��J�/

������/��=���,��J�/ ��� ��/��=���,��I�/

�� ��������� ��������� ��������K��%.��'.���.��

�.�=.�⋅ .�′�.

����������KL.�������������B��������������� �K

�����=�����M�������K����������������� ������

K�>�KL�������������� ���� ����� ���������������

�����������������

����'� ��� '�<%

����''�

��� ''�<%

"� 7�����>�'���6�������������������������������������

� ����������������������������������������'�

������������������������������8�����������

��� ���������������������

��� ������������������������

��� ������������������

��� ������N��������������

#� ��������������8�������%'*�?�>���1�

�������������

����)����������������� � ��������� ���������

���!!!!!!!� �

$� 6�,���������������������������������������

�������� �%2�3����������������������)�������

1���������������������������*'�����������������

�������������������������,�4�������������

� ������ ��������64� ��������!!!!!�

��� ������������� ��������func������������$

int func(int num) {

int count = 0;

while (num) {

count++;

num>>= 1;

}

return (count);

}

���������������������func(435)���!!!!!!!!!�

��� -�����n����p����unsigned int �������������������� ��������������������

*��� �n��������.

������ ���� � � ���� ��������� ���������� �������

��)���������������������"

��� �>���O����<�%��O����<�'��P�2Q

��� �>���O����<�%��P�'�O����<�'��P�*Q

��� �>���O����<�%��P�*�O����<�'��P�'Q

��� �>���O����<�%��O����<�'��P�2�/Q

��� 6���������8����������������������#B�R��

��������.� ��� ��� ?� ���������� ���� �����������

��������� ����������$�%/.�1.�?.�*.�'���������

���������%����@���������������������������

������������������������������������ �������

������������������� ����������������$

����%/.�1.�@.�*.�'.�%.�? ��� %/.�1.�@.�'.�*.�%.�?

��� %/.�1.�@.�%.�'.�*.�? ��� %/.�1.�@.�?.�*.�'.�%

��� ���������� ����� �����������������������������

���� ��������� � � ���� ����������� ������������

��%��>�%"

= + �� � '� ���

'

�� �

������� ��� ���������������'� ��� �������

��� ����������������������� ���K-��������� ����

������� �����W� ��� �� ����������.� ���������.�������������������������T� �������������������������������������� �����������

��� ���������������������������������� ���������

��� ���������������� ����W� ��������������B� ���������

��� ����������������� ����W���������������������������������� �T

��� �������������������������

Page 3: ˘ ˇ ˆ˙ ˝ ˆmedia.careerlauncher.com.s3.amazonaws.com/acads_download_section/gate... · t2 = k ∗ 4 t3 = t1 + t0 t4 = t3 + t2 t5 = X[t4] ˇ ˇ 9++C˚" ˙ ˝W D int X[32][32][8]E

������������ ��� ��������� ���������� ��������������������� �� ��� 33333

��� � �7%�>�S��;��≥�/;T����7

'�>�S��;��≥�/;T.���������

�� 7%�⋅�7

'������������������

��� 7%�⋅�7

'�>�S�����;���≥�/T

���������� ����� �������������9++C��"

����9������� ��� 9��������

�������������������� ��� U�������������������

��� 7���6�≤������������ ���� �������6� �������

���������������)�������������������������������

���������� ���������� ����� ������������K67-C"

��� � �6�≤���������������������������6�������������

��� � �6�≤�� �� ���6� ��� ����������� ������� ��

����������

��� � �6�≤��������������������������������������

6�������������������������

��� � �6�≤�������������������������������������

�����6�����������������������������

�"� ��������������������� ������������ ��������

���������������.������������������∗ ����=-�→���∗ �&��→�H�;���∗ �H&�→�(�=�&�;�((�→���H�→��� ���������� ����� �������������+HC"

��� =������ �����������.�������∗ ���������������������� =�������������������.�������∗ ������ �������������� �����=����∗ ���������������������� �����=����∗ ������ �����������

�#� ����� ���� � � ���� ��������� ���U9���� �����

����������������"

��� L���������������������

��� ��������)���

��� -�������������������

��� ��������B�����

�$� ���������� ����� �������������+HC"

��� ���� ��8������������������� ���� ���������

����������8������������������������������

������������������������ ��������

��� ��������������� ������������ � � ��������

��8�����������������������������������

��� &���������� ��� �������� � � ��8���������

��������

��� +�8���������������������������������� �������

�����������������������

��� 6�K6��� ������������������������ �������������

�������������������������������� ����������

�������K6�����,����������������4������%//�V�%/2

���������)�������������� �����������������������

�������)���������%/*������.������B�����������

� ��������������������������������)�����������

%/2������� ���!!!!!!!!!!!!�

��� �����B������������ � � ����)���� ��� ���

��������������R(E,F,G,H)������E�������)����� !!!!!�

��� 4���������������� �����-�HLCU�-����������

�����������$

StudentID StudentName StudentEm ail StudentAge CPI23451287785398768765

ShankarSw atiShankarSw atiG anesh

Shankar@ m athSwati@ eeShankar@ cseSw ati@ m echG anesh@ civil

X

19191819

9 .49 .59 .49 .38 .7

K����-������U��.�-������6�����������)��� ��

������������.����������W��������U9������8��

��� !!!!!!�

��� ���������� � ���� ��������� ����+HC������ ���

��������� ������ �������� ��������� <�+������

�� ��������&�������� �+�&�� ���9���-�������

&���K������9-&K�"

��� +�&��������������������������������9-&K

��������)�������������

��� 9-&K��������������������������������+�&

��������)�������������

��� �����+�&����9-&K��������)�������������

��� ����� +�&� ���9-&K� ���� �������� ������

�������

��� ���������� ����� ������������)���6&�� ��������

�������������������������������&����)�������

����������)��"

��� ������� ��� ����

���������� ��� ����

��� ������������������������.�7%������C�������

76U����7'�������)���+����76U��6���&��)��

���������� �����������-����������������+.��

��������������)��������������-&�������������

�����-&�.�����������������������������)������

������������� �������7� ��������*'�������B����

�������������� �������7� ����������+���������

�������������!!!!!!!!!!!!��

IS P1IS P2

RLAN L2

S LAN L1

������� �� ��������� �����!�����

��� ���������������������� �������)�����������

������)��������������6����������������������

� ��������)����%/2�������P������6��������������6

������� ����� ������%/*������������������������

��������+%����+'������������ �����������������

������������������)������������������������

������������������ ����6������������������������.

���� ���� ��� ����� ����� %/� �8��� ���.� ��� �����

�)������������������ ����6�������������������

���.����� �����������������'/��8���������������

�)������������ ����6�������C����)����������

Page 4: ˘ ˇ ˆ˙ ˝ ˆmedia.careerlauncher.com.s3.amazonaws.com/acads_download_section/gate... · t2 = k ∗ 4 t3 = t1 + t0 t4 = t3 + t2 t5 = X[t4] ˇ ˇ 9++C˚" ˙ ˝W D int X[32][32][8]E

44444 ������������ ��� ��������� ���������� ��������������������� �� ���

%//�������� ��������� ���������������������

������������������������������������������

������� ���������.� 8������� ��� �������

�������6���� ������ ���� ������ ��� ��� ������

��������������������7����%.��'�����*�������

�������)������������������ ����������� ����.�������

��� ������ ���� ������������� ����� ���� � � ���

�������������9++C��"

A R1 R2 B

��� �%�I��'�I��*

��� �%�J��'�J��*

��� �'�>��*.��*�I��%

��� �%�>��*.��*�J��'

�"� 6�� �&��������(� ��� � ��� ��� ������� �&

�������R�����������&���������+%.�+'.����+*�

(<+%<+'<+*<R

R���������R��&�������.����(�������������R

���R��&�������������� ����� -������� ����

�����������������.������LC-�������������)��

�������������������������������� ��������� ���

������� ��� �������$

F%%G�����H+7�� ����� �����������������(

F%'G�������&���������������(����R

F%*G������&����������� �(����R

F%,G��������)���������������� �(����R

������ ��%.��'.��*.�����,�������������������

����������� ������+'�����"

��� 9�����%�����'

��� 9�����%

��� 9�����'�����*

��� 9�����*�����,

�#� 6��������R�#7���������������������������)

��������������(����������������R�#7������

�����R��&��������-������������R�#7���

����B�������������������������������������

������-��6�����������������.������������ ����

��������� ��� �������� ����� ����R�#7������

������������������������������������"

��� (����������������������'�R��&���8��������

-.� ���� ����������� ��� � ������ ��&

���������������������-

��� (����������������������'�R��&���8��������

-.���������������&����������������������-���

�� ������

��� 6��������R��&���8����� ����(����-������ ������.

�������������&��������������������(����-

������������ �������

��� 6��������R��&���8����� ����(����-������ ������.

��� ����� ��� �������� �������� ��� ��&

�������������������(����-

�$� ������������� ������������������-�� �����������

�%.��'.��*.��,$

T1 T2 T3 T4

W rites (X)C omm it

W rites (X)C omm it

W rites(Y)R eads(Z )C omm it

R eads(X )R eads(Y )C omm it

R eads(X )

���������� ����� �����������������������9++C��"

��� -������� ����������������������������������

��� -����������� ���������������������������������

��� -������������ �����������������������������

��� -� ��� �������� ��� ���������������� ���� ��� ��

����������

��� ��������� � 5���� ��������� ������� �������

���������r(R)����s(S)��������������������������������������*��� ��������� � ������8��

��� ���)� ����)� ����.� ���� � ������� ���� �� ��� ��

��������� ��� ������������ ��������� 6�������

size(r(R))<size(s(S)).� ���� 5��������� ��� ������������� ����)�����)����������

��� ��������r(R)��������������������

��� ��������s(S)��������������������

��� 5�������������� �������������r(R)����s(S)������������/�?

��� 5�������������� �������������r(R)����s(S)������������/�?

��� ���������������������������� ����������� ����

���� ������������������������������$

semaphore n = 0;semaphore s = 1;void producer(){

while(true){produce();semWait(s);addToBuffer();semSignal(s);semSignal(n);

}}void consumer(){

while(true){semWait(s);semWait(n);removeFromBuffer();semSignal(s);consume();

}}

Page 5: ˘ ˇ ˆ˙ ˝ ˆmedia.careerlauncher.com.s3.amazonaws.com/acads_download_section/gate... · t2 = k ∗ 4 t3 = t1 + t0 t4 = t3 + t2 t5 = X[t4] ˇ ˇ 9++C˚" ˙ ˝W D int X[32][32][8]E

������������ ��� ��������� ���������� ��������������������� �� ��� 55555

���������� ����� �������������+HC"

��� �������������������������������������������

�� ��.��������������������������������������

��� ����������������������������������������

����� ���������� ���

��� L�����)�������� � � ���������������������� ��

�8���������������s������������ �����������

��� ����������������� ���������������n��������%��������/� ���������)� ������������

��� ���������������6.�������������B����������

� �%//����������������������������� ��������.�

������� �� ����� � ������� ���������� ���

��8����������&H�������������������������������

��������P9������������������ ��������������������

��� ��� ������� ���� ���� �������������� ���

����������B��������� �� ��������������� � �P9

�������� ��� ����9-� � � ���� �������� ������

�� ������ �P9��������� ���������������6���.� ���

�������������������� �����9-�������������������

����������������� ����������������������$

��������� � ��

������

����

������

�����

�����

������������������6.��.������������������������/.

?����%/�������������������������.�������������

������� ������� ������� ������ ������������ ���

������������������ �?/��������������������������

�������������������������������������������

���� ������P9������������!!!!!!!!!!!�

��� 6������������ �������������� ��� ����

��������������������������%/%���������%'/�

U������������������ ����������������

%.�'.�X.�%//�������������.�������������������

��8�������R+��C�� ���������� ����� ��������

����������������������B����������������

������� � � ��� ����� �� ���� ������ ��

���������������� �������������"

��� 7�����������������

��� K�������� ��������

��� 7������ ��������

��� #�����������������

��� K���������������������X[i][j][k].� ��� ��������� ������������ ����� ��� ������������

���������6�������������������� ���integer���*'������������������� ��character����1������

t0 = i ∗ 1024t1 = j ∗ 32t2 = k ∗ 4t3 = t1 + t0

t4 = t3 + t2

t5 = X[t4]

���������� ����� ���������������������������

������������ �������������������9++C��"

��� W��������������Dint X[32][32][8]E�

��� W��������������Dint X[4][1024][32]E�

��� W��������������Dchar X[4][32][8]E�

��� W��������������Dchar X[32][16][2]E�

��� 7���I�#�J������������������ ���������������

����������������>�S/.�%T��7���7�>�SI�#�J�;�#����� ������������������������������������ �����

'/%,T�������7.���

��� ���������������������������������

��� ������������������������������������

��� ���������������������������������������

��� ��������������������������������������

��� 7���7%� >� ��� ∈ � S/.� %TO� ;��� ��� ����� �����

������������ � � �%%/�:�� �� �/%%�:�T�� 7��

7'� >� S�� ∈ � S/.� %TO� ;� �� ��� �� ����� �����

������������ � � �///�:�� �� �%%%�:�T�� ��������� �

���� �������������+HC"

��� 7%�������������������7

'

��� 7'�������������������7

%

��� �����7%����7

'����������

��� U�������7%�����7

'����������

�"� ��������� ���� �������� 6� >� YY�����E� ��

��>�YY�������E��7�������������������� ������������

������������8���������������������������������

��������6������������������������������ �����

��������������������8���������������6������

�������=�%/��>�!!!!!!!!�

�#� -�����&.�(.�+.�-.���������������8������������

��������'/.�',.�*/.�*?.�?/���������������������

����������������������������8����������������

��������� ������8���������� ����������������

� ������������������������������������������

���� ��� ���� ������ ��������� ��� ������ ����

��� !!!!!!�

�$� ��������� ���� �B�������� ����� �������C��� ��

������������������������.����������������

���/����%��9������������������������ ����������

�����������.������B������������������� ����

�B����������������������������������!!!!!!!!!�

0/10 /10 /10 /10 /1 0 /10 /10 /1

+

+

++

– –

Page 6: ˘ ˇ ˆ˙ ˝ ˆmedia.careerlauncher.com.s3.amazonaws.com/acads_download_section/gate... · t2 = k ∗ 4 t3 = t1 + t0 t4 = t3 + t2 t5 = X[t4] ˇ ˇ 9++C˚" ˙ ˝W D int X[32][32][8]E

66666 ������������ ��� ��������� ���������� ��������������������� �� ���

��� ������������� ��������� �������

double f(double x){

if( abs(x*x – 3) < 0.01) return x;

else return f(x/2 + 1.5/x);

}

4����������q�����'�������������������f(q)������������q$!!!!!�

��� -����� � ���)� ������������� ������� �

������������+CZC+-C.�������������������������

� ��������������������).�������������������&H-R

���&9&��������������� ���������� ����� ��������

��������������+HC����������������������������

�����"

��� 6�8����� ��������� ����������������� ����

���)

��� 6� 8����� ��� ��� ����������� �����

CU(HCHC� �)��� � ������� ������������ ��

LC(HCHC� �)��� � ��8������ � � ���

������������

��� 6� 8����� ��� ��� ����������� �����

CU(HCHC� �)��� � ��8������ � � �����

����������������LC(HCHC� �)���� ������

�����������

��� 6� 8����� ��� ��� ����������������� ����

CU(HCHC����LC(HCHC� �)�� � ������

���������������

��� ��������������� ��������������������

int f(int j)

{

static int i = 50;

int k;

if (i == j)

{

printf(“something”);

k = f(i);

return 0;

}

else return 0;

}

���������� ����� �������������+HC"

��� ���� ����������������0� ������������� �j

��� ���� �������������������������something� ������������ �j

��� ���� ����������������0������j = 50

��� ���� ��������������B��������������������)

���������������� ���������������j�= 50

��� ���������������������:�������������.���������

����)� ���� ����� ������ ����� ��� �� �������

�������� ���������� ����� ������������������

������������������������B�"

��� 6������������)��������������������������������

��� 6������������)�������������������������

���������������������������������

��� 6� �����������)� ����� �������� ������ ����

�������������������������������

��� 6������������)�����������������������������

�����

��� � ������������������ ��������������������������

������ )������ ���� ������ ��� ����)� ����

��������.� ������ ���� � � ���� ��������� ��

���������������U9�� �����"

��� ������ �����������

��� ������ ���������B��������

��� ������ ���������������������B��

��� ������ ������������������������������

��� ���������� ��������������������������������

������ ���� ����������������*'����� �����������

������ ��CCC�@?,�����������������%����� ��

����.�1������ ����������B���������'*������ ��

��������6������������������W���������������

������������� �<%,�'?�������������������� �W

�����B�����������������

��� �%2,////R ��� ,%2�////R

����,%2,////R ��� �%2�////R

��� �������U������+�����������.���������������

� ��/�>�'�����������������8�������

/.��%.��'������

�������� ������� �������

/�@?�*�<�'�'�<�'��=�,�>�/

����������������������

�� �*�>�/

��� �������������������������������������� �����

�������� �����������

������ ����� �������������+HC"

��� 9����� ��� 9������

��� ������������ ��� U���������������

�"� ������������ � ������������������������� � ���

����B

% / / / %

/ % % % /

/ % % % /

/ % % % /

% / / / %

� ��� !!!!!!!�

�#� ������������������������������������������������������ %� ��� %//� ������ ����������� ��� U9��������������'.�*����?����!!!!!!��

�$� ������������ �������������������������� ������ �'/%,����!!!!!!!!!!!�

��� ������������� ����������������������������� ��������-� � � �����������������%����'/%,��K��� ��������������������H����Z�� �-�������H�I�Z�� �������������������� ��� ���� ������������ ������� ��������������������H�

Page 7: ˘ ˇ ˆ˙ ˝ ˆmedia.careerlauncher.com.s3.amazonaws.com/acads_download_section/gate... · t2 = k ∗ 4 t3 = t1 + t0 t4 = t3 + t2 t5 = X[t4] ˇ ˇ 9++C˚" ˙ ˝W D int X[32][32][8]E

������������ ��� ��������� ���������� ��������������������� �� ��� 77777

������������� ����������������������$

-%�$ ������ ������������ �-����� ��� ���������

������������������

-'�$ ������������������ �-������������������

������������������

���������� ����� �������������9++C��"

��� �����-%����-'��������

��� -%������������-'���� ���

��� -'������������-%���� ���

��� U�������-%�����-'��������

��� 6� ������ ��� �� ��������� ��� ���������� ��� ���

��������������������� ������!!!!!�

��� ������������ ������������������������������

�����������������������������!!!!!

1

2

2

22

2 1

11

2 2

2 1

��� ���������� ����� �����������������B��������

���U9�����������"

��� ����→����∧ ����→�����→����→������ ���↔����→�� ���→����∧ ������� ���∧ ���∧ ����→����∨ ������ ��→����→���

��� -(7��������������� ������ ��� ��������.� ��

����������������� ���������������������� ������

��������������� �5������ ���������� ����� ��������

8������� ����� ������ ���� ���������� �� ���

�������8����������������$

select * from R where a in (select S.afrom S)

��� select R.* from R, S where R.a = S × a

��� select distinct R.* from R,S whereR.a = S.a

��� select R.* from R,(select distincta from S) as S1 where R.a = S1.a

��� select R.* from R, S where R.a = S.aand is unique R

��� ������������������������������������������

1����������������������������������������.

������������������������ �������������8�������

���.� �������� ����������� ���%//�����������

����� ��� ������.� ������.� ��� �������� �������

L��������������%//���.���� ���?//��������� ���.

����������������������������B����������������

����������� �������� ������������ ���������

�������� � � �� �����������������������

�������������.����������������8�������������

������������������������B�������������

��������� ������������������������������������

%������������� ���!!!!!!!!!!!!

(&.2�'.

%������ (3454�6�

������ ������ ������ ������ ������ ������ "����� #����� $���%,/����%,/�

�������

��3�4��� .�5����� �6� +�7���45��� ��������8�

���������������%%�1?����%%�0?���������*�1����*�0� ����*2����*2� ����/����/�������������������������

������������������������������"����� #���*����*� $���'/����'/� �����0����0�

������� ������� ������� ������� �������

������� �"����� �#����� �$���������������������������������00�??����00�2?�

�����1����1� �����%0����%0� ������� ������� �����'2����'2�

��������������� �"����������������������������#�����������������������������$����� ��������������������������

����������������������������������%///����%///������������� ��������� ����������������������������

��������������������������������������"���*,����*,���������������#���*?1����*?1����������$���2����2���������������������%�@'����%�@,�

��������������� ������� �������� ��������� �������������

������� ���������"��2����2�������������������#���/�'?0����/�'2%� �$���1����1� �������

�������������?����?� ��������������2����2����������������������������������������������������� �����%////����%////�

Page 8: ˘ ˇ ˆ˙ ˝ ˆmedia.careerlauncher.com.s3.amazonaws.com/acads_download_section/gate... · t2 = k ∗ 4 t3 = t1 + t0 t4 = t3 + t2 t5 = X[t4] ˇ ˇ 9++C˚" ˙ ˝W D int X[32][32][8]E

88888 ������������ ��� ��������� ���������� ��������������������� �� ���

�9*)(&(�+ &.���� !"� #$%$&'�

�( ��������������� ������������ ��

�� ������������������ ��

��� ������������� ��

�� �� ��������� ��� � �� ������� ��� � � ������

∴ � �� �

������������� ���������������� ��

��� !�� "� � � #�

�� � �+ −

� �

"�� � ��� ��#�

+

� �

"�� ��#�

+ ��� ���

������$��%������������������� ����������� ��

�� � �� ��� ��

+ + +

∴ �� ���

�� ��

)( � � � ���+ + +

&�����������������'�����(�����

����� ���� � �+ + + ������)��������������$

��� ���*�����)���������+*�%�������� �

����%��*������������$���� �����*������

�������������� �

���� �������������� ×

��������������

��� � � � ���+ + + ��,

*( �����)��%�����*����%���-������%��)������������

.����)����������� ��%������%�������*��*

������.����

+( ����%�%�$���������������������������*���� ����

��������*�����������$��*�������)��*��'��

)������������)����*�����������

,( ��������%�$���*����������

��� �|���������/|���� ⇒ ������������������/��� �������������/����

&�������������������/��� �⇒ ��������������

�����,����,��,� ��������/0�1��

����������������

��)���� ��������� , ���

����,�� ��,��,� �� ,��2��

���������������%����'

∴ �+*�$������������*����������������������

��� � �� , ,� �� ��

+ ± − −

�� /0

±�� 0

±

∴ � ��,�����

�������������,�

|��/���������| ��|��0,��� 0���,|���3����)������������

|��/���������| ��|������,����|��� ,������� ��$�������|��/���������|��� ,��3�

-( .����������������������)�������������3�4��

�5�������� ��� �*�������)��� �3����)� ����

��)��� ���

���������� ������������)���)�� ���������

∴ �������� ������������)�����,�

∴ �������� �����������)����� ��

6�)� ���� ����

7�� 3� ��

&��� �� ,�

8����������)����������������

�� � 3

�� 83

� �

− ×

��9

�� 83

× ��� ,�8

� ( 1 21 1 1

2

3

4

67

8

9

1 0

5

&����������

���0�����

:��*�*��)���� ��°����������0�4����������� ��*�*��)������

⇒ ��°��� �°��� ��° ��9�°���0�4����������� ��*�*��)������

⇒ ��°��� �°��� /�° ��0�°�������

Page 9: ˘ ˇ ˆ˙ ˝ ˆmedia.careerlauncher.com.s3.amazonaws.com/acads_download_section/gate... · t2 = k ∗ 4 t3 = t1 + t0 t4 = t3 + t2 t5 = X[t4] ˇ ˇ 9++C˚" ˙ ˝W D int X[32][32][8]E

������������ ��� ��������� ���������� ��������������������� �� ��� 99999

�./#&$� � �0%��0�� �� ��1. /!$%.�� ��02�.".34

�( ����;�"��������*����������������-��%#

��;��/����,������������-��%�

��( ) ( )

/ ,

, ,

< < <

< <

, 0 ,

� �

×+ �

3

,��⇒ � ������� ���

�( 6�$�����)���

+�=��>?5<@��:.AB���&AC��D?7;!��AE=.�+�=��F�CG��HA6

F=+� C� � �*� ���)��� $���� �� ��*� �*��C����%�*�����*����)

+*�F�%�*�����*����)�+�=��&AC��+�=��HA6���/

+*�F�%�*�����*����)�AE=.��F�CG���,

+*� ��%�*� ��� �*� ���)� >?5<@�� :.AB��D?7;!����3

+*��������)��%���� � ���������%�$�� ���

I / , 3

, � /;�C�

� � �

=I���)���%�*�����*����)

�� I��I�∑ � + + , � /

/ , 3� � �

��/�����

5( !������*�$����������������*�:��+*��J��*'

��������� �����)%���0��0���/0�

�( ����

,

9

�" ���3#

����

� � �

, /0 ��

9 0/ /3

− − −

K�K�������/0��/3�������0/���� ����,��/3��� ,���� ����,��0/���/0��9�

����� �0���� �0����� ��� ,���� ,��

�� �����3�����3������

)( �����L������'������� ��������)%��/�*���������� ����������)�����/

∴ ������ ����� �������������/�

��� ������ ��� ���������/������0

��,��� �/������� ����0

�������������������

��������,������0��0�����/0�2�����������������������������:�

���������,������/0�>/ ����������%

�����������������<�

�����+���,������0���0�����>/ ����������%

�����������������H�

�����+���,������0���0�����</ ����������%

∴ ��������������������

*( �����������&������)����������*��(������� ����

���������)���I����������������'�I����$

����*���)����� ������))�

+*� ��� �� ��� �������'� I����$� ���

�������������

� ��

−= �

��� ����� ������������ �� '� ��-��%���'���

�*��������������*�� �$�������)��������'

I����$�������������� �

+( 5���M ��� ����'� ������� �� ������ ����M��M��� ��

)��)�� �*�� ������������� � (��$����� ���-M ��

���%��������

,( � �/�3�������

�×�3������×�3 ���/�×�3� � �×�� �����× ��

�3��� ����/ � ������

/� � ������

�� � /�

+�������� ������������

� � /�

/ � /�

0 3 /�

3 � /�

+*�����/���� ����������

-( ;*'������))���L���/�� ��

<��*��L��� 0-� '����� ,�:'�

���-��L��������)������,�:'����/��:'���*����*����)��� �:'��

������� ���-���

,�

3

��

�=

���-��������� ��

������������

9��

,=

���������9� ��

:'����������,�:'����/��:'�����3���3� ��

+�6���/�����9���3������� ���

� ( !������*� ����'�$�������,/3��� � �� ��B�-���

�*��������*�����1��� ���*����������������*��

��������� �*���)���%*������$�'������*������

��I���)��!����� ��� �*�%�$����)� �*� ����� �

�������)���������)�������� ��*����������L���

+*��J��*'������������� ��������)�������

������������������-�

��( �</���������)����

��

N�

�� �������

��

/

���������

Page 10: ˘ ˇ ˆ˙ ˝ ˆmedia.careerlauncher.com.s3.amazonaws.com/acads_download_section/gate... · t2 = k ∗ 4 t3 = t1 + t0 t4 = t3 + t2 t5 = X[t4] ˇ ˇ 9++C˚" ˙ ˝W D int X[32][32][8]E

1 01 01 01 01 0 ������������ ��� ��������� ���������� ��������������������� �� ���

7������'��%����� '���������%�

ρ�� � � � � ��

N N� /

� ��

��(

�����$����)�����$������ ������9��/����� ��3

�5( !�������������%�

�����������

���)��%���%�����%�����J���*�)�����%

�����

�������������′!���+������A���

��(w

a b

c d e f

!*��������*������ ����$�'�$��I����%���*�

�)( F �F

������� ��%��������%��%�����������������

�����%��������%��%������%��%�

5������� ���-�F �F

�� ≠ �O���K�� ≥ ��P

5������� ���-�F �F

����O���K����� ≥ ��P

+*��J��*'����'��5�����������'�

�*( !����6� ≤�� �� ��)� ����:� �� ���� ����� �

�����$�'���������������������������������

�����$�'� ����� ��

�+( !�→�+�N�;

+�→�?Q+�N�?

;�→�>���;Q>

>�→�5H

?�→�5H

S

T P*

T * U Q + P

ID IDU

ID

Q

ID

P

�,( �������������������)'����������'�������������������� ��

�-( ;�����'�����(���)������(�������$���)����������)������������������'����)��

� ( +*���I������L���������*������� ����)���

�*��)�-������ ����33�������03�

��( !�����*���� ���������-'���%�$�� '����

�*��������� ���������� ���

����� ������ ��� �� ��� ���� -'� ���*� �

����� ������������ �����,��� �����

��( 5�������� $���� ��� ��)��� �%� ��� � ��� �*���)����������)����%���������� �-'���*��J�*'�$���������*���)����� �(������� �� ��������'� ������������*����)���

�5( B�-�����*���.5;���)������$�����������%��)�>!;&������-�����������%�

��( F����������������������)�����$�+<;���-�����������$���-��

�)( &����!����. �� �*����� ����)� ������'�0���

�*�������)�������*�++F�$�����+*��J��*'��*���I�����$�������++F����)��*��.����$)���%������/����0����0�

�*( :��)��)�*�������-��� �0� '�Q�

&����L��� �/� '�

+ �R�+

/��������-����������)�+

/�1�+

������+

/

�������-����������*��+��

�+( >���. ���.

����.

/����

Q H

R 1 R 2 R 3

N

d

P

N

d

P

N

d

P

Source Destination

P-P hysical Layer, d-da ta link layer, N -N e twork layer

!������*�������. ���������+<;��������� �

���>���)�.�����������*�+<;��������� ������

���H�������-���'�����)����*� ��*��������������

5;��))�����>���)�����������-� ��'���!��

���'��������5����)�5

/������ �����

�,( !������++;��$��!��������������������+7F

��%���*��J��*'�>��)�����)�����������++;

�(��� ��� ! � ��� �*������� � ��%�� +<;

��������������$��!������������

�-( !������*�%���*�������������'�����*��J��*'���

������)���������������L� ��

!����� ��� �*�� �*)���� ����������� ��)�)���

������$����'�������� '������������������

+*� ������� ��������� ��� ������ ����������

������ ���� ����� ������������ *��� ��� �

���$�� �������+*��J��*'� S!J� �� ��*���������

�����L� ����)����$�� ��

5 ( ��T���� ������.����)���!�����%���)�����

��*�)������ ����������

&�����*�����������.�)�

&�����*����������!�)�

5������)������'��*�T�������)�������*��������

�*������2���1

Page 11: ˘ ˇ ˆ˙ ˝ ˆmedia.careerlauncher.com.s3.amazonaws.com/acads_download_section/gate... · t2 = k ∗ 4 t3 = t1 + t0 t4 = t3 + t2 t5 = X[t4] ˇ ˇ 9++C˚" ˙ ˝W D int X[32][32][8]E

������������ ��� ��������� ���������� ��������������������� �� ��� 1111111111

+*�� ��%����*������� ��$��$� ��N

�� ���-

���������)������

��-���*��

����)�

���

��� ����� ���-������������.���)�!������$�'��)��

������� ���������������������.��������

*�$��� ���-���������*���)� �����)���

�� ����)'� %�$�� �*���K.K2K!K��.������� ��.�*���)� �����*��������������*�$�������� ����)�-� ���-�����

5�( !�����*�����������������'�I�������������������%� '����������)������*��*����%������� '�����������'�)�����%�$����������������*������� ���� �*� ����� ���� ��� ���)����*��*�%�� ��� ��� '� I�����%����������+*����������������)�����)�)����-�

5�( <�����)����������������5QA������������� ���������������%�����)��� ����*)����%�������55+��

:������������� �����%�

55( ;*'����� ��%� ����� ��� ��� �������� ��%��� �)� � ���� ���

;��%�������)���%���� �)� �����M�M�M�M� ������*�����)����)�������*����

+*� ���� �����'� �)� ��)� �������� ��%��������������'������*�$� ������� ��� ��%������

5�( C���)����)��

SS�����C�"/�#�"/�#�"�#JJ

5)( ��F���+����%����*�������������� ������$�'����� �� '��*���� ����271������)��%���+7�� �� �������� ���)��)� ��� !�� �������� ��)��)� �� ��������$�'������ ��

5*( F ����%����� ����������)�%��&������F

� ��

����������)�%��&������F�������F

����%����

�������F��

5+(p q p r q r p

0

0

0

0

0

0

0 0 0 0 0 0 0

0

1

1

1

1

1

2

2

2

1 1

2

2

2

2

1

2

2

3

3

1

2

3

3

3

1

2

3

4

4

1

2

3

4

4

q

p

q

r

r

F��%���������� (����4�����

���� �� ��,��� ���/���/,

5,( �����,��/���/3��3�

�$�#�����B���-

4430 35 50

20 24

<������������������,��� ��7�I���,/

�$�#��� ��65

30 35

44

20 24

50

+�����������������,/����03���,,����0,

�$�#�5� �� 9465

30 35 44 50

20 24

+�����������������0,��� �����/

�$�#��� �� 159

65 94

30 35 44 50

20 24

+�������������� � �/���03��� 3�

� 3�����/���0,���,/���/3�

5-(+

– +

6

+ – – +

3

2

1 1 0 1 0 1 1 1

3

211

&��� ����������-���I�����$��������� �� ���

��������-���I�����$���� ��7�I��$���������

����� �0�

� ( B*���� ��-� �*�$���� ����� �9�� ��� �9,���

����� � �*��� �� ���)����������� � ���� ����

���������Q���� �3Q��U

+*��J��*'�$��������������*��*���������������

�9����� �9,�

��( !���� �(������� ����))���� ���� ����� �*

��-� ����)���*��!�� �������� ��-����� �*� �*�

����������� ��;?!���;A;�R�.=E=.!=�� ��

H=>?=?=�)��J��*�$������-���'��*��%�����

;?!���.=E=.!=� ����������$���������

������ ����)� ;A;�� ����� �� (��� �����

�������)�=�>?=?=� ��-�/� �����������

H=>?=?=���-� ������������

��( B*������3����*�� �������I*���������������-�

���� �������������� � ����)� �������� ���

�*��*����������������������������������3��

�5( B*�� �� ���*� ���-� �L� �� ������� ��� ����)

�������)���������� ����� ���-����������$

�*�*��������� �������*�����*���������'� ���

���*������ �����)�

��( B*���������$��'���)�� �)���*���*�������

����� �����)�������)��%�'���*���� ����� ��

Page 12: ˘ ˇ ˆ˙ ˝ ˆmedia.careerlauncher.com.s3.amazonaws.com/acads_download_section/gate... · t2 = k ∗ 4 t3 = t1 + t0 t4 = t3 + t2 t5 = X[t4] ˇ ˇ 9++C˚" ˙ ˝W D int X[32][32][8]E

1 21 21 21 21 2 ������������ ��� ��������� ���������� ��������������������� �� ���

�)�����+�6������������ �����)��B�)�*���

����)I�)��)����������� �����)��*���

����� �� �*��%)��B�)�*� ��� ��%� ������

�������I������ �����)��*���*� ���-�����

���*��%)��B��*�����������������������'

)���� ����%������)���� ��A+�����)�

�)(!� =� 7�

� ��� �� ��� �/� ��

� ,��3� ����� ��� �

��� ������� � �� ���/

!�4�

=�4��/��� �9� ����� ����� ��

7�4� �� ����MMMMMMMM

E�������)�4

− − −����� ������ ����� ������

�� � � �#"< 0 ,

� �� � � � �� � � ��

�*( ��� ��

� �

� �

��

� ��

� �−

��� ������ ��93�/��������������,

∴ � ′����� /���93������,�����

∴ � ′����� ���3������,�����

��� � �� �

��

� �

� �

� ��

� �

− ′

� �� ���������

&�� ����

� �

� �

� ��

� �

− ′

������

����

− ′ � �������������

��) �/�� �

��

� �

� �

� ��

� �

− ′

�����

����

− ′ � ���������

∴ !������� � �� ���� ��)� ���$�%� �������

���

�+( ����

� � �

� �

� �

� �

� � �

F��C���

/

,

3

�����C��⇒ �

����

3������

������

3

⇒ ������

/����

,������

�������

,

&�����≠��!�'� �

�� �

3����

���� �

/����

,���

⇒ � ����

3�� ���

⇒ ���� ���

⇒ ��� �

⇒ ������

/����

,�� ���

∴ /�� �

∴ ��� /

&���������⇒ ��%�$���������

∴ +*�����/�)��������%��$������������/�

;��)�����������L����%��$���������/���0��,( ;����$���� �� ���� ���� ����������$�����

)�$�� �� '����/����3���

O ��9�� �� /�� 9�� ����/������/ ��/9��, ��,/��,9��,��

3/��3���0 ��09��9 ��9/��99��9����/������� ���9P

;�=��� ='2

%//���0

�-( +*�����*������������� ,

���� ���3/��/��� �0�� ��9���� ,

���������������%���������������� �������� ,�

) ( F� ?���O ���������������� ���P

E���O ������������������ ,P

!����� ��! ������ �%������*���$�'���*�

� �������E�R�� ��!������� ����*���$�'

��*��� �������?��!�� ��*������������� �����

)�( B*������-�����!���

������

G G ′

B� ���� � �*��� ��� �*�� ���6�R�6′� ����� ������*��������*���*��

)�( +*�7!+���

1 2

3 4

5 6

Page 13: ˘ ˇ ˆ˙ ˝ ˆmedia.careerlauncher.com.s3.amazonaws.com/acads_download_section/gate... · t2 = k ∗ 4 t3 = t1 + t0 t4 = t3 + t2 t5 = X[t4] ˇ ˇ 9++C˚" ˙ ˝W D int X[32][32][8]E

������������ ��� ��������� ���������� ��������������������� �� ��� 1313131313

)5( � � ↔ � � ∧ � → ��� ∧ � �� ↔ �→ �� → ��� ∧ ��

& & & + + & + +

& & + & + & + &

& + & + & & + +

& + + & & & + &

+ & & & + & + &

+ & + + + + + +

+ + & & & & & +

+ + + + & + & +

������ ↔ ��→ � � �→ ��� ∧ ���������+������%'�

)�( B*����I����(��'�.�N�����������)������

�����!����! ��*��.�����!

������������%�$��*

��������

))( =��*������ �(���� �*� �� �� ������)� ���

�����

!�����%����)�����(���� ������

5�� ��������� ����

0

����� � ���

�������

0 ����

����� ��������� ��