Log In

Answers by Hirak

0 votes
Consider the following grammar and their Syntax Directed Translation (SDT) rules. (Here id represent a integer and id.val is value of that integer) S1: Given SDT is L-attributed and using L-attributed evaluation the value of the expression 4 * 6 + 3 * 7 is 84. S2: ... to the above SDT.? My doubt here: Is there any difference in the way of evaluation of L-attributed SDT and S-attributed SDT ?
answered Jul 15, 2019 in Compiler Design 1.4k views
2 votes
The marked price of a table is Rs. 1200, which is 20% above the cost price. It is sold at a discount of 10% on the marked price. Find the profit percent. (a) 10% (b) 8% (c) 7.5% (d) 6% What approach can I use for these type of questions?
answered Jun 4, 2019 in Quantitative Aptitude 862 views
3 votes
Read the statements: All women are entrepreneurs. Some women are doctors. Which of the following conclusions can be logically inferred from the above statements? All women are doctors All doctors are entrepreneurs All entrepreneurs are women Some entrepreneurs are doctors Why here $2)$ ... ans?? Is it because , if we make set of doctor as 0, then All doctors are entrepreneurs is meaningless.
answered Jun 1, 2019 in Mathematical Logic 166 views
1 vote
In a restaurant each of $n$ customer gives a hat to the hat check person. The hat check person gives the hat back to the customer in a random order. What is expected number of customer who get back their own hat?
answered May 31, 2019 in Probability 225 views
1 vote
The minimum payload of a TCP segment is 65,535 65,515 65,495 65,475
answered May 31, 2019 in Computer Networks 2.2k views
1 vote
So as we know there are 2 different approaches for cache.. Sequential and the Hierarchical. Exactly which formula should I use when only access times and hit ratio is mentioned in case of 2 level memory system..? It would be great if someone explains how to approach questions related to average access time.
answered May 19, 2019 in CO and Architecture 302 views
3 votes
Consider the following Posets: $I)\left ( \left \{ 1,2,5,7,10,14,35,70 \right \},\leq \right )$ $II)\left ( \left \{ 1,2,3,6,14,21,42 \right \},/ \right )$ $III)\left ( \left \{ 1,2,3,6,11,22,33,66 \right \},/ \right )$ Which of the above poset are isomorphic to $\left ( P\left ( S \right ),\subseteq \right )$ where $S=\left \{ a,b,c \right \}?$
answered May 18, 2019 in Set Theory & Algebra 309 views
3 votes
answered May 14, 2019 in Digital Logic 154 views
0 votes
answered May 9, 2019 in Algorithms 309 views
2 votes
A shipping clerk has to weigh 10 distinct packets. He weighs them four at a time, weighing all the possible combinations of the packets from the ten. The average weight of all the weighing combination is found to be 800 gm. What is the combined weight of all the size packets?
answered May 7, 2019 in Quantitative Aptitude 626 views
1 vote
$1)n^{2019}=O\left (n^{2020} \right )$ $2)O(n^{2019})=O\left (n^{2020} \right )$ Which one is correct?? If $1)$ is correct, why $2)$ not correct?
answered May 6, 2019 in Algorithms 310 views
0 votes
Consider a scenario where 3 processes P1, P2 and P3 are sharing x resources of the same type. The maximum need of the three processes is 4, 8, 6. It is also known that the maximum combined need of both processes P1 and P2 at a time is 9 and they always execute only in combined manner. Then the value of x is ___
answered May 4, 2019 in Operating System 1.4k views
1 vote
$P_{1}:$ {$<M>|M $ is a TM that accepts atleast $2$ strings of different length} $P_{2}:$ {$<M>|M $ is a TM and there exists an input whose length less than $100,$ on which $M$ halts } The number of problem which is $RE$ but not $REC$ _____________
answered May 3, 2019 in Theory of Computation 395 views
0 votes
A $d-$ary heap is a binary heap, but instead of $2$ children, nodes have $d$ children. A $d-ary$ heap can be represented by $1-D$ array as follows. The root is kept in $A[1]$, and it's $d$ children are kept in order in $A[2]$ through $A[d+1]$ , their children ... $A\left [ d^{2}+d+2 \right ]$
answered May 2, 2019 in DS 163 views
1 vote
Let $f : A \rightarrow B$ be a bijection and let $E,F$ be subjects of $A$, Now, we consider the following statements about the function $f :$ $P : f(E \cup F) = f (E) \cup f(F)$ $Q : f(E \cap F) = f (E) \cap f(F)$ Which of the following is ... $(4)$ None of $P$ and $Q$ is correct I thought $Q$ is true, but answer is both true. Is both true because of bijective function or ans given incorrect?
answered May 1, 2019 in Set Theory & Algebra 183 views
1 vote
Consider a single array $A\left [ 0...........(n-1) \right ]$ is used to implement two stacks. Two stacks grows from opposite end of the array. Variable $top_{1}$ and $top_{2}$ points to the location of the topmost elements in each of the stacks with initial values of ... represents the number of elements are present in the array at any time? $A)n-top_{2}+top_{1}$ $B)n+1-top_{2}+top_{1}$
answered May 1, 2019 in DS 189 views
0 votes
In a box, there are $2$ red, $3$ black and $4$ blue coloured balls. The probability of drawing $2$ blue balls in sequence without replacing, and then drawing $1$ black ball from this box is _________ %.
answered May 1, 2019 in Probability 372 views
0 votes
The number of nodes of height $h$ in any $n$-element heap is ________. $h$ $2^{h}$ ceil $\left[\frac{n}{2^{h}}\right]$ ceil $\left[\frac{n}{2^{h+1}}\right]$ Answer is given as D, But I think it should be C. Because, even if you take height=1 then possible nodes are 3 and 2.
answered Apr 26, 2019 in DS 6.4k views
0 votes
Resource Reservation is a feature of: A. Circuit Switching B. Packet Switching C. Both (A) and (B) D. None of these PS: In virtual packet switching resouce allocation is done during setup, while in datagram packet switching, there is no allocation.
answered Apr 11, 2019 in Computer Networks 2.6k views
2 votes
The statistics of runs scored in a series by four batsmen are provided in the following table. Who is the most consistent batsman of these four? ... $K$ $L$ $M$ $N$
answered Apr 10, 2019 in Quantitative Aptitude 2.6k views
2 votes
Which of the following statements are true? Three broad categories of Networks are Circuit Switched Networks Packet Switched Networks Message Switched Networks Circuit Switched Network resources need not be reserved during the set up phase In packet switching there is no resource allocation for packets a and b only b and c only a and c only a, b and c
answered Apr 3, 2019 in Computer Networks 1.1k views
1 vote
int fun(int n) { int count = 0; for (int i = n; i > 0; i /= 2) for (int j = 0; j < i; j++) count += 1; return count; } what is the time complexity
answered Mar 31, 2019 in Algorithms 6k views
1 vote
Q. An SJF algorithm is simply a priority algorithm where the priority is : A) predicted next cpu burst B) The inverse of the predicted next cpu burst C) the current cpu burst D)anything the user want so in this what will be the ans it's a) or c) ? I confused with these two options.please gives proper explanation.
answered Mar 29, 2019 in Operating System 237 views
2 votes
When an inverter is placed between both inputs of an SR flip-flop, the resulting flip-flop is [A]. JK flip-flop [B]. D flip-flop [C]. T flip-flop [D]. Master slave JK flip-flop ans given is B but how
answered Mar 23, 2019 in Digital Logic 2.8k views
0 votes
For a host machine that uses the token bucket algorithm for congestion control, the token bucket has a capacity of $1$ $\text{megabyte}$ and the maximum output rate is $20$ $\text{megabytes}$ per $\text{second}$. Tokens arrive at a rate to sustain output at a ... machine needs to send $12$ $\text{megabytes}$ of data. The minimum time required to transmit the data is _____________ $\text{seconds}$.
answered Feb 4, 2019 in Computer Networks 20.3k views
1 vote
Manish has to travel from A to D changing buses at stops B and C enroute.The maximum waiting time at either stop can be 8 minutes each,but any time of waiting upto 8 minutes is equally likely at both places.He can afford upto 13 minutes of waiting time if he is to arrive at D on time,What is probability Manish will arrive late at D?
answered Jul 2, 2018 in Probability 1.1k views
5 votes
A computer system has a three-level memory hierarchy, with access time and hit ratios as shown below: $\overset{ \text {Level $1$ (Cache memory)} \\ \text{Access time = $ ... access time of less than $100 nsec$? What is the average access time achieved using the chosen sizes of level $1$ and level $2$ memories?
answered Sep 1, 2017 in CO and Architecture 7.2k views
1 vote
______ is the number of moves of the smallest disc in Tower of Hanoi implementation where the tower consisting of 17 discs (numbered from 0 to 16) Answer given: $2^{16}$ = 65536 Please explain
answered Jul 28, 2017 in DS 1.7k views