Showing posts with label Computer Science and Application. Show all posts
Showing posts with label Computer Science and Application. Show all posts

Sunday, 21 July 2019

UGC NET Computer Science July 2018 - II | Question 23

Question 23
A hash function h defined h(key)=key mod 7, with linear probing, is used to insert the keys 44, 45, 79, 55, 91, 18, 63 into a table indexed from 0 to 6. What will be the location of key 18 ?

Options:
  1. (1) 3
  2. (2) 4
  3. (3) 5
  4. (4) 6
Answer : (3) 5

Explanation Question 23

Given:
Hash table has indexed from 0 to 6.
keys are 44, 45, 79, 55, 91, 18, 63
h(key)=key mod 7  ( h(key) value is in range of 0-6 inclusive)

Solution:

Table after inserting 44, 45
h(key)= key mod 7
h(44) = 44 mod 7 = 2
h(45) = 45 mod 7 = 3
44 is placed position 2 and 45 is placed at position 3.

0 1 2 3 4 5 6
 -   -  44 45  -   -   - 

Table after inserting 79
h(79) = 79 mod 7 = 2
but 2 is already filled by 44, linear probing is applied but 3 is also filled by 45.
To apply linear probing, we check for the next unoccupied position in the table.
So, 79 will occupy 4.

0 1 2 3 4 5 6
 -   -  44 45 79  -   - 

Table after inserting 55, 91
h(55) = 55 mod 7 = 6
h(91) = 91 mod 7 = 0
55 is placed position 6 and 91 is placed at position 0.

0 1 2 3 4 5 6
91  -  44 45 79  -  55

Table after inserting 18
h(18) = 18 mod 7 = 4
but 4 is occupied by 79 so, it will occupy 5.

0 1 2 3 4 5 6
91  -  44 45 79 18 55

Table after inserting 63
h(63) = 63 mod 7 = 0.
0 is also occupied so, it will occupy 1.

0 1 2 3 4 5 6
91 63 44 45 79 18 55

So, option (3) is correct.

PreviousNext
UGC NET CS 2018 July - II Question 22UGC NET CS 2018 July - II Question 24

Monday, 1 April 2019

UGC NET CS 2018 July - II Question 90

Question 90
Which of the following statements is true ?
  1. (1) (Z, ≤ ) is not totally ordered
  2. (2) The set inclusion relation ⊆ is a partial ordering on the power set of a set S
  3. (3) (Z, ≠ ) is a poset
  4. (4) The directed graph is not a partial order
    Diagram for option (4) The directed graph is not a partial order
Answer : (2) The set inclusion relation ⊆ is a partial ordering on the power set of a set S
Explanation Question 90

Options (1) - FALSE
(Z, ≤ ) is not totally ordered
Z = (..., -3, -2, -1, 0, 1, 2, 3, ...}
Show that “less than or equal” relation
is a partial ordering on the set of integers.
– a<=a for every integer a (reflexive)
– a<=b, b<=a, then a=b (anti-symmetric)
– a<=b, b<=c, then a<=c (transitive)
Thus <= is a partial ordering on the set of
integers
(Z,<=) is a poset.

To prove that Z is Totally Ordered Set:
If (S,R) is a poset and every two
elements of S are comparable, S is called
a totally ordered set or linearly ordered
set.

Comparable: The elements a and b of a poset (Z, ≤ )
are comparable, if either aRb or bRa holds.

Option 2: - TRUE
The set inclusion relation ⊆ is a partial ordering on the power set of a set S (TRUE)
let set S = {a,b}
P(S) = {{a} , {b} ,{a,b} , Φ}

Show that  relation (S,⊆) is a partial ordering on the set of integers.
Take any two element from S, lets say s1 and s2
– s1⊆s1 for every element s1 (reflexive)
– s1⊆s2, s2⊆s1, then s1==s2 (anti-symmetric)
– s1⊆s2, s2⊆s3, then s1⊆s3 (transitive)
Thus ⊆ is a partial ordering on the power set of a set S
(S,⊆) is a poset.

Options 3: - FALSE
(Z,≠) is a poset?
Show that (Z,≠) is a partial ordering on the set of integers.
Take any two integers, then
– aRa -> a≠a for every integer a (not reflexive)
Reflexive Relation doesn't satisfy.
So, (Z,≠) is not a poset.

Options 4: - FALSE
Relation set for the directed graph is D={(a,a),(a,b),(b,b)}
Reflecxive,transitive property holds for the elements in the set.
Anti-symattric -> if R(a, b) with a ≠ b, then R(b, a) must not hold, so, Anti-symattric also holds.

