# CMI2016-B-7ai

1 vote
145 views
Consider the funciton $M$ defined as follows:

$M(n) = \begin{cases} n-10 & \text{ if } n > 100 \\ M(M(n+11)) & \text{ if } n \leq 100 \end{cases}$

Compute the following$: M(101)$
in Calculus
recategorized

1 vote
M(101) = 101 - 10 = 91         as $n > 100$
$M(101)$, Here $n=101$ which is grater then $100$ comes under $n>100$ which return $n-10$.

so value of $M(101) =101-10= 91$

correct answer is $91$.

## Related questions

1 vote
1
113 views
Consider the funciton $M$ defined as follows: $M(n) = \begin{cases} n-10 & \text{ if } n > 100 \\ M(M(n+11)) & \text{ if } n \leq 100 \end{cases}$ Give a constant time algorithm that computes $M(n)$ on input $n$. (A constant-time algorithm is one whose running time is independent of the input $n$)
Consider the funciton $M$ defined as follows: $M(n) = \begin{cases} n-10 & \text{ if } n > 100 \\ M(M(n+11)) & \text{ if } n \leq 100 \end{cases}$ Compute the following$: M(87)$
Consider the funciton $M$ defined as follows: $M(n) = \begin{cases} n-10 & \text{ if } n > 100 \\ M(M(n+11)) & \text{ if } n \leq 100 \end{cases}$ Compute the following$: M(99)$
An automatic spelling checker works as follows. Given a word $w$, first check if $w$ is found in the dictionary. If $w$ is not in the dictionary, compute a dictionary entry that is close to $w$. For instance if the user types $\mathsf{ocurrance}$, the spelling checker should ... all alignments of $x$ and $y$. What is the running time of your algorithm (in terms of the lengths of $x$ and $y)?$