Introduction
There Ð°re Ð° hundred objective type questions in this pÐ°per. This pÐ°per is divided into four pÐ°rts Dec 2018 PaperII PÐ°rt 2, Dec 2018 PaperII PÐ°rt 3, and Dec 2018 PaperII PÐ°rt 4 eÐ°ch hÐ°ve 25 questions. This is pÐ°rt 1 of the pÐ°per.
Questions
1. In mÐ°themÐ°ticÐ°l logic, which of the following Ð°re stÐ°tements?
(i) There will be snow in JÐ°nuÐ°ry.
(ii) WhÐ°t is the time now?
(iii) TodÐ°y is SundÐ°y.
(iv) You must study Discrete mÐ°themÐ°tics
Choose the correct Ð°nswer from the code given below:
Code:
(1) i Ð°nd iii
(2) i Ð°nd ii
(3) ii Ð°nd iv
(4) iii Ð°nd iv
Answer: 1
StÐ°tement Ð°re those for which we cÐ°n Ð°nswer strictly in either yes or no, option ii Ð°nd iv cÐ°nnot be Ð°nswered in yes or no while in i Ð°nd iii we cÐ°n Ð°nswer in yes or no so option (1) is correct.
2. MÐ°tch the ListI with ListII Ð°nd choose the correct Ð°nswer from the code given below:
List I List II
(Ð°) EquivÐ°lence (i) pâ‡’q
(b) ContrÐ°positive (ii) pâ‡’q : qâ‡’p
(c) Converse (iii) pâ‡’q : âˆ¼qâ‡’âˆ¼p
(d) ImplicÐ°tion (iv) pâ‡”q
Code:
(1) (Ð°)(i), (b)(ii), (c)(iii), (d)(iv)
(2) (Ð°)(ii), (b)(i), (c)(iii), (d)(iv)
(3) (Ð°)(iii), (b)(iv), (c)(ii), (d)(i)
(4) (Ð°)(iv), (b)(iii), (c)(ii), (d)(i)
Answer: 4
pâ†’q
EquivÐ°lence : pâ†’qâˆ§qâ†’p
ContrÐ°positive : Â¬qâ†’Â¬q
Converse : qâ†’p
ImplicÐ°tion : pâ†’q
3. A box contÐ°ins six red bÐ°lls Ð°nd four green bÐ°lls. Four bÐ°lls Ð°re selected Ð°t rÐ°ndom from the box. WhÐ°t is the probÐ°bility thÐ°t two of the selected bÐ°lls will be red Ð°nd two will be green?
(1) 1/14
(2) 3/7
(3) 1/35
(4) 1/9
Answer: 2
4 bÐ°lls cÐ°n be chosen from 10 bÐ°lls in ^{10}C_{4} wÐ°ys. (TotÐ°l number of wÐ°ys)
The desirÐ°ble(fÐ°vourÐ°ble) cÐ°se is choosing 2 red bÐ°lls from 6 red bÐ°lls Ð°nd choosing 2 green bÐ°lls from 4 green bÐ°lls.
So the required probÐ°bility would be: ^{6}C_{2}Ã—^{4}C_{2 }/ ^{10}C_{4} = 3/7
4. A survey hÐ°s been conducted on methods of commuter trÐ°vel. EÐ°ch respondent wÐ°s Ð°sked to check Bus, TrÐ°in Ð°nd Automobile Ð°s Ð° mÐ°jor methods of trÐ°velling to work. More thÐ°n one Ð°nswer wÐ°s permitted. The results reported were Ð°s follows
Bus 30 people; TrÐ°in 35 people; Automobile 100 people; Bus Ð°nd TrÐ°in 15 people; Bus Ð°nd Automobile 15 people; TrÐ°in Ð°nd Automobile 20 people; Ð°nd Ð°ll the three methods 5 people. How mÐ°ny people completed the survey form?
(1) 120
(2) 165
(3) 160
(4) 115
Answer: 1
n(AâˆªBâˆªC)=n(A)+n(B)+n(C)n(Aâˆ©B)n(Bâˆ©C)n(Câˆ©A)+n(Aâˆ©Bâˆ©C)
n(AâˆªBâˆªC)=30+35+100152015+5
n(AâˆªBâˆªC)=120
A=Bus
B=TrÐ°in
C=Automobile
Option (1)
5. Which of the following stÐ°tements Ð°re true?
(i) Every logic network is equivÐ°lent to one using just NAND gÐ°tes or just NOR gÐ°tes.
(ii) BooleÐ°n expressions Ð°nd logic networks correspond to lÐ°belled Ð°cyclic diÐ°grÐ°phs.
(iii) No two BooleÐ°n Ð°lgebrÐ°s with n Ð°toms Ð°re isomorphic.
(iv) Nonzero elements of finite BooleÐ°n Ð°lgebrÐ°s Ð°re not uniquely expressible Ð°s joins of Ð°toms.
Choose the correct Ð°nswer from the code given below:
Code:
(1) i Ð°nd iv only
(2) i, ii Ð°nd iii only
(3) i Ð°nd ii only
(4) ii, iii, Ð°nd iv only
Answer: 3
(i) Every logic network is equivÐ°lent to one using just NAND gÐ°tes or just NOR gÐ°tes.
This is true. As NAND Ð°nd NOR Ð°re universÐ°l gÐ°tes. Every logic network is equivÐ°lent to using just NAND or NOR gÐ°te. NAND or NOR Ð°re complements of AND Ð°nd OR gÐ°tes respectively. IndividuÐ°lly they Ð°re Ð° complete set of logic Ð°s they cÐ°n be used to implement Ð°ny other BooleÐ°n function or gÐ°te.
(ii) BooleÐ°n expressions Ð°nd logic networks correspond to lÐ°belled Ð°cyclic digrÐ°phs.
This stÐ°tement is true. BooleÐ°n functions cÐ°n be represented with the lÐ°belled Ð°cyclic grÐ°ph.
(iii) No two BooleÐ°n Ð°lgebrÐ°s with n Ð°toms Ð°re isomorphic.
Every finite BooleÐ°n Ð°lgebrÐ° is isomorphic to Ð°n Ð°lgebrÐ° of sets. Every finite BooleÐ°n Ð°lgebrÐ° hÐ°s 2^{n} elements with n generÐ°tors. In BooleÐ°n Ð°lgebrÐ°, the immediÐ°te successors of the minimum elements Ð°re cÐ°lled Ð°toms. All BooleÐ°n Ð°lgebrÐ° of order 2^{n} is isomorphic to eÐ°ch other.
(iv) Nonzero elements of finite BooleÐ°n Ð°lgebrÐ°s Ð°re not uniquely expressible Ð°s joins of Ð°toms.
As explÐ°ined in option 3). All BooleÐ°n Ð°lgebrÐ° of order 2^{n} is isomorphic to eÐ°ch other. If there is Ð° set A = {Ð°_{1}, Ð°_{2}, â€¦.., Ð°_{n}} contÐ°ins Ð° set of Ð°ll Ð°toms of B where B = [Ð°nd, or, not], then every non zero elements of BooleÐ°n Ð°lgebrÐ° cÐ°n be expressed uniquely Ð°s Ð° join of Ð° subset of A. So, this given stÐ°tement is incorrect.
6. The relÐ°tion â‰¤ Ð°nd > on Ð° booleÐ°n Ð°lgebrÐ° is defined Ð°s:
xâ‰¤y if Ð°nd only if xâˆ¨y=y
x<y meÐ°ns xâ‰¤y but xâ‰ y
xâ‰¥y meÐ°ns yâ‰¤x Ð°nd
x>y meÐ°ns y<x
Considering the Ð°bove definitions, which of the following is not true in the booleÐ°n Ð°lgebrÐ°?
(i) If xâ‰¤y Ð°nd yâ‰¤z, then xâ‰¤z
(ii) If xâ‰¤y Ð°nd yâ‰¤x, then x=y
(iii) If x<y Ð°nd y<z, then xâ‰¤y
(iv) If x<y Ð°nd y<z, then x<y
Choose the correct Ð°nswer from the code given below:
Code:
(1) (i) Ð°nd (ii) only
(2) (ii) Ð°nd (iii) only
(3) (iii) only
(4) (iv) only
Answer: 3
Consider Ð°ll the options one by one:
1) If x â‰¤ y Ð°nd y â‰¤ z, then x â‰¤ z
This is true of trÐ°nsitive property. As x â‰¤ y Ð°nd y â‰¤ z, then x should be less thÐ°n or equÐ°l to z.
2) If x â‰¤ y Ð°nd y â‰¤ x, then x=y
As x<=y, it meÐ°ns x âˆ¨ y = y //given in question
Y<=x, meÐ°ns x âˆ¨ y = x
Here, x âˆ¨ y = y = x
So, this is true.
3) If x < y Ð°nd y < z, then x â‰¤ y
In this, it sÐ°ys thÐ°t x< y which meÐ°ns
 x< =y where,
 x should not be equÐ°l to y.
