search
Log In

Recent questions tagged isi2014

3 votes
2 answers
1
Let $m$ and $n$ be two integers such that $m \geq n \geq 1.$ Count the number of functions $f : \{1, 2, \ldots , n\} \to \{1, 2, \ldots , m\}$ of the following two types: strictly increasing; i.e., whenever $x < y, f(x) < f(y),$ and non-decreasing; i.e., whenever $x < y, f(x) ≤ f(y).$
asked May 1, 2018 in Set Theory & Algebra tathatj 402 views
2 votes
3 answers
2
Let $X_1,X_2,X_3,X_4$ be i.i.d. random variables each assuming the value $1$ and $-1$ with probability $\dfrac{1}{2}$ each. Then, the probability that the matrix $\begin{pmatrix}X_1 &X_2\\ X_3 &X_4\end{pmatrix}$ is nonsingular equals $1/2$ $3/8$ $5/8$ $1/4$
asked Mar 15, 2018 in Probability jjayantamahata 289 views
3 votes
1 answer
3
Read the C code given below. What would be the output of the following program? Justify your answer. #include <stdio.h> int myrecurse(int a, int b){ return (b == 1 ? a: myrecurse(a, b-1) + a); } main() { int a[]= {2,3,4,5,6}; int i, x; ... . Give an $O(n log n)$ algorithm to determine whether the given sequence $S$ has a subsequence whose sum is zero, and justify the correctness of the algorithm.
asked Apr 25, 2017 in Written Exam vidhyuth 194 views
2 votes
1 answer
4
Let $A$ be a 30 40 matrix having 500 non-zero entries. For $1 \leq i \leq 30$, let $r_i$ be the number of non-zero entries in the $i$-th row, and for $1 \leq j \leq 40$, let $m_j$ be the number of non-zero entries in the $j$-th column. Suppose ... top of the stack contains the value $max_{1\leq i \leq 30} r_i$. Write pseudo-code for creating such a stack using a single scan of the matrix $A$.
asked Jun 8, 2016 in Algorithms Arjun 219 views
1 vote
1 answer
5
Let $A$ be a $30 \times 40$ matrix having $500$ non-zero entries. For $1 \leq i \leq 30$, let $r_i$ be the number of non-zero entries in the $i$-th row, and for $1 \leq j \leq 40$, let $m_j$ be the number of non-zero entries in the $j$-th column. Show that there is a k such that $1 \leq k \leq 30$, $r_k \geq 17$ and there is an $l$ such that $1 \leq l \leq 40$, $m_l \leq 12$.
asked May 31, 2016 in Numerical Ability jothee 98 views
1 vote
1 answer
6
Let $x, y$ be two non-negative integers $< 2^{32}$. By $x \wedge y$ we mean the integer represented by the bitwise logical $AND$ of the 32- bit binary representations of $x$ and $y$. For example, if $x = 13$ and $y = 6$, then $x \wedge y$ ... of the pseudo-code for the input $x = 13$? What will be the output of the pseudo-code for an arbitrary non-negative integer $x < 2^{32}$?
asked May 30, 2016 in Algorithms jothee 176 views
1 vote
0 answers
7
Let $x=(x_1, x_2, \dots x_n) \in \{0,1\}^n$ By $H(x)$ we mean the number of 1's in $(x_1, x_2, \dots x_n)$. Prove that $H(x) = \frac{1}{2} (n-\Sigma^n_{i=1} (-1)^{x_i})$.
asked May 30, 2016 in Numerical Ability jothee 104 views
8 votes
4 answers
8
How many asterisks $(*)$ in terms of $k$ will be printed by the following C function, when called as $\text{count}(m)$ where $m = 3^k \ ?$ Justify your answer. Assume that $4$ bytes are used to store an integer in C and $k$ is such that $3^k$ can be stored in $4$ bytes. void count(int n){ printf("*"); if(n>1){ count(n/3); count(n/3); count(n/3); } }
asked Nov 23, 2015 in Programming Vikranth Inti 796 views
To see more, click for the full list of questions or popular tags.
...