# Recent activity by Rounak Agarwal

1
A detective has interviewed four witnesses to a crime. From the stories of the witnesses the detective has concluded that if the butler is telling the truth then so is the cook; the cook and the gardener cannot both be telling the truth; the gardener and the ... . For each of the four persons can the detective determine whether that person is telling the truth or lying ? Explain your reasoning.
2
How many bit strings contain exactly eight 0s and 10 1s if every 0 must be immediately followed by a 1 ?
3
Three men - conveniently named A, B, and C - are fighting a duel with pistols. It's A's turn to shoot. The rules of this duel are rather peculiar: the duelists do not all shoot simultaneously, but instead take turns. A fires at B, B fires at C, and C fires at ... , but that B is a better shot, and hits with probability 0.75 - all shots are independent. What's the probability that A wins the duel?
4
5
Consider the C code fragment given below. typedef struct node { int data; node* next; } node; void join(node* m, node* n) { node* p = n; while(p->next != NULL) { p = p->next; } p->next = m; } Assuming that m and n point to valid NULL-terminated linked ... or append list m to the end of list n. cause a null pointer dereference for all inputs. append list n to the end of list m for all inputs.
6
I had applied for Mtech(res) in IISC in CSA with a gate rank of 797 and score 689. However, i still havent received an interview call letter. Is there any chance that il still receive a call letter gor interview? Also, has anyone else who has applied for mtech iisc in research received a call letter yet?
7
Consider a 4-way set associative cache that has 8-lines, with perfect LRU cache replacement and supports a block size of 16-bytes. For the following memory access pattern (shown as byte addresses), find the hit ratio? 3, 5, 6, 21, 32, 14, 5, 10, 11, 12
8
Solve the recurrence relation $a_n = a_{n-1} + 2n + 3, a_0 = 4$
9
Question: Six different airlines fly from New York to Denver and seven fly from Denver to San Francisco. How many different pairs of airlines can you choose on which to book a trip from New York to San Francisco via Denver, when you pick an airline for the flight to Denver and an airline for the continuation flight to San Francisco ? How many of these pairs involve more than one airline ?
A complete $n$-ary tree is one in which every node has $0$ or $n$ sons. If $x$ is the number of internal nodes of a complete $n$-ary tree, the number of leaves in it is given by $x(n-1) +1$ $xn-1$ $xn +1$ $x(n+1)$
Suppose $R_{1} (\underline{A}, B)$ and $R_{2} (\underline{C}, D)$ are two relation schemas. Let $r_{1}$ and $r_{2}$ be the corresponding relation instances. $B$ is a foreign key that refers to $C$ in $R_{2}$. If data in $r_{1}$ and $r_{2}$ satisfy referential integrity constraints, ... $\prod_{B}(r_{1}) = \prod _{C}(r_{2})$ $\prod_{B}(r_{1}) - \prod _{C}(r_{2}) \neq \varnothing$
The decomposition of relation R with FD set F into R1 and R2 has lossless join property iff R1 $\cap$ R2 $\rightarrow$ R1 $\in$ F$^+$ OR R1 $\cap$ R2 $\rightarrow$ R2 $\in$ F$^+$ If R is decomposed into more than 2 relations, can we apply ... join property ? Or is that table drawing thing the only way to check for lossless join property ? Answers with reference(s) will be much appreciated. Thanks.
Alphabet : {a, b} Language : Set of all strings which start and end with same symbol Doubt : Can $\epsilon$ be considered as part of the language ? Edit: I can see several people have answered my question in the comments. Perhaps I should have mentioned that I need an ... to be present at the beginning and end of "ab" or even between a and b. If you disagree with me please give some explanation.