## Nielit Scientific Assistance CS 15-10-2017

Question 1 |

A decimal has 25 digits. the number of bits needed for its equivalent binary representation is approximately

50 | |

74 | |

40 | |

None of the above |

Question 1 Explanation:

Consider three digits(1,2,3) of decimal numbers.Maximum number, we can generate by that three digits are 10

Then, Decimal number has 25 digits, so maximum number is 10

Similarly, in the binary representation with “n” bits the maximum number is 2

So we can write 10

After taking log

log

n log

n = 25 log

n = 25 x 3.3 [ log

n = 82.5

Note: Original question paper given option D is 60. But actual answer is 82.5.

^{ 3} -1 which is 999.Then, Decimal number has 25 digits, so maximum number is 10

^{ 25} -1Similarly, in the binary representation with “n” bits the maximum number is 2

^{25} -1So we can write 10

^{25} –1 = 2^{ n} – 1 → 10^{ 25} = 2^{ n}After taking log

_{2} on both sideslog

_{2}2^{n} =log_{ 2} 10^{25}n log

_{2} 2=25 log _{2} 10n = 25 log

_{2} 10n = 25 x 3.3 [ log

_{2} 2=1 & log_{2} 10 =3.322]n = 82.5

Note: Original question paper given option D is 60. But actual answer is 82.5.

Question 2 |

Which of the following is minimum error code?

Octal code | |

Binary Code | |

Gray code | |

Excess-3 Code |

Question 2 Explanation:

→ "Gray code" as an alternative name is "reflected binary code". one of those also lists "minimum error code" and "cyclic permutation code" among the names.

→ Gray codes are widely used to facilitate error correction in digital communications such as digital terrestrial television and some cable TV systems.

→ Gray codes are widely used to facilitate error correction in digital communications such as digital terrestrial television and some cable TV systems.

Question 3 |

Match list I with list II and select the correct answer using the codes given below the lists.

1 2 3 4 | |

3 2 4 1 | |

2 3 1 4 | |

1 4 2 3 |

Question 3 Explanation:

3 address instruction:

Two operand locations and a result location are explicitly contained in the instruction word.

e.g., Y = A − B

2 address instruction:

One of the addresses is used to specify both an operand and the result location.

e.g., Y = Y + X

1 address instruction:

Two addresses are implied in the instruction and accumulator based operations.

e.g., A CC = A CC + X

0 address instructions:

They are applicable to a special memory organization called a stack. It interact with a stack using push and pop operations. All addresses are implied as in register based operations.

T = Tap(T − 1 )

Two operand locations and a result location are explicitly contained in the instruction word.

e.g., Y = A − B

2 address instruction:

One of the addresses is used to specify both an operand and the result location.

e.g., Y = Y + X

1 address instruction:

Two addresses are implied in the instruction and accumulator based operations.

e.g., A CC = A CC + X

0 address instructions:

They are applicable to a special memory organization called a stack. It interact with a stack using push and pop operations. All addresses are implied as in register based operations.

T = Tap(T − 1 )

Question 4 |

A binary search tree contains the values- 1,2,3,4,5,6,7 and 8. The tree is traverses in preorder and the values are printed out. Which of the following sequences is a valid output?

5 3 1 2 4 7 8 6 | |

5 3 1 2 6 4 9 7 | |

5 3 2 4 1 6 7 8 | |

5 3 1 2 4 7 6 8 |

Question 4 Explanation:

Preorder traversal yields (Root, left, right)

Option D:

Let draw binary search tree for the given sequence,

After traversing through this tree we will get same sequence.

Option D:

Let draw binary search tree for the given sequence,

After traversing through this tree we will get same sequence.

Question 5 |

The number of the edges in a regular graph of degree 'd' and 'n' vertices is____

Maximum of n,d | |

n+d | |

nd | |

nd/2 |

Question 5 Explanation:

Sum of degree of vertices = 2*no. of edges

d*n = 2*|E|

∴ |E| = (d*n)/2

d*n = 2*|E|

∴ |E| = (d*n)/2

Question 6 |

Consider the following C code segment:

int IsPrime(n)

{

int i,n;

for(i=2;i<= √n;i++)

if(n%i == 0)

{

printf(“Not Prime\n”);

return 0;

}

return 1;

}

Let T(n) denotes the number of times the for loop is executed by the program on input n.

Which of the following is TRUE?

int IsPrime(n)

{

int i,n;

for(i=2;i<= √n;i++)

if(n%i == 0)

{

printf(“Not Prime\n”);

return 0;

}

return 1;

}

Let T(n) denotes the number of times the for loop is executed by the program on input n.

Which of the following is TRUE?

T(n) = O( √n) and T(n) = Ω ( √n) | |

T(n) = O( √n) and T(n) = Ω (1) | |

T(n) = O(n) and T(n) = Ω ( √n) | |

None of the above |

Question 6 Explanation:

Then the time complexity is Best Case : Ω(1) & Worst Case: O(√n)

Question 7 |

A language L for which there exists a TM,, 'T', that accepts every word in L and either rejects or loops for every word that is not in L, is said to be

recursive | |

recursively enumerable | |

NP-Hard | |

None of the above |

Question 7 Explanation:

A language L for which there exists a TM,, 'T', that accepts every word in L and either rejects or loops for every word that is not in L, is said to be recursively enumerable

Question 8 |

Synthesized attribute can easily be simulated by an

LL grammar | |

ambiguous grammar | |

LR grammar | |

none of the above |

Question 8 Explanation:

● A Synthesized attribute is an attribute of the nonterminal on the left-hand side of a production.

● Synthesized attributes represent information that is being passed up the parse tree.

● LR-attributed grammars allow the attributes to be evaluated on LR parsing. As a result, attribute evaluation in LR-attributed grammars can be incorporated conveniently in bottom-up parsing.

● Synthesized attributes represent information that is being passed up the parse tree.

● LR-attributed grammars allow the attributes to be evaluated on LR parsing. As a result, attribute evaluation in LR-attributed grammars can be incorporated conveniently in bottom-up parsing.

Question 9 |

The logic of pumping lemma us a good example of

The pigeonhole principle | |

The divide and conquer technique | |

recursion | |

Iteration |

Question 9 Explanation:

→ The pigeonhole principle is nothing more than the obvious remark: if you have fewer pigeon holes than pigeons and you put every pigeon in a pigeon hole, then there must result at least one pigeon hole with more than one pigeon. It is surprising how useful this can be as a proof strategy.

→ In the theory of formal languages in computability theory, a pumping lemma or pumping argument states that, for a particular language to be a member of a language class, any sufficiently long string in the language contains a section, or sections, that can be removed, or repeated any number of times, with the resulting string remaining in that language. The proofs of these lemmas typically require counting arguments such as the pigeonhole principle.

→ In the theory of formal languages in computability theory, a pumping lemma or pumping argument states that, for a particular language to be a member of a language class, any sufficiently long string in the language contains a section, or sections, that can be removed, or repeated any number of times, with the resulting string remaining in that language. The proofs of these lemmas typically require counting arguments such as the pigeonhole principle.

Question 10 |

Given relations R(w,x) and S(y,z) the result of
SELECT DISTINCT w,x from R<S

R has no duplicates and S is non empty | |

R and S have no duplicates | |

S has no duplicates and R is non empty | |

R and S has the same number of tuples |

Question 10 Explanation:

r has no duplicate, if r can have duplicates it can be remove in the final state. s in non-empty if s is empty then r*s becomes empty.

Question 11 |

E-R model uses this symbol to represent weak entity set?

Dotted rectangle | |

Diamond | |

Doubly outlined rectangle | |

None of these |

Question 11 Explanation:

→ A weak entity is an entity that cannot be uniquely identified by its attributes alone.

→ It must use a foreign key in conjunction with its attributes to create a primary key.

→ The foreign key is typically a primary key of an entity it is related to.

→ It must use a foreign key in conjunction with its attributes to create a primary key.

→ The foreign key is typically a primary key of an entity it is related to.

Question 12 |

By open domain CASE tools we mean

tools available in open domain | |

Software packages which can be downloaded from the internet | |

Software packages to aid each phase of the systems analysis and design which an be downloaded free of cost from the internet | |

Source codes of CASE tools |

Question 12 Explanation:

● Tools are also in the open domain which can be downloaded and used.

● They do not usually have very good user interfaces.

● They do not usually have very good user interfaces.

Question 13 |

If P is risk probability, L is loss, then is computed as

RE=P/L | |

RE=P+L | |

RE=P*L | |

RE=2*P*L |

Question 13 Explanation:

Risk Exposure(RE) is determined using the following relationship
RE = P*L

where P is the probability of occurrence for a risk, and L is the cost to the project should the risk occur.

where P is the probability of occurrence for a risk, and L is the cost to the project should the risk occur.

Question 14 |

A can is filled with 5 paise coins. Another can is filled with 10 paise coins. Another can is filled with 25 paise coins. All the cans are given wrong labels. If the can labeled 25 paise is not having the 10 paise coins, what will the can, labeled 10 paise have?

25 paise | |

5 paise | |

10 paise | |

cannot be determined |

Question 14 Explanation:

A diagram will make it easy to comprehend.

It is easy to find that the can labeled 25 Paise must have 5 paise coins in it. So, the can labeled 10 Paise, must have 25 Paise coins in it.

It is easy to find that the can labeled 25 Paise must have 5 paise coins in it. So, the can labeled 10 Paise, must have 25 Paise coins in it.

Question 15 |

The possible number of boolean function of 3 variables X,Y and Z such that f(X,Y,Z)=f(X',Y',Z')

8 | |

16 | |

64 | |

32 |

Question 15 Explanation:

→ Like above other input combinations also repeat after these inputs.

→ We have 4 input pairs and produces output either 0 or 1.

→ Total functions possible=2*2*2*2 (or) 2

^{4}=16

## Scientific Assistance CS 15-10-2017

Question 1 |

The difference between the compound interest and the simple earned at the end of 3 rd year on a sum of money at a rate of 10% per annul is Rs. 77.5. What is the sum?

Rs. 3,500 | |

Rs. 2,500 | |

Rs. 3,000 | |

Rs. 2,000 |

Question 1 Explanation:

Let principal be ‘x’

S.I = P T R / 100

S.I = X * 3 * 10 / 100

C.I = [ P (1 + (R / 100)

C.I = [ X (1+ (10 / 100)

C.I = 331X / 1000

Difference between Compound interest and Simple interest is 77.5

( 331X / 1000 ) - ( 3X / 10) = 77.5

31x / 1000 = 77.5

x = 2500.

S.I = P T R / 100

S.I = X * 3 * 10 / 100

C.I = [ P (1 + (R / 100)

^{T}) - P]C.I = [ X (1+ (10 / 100)

^{3}) - X]C.I = 331X / 1000

Difference between Compound interest and Simple interest is 77.5

( 331X / 1000 ) - ( 3X / 10) = 77.5

31x / 1000 = 77.5

x = 2500.

Question 2 |

Aamir and Birju can cut 5000g of wood in 20 min. Birju and Charles can cut 5000g of wood in 40 min. Charles and Aamir cut 5 kg of wood in 30 min. How much time Charles will take to cut 5 kg wood alone?

120 min | |

48 min | |

240 min | |