References:
Partial Orderings - http://cse.iitkgp.ac.in/~debdeep/courses_iitkgp/FOC/slidespdf/POS.pdf
Partially ordered set - https://en.wikipedia.org/wiki/Partially_ordered_set
Total order - https://en.wikipedia.org/wiki/Total_order

PreviousNext
UGC NET CS 2018 July - II Question 89UGC NET CS 2018 July - II Question 91

UGC NET Computer Science July 2018 - II Question 50

Question 50

Encrypt the Message “HELLO MY DEARZ” using Transposition Cipher with
Key{Plain Text    2 4 1 3
Cipher Text    1 2 3 4

Options:
  1. (1) HLLEO YM AEDRZ
  2. (2) EHOLL ZYM RAED
  3. (3) ELHL MDOY AZER
  4. (4) ELHL DOMY ZAER
Answer: (3) ELHL MDOY AZER

Explanation Question 50

Given:
In question encryption of given message using Transposition Cipher with Given message is “HELLO MY DEARZ”
Key - Plain Text -> 2 4 1 3
Key - Cipher Text ->1 2 3 4

Solution:
Step-1: According to key size divide number of character into blocks. Here, key size is 4. So, character block size is 4.
Step-2: Remove the spaces in the given message and write characters in sequential order. Now arrange then in group of 4 as shown in below matrix.

Key
1234
HELL
OMYD
EARZ

Step-3: Sort column as per given Plain key as shown in below matrix.

Key
2413
ELHL
MDOY
AZER

Read the matrix horizontally one by one row.

Encrypted message will be ELHL MDOY AZER.

So, option (3) is correct.


UGC NET Computer Science July 2018 - II Question 48

Question 48
Decrypt the message “WTAAD” using the Caesar Cipher with key = 15.
  1. (1) LIPPS
  2. (2) HELLO
  3. (3) OLLEH
  4. (4) DAATW
Answer : (2) HELLO
Explanation Question 48

Caesar Cipher Algorithm Mathematical Description:
First we translate all of our characters to numbers, 'a'=0, 'b'=1, 'c'=2, ... , 'z'=25.
We can now represent the Caesar cipher encryption function, e(x), where x is the character we are encrypting, as:
e(x)=(x+k) (mod 26)

Where k is the key (the shift) applied to each letter.
After applying this function the result is a number which must then be translated back into a letter.
The decryption function is :
d(x)=(x-k) (mod 26)

Solution:

Remember alphabet ordering:
Only remember the alphabets that occur at multiplication of 5:
1 st alphabet -> A  (1)
2 nd alphabet -> E (5)
3 rd alphabet -> J  (10)
4 th alphabet -> O (15)
5 th alphabet -> T (20)
6 th alphabet -> Y (25)

Need to remember word EJOTY
for our case number numbering is E- 4, J-9, O-14, T-19 Y-24

Position of our alphabets:
W -> T+3 -> (19+3) = 22
T -> 19
A -> 1
D -> 3

Decryption of given alphabets:
W -> (22 -15) (mod 26) = 7 ->H
T -> (19 -15) (mod 26) = 4  -> E
A -> (1-15) (mod 26) = -14 +26 -> L
A -> (1-15) (mod 26) = -14 + 26 -> L
D -> (3 -15) (mod 26) = -12 + 26 -> O

In the above, the result is in the range 0 to 25; i.e., if x + n or x − n are not in the range 0 to 25, we have to subtract or add 26.)

We can decrypt the the message "WTAAD" using the Caesar Cipher with key=15 to "HELLO".

So, option (2) is correct answer


PreviousNext
UGC NET CS 2018 July - II Question 47UGC NET CS 2018 July - II Question 49

UGC NET Computer Science July 2018 - II Question 36

Question 36
Consider the following two Grammars :

G1 : S → SbS|a
G2 : S → aB|ab, A→GAB|a, B→ABb|b

Which of the following option is correct ?

Options:
  1. (1) Only G1 is ambiguous
  2. (2) Only G2 is ambiguous
  3. (3) Both G1 and G2 are ambiguous
  4. (4) Both G1 and G2 are not ambiguous
Answer : (3) Both G1 and G2 are ambiguous

Explanation Question 36

Solution:

Both G1 and G2 are ambiguous
As both grammars have two derivations for same string:

G1 : S → SbS|a

Grammer G1 Derivation-1:
S → SbS
        SbSbS
        ababa

Grammer G1 Derivation-2:
S → SbS
SbSbS
ababa


