6.3 Graph Coloring Problem - Backtracking

Поділитися
Вставка
  • Опубліковано 2 жов 2024

КОМЕНТАРІ • 291

  • @ayounghosh9218
    @ayounghosh9218 5 років тому +804

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

    • @anirudhavadhani8586
      @anirudhavadhani8586 4 роки тому +8

      same here

    • @sanayshah1
      @sanayshah1 4 роки тому +5

      Same same

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

      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 ua-cam.com/channels/4CwQWuy47lTFP8-RhtF8lw.html?view_as=subscriber

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

      damn true

  • @scabbage
    @scabbage 4 роки тому +562

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

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

      instablaster.

    • @kunalakhade5660
      @kunalakhade5660 2 роки тому +7

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

    • @SandeshMotoVlogs
      @SandeshMotoVlogs 2 роки тому +15

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

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

      ​@@kunalakhade5660 how did you draw...

  • @swatisharma9373
    @swatisharma9373 Рік тому +18

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

  • @gaharavara
    @gaharavara 5 років тому +167

    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 роки тому +92

    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

  • @mahadevawasthi8187
    @mahadevawasthi8187 10 місяців тому +45

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

  • @abhijeetiyer1556
    @abhijeetiyer1556 5 років тому +65

    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

  • @danym-98
    @danym-98 2 роки тому +5

    Thanks!

  • @arunachhatkuli2103
    @arunachhatkuli2103 2 роки тому +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.

  • @jaslinkaur645
    @jaslinkaur645 2 роки тому +15

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

  • @TridibSamanta
    @TridibSamanta 5 років тому +42

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

  • @shivammwarambhey5614
    @shivammwarambhey5614 Рік тому +17

    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.

  • @akashmaurya5338
    @akashmaurya5338 5 років тому +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

  • @benneal8224
    @benneal8224 3 роки тому +30

    Your videos are a gift to the world! Thank you

  • @yhwu4747
    @yhwu4747 5 років тому +22

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

  • @anuragvishwa1847
    @anuragvishwa1847 6 років тому +77

    Sir is, Aamir Khan of Algorithms

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

      thugs of hindustan flops

    • @RajVerma-lg3kp
      @RajVerma-lg3kp 5 років тому +3

      Bavalpreet Singh lmao 😂

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

      He is Lee CHong Wei of Algorithms

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

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

  • @mpmukundh
    @mpmukundh 5 років тому +42

    Please include algorithm sir

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

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

  • @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 3 роки тому

      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

  • @Discoverer-of-Teleportation
    @Discoverer-of-Teleportation 3 роки тому +2

    Abdul bari :- Zindaabad
    Engneering colleges:- Murdabad (The end)

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

    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.

  • @LL-ol8gr
    @LL-ol8gr 3 роки тому +9

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

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

    I'm sorry Sir, but printing press example is not suitable for the solved example. You demonstrated how to manually and iteratively (without using simple maths such as combination formulae) look for number of ways to colour the graph with given set of colors. As per your own declaration , it falls in type 1 problem but a printing press only needs to know whether or not they can colour the graph with given set of finite N number of colors (if mixing is not allowed). That is clearly your Type 2 N-colouring decision problem!
    If mixing is allowed, then they don't even need to know anything. Press created the map so they know already how many bisections they made of the graph which will be the number of times they will have to sequentially print each colour one after another. And also since they can mix the colors to make infinite shades of colors, they don't need to find out how many ways to fill colors in these bisections. They will start with 1 colour and then keep filling another shade after another shade till it is completely filled. They would already know how many fills they need to do, as again they know already the number of vertices/bisections in the map.

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

      Also I would appreciate if you could add a section in the end or a small link to the mathematical solution to the problem, where instead of manual selection (which you termed backtracking) a proper combination formula is used to explain. We just need to subtract adjacency condition from all possible solutions.
      All possible solution is [nCr x (n-r)ˆr ]
      Now need to subtract adjacency combinations from it.

  • @s.hariharan6958
    @s.hariharan6958 5 місяців тому +1

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

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

    @abdul Bari : can u Plz start including code snippet also in Ur videos? Everytime I need to follow other sites for code.

  • @johnlebens6463
    @johnlebens6463 4 роки тому +12

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

  • @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 5 років тому +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

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

      @@TusharYadav-es1bq kiddo

  • @shoryamanasthana2687
    @shoryamanasthana2687 9 місяців тому +3

    baari kon jaat ?

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

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

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

    algo's link : ua-cam.com/video/3DcG72v2_n0/v-deo.html

  • @bunnyyy911
    @bunnyyy911 4 місяці тому +1

    He is born as tutor

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

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

  • @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?

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

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

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

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

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

    the map printing example was superb professor

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

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

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

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

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

    best explanation of backtracking this far

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

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

  • @SafiaFaheem-n2p
    @SafiaFaheem-n2p 28 днів тому +1

    Very proud to say that he teaches in my college

  • @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

  • @codeforester
    @codeforester 6 місяців тому +1

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

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

    Thank you , I appreciate your help so much

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

    Your an life savior of many btech students in jntu

  • @SemesterIV-yp5jj
    @SemesterIV-yp5jj 5 місяців тому +1

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

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

    Can you also do the machine learning algorithm too, and thank you for helping understanding these concept :)

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

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

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

    Sir can you add application to all problems in upcomming videos please

  • @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 :)

  • @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 :)

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

    Thank you algo king Abdul 🙏

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

    Bari sir visited our college im really gratefull for that,
    but unfortunately the students were not cooperating with him, so he eventually left the class

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

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

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

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

  • @jackiechoe1841
    @jackiechoe1841 9 місяців тому +2

    Thankyou abdul! great bideo!

  • @HARIKARTHICKR-e3m
    @HARIKARTHICKR-e3m 5 місяців тому +1

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

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

    You missed 1-4 in map problem

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

    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).

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

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

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

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

  • @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 2 роки тому

      @@adipratapsinghaps you can apply greedy algo for this q

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

    really helpful sir thank you very much

  • @Nani-ox4ht
    @Nani-ox4ht 6 років тому +4

    What an explanation sir,,👏👏👏

  • @AnshuKumar-oj8ww
    @AnshuKumar-oj8ww 6 місяців тому

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

  • @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

  • @rohitkandula8493
    @rohitkandula8493 11 місяців тому +1

    🙏 Thank You Sir❤❤🫶❤❤🥳🥳💕💕

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

    please make tuturial on red black tree

  • @ThuyVu-pv5wd
    @ThuyVu-pv5wd 2 роки тому

    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.

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

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

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

    15:5 also a 1- 4 is present

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

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

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

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

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

    Algolegend

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

    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.🤔🤔

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

    Obviously we can count the distinct minimal coloring's and we know the chromatic polynomial value for that and the fact it is zero for smaller colors. But is that enough information to generate the chromatic polynomial. I can do it out mathematically but now i am looking for a algorithm i can program. I have a backtracking algorithm similar to what your doing in this video. But i not so sure the most efficient and best way to go about obtaining the chromatic polynomial from all this information i can obtain. (in the optimal currently known algorithms !)

  • @NavjotKaur-pk4gx
    @NavjotKaur-pk4gx 4 роки тому

    Sir, this is working in sequence number means 1,2,3..... Like this
    Or
    This is working with the adjacent

  • @AryanSingh2512.
    @AryanSingh2512. 5 років тому

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

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

    will there be a direct path from node 1 to node 4 in Map to graph. Anyone help me in understand.

  • @i.am.kakarot
    @i.am.kakarot Рік тому

    Sir apki clothing item koi kharidta bhi h price bohut kam ni h 😅😂

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

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

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

    Controlling parameter is no of node,state space tree,bounding function backtracking

  • @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

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

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

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

    Sir mere clg me bomb blast kr do padhana ni ata unhe. 😩

  • @Mohammed-ix5je
    @Mohammed-ix5je Рік тому +1

    Thanks.

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

    awesome. thank you so much

  • @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?

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

    in that map vertex 1 should connect to vertex 4

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

    dear sir please take some compicated problem....this is very easy ....please explain compicated one

  • @544soujanya8
    @544soujanya8 2 роки тому

    Sir,1is adjacent with 4 also.but,you are not mentioned there

  • @GustavoHenrique-xg4ey
    @GustavoHenrique-xg4ey 6 років тому +2

    well explained, good camera, thanks

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

    why can't you say the formula for mcoloring optimization problem

  • @MdFaizan-th5yf
    @MdFaizan-th5yf Рік тому

    Why doesn't sir upload more videos we need more videos for various topicss

  • @لُطف-ب9خ
    @لُطف-ب9خ 3 роки тому

    Hello, how many chromatic number of (c7) power 2 ????

  • @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?)

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

    sir , explanation with algorithm would have been better

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

    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 Рік тому

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

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

    thanks a lot !

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

    siema kto z preoi?