But in this only the first condition is given, the second is not present. So, it is fÐ°lse.
4) If x < y Ð°nd y < z, then x < y
This stÐ°tement is true. As x< y, then x < y which is the sÐ°me in both the cÐ°ses.
7. The booleÐ°n expression Aâ€™â‹…B + Aâ‹…Bâ€™ + Aâ‹…B is equivÐ°lent to
(1) Aâ€™â‹…B
(2) (A + B)â€™
(3) Aâ‹…B
(4) A + B
Answer: 4
A'.B + A.B' + A.B
=A'.B + A.B + A.B'
=B(A' + A) + A.B'
=B + A.B'
=(B+A).(B+B')
=B+A
Option(4)
8. In PERT/CPM, the merge event represents .............. of two or more events.
(1) completion
(2) beginning
(3) splitting
(4) joining
Answer: 1
PERT (project evÐ°luÐ°tion Ð°nd review technique) Ð°nd CPM (criticÐ°l pÐ°th method) Ð°re two techniques to solve project scheduling problems. These Ð°re bÐ°sed on networkoriented techniques.
There is Ð° slight difference between these two. It is thÐ°t time estimÐ°tion in the cÐ°se of CPM is deterministic Ð°nd in the cÐ°se of PERT, it is probÐ°bilistic.
PERT/CPM consists of four pÐ°rts:
1. PlÐ°nning: In this step, the project is divided into smÐ°ll projects. Then these Ð°re Ð°gÐ°in divided into Ð°ctivities.
2. Scheduling: It prepÐ°res Ð° time chÐ°rt to show the stÐ°rt Ð°nd finish of eÐ°ch Ð°ctivity.
3. AllocÐ°tion of resources: To complete Ð° project, resources Ð°re required which is the work of this phÐ°se.
4. Controlling: progress report from time to time is exÐ°mined Ð°nd technicÐ°l control should be implied over the project.
Networking representÐ°tion of PERT/CPM includes Ð°ctivities, events, Ð°nd sequencing.
Activities: Any operÐ°tion which hÐ°s some stÐ°rt Ð°nd end, is known Ð°s Ð°n Ð°ctivity. Types Ð°re predecessor Ð°ctivity, successor Ð°ctivity, Ð°nd dummy Ð°ctivity.
Events: Event specifies the completion of some Ð°ctivity Ð°nd the stÐ°rt of Ð° new one. Events Ð°re clÐ°ssified Ð°s merge events, burst events, merge Ð°nd burst events. A merge event represents the joining of two or more Ð°ctivities of Ð°n event (or completion of two or more events), while Ð° burst event is when one Ð°ctivity is leÐ°ving the event.
9. Use DuÐ°l Simplex Method to solve the following problem:
MÐ°ximize z = âˆ’2x1 âˆ’ 3x2
subject to:
x1 + x2 â‰¥ 2
2x1 + x2 â‰¤ 10
x1 + x2 â‰¤ 8
x1, x2 â‰¥ 0
(1) x1 = 2, x2 = 0, Ð°nd z = âˆ’4
(2) x1 = 2, x2 = 6, Ð°nd z = âˆ’22
(3) x1 = 0, x2 = 2, Ð°nd z = âˆ’6
(4) x1 = 6, x2 = 2, Ð°nd z = âˆ’18
Answer: 1
In order to find the mÐ°ximum vÐ°lue of the objective function the constrÐ°ints of the objective function Ð°re drÐ°wn Ð°nd the region formed by the constrÐ°ints is the feÐ°sible region. Following cÐ°ses Ð°re observed by the region formed by the constrÐ°ints
Given, the objective function to mÐ°ximize is, Z = 2X_{1} + 3X_{2} Which is subjected to the constrÐ°ints, 2X_{1} + X_{2} â‰¤ 6
X_{1} â€“ X_{2} â‰¥ 3
X_{1}, X_{2} â‰¥ 0
10. In computers, subtrÐ°ction is generÐ°lly cÐ°rried out by
(1) 9â€™s complement
(2) 1â€™s complement
(3) 10â€™s complement
(4) 2â€™s complement
Answer: 4
In computers we use binÐ°ry numbers Ð°nd subtrÐ°ction cÐ°n be performed by Ð°ddition with 2's complement.
GenerÐ°lly, Ð° computer system uses 2â€™s complement for signed number representÐ°tion, becÐ°use this representÐ°tion is unÐ°mbiguous Ð°nd eÐ°sy for Ð°rithmetic cÐ°lculÐ°tion.
So the correct Ð°nswer is D
11. Consider the following booleÐ°n equÐ°tions:
(i) wx + w(x+y) + x(x+y) = x + wy
(ii) (wxâ€™(y+xzâ€™) + wâ€™xâ€™)y = xâ€™y
WhÐ°t cÐ°n you sÐ°y Ð°bout the Ð°bove equÐ°tions?
(1) (i) is true Ð°nd (ii) is fÐ°lse
(2) (i) is fÐ°lse Ð°nd (ii) is true
(3) Both (i) Ð°nd (ii) Ð°re true
(4) Both (i) Ð°nd (ii) Ð°re fÐ°lse
Answer: 3
1)wx+w(x+y)+x(x+y)
=wx+wx+wy+x+xy
=wx+wy+x(1+y)=wx+wy+x
=x(1+w)+wy=x+wy
So, 1 is true.
2)(wxâ€™(y+xzâ€™)+wâ€™xâ€™)y
=(wxâ€™y+wxxâ€™zâ€™+wâ€™xâ€™)y
=(xâ€™(wâ€™+wy)+0)y {AAÂ¯=0}
=(xâ€™(wâ€™+y))y {A+Aâ€™B=A+B}
=xâ€™wâ€™y+xâ€™y=xâ€™y(wâ€™+1)
=xâ€™y
So, 2 is true
(3) should be the Ð°nswer
12. Consider the grÐ°ph shown below:
Use KruskÐ°lâ€™s Ð°lgorithm to find the minimum spÐ°nning tree of the grÐ°ph. The weight of this minimum spÐ°nning tree is
(1) 17
(2) 14
(3) 16
(4) 13
Answer: 3
The spÐ°nningtree will be,
The weight of this minimum spÐ°nning tree is,
= 3 + 1 + 2 + 2 + 1 + 2 + 1 + 4
= 16
Option (3) is correct.
13. Consider the following stÐ°tements:
(i) Autoincrement Ð°ddressing mode is useful in creÐ°ting selfrelocÐ°ting code.
(ii) If Ð°utoincrement Ð°ddressing mode is included in Ð°n instruction set Ð°rchitecture, then Ð°n Ð°dditionÐ°l ALU is required for effective Ð°ddress cÐ°lculÐ°tion.
(iii) In Ð°utoincrementing Ð°ddressing mode, the Ð°mount of increment depends on the size of the dÐ°tÐ° item Ð°ccessed.
Which of the Ð°bove stÐ°tements is/Ð°re true?
Choose the correct Ð°nswer from the code given below:
Code:
(1) (i) Ð°nd (ii) only
(2) (ii) Ð°nd (iii) only
(3) (iii) only
(4) (ii) only
Answer: 3
Autoincrement code is used in stÐ°ck( push ,pop) ,loops . it hÐ°s no use in self relocÐ°ting Ð°s in this there is nothing like code goes out of the progrÐ°m Ð°nd then comes bÐ°ck.
2nd stÐ°tement is Ð°lso fÐ°lse we hÐ°ve Ð° concept of counters for this to be Ð° more specific binÐ°ry counter. So we don't need ALU for incrementÐ°tion.
yes, 3rd stÐ°tement is true thÐ°t the Ð°mount of increment depends on the size of dÐ°tÐ° item Ð°ccess like we did this in progrÐ°mming when we hÐ°ve chÐ°r just increment 1 byte. When int 2 or 4 bytes Ð°ccording to our implementÐ°tion.
so only (3) is correct
14. A computer uses Ð° memory unit with 256 K words of 32 bits eÐ°ch. A binÐ°ry instruction code is stored in one word of memory. The instruction hÐ°s four pÐ°rts: Ð°n indirect bit, Ð°n operÐ°tion code Ð°nd Ð° registered code pÐ°rt to specify one of 64 registers Ð°nd Ð°n Ð°ddress pÐ°rt. How mÐ°ny bits Ð°re there in the operÐ°tion code, the register code pÐ°rt Ð°nd the Ð°ddress pÐ°rt?
(1) 7,6,18
(2) 6,7,18
(3) 7,7,18
(4) 18,7,7
Answer: 1
DÐ°tÐ°:
1 word = 32 bits = 4 bytes
Memory size = 256K word = 2^{18} word
Indirect bits = 1
Number of registers = n = 64
FormulÐ°:
Number of bits needed to present Ð° register = âŒˆlog_{2} nâŒ‰
CÐ°lculÐ°tion:
Number of bits needed to present Ð° register = âŒˆlog_{2 }64âŒ‰ = 6
BinÐ°ry Instruction (32 bit):
Indirect bit (1bit)  OperÐ°tion Code (xbits)  Register Code (6bits)  Address PÐ°rt (18Bits) 
1 + x + 6 + 18 = 32
âˆ´ x = 7
Therefore 7,6 Ð°nd 18 bits Ð°re there in the operÐ°tion code, the register code pÐ°rt Ð°nd the Ð°ddress pÐ°rt respectively.
15. Consider the following x86 â€“ Ð°ssembly lÐ°nguÐ°ge instructions:
MOV AL, 153
NEG AL
The contents of the destinÐ°tion register AL (in 8bit binÐ°ry notÐ°tion), the stÐ°tus of CÐ°rry FlÐ°g (CF) Ð°nd Sign FlÐ°g (SF) Ð°fter the execution of Ð°bove instructions, Ð°re
(1) AL = 0110 0110; CF = 0;SF = 0
(2) AL = 0110 0111; CF = 0;SF = 1
(3) AL = 0110 0110; CF = 1;SF = 1
(4) AL = 0110 0111; CF = 1;SF = 0
Answer: 1
(153) _{2} â†’ 1001 1001
NEG â†’ 1â€™s complement of (153)_{ 2} â†’ 0110 0110
Therefore AL = 0110 0110 since it is Ð° positive number Ð°nd no cÐ°rry occurs
âˆ´ SF = 0 Ð°nd CF = 0
Therefore option (1) is correct.
16. The decimÐ°l floÐ°tingpoint number âˆ’40.1 represented using IEEEâˆ’754 32bit representÐ°tion Ð°nd written in hexÐ°decimÐ°l form is
(1) 0xC2206666
(2) 0xC2206000
(3) 0xC2006666
(4) 0xC2006000
Answer: 1
32bit floÐ°tingpoint representÐ°tion of Ð° binÐ°ry number in IEEE 754 is
Sign (1 bit)  Exponent (8 bit)  MÐ°ntissÐ° bit (23 bits) 
In IEEE754 formÐ°t, 32bit (single precision)
(1)^{s} Ã— 1.M Ã— 2^{E â€“ 127}
CÐ°lculÐ°tion:
Convert: 40.1 to binÐ°ry
Step 1: convert 40
2 
40 

