• recategorized by
682 views
1 1 vote
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$)

1 Answer

Position:
Show:

Related questions

1 1 vote
2 2 answers
933
933 views
go_editor asked Dec 31, 2016
933 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(...
0 0 votes
1 1 answer
757
757 views
go_editor asked Dec 31, 2016
757 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(...
2 2 votes
2 answers 2 answers
747
747 views
go_editor asked Dec 31, 2016
747 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(...
1 1 vote
2 2 answers
1.3k
1.3k views
go_editor asked Dec 31, 2016
1,282 views
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 ent...