recategorized by
700 views
6 votes
6 votes

A computer program computes a function $\: f \: \{0, 1\}^* \times \{0, 1\}^* \rightarrow \{0, 1\}^*$. Suppose $f(a, b)$ ahs length $\mid b \mid ^2$, where $\mid a \mid$ and $\mid b \mid$ are the lengths of $a$ and $b$. Suppose, using this program, the following computation is performed.

x="01"
for i=1, ... , n do
    x=f("01", x)

Suppose at the end, the length of the string $x$ is $t$. Which of the following is TRUE (assume $n \geq 10)?$

  1. $ t \leq 2n$
  2. $n < t \leq n^2$
  3. $n^2 < t \leq n^{\log_2 n}$
  4. $ n^{\log_2 n} < t \leq 2^{(2n)}$
  5. $2^{(2n)} < t$
recategorized by

1 Answer

0 votes
0 votes
Initially $x$ is of $2$ bits.

In next iteration of loop $x$ has size $4$

lly, after $n$ iterations(at the end of loop ) the size of $x$ is $2^{(2*2*2*2*.......n \space times)}$

ie, $t=2^{2^n}$

option $A, B, C$ is wrong as they are small compared to $t$.

option $E$ is wrong as it exceeds the value of $t$.

So, answer is option $D$
Answer:

Related questions

50 votes
50 votes
6 answers
1
Rohith AP asked Dec 13, 2015
5,968 views
Let $n = m!$. Which of the following is TRUE?$m = \Theta (\log n / \log \log n)$$m = \Omega (\log n / \log \log n)$ but not $m = O(\log n / \log \log n)$$m = \Theta (\log...