G2 :
S → aB|ab, A→AB|a, B→ABb|b

Grammer G2 Derivation-1:
 S → aB
aABb
aABBb
aABABbb
aababbb

Grammer G2 Derivation-2:
S → aB
aABb
aAABbb
aABABbb
aababbb

Both G1 and G2 are ambiguous as both grammars have two derivations for same string as shown in above.

So, Option (3) is correct answer.

Thursday, 28 March 2019

UGC NET Computer Science July 2018 – II Question 15

Question 15

Match the 5 CMM Maturity levels/CMMI staged representations in List- I with their
characterizations in List-II :

List - I List -II
(a) Initial (i) Processes are improved quantitatively and continually.
(b) Repeatable (ii) The plan for a project comes from a template for plans.
(c) Defined (iii) The plan uses processes that can be measured quantitatively.
(d) Managed (iv) There may not exist a plan or it may be abandoned.
(e) Optimizing (v) There’s a plan and people stick to it.

Code :
(a) (b) (c) (d) (e)
(1) (iv) (v) (i) (iii) (ii)
(2) (i) (ii) (iv) (v) (iii)
(3) (v) (iv) (ii) (iii) (i)
(4) (iv) (v) (ii) (iii) (i)

Options:
  1. (1)
  2. (2)
  3. (3)
  4. (4)
Answer : (4)

Explanation Question 15

  • (a) Initial → (iv) There may not exist a plan or it may be abandoned.
  • (b) Repeatable → (v) There’s a plan and people stick to it.
  • (c) Defined → (ii) The plan for a project comes from a template for plans.
  • (d) Managed → (iii) The plan uses processes that can be measured quantitatively.
  • (e) Optimizing → (i) Processes are improved quantitatively and continually.

Reference : What is Capability Maturity Model (CMM) Levels?

Reference 2 : CMMI Staged Representation - 5 Maturity Levels



PreviousNext
UGC NET CS 2018 July - II Question 14UGC NET CS 2018 July - II Question 16

UGC NET Computer Science July 2018 – II Question 11

Question 11
Assume the following regarding the development of a software system P :

- Estimated lines of code of P : 33, 480 LOC
- Average productivity for P : 620 LOC per person-month
- Number of software developers : 6
- Average salary of a software developer : ` 50,000 per month

If E, D and C are the estimated development effort (in person-months), estimated development time (in months), and estimated development cost (in ` Lac) respectively, then (E, D, C) =_________.

Options:
  1. (1) (48, 8, 24)
  2. (2) (54, 9, 27)
  3. (3) (60, 10, 30)
  4. (4) (42, 7, 21)
Answer : (2) (54, 9, 27)

Explanation Question 11

Given:
Estimated lines of code(LOC) of P = 33, 480 LOC
Average productivity for P = 620 LOC per person-month
Number of software developers = 6
Average salary of a software developer = 50,000 per month

Solution:
If the average productivity for P = 620 LOC per person-month = one person writes 620 LOC per month

E (Estimated development effort (in person-months)) = Estimated lines of code / Average productivity for P = 33480 (LOC) / 620 (LOC per person months)= 54 person months

D(Estimated development time (in months)) = No of developers required to complete a project in a month/No of available developers= 54/6 (since 6 developers are there)= 9 months

