Login
Register
Dark Mode
Brightness
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Filter
Profile
Wall
Recent activity
All questions
All answers
Exams Taken
All Blogs
Answers by Himanshu1
0
votes
41
GATE CSE 2003 | Question: 61
In a permutation \(a_1 ... a_n\), of n distinct integers, an inversion is a pair \((a_i, a_j)\) such that \(i < j\) and \(a_i > a_j\). If all permutations are equally likely, what is the expected number of inversions in a randomly chosen permutation of \(1. . . n\)? \(\frac{n(n-1)}{2}\) \(\frac{n(n-1)}{4}\) \(\frac{n(n+1)}{4}\) \(2n[\log_2n]\)
In a permutation \(a_1 ... a_n\), of n distinct integers, an inversion is a pair \((a_i, a_j)\) such that \(i < j\) and \(a_i a_j\).If all permutations are equally likel...
22.0k
views
answered
Dec 2, 2015
Algorithms
gatecse-2003
algorithms
sorting
inversion
normal
+
–
2
votes
42
no. of gates
626
views
answered
Dec 1, 2015
0
votes
43
longest common subsequence
For X= BDCABA and Y=ABCBDAB find length of lcs and no of such lcs..(solve it using table method)
For X= BDCABA and Y=ABCBDAB find length of lcs and no of such lcs..(solve it using table method)
9.4k
views
answered
Dec 1, 2015
Algorithms
dynamic-programming
numerical-answers
longest-common-subsequence
+
–
2
votes
44
associative cache
Consider a 32 bit processor that has an on chip 16Kbyte 4 way set associative cache. assume that cache has a size of four 32 bit words. the set no in the cache to which the word from memory location FFFAE8FA is mapped_________
Consider a 32 bit processor that has an on chip 16Kbyte 4 way set associative cache. assume that cache has a size of four 32 bit words. the set no in the cache to which ...
768
views
answered
Nov 30, 2015
0
votes
45
Hashing function
Consider a hashing function that resolves collision by quadratic probing. Assume the address space is indexed from 1 to 8.If a collision occurs at position 4, then the location which will never be probed is..
Consider a hashing function that resolves collision by quadratic probing. Assume the address space is indexed from 1 to 8.If a collision occurs at position 4, then the lo...
803
views
answered
Nov 30, 2015
Algorithms
hashing
+
–
48
votes
46
TIFR CSE 2014 | Part B | Question: 9
Given a set of $n$ distinct numbers, we would like to determine the smallest three numbers in this set using comparisons. Which of the following statements is TRUE? These three elements can be determined using $O\left(\log^{2}n\right)$ ... $O(n)$ comparisons. None of the above.
Given a set of $n$ distinct numbers, we would like to determine the smallest three numbers in this set using comparisons. Which of the following statements is TRUE?These ...
10.0k
views
answered
Nov 29, 2015
Algorithms
tifr2014
algorithms
maximum-minimum
+
–
3
votes
47
combinatory
How many ways are there for a horse race with 4 horses to finish if ties are possible?(any number of horses may tie)
How many ways are there for a horse race with 4 horses to finish if ties are possible?(any number of horses may tie)
981
views
answered
Nov 27, 2015
Combinatory
combinatory
engineering-mathematics
+
–
2
votes
48
probability
Explain this question . what they mean ? A six faced die is so biased that, when thrown, it is twice as likely to show an even number than an odd number. if it is thrown twice, what is the probability that sum of two numbers thrown is odd ans = 4/9
Explain this question . what they mean ?A six faced die is so biased that, when thrown, it is twice as likely to show an even number than an odd number. if it is thrown t...
679
views
answered
Nov 27, 2015
65
votes
49
TIFR CSE 2014 | Part B | Question: 19
Consider the following tree with $13$ nodes. Suppose the nodes of the tree are randomly assigned distinct labels from $\left\{1, 2,\ldots,13\right\}$, each permutation being equally likely. What is the probability that the labels form a min-heap (i.e., every node receives the ... $\frac{2}{13}$ $\frac{1}{2^{13}}$
Consider the following tree with $13$ nodes.Suppose the nodes of the tree are randomly assigned distinct labels from $\left\{1, 2,\ldots,13\right\}$, each permutation bei...
5.6k
views
answered
Nov 24, 2015
DS
tifr2014
binary-heap
+
–
1
votes
50
total probability
A bag contains 3 balls. Given that one of the balls is red and the other two balls can be either red or non-red..what is the probability of picking up a red ball?
A bag contains 3 balls. Given that one of the balls is red and the other two balls can be either red or non-red..what is the probability of picking up a red ball?
667
views
answered
Nov 23, 2015
Quantitative Aptitude
probability
+
–
9
votes
51
TIFR CSE 2013 | Part A | Question: 10
Three men and three rakhsasas arrive together at a ferry crossing to find a boat with an oar, but no boatman. The boat can carry one or at the most two persons, for example, one man and one rakhsasas, and each man or rakhsasas can row. But if at any ... any mishap, what is the minimum number of times that the boat must cross the river? $7$ $9$ $11$ $13$ $15$
Three men and three rakhsasas arrive together at a ferry crossing to find a boat with an oar, but no boatman. The boat can carry one or at the most two persons, for examp...
1.6k
views
answered
Nov 21, 2015
Analytical Aptitude
tifr2013
analytical-aptitude
logical-reasoning
+
–
1
votes
52
TIFR CSE 2013 | Part A | Question: 20
Consider a well functioning clock where the hour, minute and the seconds needles are exactly at zero. How much time later will the minutes needle be exactly one minute ahead ($1/60$ th of the circumference) of the hours needle and the seconds needle again ... of $1/60$ th of the circumference. $144$ minutes $66$ minutes $96$ minutes $72$ minutes $132$ minutes
Consider a well functioning clock where the hour, minute and the seconds needles are exactly at zero. How much time later will the minutes needle be exactly one minute ah...
1.8k
views
answered
Nov 21, 2015
Quantitative Aptitude
tifr2013
quantitative-aptitude
clock-time
+
–
7
votes
53
TIFR CSE 2014 | Part A | Question: 2
A body at a temperature of $30$ Celsius is immersed into a heat bath at $0$ Celsius at time $t = 0$. The body starts cooling at a rate proportional to the temperature difference. Assuming that the heat bath does not change in temperature throughout the process, calculate the ... $\dfrac{\log 29}{\log 25}$ $\large e^{5}$ $1 + \log_{6} 5$ None of the above
A body at a temperature of $30$ Celsius is immersed into a heat bath at $0$ Celsius at time $t = 0$. The body starts cooling at a rate proportional to the temperature dif...
861
views
answered
Nov 21, 2015
Quantitative Aptitude
tifr2014
quantitative-aptitude
ratio-proportions
+
–
94
votes
54
GATE IT 2007 | Question: 25
What is the largest integer $m$ such that every simple connected graph with $n$ vertices and $n$ edges contains at least $m$ different spanning trees ? $1$ $2$ $3$ $n$
What is the largest integer $m$ such that every simple connected graph with $n$ vertices and $n$ edges contains at least $m$ different spanning trees ?$1$$2$$3$$n$
21.6k
views
answered
Nov 18, 2015
Graph Theory
gateit-2007
graph-theory
graph-connectivity
normal
+
–
23
votes
55
GATE IT 2007 | Question: 80
Let $P_{1},P_{2},\ldots,P_{n}$ be $n$ points in the $xy-$plane such that no three of them are collinear. For every pair of points $P_{i}$ and $P_{j}$, let $L_{ij}$ be the line passing through them. Let $L_{ab}$ be the line ... or the smallest $y$-coordinate among all the points The difference between $x$-coordinates $P_{a}$ and $P_{b}$ is minimum None of the above
Let $P_{1},P_{2},\ldots,P_{n}$ be $n$ points in the $xy-$plane such that no three of them are collinear. For every pair of points $P_{i}$ and $P_{j}$, let $L_{ij}$ be the...
5.3k
views
answered
Nov 18, 2015
Linear Algebra
gateit-2007
cartesian-coordinates
+
–
5
votes
56
GATE IT 2006 | Question: 11
If all the edge weights of an undirected graph are positive, then any subset of edges that connects all the vertices and has minimum total weight is a Hamiltonian cycle grid hypercube tree
If all the edge weights of an undirected graph are positive, then any subset of edges that connects all the vertices and has minimum total weight is aHamiltonian cyclegri...
8.9k
views
answered
Nov 18, 2015
Graph Theory
gateit-2006
graph-theory
graph-connectivity
normal
+
–
38
votes
57
GATE IT 2004 | Question: 36
If matrix $X = \begin{bmatrix} a & 1 \\ -a^2+a-1 & 1-a \end{bmatrix}$ and $X^2 - X + I = O$ ($I$ is the identity matrix and $O$ is the zero matrix), then the inverse of $X$ is $\begin{bmatrix} 1-a &-1 \\ a^2& a \end{bmatrix}$ ... $\begin{bmatrix} -a &1 \\ -a^2+a-1& 1-a \end{bmatrix}$ $\begin{bmatrix} a^2-a+1 &a \\ 1& 1-a \end{bmatrix}$
If matrix $X = \begin{bmatrix} a & 1 \\ -a^2+a-1 & 1-a \end{bmatrix}$ and $X^2 - X + I = O$ ($I$ is the identity matrix and $O$ is the zero matrix), then the inverse of ...
4.3k
views
answered
Nov 16, 2015
Linear Algebra
gateit-2004
linear-algebra
matrix
normal
+
–
40
votes
58
GATE IT 2004 | Question: 15
Let $x$ be an integer which can take a value of $0$ or $1$. The statement if (x == 0) x = 1; else x = 0; is equivalent to which one of the following ? $x = 1 + x;$ $x = 1 - x;$ $x = x - 1;$ $x = 1\% x;$
Let $x$ be an integer which can take a value of $0$ or $1$. The statementif (x == 0) x = 1; else x = 0;is equivalent to which one of the following ?$x = 1 + x;$$x = 1 - ...
9.8k
views
answered
Nov 16, 2015
Programming in C
gateit-2004
programming
easy
identify-function
+
–
14
votes
59
GATE CSE 1996 | Question: 17
Let $G$ be the directed, weighted graph shown in below figure We are interested in the shortest paths from $A$. Output the sequence of vertices identified by the Dijkstra's algorithm for single source shortest path when the algorithm is started at node $A$ Write down ... vertices in the shortest path from $A$ to $E$ What is the cost of the shortest path from $A$ to $E$?
Let $G$ be the directed, weighted graph shown in below figureWe are interested in the shortest paths from $A$.Output the sequence of vertices identified by the Dijkstra�...
7.6k
views
answered
Nov 12, 2015
Algorithms
gate1996
algorithms
graph-algorithms
normal
dijkstras-algorithm
descriptive
+
–
25
votes
60
TIFR CSE 2013 | Part B | Question: 8
Which one of the following languages over the alphabet ${0, 1}$ is regular? The language of balanced parentheses where $0, 1$ are thought of as $(,)$ respectively. The language of palindromes, i.e. bit strings $x$ that read the same from left to right as well as right to ... $(c)$ above. $\left \{ 0^{m} 1^{n} | 1 \leq m \leq n\right \}$
Which one of the following languages over the alphabet ${0, 1}$ is regular?The language of balanced parentheses where $0, 1$ are thought of as $(,)$ respectively.The lang...
4.1k
views
answered
Nov 7, 2015
Theory of Computation
tifr2013
theory-of-computation
regular-language
+
–
34
votes
61
TIFR CSE 2012 | Part A | Question: 20
There are $1000$ balls in a bag, of which $900$ are black and $100$ are white. I randomly draw $100$ balls from the bag. What is the probability that the $101$st ball will be black? $9/10$ More than $9/10$ but less than $1$. Less than $9/10$ but more than $0$. $0$ $1$
There are $1000$ balls in a bag, of which $900$ are black and $100$ are white. I randomly draw $100$ balls from the bag. What is the probability that the $101$st ball wil...
2.9k
views
answered
Nov 6, 2015
Probability
tifr2012
probability
conditional-probability
+
–
3
votes
62
Binary Number when interpreted as decimal mod 12
What are the Number of states in minimum DFA that accepts Binary strings when interpreted as decimal mod 12 give 0 as remainder.Also give DFA.
What are the Number of states in minimum DFA that accepts Binary strings when interpreted as decimal mod 12 give 0 as remainder.Also give DFA.
1.4k
views
answered
Nov 6, 2015
Theory of Computation
minimal-state-automata
theory-of-computation
+
–
35
votes
63
GATE CSE 2005 | Question: 49
What are the eigenvalues of the following $2\times 2$ matrix? $\left( \begin{array}{cc} 2 & -1\\ -4 & 5\end{array}\right)$ $-1$ and $1$ $1$ and $6$ $2$ and $5$ $4$ and $-1$
What are the eigenvalues of the following $2\times 2$ matrix? $$\left( \begin{array}{cc} 2 & -1\\ -4 & 5\end{array}\right)$$$-1$ and $1$$1$ and $6$$2$ and $5$$4$ and $-1$...
6.1k
views
answered
Nov 6, 2015
Linear Algebra
gatecse-2005
linear-algebra
eigen-value
easy
+
–
59
votes
64
GATE CSE 1995 | Question: 2.12, ISRO2015-9
The number of $1$'s in the binary representation of $(3\ast4096 + 15\ast256 + 5\ast16 + 3)$ are: $8$ $9$ $10$ $12$
The number of $1$'s in the binary representation of $(3\ast4096 + 15\ast256 + 5\ast16 + 3)$ are:$8$$9$$10$$12$
18.4k
views
answered
Nov 5, 2015
Digital Logic
gate1995
digital-logic
number-representation
normal
isro2015
+
–
37
votes
65
TIFR CSE 2013 | Part A | Question: 9
There are $n$ kingdoms and $2n$ champions. Each kingdom gets $2$ champions. The number of ways in which this can be done is: $\frac{\left ( 2n \right )!}{2^{n}}$ $\frac{\left ( 2n \right )!}{n!}$ $\frac{\left ( 2n \right )!}{2^{n} . n!}$ $\frac{n!}{2}$ None of the above
There are $n$ kingdoms and $2n$ champions. Each kingdom gets $2$ champions. The number of ways in which this can be done is:$\frac{\left ( 2n \right )!}{2^{n}}$$\frac{\le...
3.3k
views
answered
Nov 4, 2015
Combinatory
tifr2013
combinatory
discrete-mathematics
normal
balls-in-bins
+
–
69
votes
66
GATE IT 2006 | Question: 63, ISRO2015-57
A router uses the following routing table: \begin{array}{|l|l|l|} \hline \textbf {Destination} & \textbf { Mask} & \textbf{Interface} \\\hline \text {144.16.0.0} & \text{255.255.0.0} & \text{eth$0$} \\\hline\text { ... address $144.16.68.117$ arrives at the router. On which interface will it be forwarded? eth$0$ eth$1$ eth$2$ eth$3$
A router uses the following routing table:\begin{array}{|l|l|l|} \hline \textbf {Destination} & \textbf { Mask} & \textbf{Interface} \\\hline \text {144.16.0.0} & \text...
42.8k
views
answered
Nov 4, 2015
Computer Networks
gateit-2006
computer-networks
subnetting
normal
isro2015
+
–
2
votes
67
Can these be solved by Master's theorem?
1) $T(n)=T(n/2)+2^n$ 2) $T(n)=2T(n/2)+n / \log n$ 3) $T(n)=16T(n/4)+n!$ 4) $T(n)= \sqrt 2T ( n/2 ) + \log n$
1) $T(n)=T(n/2)+2^n$2) $T(n)=2T(n/2)+n / \log n$3) $T(n)=16T(n/4)+n!$4) $T(n)= \sqrt 2T ( n/2 ) + \log n$
3.8k
views
answered
Nov 4, 2015
Algorithms
algorithms
recurrence-relation
master-theorem
+
–
1
votes
68
type of given language ?
let P,Q,R be three languages. if P nd R are regular and if PQ=R the Q is ?
let P,Q,R be three languages. if P nd R are regular and if PQ=R the Q is ?
610
views
answered
Nov 2, 2015
2
votes
69
UGC NET CSE | December 2014 | Part 3 | Question: 24
Regular expression for the complement of language $L=\left\{a^{n}b^{m} \mid n \geq 4, m \leq 3\right\}$ is $(a + b)^{*} ba(a + b)^{*}$ $a^{*} bbbbb^{*}$ $(\lambda + a + aa + aaa)b^{*} + (a + b)^{*} ba(a + b)^{*}$ None of the above
Regular expression for the complement of language $L=\left\{a^{n}b^{m} \mid n \geq 4, m \leq 3\right\}$ is $(a + b)^{*} ba(a + b)^{*}$ $a^{*} bbbbb^{*}$ $(\lambda + a + a...
11.0k
views
answered
Oct 31, 2015
Theory of Computation
ugcnetcse-dec2014-paper3
theory-of-computation
regular-expression
regular-language
+
–
1
votes
70
Which one of the following doesn’t generate same language as rest?
(a+b)*a(a+b)*(a+b)* b * a b * a (a + b)* (a + b)* a b* a b* b * a (a + b)* a b* All are generating same language.
(a+b)*a(a+b)*(a+b)*b * a b * a (a + b)*(a + b)* a b* a b*b * a (a + b)* a b*All are generating same language.
2.7k
views
answered
Oct 29, 2015
Theory of Computation
theory-of-computation
regular-expression
+
–
Page:
« prev
1
2
3
next »
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register