L-2.4: Recurrence Relation [ T(n)= 2T(n/2) +n] | Substitution Method | Algorithm

Поділитися
Вставка
  • Опубліковано 19 січ 2025

КОМЕНТАРІ • 157

  • @khushigandhi7322
    @khushigandhi7322 3 роки тому +73

    This channel needs more recognition and reach! Amazing work!

  • @AroojArmy
    @AroojArmy Рік тому +28

    sir u made a mistake on 3:39 when 2^2 is cancel by 2 how it is still 2^2 i mean the ans should be 2 just........................

    • @xenonudaykhandare2836
      @xenonudaykhandare2836 8 місяців тому +9

      bro multiply 2 with bracket... you will get 4T(T/4)+2n/2 and in next step take 4 as 2^2... got it..!!!

    • @Archana-j1w2f
      @Archana-j1w2f 7 місяців тому

      Thanks bhai​@@xenonudaykhandare2836

    • @Drakeagarwal
      @Drakeagarwal 4 місяці тому

      Bro you all are so dumb , 1st class child can understand that

    • @Micbutch
      @Micbutch 4 місяці тому

      @@xenonudaykhandare2836 thanks for solving this

  • @Smartcity3184
    @Smartcity3184 2 роки тому +11

    First for 2^2T( 2(n/2^3) ×n/4) +2n
    we need to multiply 4 × above whole bracket equation then we have the value of 2^3T((n/2^3)× 4n/4) +2n
    After divided 4n/4 we got n then add n +2n = 3n
    After that we have the equation
    2^3T(n/2^3)+3n

  • @akshayavbca6704
    @akshayavbca6704 2 роки тому +4

    honestly my savior , you're the best fam , you always keep things simple. love your videos keep doing 'em

  • @devpatel1298
    @devpatel1298 Рік тому +9

    Thanks sir,
    Aaj me phone leke gaya tha Exam hall me aur ye question aagaya 😂
    Course: B.E (IT Branch)

  • @PCCOERCoder
    @PCCOERCoder 19 годин тому +1

    Lecture successfully completed on 19/01/2025 🔥🔥

  • @mdtalhashaikh7650
    @mdtalhashaikh7650 2 роки тому +4

    love you sir, The way of your explanation is too good

  • @SAKSHIKUMARIP
    @SAKSHIKUMARIP 2 роки тому +5

    god bless you sir...most useful one!!!

  • @shaniabalkhi8065
    @shaniabalkhi8065 3 роки тому +3

    Awesome explanation! You just gained another subscriber!

  • @DineshSingh-hx5kw
    @DineshSingh-hx5kw 3 роки тому +5

    Owsm sir...keep doing this we extremely need this❣

  • @aamirdehngal2280
    @aamirdehngal2280 3 роки тому +4

    Bhai Allah aapku himmat de 6 lakh sus.but 8 hours views only 800 ❤️❤️❤️

  • @amaanullah13
    @amaanullah13 3 роки тому +1

    Sir bhot Bdhya samjhaya aapne
    Glad that I found this channel before time.

  • @tanzidfardin5946
    @tanzidfardin5946 11 місяців тому

    Nah man U deserve love. really grateful my frnd u just made it simple

  • @silverfanggaming3318
    @silverfanggaming3318 4 місяці тому

    You are life saver sir...🫡 College exam k end time pe aap ki videos he kam aate hai. You are Life saver for all engineering community. Thank you sir.🫡🫡🫡🫡🫡

  • @067-subhannitasaha8
    @067-subhannitasaha8 2 роки тому +55

    Hi VARUN SIR !
    HOPE YOU ARE DOING GREAT 😃
    I have one confusion if
    = 2 ( 2T (n/4) + n/2 ) + n [ IN THIS STEP HOW YOU HAVE CUTTED THE VALUE 2 OF n/2 and the outer 2 ( i.e. outside the bracket )
    = 2^2T ( n/2^2 + n/2 + n)
    = 2^2T ( n/2^2 + 2n )
    HOW IS THIS POSSIBLE BEACAUSE YOU ALREADY CUTTED THE VALUE 2 FROM THE FIRST LINE I HAVE MENTIONED... PLEASE CLEAR OUT THIS DOUBT

    • @travelwithme4128
      @travelwithme4128 2 роки тому +3

      He did Right check you again , he just multiply 2*n/2 and here 2 is cancle out

    • @sahilmusicsss
      @sahilmusicsss Рік тому +1

      same ques

    • @raksharthjangid7506
      @raksharthjangid7506 Рік тому +14

      the first 2 is multiplied individually inside the bracket. [ 2(2T(n/4)) ] + [ 2*n/2 ]

    • @jeetmallick508
      @jeetmallick508 Рік тому +2

      Bhai mereko bhi ye doubt hua tha. Dobara uss line ka calculation karo individually. Hojaeyga.

    • @sjsjdfe3332
      @sjsjdfe3332 Рік тому

      I also had this doubt

  • @nabilmalik5042
    @nabilmalik5042 2 роки тому +17

    Dear teacher,
    I wish you a happy teacher's day. Thank you for being the guide and for inspiring me to do well in my studies. You are the best teacher
    HApPy tEaCheR'$ dAy

  • @empathetic24671
    @empathetic24671 2 роки тому +2

    Very well explained. Mujhe yeh video lagatar 3 baar dekhne pada par mera concept clear ho gaaya. Thank you very much sir!

  • @romanasalim5335
    @romanasalim5335 2 роки тому +14

    So what is the difference between iterative and substitution method in this qtn sir?

  • @AbhiShek.PandwaR
    @AbhiShek.PandwaR 3 роки тому +5

    Great Explanation 😊😊
    Keep it up ❤️💙

  • @Abc-dk8cl
    @Abc-dk8cl Рік тому

    Sir good work 👏.
    Achi Tara samajh ahi ha..

  • @akashpb4179
    @akashpb4179 3 роки тому +13

    Srji apney college ke prof se zyada toh idhar acha samajh aa rha hai ... koi bhi stepwise explain nahi karta itna clearly kahi bhi

    • @meetshah9510
      @meetshah9510 Рік тому +1

      Beta Dil se padhate he iss liye padho padho

  • @amitgoswami7856
    @amitgoswami7856 3 роки тому +10

    Sir congratulations to complete 6lakh subscriber

  • @world_of_programming9653
    @world_of_programming9653 3 роки тому +71

    Sir how we cancel outer 2 with inner n/2 in 1st two equ's substitution. Coz outer 2 multiplied by all values.

  • @jyeshnupaturi9784
    @jyeshnupaturi9784 Рік тому +1

    You are amazing!! Btw it will be great if you could include step count method, tabular method for calculating time complexity of an algorithm and also PRAM algorithms, string matching algorithms too

  • @dressbydeen
    @dressbydeen 8 місяців тому

    The way sir says subscribe bahut zaroori hai
    Hits hard more than time complexity 2 ki power n

  • @kaushikpubg5387
    @kaushikpubg5387 2 роки тому +1

    Sir your explanation and you both are outstanding

  • @Shinchangirl65
    @Shinchangirl65 7 місяців тому

    you're taking it in complicated way my college teacher explains it in very simple and easy way

  • @zeeshanfarooq4204
    @zeeshanfarooq4204 3 роки тому +1

    Congo sir 600k
    Love from pak ❤️

  • @takshakno7737
    @takshakno7737 Рік тому +1

    sir just a doubt , why do we always take log both side always , i never understood this , 7:29 plz reply fast ...

  • @InformationRealistic_str
    @InformationRealistic_str 9 місяців тому +1

    sir i am facing difficulty in substitution method and iterative method because the method that u use is same as our teacher taught in iterative method . so what is main difference between them can you help me

  • @shwetankjoshi3011
    @shwetankjoshi3011 2 роки тому

    Every one make sure u like every one of sir's vdo other wise u will forget this in ur exam

  • @SunTzuTzu-xr9jv
    @SunTzuTzu-xr9jv 9 місяців тому

    Sir, English version of your Lectures. Very great content ❤❤❤❤❤❤❤❤❤❤❤❤❤❤

  • @KHALDANASREEN-uf7bl
    @KHALDANASREEN-uf7bl Рік тому

    you are very very very good teacher 😊and looking like 😍😎❤

  • @ishitapaneru5023
    @ishitapaneru5023 2 роки тому +2

    Thank you so much sir 💗☺️

  • @Harpreetkaur-fd5fu
    @Harpreetkaur-fd5fu 3 роки тому +1

    Happy Teacher's day sir
    🙏✨💫

  • @vikrantprashantgurav9811
    @vikrantprashantgurav9811 2 роки тому

    Sir you are an absolute legend

  • @ihsankhattakofficial154
    @ihsankhattakofficial154 Рік тому

    Best Teacher ever.

  • @ashokrajpurohit3671
    @ashokrajpurohit3671 3 роки тому +1

    Acha smjate ho🔥

  • @moonedCake
    @moonedCake 3 роки тому +5

    Love the explanation ❤ No doubt you are a great teacher 🙏🏼
    But, Lord knows who edits these videos! Reminding every other minute "subscribing" the channel is so annoying.

  • @AnjuKumari-ft6qk
    @AnjuKumari-ft6qk 2 роки тому

    Awesome explanation

  • @afrinmomin9594
    @afrinmomin9594 2 роки тому +1

    Hello Sir, Answer is T(n)=n+nlogn then how it become O(nlogn). It should be Ω(nlogn), isnt'it?

  • @maheshupadhyay008
    @maheshupadhyay008 3 місяці тому

    We are multiply by 2 on both equation sir ne jo karaya hai vo sahi h

  • @hrishidev742rdx
    @hrishidev742rdx 4 місяці тому +2

    how 2^2T is possible if you cut n/2 by outside 2 then their is only one 2 is left. If you multiply both then 2^2 is ok but you cut it.

  • @Tyro3D
    @Tyro3D Місяць тому

    Sir ye iteration method h ya substitution kyuki mko ye iteration bataya gaya h

  • @snehadhulap5377
    @snehadhulap5377 3 роки тому +1

    Sir muzhe mathematical induction and recursion ka lec chaiye tha ..video send kro na ap

  • @Dimpledurgathenepalli
    @Dimpledurgathenepalli 4 місяці тому

    In 3:28 if we write 2 square there, then how can we cancel the above 2 with 2 in n/2 in 3:37

  • @anjalichoudhary5642
    @anjalichoudhary5642 Місяць тому

    can we apply the Master Theorem to analyze the recurrence relation?
    T(n)=2T(n/2)+n I am getting trouble, Please help

  • @zainwasem
    @zainwasem Рік тому

    Insane so good❤

  • @oreki019
    @oreki019 17 днів тому

    Needs more explanation step wise solution
    I couldn't understand where what we assumed or guessed to solve it

  • @MehndiDesignCollections
    @MehndiDesignCollections 3 роки тому +1

    Sir computer vacancy ke preparation hoge kya

  • @rajarshimandal3235
    @rajarshimandal3235 3 роки тому +5

    Missing the old board😌

  • @audiozen2910
    @audiozen2910 5 місяців тому

    i have a doubt :
    on 3rd line of answer we eliminated the outside 2 with n/2 then how come on fourth line we have 2^2

  • @sreepornasikdarsikdar6184
    @sreepornasikdarsikdar6184 7 місяців тому

    I think there is some mistake in the solution..if you are cancelling outer 2 with n/2 then how again you got that 2^2 ?

  • @kalashsoni5072
    @kalashsoni5072 4 місяці тому

    sir aap hi engg ki naiyaa paar lagaoge 🤩

  • @SaifUllahArshad-os8qu
    @SaifUllahArshad-os8qu 7 місяців тому

    hats of ustad g 🫡💯

  • @sobiarani2359
    @sobiarani2359 Рік тому

    Great sr

  • @hisham6899
    @hisham6899 Рік тому

    if you made these videos in english, it will be a great help to south indians who doesnt understand hindi.

  • @aartimashram6859
    @aartimashram6859 2 роки тому

    Thanku sir❣️

  • @mamtadhalla2718
    @mamtadhalla2718 2 роки тому

    sir pls explain recurrence relation by iteration of second order equation

  • @aryanbatra5335
    @aryanbatra5335 3 роки тому

    HAPPY TEACHERS DAY SIR!

  • @talhariazx786
    @talhariazx786 2 роки тому

    there is a mistake in the step where you cut 2*2 by 4

  • @aneesshahzad3082
    @aneesshahzad3082 Рік тому

    2 ( 2T (n/4) + n/2 ) + n [ IN THIS STEP YOU MULTIPLY 2( 2T (n/4) + n/2 ) SO [2^2T(n/4)+2^(n/2)] + n [NOW IN THIS STEP CUTTED THE VALUE OF 2 IN THE FOLLOW EQ 2^(n/2) AND THE FINAL RESULTS OF THE GIVEN STEP IS 2^2T(n/2^2) +n+n => 2^2T(n/2^2) + 2n

    • @mummykdhaba
      @mummykdhaba Рік тому

      2 ki multiple kar di andar n se toh 2n upon 2 hogya fir 2 cancel hogya bacha n +n

  • @sushankbais4702
    @sushankbais4702 Рік тому +1

    LORD SPOTTED 🛐🗿

  • @amanjain0842
    @amanjain0842 2 роки тому +1

    if i do this same question using Master method then the answer is O(n) . why ?

  • @ashni4932
    @ashni4932 Рік тому

    Sir please do videos in english also 🙏

  • @Alan_christo
    @Alan_christo 2 роки тому

    Thank you sir

  • @souvikbasak4396
    @souvikbasak4396 Рік тому

    This relation is of which sort technique?

  • @SILENT_4_M_6551
    @SILENT_4_M_6551 3 роки тому +1

    Sir please upload AI and ML playlist
    Please 🙏🙏🙏

  • @LokeshKumar-jg8md
    @LokeshKumar-jg8md 10 місяців тому

    Can we call this as iteration method??

  • @Nuur_Rajput
    @Nuur_Rajput 2 роки тому

    How can i solve T(n)=T(n/4)+T(n/2)+n² using recursion tree method

  • @teekshanheeragcet--
    @teekshanheeragcet-- 3 роки тому +1

    ye n/2k kaise =1 daal skte ho marzi se

  • @aakanshasoy3921
    @aakanshasoy3921 4 дні тому

    2 ke power me squre kese aya ?

  • @sahilpatil5445
    @sahilpatil5445 Рік тому

    1:00 aur device is suscribe kara doo...Chad moment 😎😂

  • @anjalicharak2023
    @anjalicharak2023 2 роки тому +1

    How can u divide 2 and n/2

  • @AnimeBoy12377
    @AnimeBoy12377 2 роки тому

    Sir agar n ke badle cn raha ga to kuch change ho ga kya

  • @archanaverma3344
    @archanaverma3344 3 роки тому

    Tq so much sir

  • @s.maazullah376
    @s.maazullah376 11 місяців тому

    there's a mistake, where's the extra 2 coming from

  • @Lokesh_yadav__
    @Lokesh_yadav__ 2 роки тому +1

    Finally digital board😌

  • @janhaviraj5924
    @janhaviraj5924 6 місяців тому

    2 square kaise aaya?

  • @bunty_98technical4
    @bunty_98technical4 3 роки тому +1

    2-way Merge Sort ka recursive equation

  • @scorpionkingcr4523
    @scorpionkingcr4523 3 роки тому +3

    Sir can you please make a video on following equation. 8T(n/2)+n^2 here T(1)=1. Plz sir after 15 days I have exams and this question is important 🙏

  • @malikahsan4053
    @malikahsan4053 4 місяці тому

    Sir log ki base u hi nai ati es ye ati ha jab log n ko log 2 se divide krtey han tab ati ha Verna normally 10 hi hoti ha😁🤪

  • @radhamadhabpanda941
    @radhamadhabpanda941 Рік тому

    Sir 2 square kahna se aya uspe

  • @egames1877
    @egames1877 2 роки тому

    yra equation kay numbers peh circle to karo sara time us peh stuck rha

  • @saifahmed9152
    @saifahmed9152 3 роки тому +1

    bhai shuru ki beat ka link bhej de, rap karna hai uspe

  • @anjalicharak2023
    @anjalicharak2023 2 роки тому

    Where did T go in 4th step

  • @albatablays24
    @albatablays24 3 роки тому

    yeh 2 square or 2 cube khn se aarha hy?

  • @basanghimire8119
    @basanghimire8119 Рік тому

    Is this Iteration Method?

    • @umairbhai4257
      @umairbhai4257 Рік тому

      Yr batao yeh iteration ha I am also confuse

  • @anjalicharak2023
    @anjalicharak2023 2 роки тому

    And where didn T go

  • @saadbinghaffar2269
    @saadbinghaffar2269 2 роки тому

    can anyone plese tell where these n^2 and n^3 are coming from plz

  • @vinaykumar-ud7rh
    @vinaykumar-ud7rh 3 роки тому

    sir 2 ko bracket open kr ke 2t se multiply kr raha ha fir n\2 se usko cancel kasa kr raha ho

    • @rutikpatil6758
      @rutikpatil6758 3 роки тому +5

      By bodmas first solve bracket you have to first multiple 2T by 2 so that it became 2 [4T (n/4) + n] /2 this how it is cut outer 2 by deninometer 2
      2 [ 2T (n/4) + n/2] + n
      2 [ 4T (n/4) +n ] / 2 + n

  • @himankgaming7555
    @himankgaming7555 Рік тому

    that was the time complexity for merge sort

  • @NITESHKUMAR-sp6qj
    @NITESHKUMAR-sp6qj 7 місяців тому

    sir 2 sqaure kaise hua isme

  • @azmeerasai2005
    @azmeerasai2005 Рік тому

    By solving this question you did back substitution method wrong check it once.

  • @anshul8415
    @anshul8415 5 місяців тому

    For k time it become T(n/2^k + kn) 🧠

  • @jies933
    @jies933 2 роки тому

    Best

  • @rukshanaaly7794
    @rukshanaaly7794 2 роки тому

    I wish there is english subtitles for this sir :(

  • @Rinal-fv8ty
    @Rinal-fv8ty 3 місяці тому

    if anyone can solve it for T(n) = T (n/2) + n. It would be great.

  • @smrpkrl
    @smrpkrl 9 місяців тому

    3:13

  • @soumikadey8260
    @soumikadey8260 5 місяців тому

    ❤🔥