C(Estimated development cost (in ` Lac)) = Average salary 50,000 paid to each 6 developers for 9 months = 50000 x 6 x 9 = 27 lacs

That forms (E, D, C) = (54,9,27)                                 

So, Option (2) is correct answer.

PreviousNext
UGC NET CS 2018 July - II Question 10UGC NET CS 2018 July - II Question 12

UGC NET Computer Science July 2018 - II | Question 8

Question 8
A graphic display system has a frame buffer that is 640 pixels wide, 480 pixels high and 1 bit of color depth. If the access time for each pixel on the average is 200 nanoseconds, then the refresh rate of this frame buffer is approximately :
  1. (1) 16 frames per second
  2. (2) 19 frames per second
  3. (3) 21 frames per second
  4. (4) 23 frames per second
Answer : (1) 16 frames per second
Explanation Question 8

Given Values:
Frame buffer width is 640 pixels = horizontal line on screen
Frame buffer height is 480 pixels = vertical line on screen
Color depth is 1 bit

Solution:
Framebuffer is the size of the maximum image that can be displayed.
Screen forms a Matrix of pixels with width of 640 and height of 480.

No of total pixels in the frame buffer = (width  x height)= 640 x 480 px = 307200
Here, color depth is 1 bit.
Memory required by frame buffer = Memory required for total pixel =
Total pixels in the frame buffer x (Color depth) = 307200 x 1

If access time for each pixel on the average is 200 nanoseconds
Time requires to refresh the "whole screen" or "frame buffer" = Memory required by frame buffer x 200 ns = 61440000 nano second = 61440000 x 10−9 second

Then, refresh rate of frame buffer =
number of frame changes per second = 1 / 61440000 x 10−9 second = 100,00,00,000 / 61440000 = 100,000 / 6144 = 16.2760 = 16 (Approximately)

So, Option (1) is correct answer.

What is color depth?
Color depth, also known as bit depth, is either the number of bits used to indicate the color of a single pixel, in a bitmapped image or video framebuffer, or the number of bits used for each color component of a single pixel.
Reference: Color depth

Here Color depth is 1 bit. bit can either depict 0 or 1, i.e., the two colors used for a binary image are black and white. Image with 1 bit color depth is called 1-bit monochrome.

Tuesday, 10 July 2018

NTA UGC-NET Computer Science November 2017 Solved Questions Paper-2

The NTA UGC-NET November, 2017 Examination was conducted on 5th November by CBSE( Central Board of Secondary Education). The following are the answer keys of Test Booklet Series B, Paper-1 of UGC NET / CBSE NET held on 5th November, 2017. The answer keys are as per the answer keys released by CBSE on behalf of UGC. It is to be noted that the UGC NET Examination 2017 June and 2017 December was not held. You can also Download PDF of solved computer science nta ugc-net previous year question paper with answer key from below links.

  Question paper NTA NET Computer Science Paper 2 Nov 2017: Download Free PDF Now

Question paper with Answer key NTA NET Computer Science Paper 2 Nov 2017: Download Free PDF Now

1. If the time is now 4 O’clock, what will be the time after 101 hours from now ?
(1) 9 O’clock
(2) 8 O’clock
(3) 5 O’clock
(4) 4 O’clock

Answer is: (1) 9 O’clock
101 / 24 = = 96 + 5 = reminder 5 => after 96 hour it would be 4 O’clock and then after 5 hour,
it's 9 O'clock

2. Let m=(313)4 and n=(322)4. Find the base 4 expansion of m+n.
(1) (635)4
(2) (32312)4
(3) (21323)4
(4) (1301)4

Answer is: (4) (1301)4
m+n
(313)4 + (322)4
( _ _ 5)4 =>4 (here add unit's digit, we get 5 >= 4 , so carry 1, (so one is added to the ten's digit))
( _ 41)4=> ( _ 0 1)4 (here, we sum ten's digits => (2+1+1 (carry 1 from unit's digit sum))) =4 >=4. so, carry 1 will be passed to hundreds digit.
( 7 4 1)4=> ( 3 0 1)4(here, we sum hundreds digits => (3+3+1 (carry 1 from tens digit sum))) =7 >=4. so, carry 1 will be passed to thousands digit. so, finally (1 3 0 1)4

3. 
Find the boolean product A⊙B of the two matrices.

(A) (1) (B) (2) (C) (3) (D) (4)
Answer is: (A) (1)

4. How many distinguishable permutations of the letters in the word BANANA are there ?

(1) 720
(2) 120
(3) 60
(4) 36

Answer is: (3) 60
Total permutation with 6 words are 720
A is repeated 3 times and N is repeated 2 times.
Permutations of 3 A's are 3!
Permutations of 3 N's are 2!
So, divide the total 720 permutations by 2! and 3!, gives answer 60 permutations.

5. Consider the graph given below :

Use Kruskal’s algorithm to find a minimal spanning tree for the graph. The List of the edges of the tree in the order in which they are choosen is ?
(1) AD, AE, AG, GC, GB, BF
(2) GC, GB, BF, GA, AD, AE
(3) GC, AD, GB, GA, BF, AE
(4) AD, AG, GC, AE, GB, BF

Kruskal's algorithm is a MST(minimum-spanning-tree) algo., which finds an edge with the least possible edge weight that combines any two trees in the forest (initially all vertex are considered as separate tree). Kruskal's algorithm follows the greedy algorithm approach in graph theory as it finds a MST for a connected weighted graph adding increasing cost edges at each step (Such that graph doen't form a cycle).
Sorted edges by weight
Edge  weight
AD       2
GC       2
GB       3
GA       3
BC       4
BF       4
DG      4
AE      4
ED      5
CF      5
AC     6
DB   weight not given
So, the bold edges above will form a MST of graph in the order of increasing edge weight.

6. The Boolean function with the Karnaugh map is :

(1) (A+C).D+B
(2) (A+B).C+D
(3) (A+D).C+B
(4) (A+C).B+D

Answer is: (1) (A+C).D+B

7. The Octal equivalent of the binary number 1011101011 is :
(1) 7353
(2) 1353
(3) 5651
(4) 5657

Answer is: (2) 1353
Group the three bits from the right side (from LSB) and convert to equivalent decimal.

8. Let P and Q be two propositions, ¬ (P ↔ Q) is equivalent to :
(1) P ↔ ¬ Q
(2) ¬ P ↔ Q
(3) ¬ P ↔ ¬ Q
(4) Q → P

Answer is: (1) P ↔ ¬ Q

9. Negation of the proposition ∃ x H(x) is :
(1) ∃x ¬ H(x)
(2) ∀ x ¬ H(x)
(3) ∀ x H(x)
(4) ¬ x H(x)


Ans is: (2) ∀ x ¬ H(x)
Negation of (∃ x H(x)) = ¬ ∃ x H(x) = ∀ x ¬ H(x)(as negation symbol moves from left to right it changes the symbol ∃ to ∀).

10. The output of the following combinational circuit is F.

The value of F is :
(1) P1 + P2' P3
(2) P1 + P2' P3'
(3)P1 + P2 P3'
(4)P1'+ P2 P3

Correct answer is : (2) P1+P2'P3' outputs of OR gates are:
(P1+P2'+P3') . (P1+P2'+P3) . (P1+P2+P3')
= (P1+P1P2'+P1P3+P2'+P2'P3+P3'P1+P3'P2+0) . (P1+P2+P3')
=(P1+P1P2'+P1P3+P3'P1+P2'+P2'P3+P3'P2) . (P1+P2+P3') 
= 
(P1+P2') . (P1+P2+P3') 
=(P1+P1P2+P1P3'+P2'P1+0+P2'P3')
=(P1+P2'P3')

11. ‘ptrdata’ is a pointer to a data type. The expression *ptrdata++ is evaluated as (in C++) :
(1) *(ptrdata++)
(2) (*ptrdata)++
(3) *(ptrdata)++
(4) Depends on compiler

Answer is: (1) *(ptrdata++)
as the ++ has higher precedence than * operator.

12. The associativity of which of the following operators is Left to Right, in C++ ?
(1) Unary Operator
(2) Logical not
(3) Array element access
(4) addressof

Answer is: (3) Array element access
Unary Operator -- right to left associativity
Logical not -- right to left associativity
Array element access -- Array subscript - [ ] - Left to Right associativity addressof -- right to left associativity

13. A member function can always access the data in __________ , (in C++).
(1) the class of which it is member
(2) the object of which it is a member
(3) the public part of its class
(4) the private part of its class

Correct Answer is: (1) the class of which it is member

14. Which of the following is not correct for virtual function in C++ ?
(1) Must be declared in public section of class.
(2) Virtual function can be static.
(3) Virtual function should be accessed using pointers.
(4) Virtual function is defined in base class.

Answer is: (2) Virtual function can be static. A virtual function must be declared within public section of base class and is overridden by the derived-class. When we refer to a derived class object using a reference of the base class, you can call a virtual function for that class object.then, version of the function defines in derived class will execute.

15. Which of the following is not correct (in C++) ?
(1) Class templates and function templates are instantiated in the same way.
(2) Class templates differ from function templates in the way they are initiated.
(3) Class template is initiated by defining an object using the template argument.
(4) Class templates are generally used for storage classes.

OPTION 2, 3, 4 ARE CORRECT (as per UGC answer key)

16. Which of the following is/are true with reference to ‘view’ in DBMS ?
(a) A ‘view’ is a special stored procedure executed when certain event occurs.
(b) A ‘view’ is a virtual table, which occurs after executing a pre-compiled query.(1) Only (a) is true
(2) Only (b) is true
(3) Both (a) and (b) are true
(4) Neither (a) nor (b) are true

(2) Only (b) is true View is the table or the result of query after query execution.

17. In SQL, __________ is an Aggregate function.
(1) SELECT (2) CREATE (3) AVG (4) MODIFY

Correct Answer is: AVG function used to find the average of the particular attribute values. e.g., to find avg salary of employee of a company.

18. Match the following with respect to RDBMS :
(a) Entity integrity (i) enforces some specific business rule that do not fall into entity or domain.
(b) Domain integrity(ii) Rows can’t be deleted which are used by other records
(c) Referential integrity(iii) enforces valid entries for a column
(d) User defined integrity (iv) No duplicate rows in a table
Code :
(1) (iii) (iv) (i) (ii)
(2) (iv) (iii) (ii) (i)
(3) (iv) (ii) (iii) (i)
(4) (ii) (iii) (iv) (i)

Correct Answer is: (2) (iv) (iii) (ii) (i)
Entity integrity: No duplicate rows in a table. Every entity(row) in the table must be unique based on the primary key of the table. Table would not allow the same primary key twice.
Domain integrity:Defines the what type of values to be inserted to the particular (attribute)column of DB for an entity. If we define the salary attribute in employee class then, domain of such values are numeric (say double). This integrity enforces valid entries for a column. (not allow alpha-numeric values for the salary).
Referential integrity: is based on foreign keys (so, it referred by other referencing table, deletion of such entries causes the undefined value for referencing table). Rows can’t be deleted which are used by other records.
User defined integrity: enforces some specific business rule that do not fall into entity or domain.
For e.g., you defining the constraint over the values of the attribute. let's assume that you are inserting the values to the table such that max and minimum salary for the part-time employee must be in in range 10,000 and 100. (So, you are restricting any insert to DB outside this salary range).

19. In RDBMS, different classes of relations are created using __________ technique to prevent modification anomalies.
(1) Functional Dependencies
(2) Data integrity
(3) Referential integrity
(4) Normal Forms

Correct Answer is: (4) Normal Forms
Normal forms are used to reduce the redundancy and increase the data consistency.

20. __________ SQL command changes one or more fields in a record.
(1) LOOK-UP
(2) INSERT
(3) MODIFY
(4) CHANGE

Correct Answer is: (3) MODIFY
21. Consider an array representation of an n element binary heap where the elements are stored
from index 1 to index n of the array. For the element stored at index i of the array (i<=n),
the index of the parent is :
(1) floor ((i+1)/2)
(2) ceiling ((i+1)/2)
(3) floor (i/2)
(4) ceiling (i/2)

Correct Answer is: (3) floor (i/2)
As shown below the root of the 13 and 10 are floor of the 4 and 5 respectively.

22. The following numbers are inserted into an empty binary search tree in the given order :
10, 1, 3, 5, 15, 12, 16. What is the height of the binary search tree ?
(1) 3
(2) 4
(3) 5
(4) 6

Correct Answer is: (1) 3
Here, height is longest path from root to the leaf node. As shown green number in below image indicates the count of the tree edges which has max height.

23. Let G be an undirected connected graph with distinct edge weight. Let Emax be the edge
with maximum weight and Emin the edge with minimum weight. Which of the following
statements is false ?
(1) Every minimum spanning tree of G must contain Emin.
(2) If Emax is in minimum spanning tree, then its removal must disconnect G.
(3) No minimum spanning tree contains Emax.
(4) G has a unique minimum spanning tree.

Correct Answer is: (3) No minimum spanning tree contains Emax.

24. A list of n strings, each of length n, is sorted into lexicographic order using merge - sort
algorithm. The worst case running time of this computation is :
(1) O(n log n)
(2) O(n2 log n)
(3) O(n2 + log n)
(4) O(n3)

Correct Answer is: (2) O(n2 log n)

25. Postorder traversal of a given binary search tree T produces following sequence of keys :
3, 5, 7, 9, 4, 17, 16, 20, 18, 15, 14
Which one of the following sequences of keys can be the result of an in-order traversal of
the tree T ?
(1) 3, 4, 5, 7, 9, 14, 20, 18, 17, 16, 15
(2) 20, 18, 17, 16, 15, 14, 3, 4, 5, 7, 9
(3) 20, 18, 17, 16, 15, 14, 9, 7, 5, 4, 3
(4) 3, 4, 5, 7, 9, 14, 15, 16, 17, 18, 20

Correct answer is: (4) 3, 4, 5, 7, 9, 14, 15, 16, 17, 18, 20
3, 5, 7, 9, 4, 17, 16, 20, 18, 15, 14
Here, the root of the binary tree is 14 (last element), as it's post-order traversal.
Right side of the tree contains bigger elements than 14
Left side of the tree contains bigger elements than 14
So, the first number >14 on left of root (14) (check from right to left).
=>root of right sub-tree is 15
So, the first number <14 on left of root (14) (check from right to left).
=>root of left sub-tree is 4
now we have two sequences: right tree and left tree
right tree:  17, 16, 20, 18, 15,
left tree: 3, 5, 7, 9, 4
Here, also similarly  find left and right sub-tree of both tree root-right(15) and the root-left(4).
So, final binary tree is

26. Which of the following devices takes data sent from one network device and forwards it to
the destination node based on MAC address ?
(1) Hub
(2) Modem
(3) Switch
(4) Gateway

Correct answer is: (3) Switch

27. __________ do not take their decisions on measurements or estimates of the current traffic
and topology.
(1) Static algorithms
(2) Adaptive algorithms
(3) Non - adaptive algorithms
(4) Recursive algorithms

Correct answer is: (3) Non - adaptive algorithms

28. The number of bits used for addressing in Gigabit Ethernet is __________.
(1) 32 bits
(2) 48 bits
(3) 64 bits
(4) 128 bits

Correct answer is: (2) 48 bits

29. Which of the following layer of OSI Reference model is also called end-to-end layer ?
(1) Network layer
(2) Datalink layer
(3) Session layer
(4) Transport layer

Correct answer is: (4) Transport layer

30. The IP address __________ is used by hosts when they are being booted.
(1) 0.0.0.0
(2) 1.0.0.0
(3) 1.1.1.1
(4) 255.255.255.255

Correct answer is:  (1) 0.0.0.0

31. Consider the following program fragment in assembly language :
          mov ax, 0h
          mov cx, 0A h
doloop :
          dec ax
          loop doloop
What is the value of ax and cx registers after the completion of the doloop ?
(1) ax=FFF5 h and cx=0 h
(2) ax=FFF6 h and cx=0 h
(3) ax=FFF7 h and cx=0A h
(4) ax=FFF5 h and cx=0A h

Correct Answer: (2) ax=FFF6 h and cx=0 h

32. Consider the following assembly program fragment :
stc
mov al, 11010110b
mov cl, 2
rcl al, 3
rol al, 4
shr al, cl
mul cl
The contents of the destination register ax (in hexadecimal) and the status of Carry Flag (CF) after the execution of above instructions, are :
(1) ax=003CH; CF=0
(2) ax=001EH; CF=0
(3) ax=007BH; CF=1
(4) ax=00B7H; CF=1

Correct Answer: (1) ax=003CH; CF=0

33. Which of the following regular expressions, each describing a language of binary numbers (MSB to LSB) that represents non-negative decimal values, does not include even values ?
(1) 0*1+0*1* (2) 0*1*0+1* (3) 0*1*0*1+ (4) 0+1*0*1* Where {+, *} are quantification characters.


34. Which of the following statements is/are TRUE ? (a) The grammar S → SS | a is ambiguous. (Where S is the start symbol) (b) The grammar S → 0S1 | 01S | ε is ambiguous. (The special symbol ε represents the empty string) (Where S is the start symbol) (c) The grammar (Where S is the start symbol) S → T/U T → x S y | xy | e U → yT generates a language consisting of the string yxxyy.
(1) Only (a) and (b) are TRUE.
(2) Only (a) and (c) are TRUE.
(3) Only (b) and (c) are TRUE.
(4) All of (a), (b) and (c) are TRUE.

Correct Answer: (4) All of (a), (b) and (c) are TRUE.

35. Match the description of several parts of a classic optimizing compiler in List - I, with the names of those parts in List - II : List - I List - II
(a) A part of a compiler (i) Optimizer syntax. that is responsible for recognizing (b) A part of a compiler that takes as input a stream of (ii) Semantic Analysis characters and produces as output a stream of words along with their associated syntactic categories. (c) A part of a compiler that understand the meanings of (iii) Parser variable names and other symbols and checks that they are used in ways consistent with their definitions. (d) An IR-to-IR transformer that tries to improve the IR (iv) Scanner program in some way (Intermediate Representation).
Code : (a) (b) (c) (d)
(1) (iii) (iv) (ii) (i)
(2) (iv) (iii) (ii) (i)
(3) (ii) (iv) (i) (iii)
(4) (ii) (iv) (iii) (i)

Correct Answer:  (1) (iii)  (iv)  (ii)   (i)

36. In Distributed system, the capacity of a system to adapt the increased service load is called ____.
(1) Tolerance
(2) Scalability
(3) Capability
(4) Loading

Correct Answer: (2) Scalability 

37. In __________ disk scheduling algorithm, the disk head moves from one end to other end of the disk, serving the requests along the way. When the head reaches the other end, it immediately returns to the beginning of the disk without serving any requests on the return trip.
(1) LOOK
(2) SCAN
(3) C - LOOK
(4) C - SCAN

Correct Answer:  (4) C - SCAN

38. Suppose there are six files F1, F2, F3, F4, F5, F6 with corresponding sizes 150 KB, 225 KB, 75 KB, 60 KB, 275 KB and 65 KB respectively. The files are to be stored on a sequential device in such a way that optimizes access time. In what order should the files be stored ?
(1) F5, F2, F1, F3, F6, F4
(2) F4, F6, F3, F1, F2, F5
(3) F1, F2, F3, F4, F5, F6
(4) F6, F5, F4, F3, F2, F1

Correct Answer:  (2) F4, F6, F3, F1, F2, F5
If we put the small file first then, then the average time to access all the file will be minimum. Lets put the largest file in  first place and smaller after that. then, in this case to access smaller file multiple time, systems need to cross the larger file sequentially each time which is very complex.

39. Which module gives control of the CPU to the process selected by the short-term scheduler?
(1) Dispatcher
(2) Interrupt
(3) Schedular
(4) Threading

Correct Answer: (1) Dispatcher

40. Two atomic operations permissible on Semaphores are __________ and __________.
(1) wait, stop
(2) wait, hold
(3) hold, signal
(4) wait, signal

Correct Answer: (4) wait, signal

41. Software does not wear-out in the traditional sense of the term, but software does tend to deteriorate as it evolves, because :
(1) Software suffers from exposure to hostile environments.
(2) Defects are more likely to arise after software has been used often.
(3) Multiple change requests introduce errors in component interactions.
(4) Software spare parts become harder to order.

Correct Answer: (3) Multiple change requests introduce errors in component interactions.

42. Software re-engineering is concerned with :
(1) Re-constructing the original source code from the existing machine (low - level) code program and modifying it to make it more user - friendly.
(2) Scrapping the source code of a software and re-writing it entirely from scratch.
(3) Re-organising and modifying existing software systems to make them more maintainable.
(4) Translating source code of an existing software to a new machine (low - level) language.

Correct Answer: (3) Re-organising and modifying existing software systems to make them more maintainable.

43. Which of the following is not a key issue stressed by an agile philosophy of software engineering ?
(1) The importance of self-organizing teams as well as communication and collaboration between team members and customers.
(2) Recognition that change represents opportunity.
(3) Emphasis on rapid delivery of software that satisfies the customer.
(4) Having a separate testing phase after a build phase.

Correct Answer:  (4) Having a separate testing phase after a build phase.

44. What is the normal order of activities in which traditional software testing is organized ?
(a) Integration Testing
(b) System Testing
(c) Unit Testing
(d) Validation Testing
Code :
(1) (c), (a), (b), (d)
(2) (c), (a), (d), (b)
(3) (d), (c), (b), (a)
(4) (b), (d), (a), (c)

Correct Answer: (2) (c), (a), (d), (b)

45. Which of the following testing techniques ensures that the software product runs correctly after the changes during maintenance ?
(1) Path Testing
(2) Integration Testing
(3) Unit Testing
(4) Regression Testing

Correct Answer: (4) Regression Testing

46. Which of the following Super Computers is the fastest Super Computer ?
(1) Sun-way TaihuLight
(2) Titan
(3) Piz Daint
(4) Sequoia

Correct Answer:  (1) Sun-way TaihuLight

47. Which of the following statements about ERP system is true ?
(1) Most ERP software implementations fully achieve seamless integration.
(2) ERP software packages are themselves combinations of seperate applications for manufacturing, materials, resource planning, general ledger, human resources, procurement and order entry.
(3) Integration of ERP systems can be achieved in only one way.
(4) An ERP package implemented uniformly throughout an enterprise is likely to contain very flexible connections to allow charges and software variations.

Correct Answer: (2)

48. Which of the following is not a Clustering method ?
(1) K - Mean method
(2) Self Organizing feature map method
(3) K - nearest neighbor method
(4) Agglomerative method

Correct Answer:(3) K - nearest neighbor method

49. Which of the given wireless technologies used in IoT, consumes the least amount of power ?
(1) Zigbee
(2) Bluetooth
(3) Wi-Fi
(4) GSM/CDMA

Correct Answer: (2) Bluetooth

50. Which speed up could be achieved according to Amdahl’s Law for infinite number of processes if 5% of a program is sequential and the remaining part is ideally parallel ?
(1) Infinite
(2) 5
(3) 20
(4) 50

Correct Answer: (3) 20

UGC NET Computer Science December 2019 | Question 16

Question 16 In a certain coding language. 'AEIOU' is written as 'TNHDZ'. Using the same coding language. 'BFJPV' wil...

Popular Posts