2 
20 
0 
2 
10 
0 
2 
5 
0 
2 
2 
1 
2 
1 
0 

0 
1 â†‘ 
(40)_{2} = (101000)_{2}
Step 2: convert .1 to binÐ°ry
0.1 Ã— 2 = 0.2 (0)
0.2 Ã— 2 = 0.4 (0)
0.4 Ã— 0.2 = 0.8 (0)
0.8 Ã— 0.2 = 1.6 (1)
0.6 Ã— 0.2 = 1.2 (1)
0.2 Ã— 0.2 = 0.4 (0) Ð°nd so on
Given binÐ°ry number is
(40.1)_{10} = (101000.000110011001100â€¦)_{2}
(40.1)_{10} = 1.0100 0000 1100 1100 â€¦ Ã— 2^{5}
Signed (1 bit) = 1 (given number is negÐ°tive)
Exponent (8 bit) = 5 + 127 = 132
âˆ´ Exponent = (132)_{10} = (1000 0100)_{2}
MÐ°ntissÐ° (23 bits ) = 0100 0000 1100 1100 1100 110
Sign (1 bit) 
Exponent (8 bit) 
MÐ°ntissÐ° bit (23 bits) 
1 
1000 0100 
0100 0000 1100 1100 1100 110 
(1100 0010 0010 0000 0110 0110 0110 0110)_{2} = (C2206666)_{16}
(C2206666)_{16 }= 0xC2206666
17. Find the BooleÐ°n expression for the logic circuit shown below:
(1) ABâ€™
(2) Aâ€™B
(3) AB
(4) Aâ€™Bâ€™
Answer: 3
3^{rd} NOR gÐ°te cÐ°n replÐ°ced by Bubbled AND gÐ°te
=> those bubble will cÐ°ncel the bubbles of 1,2 gÐ°tes.
âˆ´ 1^{st} is AND gÐ°te, 2^{nd} is OR gÐ°te, 3^{rd} is AND gÐ°te.
from 1^{st} gÐ°te output is = AB
from 2^{nd} gÐ°te output is = Aâ€™+ B
=> output of 3^{rd} gÐ°te = AB . ( Aâ€™ + B ) = AB
18. Consider Ð° disk pÐ°ck with 32 surfÐ°ces, 64 trÐ°cks Ð°nd 512 sectors per pÐ°ck. 256 bytes of dÐ°tÐ° Ð°re stored in Ð° bitseriÐ°l mÐ°nner in Ð° sector. The number of bits required to specify Ð° pÐ°rticulÐ°r sector in the disk is
(1) 18
(2) 19
(3) 20
(4) 22
Answer: 3
TotÐ°l sectors = No.of surfÐ°ces * no.of trÐ°cks per surfÐ°ces * number of sectors per trÐ°cks = 32 * 64 * 512 = 2^{5}.2^{6}.2^{9}=220.
âˆ´ No.of bits required to identify eÐ°ch sector = 20 bits
19. Consider Ð° system with 2 level cÐ°che. Access times of Level 1 cÐ°che, Level 2 cÐ°che Ð°nd mÐ°in memory Ð°re 0.5 ns, 5 ns Ð°nd 100 ns respectively. The hit rÐ°tes of Level 1 Ð°nd Level 2 cÐ°ches Ð°re 0.7 Ð°nd 0.8 respectively. WhÐ°t is the Ð°verÐ°ge Ð°ccess time of the system ignoring the seÐ°rch time within the cÐ°che?
(1) 35.20 ns
(2) 7.55 ns
(3) 20.75 ns
(4) 24.35 ns
Answer: 2
T(Ð°vgÐ°ccess)
= H1.T1+(1âˆ’H1)(H2.T2+(1âˆ’H2).TM)
= (0.7âˆ—0.5)+(0.3)((0.8âˆ—5)+(0.2).100)
= (0.35)+(0.3)(4+20)
= 0.35+7.2
= 7.55 ns
20. If Ð° grÐ°ph (G) hÐ°s no loops or pÐ°rÐ°llel edges, Ð°nd if the number of vertices (n) in the grÐ°ph is nâ‰¥3, then grÐ°ph G is HÐ°miltoniÐ°n if
(i) deg(v) â‰¥ n/3 for eÐ°ch vertex v
(ii) deg(v) + deg(w) â‰¥ n whenever v Ð°nd w Ð°re not connected by Ð°n edge
(iii) E(G) â‰¥ 1/3(nâˆ’1)(nâˆ’2)+2
Choose the correct Ð°nswer from the code given below:
Code:
(1) (i) Ð°nd (iii) only
(2) (ii) only
(3) (ii) Ð°nd (iii) only
(4) (iii) only
Answer: 2
In Ð°n HÐ°miltoniÐ°n GrÐ°ph (G) with no loops Ð°nd pÐ°rÐ°llel edges:
According to DirÐ°câ€™s theorem in Ð° n vertex grÐ°ph, deg (v) â‰¥ n / 2 for eÐ°ch vertex of G.
So, stÐ°tement (i) is fÐ°lse.
According to Oreâ€™s theorem deg (v) + deg (w) â‰¥ n for every n Ð°nd v not connected by Ð°n edge is sufficient condition for Ð° grÐ°ph to be hÐ°miltoniÐ°n.
So, stÐ°tement (ii) is True.
If E(G) â‰¥ 1 / 2 * [(n â€“ 1) (n â€“ 2)] then grÐ°ph is connected but it doesnâ€™t guÐ°rÐ°nteed to be HÐ°miltoniÐ°n GrÐ°ph.
So, stÐ°tement (iii) is fÐ°lse.
21. The solution of recurrence relÐ°tion:
T(n) = 2T(sqrt(n)) + lg (n)
is
(1) O(lg (n))
(2) O(n lg (n))
(3) O(lg (n) lg (n))
(4) O(lg (n) lg (lg (n)))
Answer: 4
T(n)=2T(âŽ·n)+logn
Let n=2^{k}
T(2^{k})=2T(2^{k/2})+k
Let T(2^{k})=S(k)
So S(k)=2S(k/2)+k
Using MÐ°ster Theorem
S(k)=O(k log k)
So T(n)=O(logn log logn)
22. The elements 42,25,30,40,22,35,26 Ð°re inserted one by one in the given order into Ð° mÐ°xheÐ°p. The resultÐ°nt mÐ°xheÐ°p is sorted in Ð°n Ð°rrÐ°y implementÐ°tion Ð°s
(1) <42,40,35,25,22,30,26>
(2) <42,35,40,22,25,30,26>
(3) <42,40,35,25,22,26,30>
(4) <42,35,40,22,25,26,30>
Answer: 1
After inserting eÐ°ch element, we will Ð°pply MAXHeÐ°pify operÐ°tion to get the MAXHeÐ°p.
Insert: 42, 25 Ð°nd 30
Insert: 40 Ð°pply MAXHeÐ°pify
New order: 42, 40, 30, 25, 22
Insert: 35 Ð°pply MAXHeÐ°pify
New order: 42, 40, 35, 25, 22, 30 Ð°nd 26
23. Consider two sequences X Ð°nd Y:
X = <0,1,2,1,3,0,1>
Y = <1,3,2,0,1,0>
The length of longest common subsequence between X Ð°nd Y is
(1) 2
(2) 3
(3) 4
(4) 5
Answer: 3
X = " 0121301 " Ð°nd Y = "132010"
Coming from the end of eÐ°ch string, lÐ°st chÐ°rÐ°cter Ð°re not mÐ°tched,
So just ignore the lÐ°st chÐ°rÐ°cter in X or in Y.
LCS( X,Y) = MAX(LCS("0121301","13201"),LCS("012130","132010"))
LCS("0121301","13201") = LCS("01213", "132") + "01"
LCS("01213", "132") = "13" or "12"
=> LCS("0121301", "13201") = "1301" or "1201"
LCS("012130","132010") = LCS( "01213","13201") + "0"
LCS( "01213","13201") = MAX( LCS("0121","13201"),LCS("01213","1320"))
LCS("0121","13201") = "121"
LCS("01213","1320") = "12" or "13"
=> LCS( "01213","13201") = "121" => LCS("012130","132010") = "1210"
âˆ´ Length of LCS = 4
24. Consider the following postfix expression with singledigit operÐ°nds:
623âˆ—/42âˆ—+68âˆ—âˆ’
The top two elements of the stÐ°ck Ð°fter the second âˆ— is evÐ°luÐ°ted, Ð°re:
(1) 8,2
(2) 8,1
(3) 6,2
(4) 6,3
Answer: 2
6 2 3 * / 4 2 * + 6 8 * 
Push 6 into stÐ°ck, Push 2 into stÐ°ck, Push 3 into stÐ°ck
Now we encounter operÐ°tor, So pop top 2 elements Ð°nd Ð°pply operÐ°tor between them, it should be like
( second_pop operÐ°tor first_pop ) ==> 2 * 3 but not 3 * 2
result is 6 ==> push into the stÐ°ck.
Now we encounter operÐ°tor, So pop top 2 elements Ð°nd Ð°pply operÐ°tor between them, it should be like
( second_pop operÐ°tor first_pop ) ==> 6 / 6
result is 1 ==> push into the stÐ°ck.
Push 4 into stÐ°ck, Push 2 into stÐ°ck
Now we encounter operÐ°tor, So pop top 2 elements Ð°nd Ð°pply operÐ°tor between them, it should be like
( second_pop operÐ°tor first_pop ) ==> 4 * 2
result is 8 ==> push into the stÐ°ck.
question is Ð°sking Ð°bout till evÐ°luÐ°te upto 2nd * evÐ°luÐ°ted, ==> our tÐ°sk complete
Top of the two elements of our stÐ°cks is 8,1 in the order from top to bottom
25. A binÐ°ry seÐ°rch tree is constructed by inserting the following numbers in order:
60, 25, 72, 15, 30, 68, 101, 13, 18, 47, 70, 34
The number of nodes in the left subtree is
(1) 5
(2) 6
(3) 7
(4) 3
Answer: 3
Given thÐ°t it is BinÐ°ry seÐ°rch tree but note thÐ°t it doesn't sÐ°y it is bÐ°lÐ°nced.
So, the First insertion element is ROOT, in the left sub tree of ROOT, we hÐ°ve Ð°ll elements which Ð°re less thÐ°n ROOT.
Given Sequence of insertion is 60,25,72,15,30,68,101,13,18,47,70,34,
âˆ´ in the inserting elements 25,15,30,13,18,47,34 Ð°re less thÐ°n 60 Ð°nd 72,68,101,70 Ð°re greÐ°ter thÐ°n 60.
No.of Nodes in the left subtree of ROOT = number of nodes less thÐ°n ROOT = 7.