4.6 Optimal Binary Search Tree (Successful Search Only) - Dynamic Programming

Поділитися
Вставка
  • Опубліковано 26 вер 2024
  • This problem is a partial, considering only successful search.
    What is Binary Search Tree?
    What is Optimal Binary Search Tree?
    How to create Optimal Binary Search Tree by applying Dynamic Programming
    PATREON : www.patreon.co...
    Courses on Udemy
    ================
    Java Programming
    www.udemy.com/...
    Data Structures using C and C++
    www.udemy.com/...
    C++ Programming
    www.udemy.com/...

КОМЕНТАРІ • 428

  • @raiakil
    @raiakil 5 років тому +437

    Abdul Sir, I work for Microsoft in Redmond Seattle. I have 15 years industry experience, but I have never seen such crisp explanation of DP. Chained Matrix mult and this one with OST, is one of the best explanation videos on UA-cam ever,

    • @Akaash449
      @Akaash449 2 роки тому +10

      Hi , I am Saptarshi Rudra from India. I have a passion for working at Microsoft and a good grasp over DS and Algo and years of Software Development experience. I would really love if someone like you recommend me for a Software Developer / Engineer position. I have applied for these positions for the past 2 months, but yet to receive any call. So I would be extremely grateful if you recommend me.
      My full name is Saptarshi Rudra.
      Thanks.

    • @ArvindKumar-fv6mv
      @ArvindKumar-fv6mv 2 роки тому +15

      @@Akaash449 waste of time bro he might have changed his mail I'd so only no response

    • @anubhavpandey7682
      @anubhavpandey7682 Рік тому +3

      he told the formula to fill the table after filling the table..all the time i was thinking how he is filling.....so how can you say this is best......

    • @atharvameher5880
      @atharvameher5880 Рік тому +4

      @@Akaash449 Why do people wanna work in foreign I don't get it? You guys don't like it here? Proximity to family and friends don't matter to you?

    • @Akaash449
      @Akaash449 Рік тому +3

      @@atharvameher5880 please inform yourself before rashly posting a comment. Microsoft, Google and Amazon have local offices in the country in many states. Where is even your statement coming from!!

  • @eddiesengola4491
    @eddiesengola4491 6 років тому +310

    You can see. He teaches with love, reveals everything that needs to be mastered. Thanks Abdul. You are the best.

  • @rb_honest
    @rb_honest Рік тому +47

    Thank you, Sir 🙏

    • @abdul_bari
      @abdul_bari  Рік тому +74

      Dear, check the amount once. I think, it’s by mistake.

    • @Bitofmeforyou
      @Bitofmeforyou 9 днів тому +2

      Bro?? 8900?? Was it by mistake or what?👀

  • @RoyalEXO_
    @RoyalEXO_ 5 років тому +23

    You are a life saver, sir! Honestly, you make this subject look so easy and fun! Hooked.

  • @anasjamal7206
    @anasjamal7206 2 роки тому +30

    It's relatively impossible to not understand what you convey . You are a legend ❤️.
    For all concepts in DAA i watch your videos .
    First time when I watched your video on this concept i couldn't understand as I was bit hurried due to upcoming test in an hour .😁😁
    But now here I am again for the second time , watching this concept and understanding it properly .
    Note : for those of you who don't understand Abdul Bari sir , maybe you need to be relaxed and give some time to the video without any hurry . This is specially for those who come here an hour before exam 😂.

  • @paulz_san
    @paulz_san 6 років тому +295

    How many engineers out here, give a like.

  • @chitnat
    @chitnat 5 місяців тому +2

    For the recurrence relation, it would be more appropriate to write C[i, j] (for i < j) as the min {C[i, k-1] + C[k+1, j]} + w(i, j) where i

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

    tomorrow is my viva and i am here that makes u life saver thankuh so much sir

  • @coolone5561
    @coolone5561 3 місяці тому +1

    Abdul Sir, I am a 5 year experienced Software Engineer. I have Google interview coming up on June 10th. So I started watching your algorithm videos and reached this lecture. Although I found this playlist very late after referring to a number of resources, your videos are very effective and easy to understand..

    • @helvosthecreator1920
      @helvosthecreator1920 2 місяці тому

      How did you do?

    • @coolone5561
      @coolone5561 2 місяці тому

      The technical rounds went well. The process is not complete yet. I will share the result soon.

    • @helvosthecreator1920
      @helvosthecreator1920 2 місяці тому

      @@coolone5561 I hope you get it, good luck! 🍀💪

    • @harshitha.m.4189
      @harshitha.m.4189 13 днів тому

      @@coolone5561 how is it going its been 2 months

  • @piyushverma826
    @piyushverma826 Рік тому +7

    i never hated any subject until i encountered Design and analysis of algorithms. also my university prof who makes the ppr so difficult and calculative.

  • @HimanshuSharma-us1gz
    @HimanshuSharma-us1gz 5 років тому +11

    Sir I am from GGSIPU (Delhi), Today i hava ADA exam and I prepared only your videos, and kudos to your playlist thanku so much!

    • @ankushgarg2188
      @ankushgarg2188 5 років тому +2

      Kesa gya bhai ?

    • @HimanshuSharma-us1gz
      @HimanshuSharma-us1gz 5 років тому +1

      @@ankushgarg2188 Rula diya yaar, difficult exam aaya tha!

    • @HimanshuSharma-us1gz
      @HimanshuSharma-us1gz 5 років тому +1

      @@abdul_bari Sir 100%, these videos contains even more, thanks sir for replying, you are legend, and god for us!

    • @naziyafirdoussayyed8491
      @naziyafirdoussayyed8491 5 років тому +1

      @@abdul_bari Sir...ur videos are very helpful 😇 ur way of teaching, deep knowledge of the this subject 👏
      Lots of love and huge respect 😇
      From🇮🇳

  • @hassansyed5661
    @hassansyed5661 5 років тому +14

    You are a wonderful teacher. Thank you, so much for helping me to understand these concepts in an easy way.

  • @jaatharsh
    @jaatharsh 4 роки тому +10

    Abdul Bari Sir (love) for ur passion to teach us, with every new video you raise the bar even higher,
    I cannot thank you enough for this, hope u always stay healthy & wealthy :)

  • @Diana-np5so
    @Diana-np5so 3 роки тому +5

    such an amazing explanation of optimal binary search trees!!! thank you so much for making this video!

  • @softwareengineer8923
    @softwareengineer8923 Рік тому +6

    In 6:35 it was actually 22.Also thanks for a great video!

  • @fahadshajahan2554
    @fahadshajahan2554 4 місяці тому +6

    Hemanth on fire 🔥🔥🔥

  • @lokeshagarwal6701
    @lokeshagarwal6701 5 років тому +32

    The video is like explaining the steps involved but i need the reason behind why we are doing ot in that way?

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

    Great video so easy to understand , clear pronunciation and clear handwriting

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

    You just saved my life in a Data Structure exam, thaks very much 😍😍😍

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

    Wt a teaching sir..... Really no one can say like u sir..... With out disturbance....super sirrr

  • @sandeepkumar-ty3kt
    @sandeepkumar-ty3kt 4 роки тому +15

    Formula = c[I,j]={c[I,k]+c[k+1,j]+weight}
    Where k values are
    C[0,3] then k values are 0,1,2
    Then I=0 and j=3
    Substitute the values
    C[0,0]+C[1,3]+12
    Hope it helps

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

      Why did u only took k=0,but k can be 1,2 also??

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

      @@naveen_kotha That was just a part of that example. Yes k can also be 1 and 2

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

      Thanks for formula

  • @gabrielmachado146
    @gabrielmachado146 6 років тому +20

    Sir, I have to thank you a lot for saving me. Great content and explanation! Please keep up the good work!

  • @knoName5691
    @knoName5691 6 років тому +10

    I have gone through few video lectures of ur's sir..Very qualitative, easily understandable..
    Thank you.. :-)
    Playlist is matching VTU syllabus..

    • @knoName5691
      @knoName5691 6 років тому +4

      +Abdul Bari Yeah sir.. Visvesvaraya Technological University..
      Exams for my students will be in Jun-Jul

  • @aradhyajain9575
    @aradhyajain9575 6 років тому +9

    @14:45 how are you getting the values using formula.....and also please tell how u calculated it in brief? Sir.....thank you.....I am finding it very difficult to understand this part.

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

      same problem

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

      if any one knows pls replay

  • @yichizhang973
    @yichizhang973 5 років тому +2

    Your explanation is great, but I was kind of confused about the 9:05, when you conduct j-i, I do not understand the meaning of j-i, and the meaning of l, what that expression stands for? and why we use 1 represent 10, 2 represent 20 and so on, if we use 4 represent 10 ,it is a different story.

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

    @7:46 when he said: this is the optimal binary search tree! I made dua for this teacher.

  • @hrushikeshvazurkar
    @hrushikeshvazurkar 4 роки тому +4

    Thank you Sir for the video. The effort you put in making these videos is really commendable.

  • @ChandanG94805
    @ChandanG94805 5 місяців тому +14

    I did'nt Understand this really

  • @ImSoumenMukherjee
    @ImSoumenMukherjee 5 років тому +52

    6:32 How it came 18?? It will be 22.. Right?

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

    why 2nCn / n + 1 = 5? Please help

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

      It's (2n)Cn/(n+1) or (2n)!/(n!*(n+1)! and you get 6C3/4 = 5

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

      ​@@recensionemthanks!!

  • @manasakuncham4547
    @manasakuncham4547 6 років тому +5

    sir,could you explain how to generate a tree from the data at the end?

  • @charmingpetal
    @charmingpetal 3 місяці тому +1

    14:45 top moment, thank you

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

    Sir you have explained the concepts so well.

  • @gogroot9745
    @gogroot9745 5 років тому +1

    Please clarify my query..
    1. when j-i =1 -> Here we calculated the cost for all the 4 keys (10, 20, 30 40)
    2. when j-i =2 -> Why do we only take these 3 combination (10, 20) (20, 30) (30, 40) only ??
    3. As we already know to select 2 keys out for keys is 4C2 => 6
    4. So why we dont consider (10, 40) (10, 30) (20 40)
    5. |||y for 3 pairs and so on ??
    Could you please clarify this point .. ?? Thanks in Advance..

  • @techstudio9802
    @techstudio9802 5 років тому +7

    how you have chosen the child of r(0,4) are r(0,2) and r(3,4). plz explain

    • @aayushkumar5361
      @aayushkumar5361 5 років тому +6

      because as the matrix he created , the root for r(0,4) is 3...thus, k =3 here...
      so the child will become for c[i,j] ---> c[i,k-1] and c[k,j]

    • @abhirajsingh7005
      @abhirajsingh7005 4 роки тому +1

      @@aayushkumar5361 thanks dude, saved my time!!!

  • @donavarghese6273
    @donavarghese6273 5 років тому +10

    wonderfully taught.
    but u should have explained formula in the start and not revealed it at the end.
    that wud have made it better

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

      Totally agree, had me scratching my head the whole time.

  • @karthikadharmaraj1557
    @karthikadharmaraj1557 6 років тому +2

    I like ur way of teaching... Ur teaching is very clear sir about the topic

  • @souravseal7262
    @souravseal7262 5 років тому +4

    a quick shortcut for exam or observation just add the corresponding element from the row and column u are supposed to find....
    for example u want to find
    c[0,3]=(0,0)+(3,1),(0,1)+(3,2),(0,2)+(3,3) hope u found the pattern...

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

    Thank you sir it's a very understandable example 🙏🙏

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

    A very good explanation. Thank you.

  • @sashankyakkali3029
    @sashankyakkali3029 6 років тому +1

    ur videos r great sir...thank u for saving us...gitam students love u a lot

  • @AmanSharma-me7ho
    @AmanSharma-me7ho 5 років тому +2

    Sir's explanation is great, i just love his explaining techniques.

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

    just wow! it was great...

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

    ABDUL BARI I LOVE YOU SO MUCH

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

    For this to work keys should be in sorted order or not?

  • @Dhanunjayp-fz5cj
    @Dhanunjayp-fz5cj 5 років тому +6

    6:32 answer is by adding the values 22

  • @berylbose7006
    @berylbose7006 6 років тому +2

    Hi Sir,
    Really Informative, great use of examples . I am able to grasp the content so well..
    Just a quick suggestion, could you also device the algorithm or pseudo-code at the end, to help us get a more generalized view on solving the problem.

    • @berylbose7006
      @berylbose7006 6 років тому

      Maybe next time. Or Sir u can add like a Part-2 for this video

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

    We love you ❤😊, sir

  • @aradhyajain9575
    @aradhyajain9575 6 років тому +1

    Sir, why are we adding the weight of all the keys in the formula?.....How is it related to the formula and the BST if we consider 2 nodes BST or 3 nodes BST?

    • @VincePetRok
      @VincePetRok 6 років тому

      Since you aren't considering the "zeroth" level when you split the tree into left and right subtrees (C[i, k-1] on the left and C[k, j] on the right), you need to add the frequency for each node at the end.

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

    Thank you sir, for your great explanation. 🙏🙏

  • @dr.vinodkumarchauhan3454
    @dr.vinodkumarchauhan3454 6 років тому +1

    Sir, first of all, thank you very much for the wonderful content.
    Sir, it looks like you have not covered some contents from Algorithms, which is generally part of the syllabus. So I request you to cover the following contents also:
    Lower-Bound Theory:
    Introduction to Algebraic problems, Introduction to lower bounds, Comparison Trees,Techniques for Algebraic problems, Some Lower Bounds on Parallel Computation

  • @syedmahasibali2324
    @syedmahasibali2324 5 років тому

    It's some what difficult problem to solve but this video made it easy for implementing

  • @ritviknurchal5993
    @ritviknurchal5993 5 років тому +1

    sir the first one for frequenct check the count would be 22 not 18

  • @aniketnangare904
    @aniketnangare904 10 місяців тому

    Your teaching is great sir

  • @MOHIT-rg8ge
    @MOHIT-rg8ge 2 роки тому +1

    This is great video but in this video 6: 29 part of video is some mistake cost of 1st tree is 22 due to given frequency but you write 18

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

    Sir which ide you use for coding?

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

    Thank you very much. You are a genius. 👍👍🔝🔝🙏🙏👌👌

  • @cipherwills7877
    @cipherwills7877 6 років тому +2

    You are truly a saviour,
    Tysm.

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

    I observe one thing in the above problem that consider the frequencies in descending order and then form binary search tree. We get answer(you need cost then find the cost from tree)

  • @souravkalal3831
    @souravkalal3831 4 роки тому +1

    13:30...Formula is C[i,j]=C[i,k-1]+C[k,j]+w[i,j]... i and j value and weight.. u know..now value of K..😆😆
    For value of k.
    10 is 1st so key no. of 10 is..k=1...
    20 is 2nd so key no. of 20 is.k=2..
    30 is 3rd so key no of 30 is..k=3..
    40 is 4th so key no of 40 is k=4..
    ..Now to select k ..u have to take root node key no..if ur root node is 10 then k=1..if ur root node is 20 then k=2..so on..
    C[0,2] that first 2 numbers..
    10 and 20..
    C[i,j]=C[i,k-1]+C[k,j]+w[i,j]
    FOR 10..K=1..
    C[0,2]={C[0,0]+c[1,2]}+w[0,2]
    =0+2+4+2
    =8
    FOR 20..K=2..
    C[0,2]=C[0,1]+C[2,2]+w[i,j]
    =4+0+4+2
    =10..
    U know which one to select :)

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

    If you are a faculty in our college we always rock in the exams Your lectures are Superb sir 👏👏👏👏👏👏👏🙏🙏🙏🙏

  • @shubhamgupta5708
    @shubhamgupta5708 4 роки тому +1

    Thank you sir

  • @sanketsultan2348
    @sanketsultan2348 5 років тому +4

    sir how you take r(0,2),r(3,4) as child of 3?

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

      yes sir, why did we do that?! Please answer ASAP. I have test tom for this!!!!!!!!!!!!!

  • @yifanwu5277
    @yifanwu5277 5 років тому +2

    great video! Explain things so well!

  • @pradipnitw
    @pradipnitw 6 років тому +10

    this video is little confusing to me. it is not clear to me , how are we getting the formulas.
    But as an alternate solution, we could have sorted the input as per the frequency and then inserted one by one into a BST ?

    • @jeyanthileela1727
      @jeyanthileela1727 6 років тому +1

      pradip biswas i got same prblm little bit confusion how to make formula 😇

    • @AJEETKUMAR-im3qi
      @AJEETKUMAR-im3qi 6 років тому +1

      its not clear through video without formula ..... it might better if you wrote that before applying

  • @DeepteshLovesTECH
    @DeepteshLovesTECH 6 років тому

    Excuse sir! First of all great explanation but I didn't understand the last part where you construct the tree. I'm unable to understand the way you are diving the branches.

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

    Sir, why should we multipy number of comparisons with frequency🤔?

  • @Rakeshrajeev94
    @Rakeshrajeev94 6 років тому +3

    Sir, Thank you so much for the video. Best explanation I have seen. Expecting more videos.

  • @yamunahanumanthu6254
    @yamunahanumanthu6254 5 років тому +1

    Thank u so much sir. How c(0,0) in the first step i didn't understand

  • @sreekarshesham1505
    @sreekarshesham1505 5 років тому +3

    how come 15+3+4=18 iy is 22 right????

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

    Big Thanks sir ......you are awesome.

  • @harekrishnamahto6512
    @harekrishnamahto6512 6 років тому +1

    I want to salute u sir for your efforts in making such amazing videos. It made all my concepts clear. Thank you sir

  • @GoodMorning-bv6rf
    @GoodMorning-bv6rf 3 місяці тому +1

    Can anyone explain from 27:45
    How he created the tree

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

    Thank u sir but if you check the calculation problem on this 6:29

  • @girrajjangid4681
    @girrajjangid4681 Рік тому +3

    We can also directly generate tree by taking max frequency key as an root.

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

      Does this work all the time?
      Btw tq for that, 😅

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

    you are just showing the method, but not why it is done so..

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

    Why we are following the hectic process if we insert them in a tree according to their frequency value then the result will be same like you are solving it with the formula

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

    Your teaching is extremely awesome❤️ but I didn't understand how you split r[0,4] as r[0,2] and r[3,4] while writing tree

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

      Me too same doubt if u understood let me know

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

      @@girijayk811 even I didn't understand properly but what I thought was 26 was least ryt how did you get 26 it's by adding C[0,2] + C[3,4] + 15 therefore we will split r[0,4] as r[0,2] and r[3,4] and again we will split r[0,2] on the same basis..check what is the least number in r[0,2] then split those two... I tried my best to make you to understand 😃 if you still don't understand feel free to ask 😊

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

      @@girijayk811 [0,4] means the keys which we take are 10,20,30,40 and when we draw trees for these keys we get different trees having root 10,20,30,40 so when we split c[0,4] to c[0,2],c[3,4] it is representing the trees which are having 30(whose frequency is 3) as root.

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

    Very good teaching 😊

  • @Hari-fb4dw
    @Hari-fb4dw 5 місяців тому

    c[i,j]=min{c[i,k-1]+c[k,j]+w[i,j]} where k=i+1 to j and w=sum of frequencies

  • @oppalinfo
    @oppalinfo 6 років тому

    f(n) = 16n3 +10 n log n and g(n) = 8758 n2 log n + 9248 n2
    Sir, which function has greater value f(n) or g(n)

  • @meimei1572
    @meimei1572 4 роки тому +7

    I would've given up my final exams if you were not here.

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

    The video discusses the concept of an optimal binary search tree, where the keys have different search frequencies. The dynamic programming approach is used to find the optimal tree organization that minimizes the total search cost.
    Key moments:
    00:00 Binary search trees are efficient for searching keys with a time complexity of log n. Different binary search trees can be formed for a given set of keys, impacting the search cost.
    -Binary search trees provide efficient key searching with a time complexity of log n, based on the tree height.
    -Different binary search trees can be formed for a set of keys, affecting the number of comparisons needed for key search, leading to a balanced binary search tree.
    -Optimal binary search trees consider the frequency of key searches, prioritizing more frequently searched keys, impacting the overall search efficiency.
    06:04 The video discusses optimizing binary search trees based on key frequencies. Dynamic programming is used to find the optimal organization for keys with different frequencies.
    -Explanation of how to determine the optimal binary search tree organization based on key frequencies using dynamic programming.
    -Detailed step-by-step process of filling values in a table to calculate the cost of different binary search tree organizations.
    12:43 The video explains a process of finding the minimum cost of forming a binary search tree using dynamic programming and frequency values. It demonstrates selecting keys, calculating costs, and determining the optimal arrangement of keys.
    -Demonstrating the calculation of costs and comparisons for different key selections in forming a binary search tree.
    -Exploring the process of selecting keys and frequencies to determine the optimal arrangement for minimizing the cost of the binary search tree.
    -Illustrating the expansion of the process to consider three keys at a time to further optimize the arrangement and minimize the cost of the binary search tree.
    19:18 The video discusses the concept of finding the optimal cost of a binary search tree using a formula based on frequencies and weights of keys. It demonstrates the calculation process step by step.
    -Calculation of optimal cost for different key possibilities using a formula based on frequencies and weights.
    -Determining the root key for optimal cost calculation and selecting the minimum cost among different possibilities.
    -Expanding the analysis to consider more keys and calculating the optimal cost for a larger set of keys in a binary search tree.
    27:40 The video explains the concept of an optimal binary search tree using a formula to minimize the cost of searching based on frequency. It demonstrates how to apply the formula for optimal tree construction.
    -Explanation of the concept of an optimal binary search tree and its importance in minimizing search costs based on frequency of search.
    -Demonstration of the formula for constructing an optimal binary search tree to minimize search costs and how to apply it effectively.

  • @thepinkcodon
    @thepinkcodon 4 роки тому

    How do we come up with the formula for the number of binary search trees for a given number of vertices?

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

    please someone can explain why the formula here on the board says that c(i, k-1) + c(k, j), not c(i, k-1) + c(k+1, j)? we are looking for the root so is it not c(i, k-1) + c(k+1, j), is it? I want to understand...

  • @BanothAnusha-hv4qn
    @BanothAnusha-hv4qn 6 місяців тому

    thank you sir for your better techer thank you a lot sir

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

    for those who are confused about the formula he has given the formula at the last of the video

  • @karansunchanakota6624
    @karansunchanakota6624 6 років тому

    Explanation part was good, but as dint know the formula earlier it was a bit confusing in between...

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

    If we represent this in the form of an array then what exactly does the organisation mean and how they help + what do you mean by cost is it how easily a frequent element can be searched?

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

      Okay this is me replying to myself to watch the next video 🙂

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

    How did sir calculated probability of n keys , from where did the formula came ?

  • @naklecha
    @naklecha 5 років тому +8

    Ideal speed for 2x speed

  • @hacker-e7i
    @hacker-e7i 3 місяці тому +1

    i have doubt in the formula i didn"t understood the formula

  • @TheGreatMind55
    @TheGreatMind55 4 роки тому +1

    First you have to see the formula to understand the problem
    29:31
    If helped
    Like👍

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

    Watch out the following playlist.
    ua-cam.com/video/PU4fgVbzIUs/v-deo.html
    You will find the best and clear explanation for this question there. That will prepare you for the other related problems such as chain multiplication.

  • @dheerajkafaltia8474
    @dheerajkafaltia8474 5 років тому

    Very confusing, but watching till end made it clear

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

    Sir why are we checking "l = j-i=0" 9:00 ?

  • @naklecha
    @naklecha 5 років тому

    Thanks for telling us how the formula works :)))))))

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

    Could someone pls tell me how he got 5 over there? I am not able to understand how he solved that formula, searched on youtube as well but could not get anything.

  • @kaushalsolanki3531
    @kaushalsolanki3531 5 років тому +14

    13:45 how does c(0,0) c(1,2) came pls help

    • @prafulrane9037
      @prafulrane9037 5 років тому +1

      @Virendra Negistill that part is unclear

    • @FirstLearningthanEarning
      @FirstLearningthanEarning 5 років тому +4

      In range of (0,2)
      Two value are coming 1 and 2
      So possible value= MIN ((C(0,1)+C(2,2)+C(0,0)+C(1,2)))
      +W(0,2)
      = ANSWER
      HOPE U UNDERSTAND

    • @sandeepkumar-ty3kt
      @sandeepkumar-ty3kt 4 роки тому +3

      Formula = c[I,j]={c[I,k]+c[k+1,j]+weight}
      Where k values are
      C[0,3] then k values are 0,1,2
      Then I=0 and j=3
      Substitute the values
      C[0,0]+C[1,3]+12
      Hope it helps

    • @ragulmylsamy4467
      @ragulmylsamy4467 4 роки тому

      @@sandeepkumar-ty3kt values of k shouldn't include i . Then how come the values of k are 0,1,2?

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

    I am also confused about 2nCn / n + 1 = 5. What exactly is Cn?
    is it 2*n*Cn or it is Cn to power of 2n?
    if it is 2*n*Cn/(n+1) and n =3, then Cn = 20/6 and I don't get what this might represents.

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

      it comes from the combination law. He meant combination of (2n,n) and it is written like C(2n,n) such that C(y,x)= y!/(x! * (y - x)!).
      where y! is called "y factorial" such that y! = y*(y-1)*(y-2) .....(3)*(2)*(1)
      so 3! = 3*2*1 = 6
      You can find more about it here:
      www.mathsisfun.com/combinatorics/combinations-permutations.html
      Brief explanation of combination law:
      if you want to select 2 objects from a list of three elements such that the order doesn't matter you use this combination to get all the possible configuration law.
      EX:
      what are possible configuration to select 2 objects from list containing 3 elements such this list: {a,b,c} ??
      all possible configurations are: {a,b}, {b,c},{a,d}
      and the number of all possible configuration are 3
      and we still can get this number by using the combination law:
      C(6,3) = 3!/(2! * 1!) = 3*2*1/( (2*1) * (1) ) = 3

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

      @@Heshammehrem I was confused on this as well. Thank you for the information!