L-2.5: Recurrence Relation [ T(n)= T(n-1) +logn] | Substitution Method | Algorithm

preview_player
Показать описание

►Design and Analysis of algorithms (DAA) (Complete Playlist):

Other subject-wise playlist Links:
--------------------------------------------------------------------------------------------------------------------------------------
► Operating System :
►Database Management System:
► Theory of Computation
►Artificial Intelligence:
►Computer Networks (Complete Playlist):
►Computer Architecture (Complete Playlist):
►Structured Query Language (SQL):
►Discrete Mathematics:
►Compiler Design:
►Number System:
►Cloud Computing & BIG Data:
►Software Engineering:
►Data Structure:
►Graph Theory:
►Programming in C:
►Digital Logic:

---------------------------------------------------------------------------------------------------------------------------------------
Our social media Links:
--------------------------------------------------------------------------------------------------------------------------------------
►For Any Query, Suggestion or notes contribution:
Рекомендации по теме
Комментарии
Автор

For those who are confused when sir wrote the equation n - k = 1,
so, k = n -1
if we input the value in the eq then it is become
1 + log2 + log3 + log4+ log5 +
as we all know log1=0
if we write,
1+0+ log2 + log3 + log4+ log5 + there is no problem adding a zero in the eq.
then we can replace the 0 with log1 simple,
now the eq becomes
1+log1+ log2 + log3 + log4+ log5 + which sir wrote in white board so there is actually no problem. Sir did it right....

KaziMd.RakibulHassan
Автор

Sir, at 6:25 when you equate n-k with 1 then k will be n-1 not just 1. And then the whole equation will get changed after 6:57.

RiteshKumar-udbf
Автор

At 7:20 of your video....sir
n-k=1
n-1=k aayega...not n=k

lifeandme
Автор

dear sir here n-k=1 then k will be n-1 and whole equation and question will change at 6:30.

LearnwithRohit-odhw
Автор

don't worry answer is right see explanation
n-k=1
k=n-1
T(n)= 1+log(n-(k-1)) +log(n-(k-2)) +log(n-(k-3))

T(n)= 1 +log(n-(n-1-1)) +log(n-(n-1-2))
T(n) = 1 +log2 + log3+
T(n)=
T(n)=
T(n)= 1+log(n!)


T(n)= 1+log(n^n) (how it come see video 8.50)

T(n)= 1+nlog(n)
0(nlogn)

yogeshmishra
Автор

TIPS: Take the two conditions as n = 0; n >0; Rest will be fine.
Hope it helps you, guys.
Love you sir ❤

ramijhasanshaik-
Автор

I don't know whether you are reading my comment or not, but wishing you Happy Teacher's Day Bhaiya. You are our Bhaiya as well as a teacher. Lots of love and respect for you, for your effort in providing us such a best courses.

_arghya
Автор

There is one mistake in given condition everyone should be corrct it....

if n=0
if n>0

This are the correct condition given...👍🏼👍🏼

atharvanimkar
Автор

Happy Teachers' Day Sir. Your explanation style is really eye catching which help us to beat any level of question from any level of concepts. Thank You So much for all of your guidance and support. 🙏

pratapsingh-mvgg
Автор

no need to do k = n -1
it will be like T(n-k)=T(1) which is 1
so our equation will be as follow

=1+log(2*3*4*5*...(n-1)*n)
=1+log(n!)
So time complexity will be O(log(n!))

devamshah
Автор

Pls tell how n-k=1 statment is becomes n=k

hafeezaslecturesofcomputer
Автор

LOTS OF THANK SIR, I WATCHED YOUR ALL(60) VIDEO OF DAA. I AM VERY GLAD TO SEE THIS. I AM VERY INSPIRED WITH YOUR VIDEO LECTURE AND DECIDE TO DO MCA COURSE. I WISH THAT YOU GUIDE ME. I ALSO WISH THAT YOU UPLOAD ALL VIDEO OF SYLLABUS OF MCA. YOUR EVERY VIDEO GIVE DEEP KNOWLEDGE AND BETTER THAN VIDEO PROVIDED BY UNIVERSITY.

pankajpriyadarshy
Автор

Completed whole playlist today, thank you sir for your efforts, will donate a big amount soon.

adityasharma
Автор

Sir you taking the value of n=k which is wrong you take it n=k+1 so we become n-k=1. How it is possible to obtain n=k from n-k=1.

ReelVibesGram
Автор

Confusion clear,
n-k = 1,
n = 1 + k
k = n - 1
Agar hm n-k = 1 put krke ans. Nikale to ans. Same hi ata hai.
1 + log(n-k+1) + log(n-3) + log(n-2) + log(n-1) + logn
aisa eq.ayega
Aur isme *n-k* ko 1 se replace kr do..
To ans. Log(n!) Aa jayega

ryzenae
Автор

Happy Teacher's day sir may god increase your subscriber day by day. Your way of teaching helps me to clear my concepts also when i solve the question I remember your videos it just makes easy for me to do that. Thanku sir for all your dedication and hardwork.

priyanshisharma
Автор

Computer science ka kuch pta hi nhi tha... Itna interest se pdhaya ki hr topic ka pta h ab apse pdhkr

SAKSHISHARMA-pssz
Автор

Happy teacher's day 👏👏👏👏 love from Gujarat

codeattraction
Автор

Sir, at 6:25 when you equate n-k with 1 then k will be n-1 not just 1. And then the whole equation will get changed after 6:57.

solution - equate n-k with 0
n-k=0
k=n

techkid
Автор

Those who are asking about how k=n, just take n-k=1 then k=n-1 then use it in previous equation so n ; then T(n)=T(1)+log 2+log n ; T(n)=1+ log(2 3 4 5 n)
T(n)=1+ log(1 2 3 n)
T(n)=log(n!)

wisdomdoor