Missing basis step while solving a recurrence inductively
Clash Royale CLAN TAG#URR8PPP
up vote
-1
down vote
favorite
While solving the recurrence
$$T(n) leq (n-1) +frac2n sum_i= n/2^n-1 T(i)$$
our professor directly went to the hypothesis step without showing the basis step. Here the hypothesis step is:
Assume inductively that $T(i) leq 4i$ for $i < n$.
Edit: Here is complete context:
Let $T(n, k)$ denote the expected time to find the $k$-th smallest in an array of size $n$, and let $T(n) = max_k T(n, k)$. We will show that $T(n) < 4n$.
First of all, it takes $n-1$ comparisons to split into the array into two pieces in Step 2. These pieces are equally likely to have size $0$ and $n-1$, or $1$ and $n-2$, or $2$ and $n-3$, and so on up to $n-1$
and $0$. The piece we recurse on will depend on $k$, but since we are only giving an upper bound, we can imagine that we always recurse on the larger piece.
What would be appropriate basis step for this recurrence ?
Thanks in advance.
induction recurrence-relations computational-complexity
add a comment |Â
up vote
-1
down vote
favorite
While solving the recurrence
$$T(n) leq (n-1) +frac2n sum_i= n/2^n-1 T(i)$$
our professor directly went to the hypothesis step without showing the basis step. Here the hypothesis step is:
Assume inductively that $T(i) leq 4i$ for $i < n$.
Edit: Here is complete context:
Let $T(n, k)$ denote the expected time to find the $k$-th smallest in an array of size $n$, and let $T(n) = max_k T(n, k)$. We will show that $T(n) < 4n$.
First of all, it takes $n-1$ comparisons to split into the array into two pieces in Step 2. These pieces are equally likely to have size $0$ and $n-1$, or $1$ and $n-2$, or $2$ and $n-3$, and so on up to $n-1$
and $0$. The piece we recurse on will depend on $k$, but since we are only giving an upper bound, we can imagine that we always recurse on the larger piece.
What would be appropriate basis step for this recurrence ?
Thanks in advance.
induction recurrence-relations computational-complexity
I think this is related to tag:computational-complexity. Can you explain with more detail? What you have wanted to do? Sorting an array?
â tarit goswami
Aug 26 at 14:32
add a comment |Â
up vote
-1
down vote
favorite
up vote
-1
down vote
favorite
While solving the recurrence
$$T(n) leq (n-1) +frac2n sum_i= n/2^n-1 T(i)$$
our professor directly went to the hypothesis step without showing the basis step. Here the hypothesis step is:
Assume inductively that $T(i) leq 4i$ for $i < n$.
Edit: Here is complete context:
Let $T(n, k)$ denote the expected time to find the $k$-th smallest in an array of size $n$, and let $T(n) = max_k T(n, k)$. We will show that $T(n) < 4n$.
First of all, it takes $n-1$ comparisons to split into the array into two pieces in Step 2. These pieces are equally likely to have size $0$ and $n-1$, or $1$ and $n-2$, or $2$ and $n-3$, and so on up to $n-1$
and $0$. The piece we recurse on will depend on $k$, but since we are only giving an upper bound, we can imagine that we always recurse on the larger piece.
What would be appropriate basis step for this recurrence ?
Thanks in advance.
induction recurrence-relations computational-complexity
While solving the recurrence
$$T(n) leq (n-1) +frac2n sum_i= n/2^n-1 T(i)$$
our professor directly went to the hypothesis step without showing the basis step. Here the hypothesis step is:
Assume inductively that $T(i) leq 4i$ for $i < n$.
Edit: Here is complete context:
Let $T(n, k)$ denote the expected time to find the $k$-th smallest in an array of size $n$, and let $T(n) = max_k T(n, k)$. We will show that $T(n) < 4n$.
First of all, it takes $n-1$ comparisons to split into the array into two pieces in Step 2. These pieces are equally likely to have size $0$ and $n-1$, or $1$ and $n-2$, or $2$ and $n-3$, and so on up to $n-1$
and $0$. The piece we recurse on will depend on $k$, but since we are only giving an upper bound, we can imagine that we always recurse on the larger piece.
What would be appropriate basis step for this recurrence ?
Thanks in advance.
induction recurrence-relations computational-complexity
edited Aug 26 at 15:51
tarit goswami
1,127219
1,127219
asked Aug 26 at 11:17
Darshak
11
11
I think this is related to tag:computational-complexity. Can you explain with more detail? What you have wanted to do? Sorting an array?
â tarit goswami
Aug 26 at 14:32
add a comment |Â
I think this is related to tag:computational-complexity. Can you explain with more detail? What you have wanted to do? Sorting an array?
â tarit goswami
Aug 26 at 14:32
I think this is related to tag:computational-complexity. Can you explain with more detail? What you have wanted to do? Sorting an array?
â tarit goswami
Aug 26 at 14:32
I think this is related to tag:computational-complexity. Can you explain with more detail? What you have wanted to do? Sorting an array?
â tarit goswami
Aug 26 at 14:32
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
0
down vote
$$T(i)le4itext for i<n,$$ for some $n$ which depends on the problem on hand (I cannot guess).
E.g. $$T(1)le4,T(2)le8.$$
Updated the Question. Thanks
â Darshak
Aug 26 at 11:49
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
$$T(i)le4itext for i<n,$$ for some $n$ which depends on the problem on hand (I cannot guess).
E.g. $$T(1)le4,T(2)le8.$$
Updated the Question. Thanks
â Darshak
Aug 26 at 11:49
add a comment |Â
up vote
0
down vote
$$T(i)le4itext for i<n,$$ for some $n$ which depends on the problem on hand (I cannot guess).
E.g. $$T(1)le4,T(2)le8.$$
Updated the Question. Thanks
â Darshak
Aug 26 at 11:49
add a comment |Â
up vote
0
down vote
up vote
0
down vote
$$T(i)le4itext for i<n,$$ for some $n$ which depends on the problem on hand (I cannot guess).
E.g. $$T(1)le4,T(2)le8.$$
$$T(i)le4itext for i<n,$$ for some $n$ which depends on the problem on hand (I cannot guess).
E.g. $$T(1)le4,T(2)le8.$$
answered Aug 26 at 11:42
Yves Daoust
113k665207
113k665207
Updated the Question. Thanks
â Darshak
Aug 26 at 11:49
add a comment |Â
Updated the Question. Thanks
â Darshak
Aug 26 at 11:49
Updated the Question. Thanks
â Darshak
Aug 26 at 11:49
Updated the Question. Thanks
â Darshak
Aug 26 at 11:49
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2894936%2fmissing-basis-step-while-solving-a-recurrence-inductively%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
I think this is related to tag:computational-complexity. Can you explain with more detail? What you have wanted to do? Sorting an array?
â tarit goswami
Aug 26 at 14:32