6.3 Graph Coloring Problem - Backtracking

Поделиться
HTML-код
  • Опубликовано: 24 янв 2025

Комментарии • 317

  • @mahadevawasthi8187
    @mahadevawasthi8187 Год назад +92

    Someone give this man a medal 🥇 . He is better than the lecturar of expensive private universities. Hats off to you legend 🔥

  • @scabbage
    @scabbage 4 года назад +608

    I like how he actually took the effort to draw the last level.

    • @gannonben2554
      @gannonben2554 3 года назад +4

      instablaster.

    • @kunalakhade5660
      @kunalakhade5660 2 года назад +9

      I was like how will I draw the level in the exam paper

    • @SandeshMotoVlogs
      @SandeshMotoVlogs 2 года назад +18

      @@kunalakhade5660 Indian teachers are like it should look neat no matter whether that's gonna fit in the area/page

    • @shaikhtaqueveem6819
      @shaikhtaqueveem6819 Год назад +1

      ​@@kunalakhade5660 how did you draw...

  • @abhishekslab
    @abhishekslab 5 лет назад +181

    Loved the last part where you told about the origin of this problem, it was something new and really helped to realize why were we doing this : )

  • @chepaiytrath
    @chepaiytrath 4 года назад +103

    Looking forward to the day when I post on LinkedIn about my journey to my dream company and I attach your channel as a reference for DP, Backtracking, Algos, etc

  • @ayounghosh9218
    @ayounghosh9218 5 лет назад +879

    I feel like I'm giving my fees to the wrong teachers, my college should hire teachers like him instead

    • @anirudhavadhani8586
      @anirudhavadhani8586 5 лет назад +8

      same here

    • @sanayshah1
      @sanayshah1 4 года назад +5

      Same same

    • @matthieub3973
      @matthieub3973 4 года назад +3

      What program are you majoring in that you're learning stuff like this? AI or something? That's great!

    • @CoderBrains
      @CoderBrains 4 года назад

      Just try this ruclips.net/channel/UC4CwQWuy47lTFP8-RhtF8lw?view_as=subscriber

    • @artisingh1944
      @artisingh1944 4 года назад +3

      damn true

  • @shivammwarambhey5614
    @shivammwarambhey5614 Год назад +24

    13:09 Smoothest transition by Abdul Sir so far😅😂. Can't stop going back and checking frame by frame the way sir seems to be in the same place.

  • @LL-ol8gr
    @LL-ol8gr 3 года назад +10

    Best CS teacher ever, make every topic bite-able.

  • @ujwalgupta7457
    @ujwalgupta7457 Год назад +8

    Even though NITs and prestigious state government colleges have the worst faculty.
    Without these teachers, I cannot imagine that I could pass the semester exams.

  • @yhwu4747
    @yhwu4747 6 лет назад +23

    brilliant storytelling of the historical case where the graph coloring can be applied!

  • @codeforester
    @codeforester 10 месяцев назад +1

    What an excellent teacher! I feel like I am back in college! Thank you Abdul for educating us.

  • @ankursoni8751
    @ankursoni8751 3 года назад +5

    The way you gracefully explain the complex problem is just amazing. Thank you for all your hard work. :)

  • @danym-98
    @danym-98 2 года назад +5

    Thanks!

  • @benneal8224
    @benneal8224 4 года назад +31

    Your videos are a gift to the world! Thank you

  • @TridibSamanta
    @TridibSamanta 6 лет назад +42

    Great ! You are a great Teacher. Thanks for saving my Design and analysis of Algorithm Paper.
    #Respect

  • @swatii3011
    @swatii3011 2 года назад +21

    funny thing is my college teacher is making notes from your videos and still could not teach

  • @brettford7521
    @brettford7521 2 года назад +11

    Your videos have a lot of educational value, thank you so much for sharing. Currently taking Algorithm Design and Analysis

  • @jaslinkaur645
    @jaslinkaur645 3 года назад +15

    For the graph colouring problem at 14:55, should not vertex 4 connect to vertex 1? The boundaries connect

  • @chanduyerragundla2268
    @chanduyerragundla2268 3 года назад +2

    Your an life savior of many btech students in jntu

  • @johnlebens6463
    @johnlebens6463 5 лет назад +12

    Your videos are the best sir! Thank you for getting me through my algorithms class. Keep up the good work :)

  • @adipratapsinghaps
    @adipratapsinghaps 5 лет назад +1

    Preparing for upcoming google interviews. Solved an unanswered google problem from geeksforgeeks interview experience with m-colouring optimization algorithm. Had start and end time of meetings in 2 different arrays. Had to compute minimum number of rooms that are required to host all meetings.
    Start = [9:00,9:40,9:50,11:00,15:00,18:00]
    End = [9:10,12:00,11:20,11:30,19:00,20:00]
    So I created objects with start and end time and treated them as graph nodes. And added edges between nodes with overlapping timings. And finally solved it using m-colour optimization problem. The answer is 3. 😄

    • @adipratapsinghaps
      @adipratapsinghaps 5 лет назад

      @@abdul_bari Sir, I assume that I found the right solution. But I need your advice if my approach is right. And if there is any better way of solving this problem?

    • @bhuveshdhiman2
      @bhuveshdhiman2 3 года назад

      @@adipratapsinghaps you can apply greedy algo for this q

  • @rrMaxwell
    @rrMaxwell 2 года назад +5

    the map printing example was superb professor

  • @SafiaFaheem-n2p
    @SafiaFaheem-n2p 4 месяца назад +22

    Very proud to say that he teaches in my college

    • @Excommoner
      @Excommoner 2 месяца назад +4

      Which college

    • @MukeshchowdaryVinjam
      @MukeshchowdaryVinjam Месяц назад +1

      Which college?​@@Excommoner

    • @OpocHamA7707
      @OpocHamA7707 Месяц назад +1

      ​@@MukeshchowdaryVinjamthyagaraja clg of engineering and technology

  • @HARIKARTHICKR-e3m
    @HARIKARTHICKR-e3m 9 месяцев назад +1

    14:13 i'm convinced that ur the best teacher

  • @abhijeetiyer1556
    @abhijeetiyer1556 5 лет назад +68

    It would be helpful if you provide some pseudo code with the examples and explain in terms with the code too 😁😁
    PS:- your videos are really helpful

  • @avenger1898
    @avenger1898 3 месяца назад +1

    Really Helpful Sir,No one can teach like you ,Thank you sir

  • @arunachhatkuli2103
    @arunachhatkuli2103 3 года назад +15

    In the coloring of the map there must have to connect node 1 to node 4 because these two are adjacent according to this map.

  • @mansonchallenger1143
    @mansonchallenger1143 3 года назад +4

    best explanation of backtracking this far

  • @YaraFahad-m2y
    @YaraFahad-m2y Месяц назад +1

    ياخي اقسم بالله ودي اكتب شهادة تخرجي باسمك يا اسطورتي

  • @prathampawar5950
    @prathampawar5950 Месяц назад +1

    trust me! I Have never watched a lecture video 1.0 X, this was Actually Interesting to watch

  • @tejudimple689
    @tejudimple689 6 лет назад +1

    Superb sir....seriously the way you explain and speak is so easy and understandable to any one.....

  • @Cute_Funny_Clips
    @Cute_Funny_Clips Год назад

    Best teacher I've seen my teacher is not even close to him!!

  • @ELEKTROGOWK
    @ELEKTROGOWK Месяц назад +1

    wow, that explanation was perfect

  • @MdAsif-zx5wy
    @MdAsif-zx5wy 5 лет назад

    itna zyada student seen kr rha ....bhut accha sir,thanku so much sir for ur help

  • @prokasghosh3660
    @prokasghosh3660 2 месяца назад +3

    00:01 Graph coloring problem requires assigning colors to vertices without adjacent vertices having the same color.
    01:59 Graph coloring problem can have multiple solutions using backtracking
    03:53 Graph coloring problem types and solutions
    05:36 Graph coloring without adjacency conditions
    08:06 Graph coloring problem has exponential time complexity
    09:52 Backtracking algorithm attempts all colors for each vertex
    12:02 Graph coloring problem and its applications
    13:59 Graph coloring problem explained with map conversion

  • @tusharsingh2286
    @tusharsingh2286 2 года назад +1

    Tommorrow is my exam and i done prepration by your video 🍀🍀

  • @amanjain256
    @amanjain256 4 года назад +22

    15:25
    Since 4 is neighbour to 1 between 2 and 5,there should be an edge from 4 to 1 or 1 to 4 at 15:25, right?

    • @aniljami6786
      @aniljami6786 4 года назад +3

      Yes,but assume that 2nd vertex is completely in between 1 and 4 i.e the small uncovered region is to be covered

    • @sonudwivedi4815
      @sonudwivedi4815 4 года назад

      if you think like that then if 1-4 has boundary then tell me where is the ending boundary of 2 you won't be able to decide
      hence if you look carefully you will notice that 1's boundary goes up from 2 not below of 2 because below of is 2's boundary not 1's

  • @aryantiwari3823
    @aryantiwari3823 6 месяцев назад

    even after 100 years , this man will be remembered

  • @anuragvishwa1847
    @anuragvishwa1847 6 лет назад +78

    Sir is, Aamir Khan of Algorithms

    • @bavalpreetsingh4664
      @bavalpreetsingh4664 6 лет назад +7

      thugs of hindustan flops

    • @RajVerma-lg3kp
      @RajVerma-lg3kp 6 лет назад +3

      Bavalpreet Singh lmao 😂

    • @ttctoh
      @ttctoh 4 года назад +4

      He is Lee CHong Wei of Algorithms

    • @KeshariPiyush24
      @KeshariPiyush24 4 года назад +4

      wanted to like this comment but it is on 69 so not doingXD

  • @SemesterIV-yp5jj
    @SemesterIV-yp5jj 9 месяцев назад +1

    14:37 there's a common boundary between 1 & 4 also.

  • @stith_pragya
    @stith_pragya Год назад +1

    Thank You So Much Abdul Sir..........🙏🏻🙏🏻🙏🏻🙏🏻🙏🏻🙏🏻 as usual super dooper explanation

  • @gopeshkhandelwal9823
    @gopeshkhandelwal9823 5 лет назад +1

    sir ,your teaching style is awesome .Really, love your videos

  • @yethishchintu3571
    @yethishchintu3571 Месяц назад +1

    Please stop posting comments appreciating Abdul Sir. Everyone already knows he is an excellent teacher. However, subject-related or topic-related comments would be far more helpful and actually needed.

  • @sapingeli
    @sapingeli 5 лет назад

    I am a big fan of you, now following everything about algorithms and maths.

  • @umamanikantaikkurthi
    @umamanikantaikkurthi 2 месяца назад +6

    15:25 there must be an edge between 1 and 4

    • @meonly1847
      @meonly1847 28 дней назад

      But they're not neighboring?

  • @Mohamed_Mostafa259
    @Mohamed_Mostafa259 8 месяцев назад

    At 14:50, isn't region(1) neighbour to region(4)?

  • @malaykumar7991
    @malaykumar7991 6 лет назад +6

    Thank you sir. 🙂
    Your videos are very helpful for papers .

  • @HAAH999
    @HAAH999 5 лет назад +3

    Thank you for your great effort and helping students around the world.

  • @lspophale
    @lspophale 6 лет назад +3

    voice is so good to understand and skip written part by himself which is not imp thats so better

  • @Nani-ox4ht
    @Nani-ox4ht 6 лет назад +4

    What an explanation sir,,👏👏👏

  • @RS_renovation_10
    @RS_renovation_10 2 года назад +1

    Thank you sir for these types of videos it's really very helpful for us ❤️❤️

  • @navdeepsharma9591
    @navdeepsharma9591 6 лет назад +2

    Actual solution starts at 8:33

    • @ebenezerpaul
      @ebenezerpaul 5 лет назад +1

      Thanks for the time stamp mate. You've just saved my time 😊

  • @akashmaurya5338
    @akashmaurya5338 6 лет назад +82

    how many of you are watchin 1.5x or 2x hit like here
    kabi kabhi nhi hamesha lagta hai ki sir ich bhagwan hai.... akash gaytunde

  • @nishant9972
    @nishant9972 4 года назад

    thanks, wrote the code directly, didn't even need to take any reference or watch it again

  • @s.hariharan6958
    @s.hariharan6958 9 месяцев назад +1

    can anyone help me to understand 7:53 math sum proplem how to drive it pls...

  • @amitkumarsrivastava9261
    @amitkumarsrivastava9261 10 месяцев назад

    Sir, you explained the Graph colouring problem as "the number of ways to colour a graph or given a number of colours, find if its possible to colour the graph". Then you explained about the history with Map colouring. In Map colouring problem, we need to find the minimum number of colours to colour the map with same constraints. These are related but different problems. Nevertheless, I feel that in the Graph colouring we can add a small optimisation - if the number of colours needed are more than the number of colours in a previously seen branch, then also we can stop early(bound).

  • @vishnuvardhans8463
    @vishnuvardhans8463 4 года назад +6

    Sir the last application part was really awesome and made me reason for learning
    Can you please add applications to all problems to solve in upcoming videos :)

  • @ishanikundu4419
    @ishanikundu4419 5 месяцев назад

    what a brilliant explanation ❤

  • @sryp3055
    @sryp3055 Год назад

    15:00 isnt 1 and 4 are neighbor?

  • @c.danielpremkumar8495
    @c.danielpremkumar8495 6 лет назад +2

    I appreciate your immediate response.

  • @mkiss73
    @mkiss73 5 лет назад +2

    I enjoyed your video. Unfortunately at 15:08 you missed an edge, 1-4, in your final diagram.

    • @mkiss73
      @mkiss73 5 лет назад

      Nevermind, I see your note in the description :)

  • @gnrh123
    @gnrh123 3 года назад +2

    Thank you algo king Abdul 🙏

  • @mpmukundh
    @mpmukundh 5 лет назад +42

    Please include algorithm sir

  • @jackiechoe1841
    @jackiechoe1841 Год назад +2

    Thankyou abdul! great bideo!

  • @bunnyyy911
    @bunnyyy911 8 месяцев назад +1

    He is born as tutor

  • @putluruvenkatsabarisainath7009
    @putluruvenkatsabarisainath7009 2 года назад

    good Teacher.Learnt many things.so simple in understanding.

  • @namankhard4270
    @namankhard4270 6 лет назад +10

    Sir it would be much better if you provide algorithms as well because in exams they ask algorithms too.

    • @darshanarani9059
      @darshanarani9059 6 лет назад

      Yes please Sir

    • @TusharYadav-es1bq
      @TusharYadav-es1bq 6 лет назад +2

      he doesnt know them

    • @varunrao2135
      @varunrao2135 4 года назад +2

      @@TusharYadav-es1bq writing the algorithm is trivial if you understand the algorithm well. Understanding algorithm is more difficult

    • @SherPunjabDa-001
      @SherPunjabDa-001 Год назад

      @@TusharYadav-es1bq kiddo

  • @rahulraut2689
    @rahulraut2689 5 лет назад +3

    @Abdul Bari
    In university exam,
    is required to find all possibility of graph coloring ?

  • @sam111880
    @sam111880 5 лет назад +2

    Great video , I am curious not on writing an algorithm for chromatic number but to obtain the chromatic polynomial for the graph. Is there an easy relation one can uses to go from chromatic number to chromatic polynomial for a backtracking algorithm?

    • @bavidlynx3409
      @bavidlynx3409 3 года назад

      i cant really find any easy to write algoritms. i know hes a great teacher but he aint explining any algoritms

    • @onais__
      @onais__ 2 года назад

      @@bavidlynx3409 hey, so from where did you do the algo explanation part

  • @kshnt9996
    @kshnt9996 3 года назад +1

    Can you provide lisp programming for the same problem using any search method

  • @HamsaShehadeh
    @HamsaShehadeh 3 года назад

    how about the point that dont connect to any other point? what should i color it? a different color that no point got it? or same as any point color?

  • @hemantsingh6420
    @hemantsingh6420 6 лет назад +1

    Sir for Network flow and matching lecture video is available or not?

  • @CLG111
    @CLG111 2 месяца назад

    Very simple and straightforward explanation. I understand backtracking

  • @GustavoHenrique-xg4ey
    @GustavoHenrique-xg4ey 6 лет назад +2

    well explained, good camera, thanks

  • @tushar_pawar040
    @tushar_pawar040 Год назад

    15:5 also a 1- 4 is present

  • @vishallondhe7298
    @vishallondhe7298 5 лет назад +1

    looks little bit like gujarat map, btw nice video appreciate the effort.

  • @sanjivaniburma6171
    @sanjivaniburma6171 6 лет назад

    at 7:47, how it is (3^(4+1))/3-1

  • @ssm840
    @ssm840 2 года назад +3

    Great content as usual-can anyone suggest a good tutorial (novice friendly) for finding the chromatic no of a graph.Does Abdul sir have any videos on this topic in particular?

  • @RitikRaushan-z8u
    @RitikRaushan-z8u Месяц назад +1

    nice video sir

  • @anums4590
    @anums4590 6 лет назад +1

    Your channel is very helpful

  • @ΜιχάληςΜιχαήλ-σ8ν
    @ΜιχάληςΜιχαήλ-σ8ν 4 года назад

    Μεγάλος μάστορας αυτός παιδιά.

  • @mohammedadel8948
    @mohammedadel8948 2 года назад +2

    Thank you , I appreciate your help so much

  • @HelloWorld-zt4ol
    @HelloWorld-zt4ol 5 лет назад

    is there any rule to start colouring from specific vertex? or we can start colouring from any vertex?? please reply @Abdul Bari

  • @anandbaskaran
    @anandbaskaran 2 года назад

    Should we use the same kind of execution technique for mColouringDecisionProblem and mColouringOptimzationProblem? (Of course, we will terminate once a solution is obtained, nut is there a better method?)

  • @InsideTFI
    @InsideTFI 6 лет назад

    Sir.. actually how many solutions can obtain at end of the video is 18 or more that?

  • @garlapatibalu6192
    @garlapatibalu6192 5 лет назад +1

    sir if we are having only 3 nodes and 3 colors how could we do the problem ??

  • @ssm840
    @ssm840 2 года назад

    after trying red on the first vertex,do we need to try out Green and blue on the first vertex in the subsequent iterations.Or will 1st vertex always be colored with red only?

    • @pareekshithachar3788
      @pareekshithachar3788 2 года назад

      have to put other colours there too as they are possible solutions

  • @bibhubal3453
    @bibhubal3453 4 месяца назад

    Brilliant Teacher.

  • @k-ananya9657
    @k-ananya9657 3 года назад +1

    Thank you so much sir, respect and love from Bangladesh ❤️🇧🇩

  • @AnshuKumar-oj8ww
    @AnshuKumar-oj8ww 10 месяцев назад

    Isn't M - coloring optimization problem solved via dynamic programming since it's an optimization problem?

  • @utsavkumar4826
    @utsavkumar4826 10 месяцев назад

    Sir, this solution won't work for K4(complete graph with 4 vertices) graph

  • @gladwinrojer273
    @gladwinrojer273 4 года назад +1

    Cant we just Greedily color the graph? Why do we have to go for BackTracking?

  • @ritumishra4303
    @ritumishra4303 4 года назад

    At 12:50 RBRB can't be the solution.

    • @thepriestofvaranasi
      @thepriestofvaranasi 3 года назад

      Why though? It is a valid solution. Check it out yourself.

  • @dr.p.sridevi2626
    @dr.p.sridevi2626 4 года назад +1

    Thank you for your great effort

  • @AryanSingh2512.
    @AryanSingh2512. 6 лет назад

    Way better than Boring and upto some extent useless Ravula Lectures.

  • @aparnam1200
    @aparnam1200 14 дней назад

    From 8:44

  • @ThuyVu-pv5wd
    @ThuyVu-pv5wd 3 года назад

    bài giảng hay lắm ạ, mỗi tội cháu ko nghe thấy gì, may mà có phụ đề tiếng anh.

  • @gideonkiplagat4232
    @gideonkiplagat4232 2 года назад +1

    Can you explain how GCP can be used in College/exam
    Timetabling

  • @gurpreettata
    @gurpreettata 6 лет назад +6

    beautifully explained but it could have been better if it would have explained through code as well

    • @GauthamBangalore
      @GauthamBangalore 6 лет назад +1

      I came across this classic Graph colouring problem - uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=129
      I have solved it based on the explanation given in this video. You can find my solution here - github.com/GauthamBanasandra/CompetitiveCoding/blob/master/UVa/UVa/Complete%20search/Recursive%20backtracking/Hard/Graph%20coloring/Graph%20coloring.cpp

  • @deeproy7292
    @deeproy7292 4 года назад

    awesome example on application✌

  • @aparnazomeeeeee2
    @aparnazomeeeeee2 2 года назад

    Great explanation ❤️