2.1.2 Recurrence Relation (T(n)= T(n-1) + n) #2

  Рет қаралды 1,055,672

Abdul Bari

Abdul Bari

Күн бұрын

Recurrence Relation for Decreasing Function
Example : T(n)= T(n-1) +n
Courses on Udemy
================
Java Programming
www.udemy.com/...
Data Structures using C and C++
www.udemy.com/...
C++ Programming
www.udemy.com/...

Пікірлер: 352
@emelyloria7467
@emelyloria7467 5 жыл бұрын
Teaching is a talent!! You're one of the best teachers I've known. I should have found your channel before.
@wirito
@wirito 5 жыл бұрын
I wish I had found this channel before I took algorithms. I would have aced everything :)
@user-wc1sm8cj8s
@user-wc1sm8cj8s 3 жыл бұрын
mw too
@m7mdarwani964
@m7mdarwani964 3 жыл бұрын
For Calculus, we have Prof. Leonard & for Algorithms, we have teacher Abdul Bari. Thank God
@fritz6600
@fritz6600 2 жыл бұрын
Indeed. Haha.
@SwatejTech
@SwatejTech Жыл бұрын
For linear algebra we have Gilbert Strang.
@shreya-tf5go
@shreya-tf5go Жыл бұрын
🙂🙂
@cocaine4youu
@cocaine4youu Жыл бұрын
Prof. Leonard saved my undergrad calculus!!!
@cancali
@cancali 10 ай бұрын
Do you have recommendations for Physics (1&2) and Circuit classes? I CANNOT deal with these..
@michaelekoka3263
@michaelekoka3263 5 жыл бұрын
Excellent teacher. As he said, adding the n gives 2n-1, 3n-2, etc, making the pattern a bit less obvious and the expression a bit more difficult to solve. But sometimes we have to live dangerously, so here we go: T(n) = T(n-1) + n T(n) = T(n-2) + 2n - 1 T(n) = T(n-3) + 3n - 3 T(n) = T(n-4) + 4n - 6 ... T(n) = T(n-k) + kn - [(k-1) + (k-2) + ... + 3 + 2 + 1] Assuming n-k = 0; k = n T(n) = T(0) + n² - [(n-1) + (n-2) + ... + 3 + 2 + 1] Isolating the expression in brackets [(n-1) + (n-2) + ... + 2 + 1] We know that n + (n-1) + (n-2) + ... + 2 + 1 = n(n+1)/2 Taking off n from both sides we get (n-1) + (n-2) + ... + 2 + 1 = (n(n+1)/2) - n which resolves to (n(n+1)/2) - 2n/2 => (n(n+1) - 2n)/2 => (n(n+1-2))/2 => n(n-1)/2 Plugging it back in the equation in its new form T(n) = T(0) + n² - [n(n-1)/2] Removing the brackets and swapping the sign T(n) = T(0) + n² + n(1-n)/2 T(n) = 1 + (2n² + n(1-n))/2 T(n) = 1 + n(2n+1-n)/2 T(n) = 1 + n(n+1)/2
@ajaypanthagani5959
@ajaypanthagani5959 5 жыл бұрын
its T(n) = T(n-3)+3n-3 I think
@michaelekoka3263
@michaelekoka3263 5 жыл бұрын
​@@ajaypanthagani5959 Sequence is indeed 1 3 6 10... Good catch, thanks!
@neru1091
@neru1091 Жыл бұрын
I would like to ask, where did 2n^2 came from after removing and swapping the sign? did you just plugged in a constant c to get n(n+1)/2?
@Usertyspr
@Usertyspr 3 жыл бұрын
Greatest teacher of Algorithms . Even my college teacher(dsa) first watchs your videos the he teaches us .....He completely try to copy but couldn't .
@Mlakshman-w9k
@Mlakshman-w9k 8 ай бұрын
unique art of abdul bari sir..
@HeerModi-vv1jm
@HeerModi-vv1jm 9 күн бұрын
So relatable 😂😅
@ravigupta4252
@ravigupta4252 4 жыл бұрын
Before finding your videos, I was very scared of CSE subjects but now I m becoming hero in algorithms 👍
@AkibHussain
@AkibHussain 2 жыл бұрын
Did you got placed bro?
@amberpradhan2484
@amberpradhan2484 4 жыл бұрын
Hello Sir, You are the best teacher so far. God bless you and your family. Thank you for sharing your knowledge which is helping us a lot.
@sarfarazkhanbiradar544
@sarfarazkhanbiradar544 4 жыл бұрын
I have started admiring you Abdul !!! Wish every teacher/instructor be like you. Thank you
@SadiaAmin-u4q
@SadiaAmin-u4q Ай бұрын
Sir i took DAA course two times and failed both times and just couldn't understand this subject at all, i came across your playlist and it made my life so much easier. i thought i just couldn't understand this subject and felt really hopeless. thankyou so much for this amazing playlist, you are truly a gem.
@knarice
@knarice 3 жыл бұрын
I have passed my data structures course by these lectures and now finally understanding algorithms. Thank you very much
@mohammedal-khulaifi7655
@mohammedal-khulaifi7655 3 жыл бұрын
best algorithm teacher in the world
@ishaqbhat800
@ishaqbhat800 3 жыл бұрын
The way u have delivered it..... really made it very easy to understand.that is the beauty lies in this lecture.
@coderopes2983
@coderopes2983 5 жыл бұрын
Study is beautiful with u sir✌️👍🏻✌️
@elitesquad8231
@elitesquad8231 3 жыл бұрын
Teaching is an ART and you are the ARTIST 🔥🔥🔥🔥
@erikadistefano7582
@erikadistefano7582 4 жыл бұрын
There should exist more people like you in the world! Thank you
@mahimsd7645
@mahimsd7645 6 жыл бұрын
one of the best lecture on Algo... I HV ever listened........
@priyankamanna4550
@priyankamanna4550 4 жыл бұрын
Your teaching skill is super. I really understand each and every thing you taught and my concepts are really cleared out after watching this.. I hope you make more such video on programming concepts .😀
@africanhope1440
@africanhope1440 4 жыл бұрын
This is the best tutorial I have ever watch on youtube.
@rathnaprabuayyappan3117
@rathnaprabuayyappan3117 2 жыл бұрын
Teaching is an art and abdul sir ,you are an artist of it. Cool, calm and composed teaching!!!!
@_VIREN
@_VIREN Жыл бұрын
kuch samjh nahi aaraha bro \
@alexpena9927
@alexpena9927 4 жыл бұрын
WOW three lectures I couldnt understand, then this guy comes along and I understand it in 3 minutes.
@noahsim9976
@noahsim9976 2 жыл бұрын
When you said "Hello friends" at the beginning, I couldn't help but smile.
@ryzurrin
@ryzurrin 3 жыл бұрын
You good sir have just expanded my brain and my wisdom, thanks for the great lessons!
@thesigma3779
@thesigma3779 10 ай бұрын
sir you are best, with best explanation i got till now. i was never understanding these algorithms because nobody actually knew it completely and never explained them fully. so i always cramed them , which i never like😂. Thank you a lot for keeping and incresing my interest in programming😊.
@pedronieto1584
@pedronieto1584 9 ай бұрын
Yessss this is just what I needed. Thank you Prof Bari!
@dmike4real496
@dmike4real496 3 жыл бұрын
This man's breathtaking!
@souravbhattacharyya8228
@souravbhattacharyya8228 4 жыл бұрын
You have a natural way to explain these things. Exceptional videos. Would like to learn OS or python, java from you. Thank you.
@anishkumargiri9490
@anishkumargiri9490 2 жыл бұрын
Sir the way you teach every concept get's clear.....thanks a lot sir you are making future of many students bright...keep going sir
@shreemaan-abhishek
@shreemaan-abhishek 3 жыл бұрын
Here he is! The man, the myth, the legend!
@pratapujjwal4642
@pratapujjwal4642 3 жыл бұрын
What a coincidence bhaiya!! I was also watching algorithm and you too
@shreemaan-abhishek
@shreemaan-abhishek 3 жыл бұрын
@@pratapujjwal4642 :D
@kartech11
@kartech11 3 жыл бұрын
All colleges that teach data structures should fire their hopeless lecturers and just play this video. Immense respect for Abdul Bari
@RKNancy
@RKNancy 6 жыл бұрын
Thank you sir. Your videos will help me pass this examination. Thank you hundred-fold.
@wirito
@wirito 5 жыл бұрын
8:50 when you go to office hours and the professor has already explained it twice and you say: I still don’t get it professor.
@deepanshuchoudhary4598
@deepanshuchoudhary4598 5 жыл бұрын
I thought you would slap me :p :p @ 8:54
@joynaew
@joynaew 11 ай бұрын
You deserve nothing but happiness and great things in your life! I cant thank you enough!
@abhishek7969
@abhishek7969 6 жыл бұрын
learning a lot from ur videos
@unleash_vlogs
@unleash_vlogs 5 жыл бұрын
Sir you are very accurate and to the point, and also I love to watch your videos as you are accurate with your way of teaching....
@loviisamaenpaa6452
@loviisamaenpaa6452 5 жыл бұрын
Thank you!! Finally I got this, thanks to you!
@kingdeath1007
@kingdeath1007 4 жыл бұрын
Recursive Tree Method 3:24 Substitution Method 7:47 note 1 9:16-9:49 note 2 13:39-13:48
@siddhantmusic5028
@siddhantmusic5028 4 жыл бұрын
Thnks bro🙂
@arrogantermistkerl4579
@arrogantermistkerl4579 5 жыл бұрын
He's staring that knowledge into my head
@subhankarkanrar9494
@subhankarkanrar9494 8 ай бұрын
Huge respect To Bari sir, for deep knowledge.
@APK_22
@APK_22 2 ай бұрын
Teaching is a talent and sir has done masters in it
@AbhishekYadav-wc5vz
@AbhishekYadav-wc5vz 4 жыл бұрын
14:13 Itna solve krne ke baad... Mahaul badal gya, zazbaat badal gye ;)
@techexplored
@techexplored Жыл бұрын
I really initially thought that the answer should be O(n) as there is one for loop. I was clearly wrong. Thank you sir for explaining this soo elegantly and making us better students
@codetogether24x7
@codetogether24x7 3 жыл бұрын
yes sir you teaching method is very good
@tictacricrac
@tictacricrac 8 ай бұрын
In fields where legends freely roam, A GOAT emerges, to claim its throne. With prowess unmatched, it scales the height, In realms of glory, it takes its flight. In games of skill, it reigns supreme, The GOAT, a champion in every scheme. With grace and power, it dominates, In history's annals, it seals its fate. Through trials faced and challenges met, The GOAT's legacy, we won't forget. In every triumph, it leaves its mark, A symbol of greatness, shining stark. Oh, GOAT, in realms of fame you dwell, Your spirit shines, a timeless spell. In every field, your legend's told, Greatest Of All Time, forever bold.
@dg3577
@dg3577 2 жыл бұрын
really awesome explanation sir all software engineers
@sadeghhosseini6381
@sadeghhosseini6381 3 жыл бұрын
Please continue publishing new tutorials on other CS courses like OS and etc. You are one of the best teachers i've ever seen.
@AnujKumar-tt5md
@AnujKumar-tt5md 4 жыл бұрын
Sir... You are a gem 💎 among teachers. Thanks🙏
@abdul_bari
@abdul_bari 4 жыл бұрын
It's my pleasure
@vmidhun8973
@vmidhun8973 4 жыл бұрын
Best lectures on Algorithms.
@edwintan4784
@edwintan4784 5 жыл бұрын
Sir, loves your videos! Finally i can understand Algorithms in a simple way. Please continue to create more videos! Hope u can cover every Advanced Algorithms as in Cormen’s textbook.Thanks!
@Hoppensagen
@Hoppensagen 2 жыл бұрын
Should mention that 1 + 2 + 3 + .... n-1 + n is a summation that can be shorthanded to equal n(n+1)/2
@hunainalikhan9253
@hunainalikhan9253 9 ай бұрын
Glad I saw that comment thanks buddy
@BIOHAZARD_V2
@BIOHAZARD_V2 4 ай бұрын
You sir are a lifesaver
@b088mohdzaid5
@b088mohdzaid5 Ай бұрын
It’s a basic concept in math probably a 9th class kid knows it.
@BIOHAZARD_V2
@BIOHAZARD_V2 Ай бұрын
@@b088mohdzaid5 for people who haven’t been in math class for a long time, they can forget
@ankursahu7704
@ankursahu7704 6 жыл бұрын
Thank you sir You helped me a lot.
@iAmShortyFry
@iAmShortyFry 3 жыл бұрын
Thanks for helping me obtain my degree :)
@ChauDang-bm1nf
@ChauDang-bm1nf 9 ай бұрын
Please make videos of computer architecture. You’re teaching skills is brilliant.
@jagjotsingh2039
@jagjotsingh2039 5 жыл бұрын
Oakland University Sent Me Here
@oskarf8868
@oskarf8868 7 ай бұрын
I appreciated the video a lot, thanks from Poland
@all-roundersanyal4472
@all-roundersanyal4472 4 жыл бұрын
Sir ,,,you are great ,I love the way you teach. It is so clear.Thanks a lot sir.NPTEL teachers are so boring ,,,,,,but you are interesting with your subject.
@poojabhale816
@poojabhale816 4 жыл бұрын
Thank you sir...tomorrow is our exam and your lectures are ssly a saviour for us.....it easily made us understand the concept one night before the exam....👍
@preetsutariya1664
@preetsutariya1664 4 жыл бұрын
ENLIGHTENING 🙏💯🔥
@justinpower4475
@justinpower4475 5 жыл бұрын
Abdul Bari for President
@siddharth_singhvlogs
@siddharth_singhvlogs 5 жыл бұрын
Kash mere class teacher bhi daa in sir ke jaise padha pate🤔🤗
@ParvezAlam-gt6cc
@ParvezAlam-gt6cc 5 жыл бұрын
Sir you are awesome and teaching style is very good. Thanks for this video Sir. Now I can easily understand everything things about algorithm. Again thank you sir. May you live long and healthy.
@devanshkhare3532
@devanshkhare3532 4 жыл бұрын
Sir, ar 5:51 you took T(0) will take 0 time. But you also said that 0 time means constant time so we take 1 instead of 0. So, for summing up, if taken 1 instead of 0 sum should be = n(n+1)/2 +1 . I know it wont make a difference in the final answer but just wanted to confirm if I am theoritically correct or not ? Please do reply and Thank you in advance !
@lensam5288
@lensam5288 2 жыл бұрын
God bless you! you made my life easy!!!!!
@kengthe5949
@kengthe5949 4 жыл бұрын
the best explanation ever. Thank you!
@muhammadnaeem9855
@muhammadnaeem9855 5 жыл бұрын
Good to the the point lectures with such simplicity and examples... Amazing. may ALLAH bless you.
@BryceChudomelka
@BryceChudomelka 4 жыл бұрын
Hello Friends!
@arnoc.2107
@arnoc.2107 5 жыл бұрын
love the random stares into the camera like at 8:48 :P
@arindamroy7671
@arindamroy7671 6 жыл бұрын
A probable rectification - Since T(0) is never written as 0 as instructed by you in the previous video , T(0) in the execution depiction should be equal to 1not 0. So it should be 1+2+3+......+ n-1+n = n(n-1)/2 .
@lifethrownoutofthewindow
@lifethrownoutofthewindow 5 жыл бұрын
n(n+1)/2*
@sydneyballard6798
@sydneyballard6798 3 жыл бұрын
Ok king I see you with the Tommy Hilfiger on 😍
@Piyushchaurasia-j9c
@Piyushchaurasia-j9c 6 ай бұрын
best teacher ever
@shemsusultan7987
@shemsusultan7987 2 жыл бұрын
you are teaching in nice way
@DavidLopez-eb5km
@DavidLopez-eb5km 2 жыл бұрын
Nicely Explained Professor!
@AbdallahSayed-hp4hw
@AbdallahSayed-hp4hw Жыл бұрын
thank you very much you help me to understand this, you are a legend
@Dear422
@Dear422 Жыл бұрын
सर जब भी आपकी विडियो देखता हू| ऐसा लगता है जैसे ऑपरेटिंग सिस्टम की स्टैण्डर्ड बुक के राइटर गल्विन खुद सामने पढ़ा रहे हो| इतनी ऑथेंटिक लगती है आपकी विडियो बता नहीं सकते| किसी और की विडियो देखते है तो लगता है स्टैण्डर्ड बुक का रिफरेन्स लेके लोकल राइटर पढ़ा रहा है| वो भी अच्छे है जब आसानी से कोई चीज सीखनी हो पर आपकी विडियो का कंटेंट ऑथेंटिक लगता है|
@bhaskargg6018
@bhaskargg6018 4 жыл бұрын
Your explanation is crystal clear, thanks a lot Sir for sharing your knowledge
@SRNR_PODCAST.
@SRNR_PODCAST. 3 жыл бұрын
a gold mine in youtube
@wasay8105
@wasay8105 3 жыл бұрын
you're really good at teaching
@DenisGitonga
@DenisGitonga 2 жыл бұрын
Excellent Teacher...
@subramaniyanvg6367
@subramaniyanvg6367 4 жыл бұрын
Sir I watched this video today. I like the way you teach you cover math in algorithms that's the specialty. Now I understood why I learnt geometric series at school. Thank you sir.
@rahulsathyan5772
@rahulsathyan5772 6 жыл бұрын
Life Saver..... Thank you Sir.
@kayalvizhikalaichelvan5283
@kayalvizhikalaichelvan5283 4 жыл бұрын
Very Useful Series Sir. Thank you
@cmpala6838
@cmpala6838 6 жыл бұрын
Nice video continue you are the best
@tshd4B2ZNWS
@tshd4B2ZNWS 4 жыл бұрын
Finally found a video shows how to solve this stupid recurrence problem.
@shanealam3246
@shanealam3246 4 жыл бұрын
very useful lectures Thanks sir
@vakhariyajay2224
@vakhariyajay2224 2 жыл бұрын
Thank you very much. You are a genius.
@mariarex2799
@mariarex2799 Жыл бұрын
Nice explanation sir !
@ramjitiwari8910
@ramjitiwari8910 4 жыл бұрын
Nice 🌸🌻
@dg3577
@dg3577 2 жыл бұрын
fantastic explanation sir
@mohammedadel8948
@mohammedadel8948 2 жыл бұрын
Thank you for your efforts
@liamzhang5696
@liamzhang5696 4 жыл бұрын
This guy is unbeliviable
@JP-programming
@JP-programming 2 жыл бұрын
great job sir
@advikasingh739
@advikasingh739 2 жыл бұрын
thanks sir ur videos are so good really understood the concept
@edwintan4784
@edwintan4784 5 жыл бұрын
Excellent teaching
@y031962
@y031962 4 жыл бұрын
thank you so much for posting this and all you clips. I found them very useful.
@superwendel
@superwendel 5 жыл бұрын
Blessed Explanation !
@061moh.zaidkhan5
@061moh.zaidkhan5 3 жыл бұрын
Nicely explained
@Stoic_Cat_
@Stoic_Cat_ 5 жыл бұрын
Thank you so much sir you have helped me alot
@roshnisharma281
@roshnisharma281 6 жыл бұрын
Sir your lectures are very helpful for us. Thank you sir
@duchuynh9019
@duchuynh9019 6 жыл бұрын
Roshni sharma nhạc hen ha chenhacchepp
@begins-lm4kc
@begins-lm4kc 3 жыл бұрын
I was going thorough your video lecture only
@mdamiralam3792
@mdamiralam3792 3 жыл бұрын
awesome!!
@Insaanbansalman
@Insaanbansalman Жыл бұрын
Thanks Abdul Bari!
2.1.3 Recurrence Relation (T(n)= T(n-1) + log n) #3
12:25
Abdul Bari
Рет қаралды 737 М.
2.1.1 Recurrence Relation (T(n)= T(n-1) + 1) #1
13:48
Abdul Bari
Рет қаралды 1,8 МЛН
Do you love Blackpink?🖤🩷
00:23
Karina
Рет қаралды 22 МЛН
БУ, ИСПУГАЛСЯ?? #shorts
00:22
Паша Осадчий
Рет қаралды 3 МЛН
Turn Off the Vacum And Sit Back and Laugh 🤣
00:34
SKITSFUL
Рет қаралды 7 МЛН
Why is Python 150X slower than C?
10:45
Mehul - Codedamn
Рет қаралды 25 М.
Solved Recurrence - Iterative Substitution (Plug-and-chug) Method
9:08
Substitution Method to Solve Recurrence Relation of Time
15:13
Neso Academy
Рет қаралды 4,3 М.
2.1.4 Recurrence Relation T(n)=2 T(n-1)+1  #4
10:42
Abdul Bari
Рет қаралды 722 М.
2.2 Masters Theorem Decreasing Function
8:10
Abdul Bari
Рет қаралды 683 М.
8. NP-Hard and NP-Complete Problems
31:53
Abdul Bari
Рет қаралды 2 МЛН
Recursion Tree Method
32:41
Dr. Hasan Jamal
Рет қаралды 182 М.
The Backtracking Blueprint: The Legendary 3 Keys To Backtracking Algorithms
13:44
Do you love Blackpink?🖤🩷
00:23
Karina
Рет қаралды 22 МЛН