depth first search algorithm | DFS | Uninformed | Artificial intelligence | Lec-14 | Bhanu Priya

แชร์
ฝัง
  • เผยแพร่เมื่อ 27 ส.ค. 2019
  • DFS: depth first search algo in artificial intelligence

ความคิดเห็น • 59

  • @balasiva9089
    @balasiva9089 4 ปีที่แล้ว +115

    6:04 from E node it should backtrack to B and again it should backtrack to A and then it reaches c node

    • @Adarshsahni1
      @Adarshsahni1 4 ปีที่แล้ว +1

      ya bro

    • @mehmetayparyangozalumni2606
      @mehmetayparyangozalumni2606 4 ปีที่แล้ว +3

      it does but since you dont take the value twice, this is even a better representation

    • @abharathi5193
      @abharathi5193 3 ปีที่แล้ว +1

      Exactly

    • @Monkeydluffy-we2fk
      @Monkeydluffy-we2fk 2 ปีที่แล้ว +1

      Yes

    • @aryankali5446
      @aryankali5446 2 ปีที่แล้ว +1

      @Bloody Kheeng teacher not explain properly. this is wrong way to explain this algorithm you can watch gate smashers TH-cam channel for this algorithm

  • @satyasrujan2349
    @satyasrujan2349 3 ปีที่แล้ว +147

    Hi to all the cse students!

  • @Yua2252
    @Yua2252 ปีที่แล้ว +7

    Not only the contents but the "Hi, Students" motivates me to watch all the videos related to my study ❤️🙌 Thank you so much mam ❤️🙏

  • @sanjusingha1714
    @sanjusingha1714 2 ปีที่แล้ว +30

    Notes
    ●QUEUE:-A type of a data structure in which the elements are inserted and
    deleted according to the FIFO (First In First Out) principle.
    ●Working:-
    A Queue can be implemented using an ARRAY in which
    > every new element which is inserted in the END: Enqueue
    > If any element has to be removed, it is removed from the
    starting point: Dequeu
    -------------------------------------------------------------------
    ●STACK :- A type of a data structure in which the elements are inserted and
    deleted according to the LIFO (Last In First Out) principle.
    ● Working:-A STACK can be implemented using an array in which
    > every new element which is inserted, is inserted at theTOP (PUSH)
    > If any element has to be removed, it is removed from the TOP (POP)

    • @sanjusingha1714
      @sanjusingha1714 2 ปีที่แล้ว +2

      For Example
      Mujhe lgta hai yeh "B" pr wapis hi nahi jayega,yeh "D"->"E"->"C"->"G" jayega.
      -------------------------------------------------------------------
      Algorithm of DFS:-
      1. START WITH EMPTY STACK
      2. INSERT THE ROOT NODE (INITIAL STATE) IN THE STACK
      3. CHECK IF THE ROOT NODE IS THE GOAL NODE
      IF THE ROOT NODE IS THE GOAL NODE, SEARCH IS SUCCESSFUL ELSE REMOVE ROOT
      4. PUSH: INSERT CHILD (SUCCESSOR) NODES OF THE NODE REMOVED FROM THE QUEUE
      5. POP: Remove the topmost node from the STACK
      6. CHECK IF THE POPPED NODE IS THE GOAL NODE
      7. IF THE POPPED NODE IS THE GOAL NODE, PRINT (SEARCH SUCCESSFUL) AND EXIT
      ELSE, REPEAT STEPS 4 TO 7 UNTIL THE SEARCH IS SUCCESSFUL OR ALL THE NODES OF THE TREE
      HAVE BEEN TRAVERSED AND THE STACK IS EMPTY
      IF THE GOAL STATE IS NOT FOUND , PRINT (SEARCH UNSUCCESSFUL) AND EXIT
      _______________________________________
      Step1: Insert (PUSH) the initial state (root node) S on TOP of
      STACK
      Step 2: POP S and PUSH it’s child nodes H and A
      Step 3: POP A and PUSH it’s child nodes C and B
      Step 4: POP B and PUSH it’s child nodes E and D
      Step 5: POP D but D has no child ! Move to the next node E
      Step 6: POP E but E has no child ! Move to the next node C
      To reach node C, we will have to backtrack from level 3 to level 2
      Step 7: POP C and PUSH it’s child node G
      Step 8: POP G.
      G is the GOAL STATE !! SUCCESS !!

    • @akrishnasamysamy3857
      @akrishnasamysamy3857 3 หลายเดือนก่อน

      Mm

  • @ashutoshdurgule4011
    @ashutoshdurgule4011 ปีที่แล้ว +2

    Thanks mam you made this topic easier... 🙏

  • @ankitdahiya5367
    @ankitdahiya5367 4 ปีที่แล้ว +5

    Thank u mam...best wishes

  • @mehmetayparyangozalumni2606
    @mehmetayparyangozalumni2606 4 ปีที่แล้ว +2

    What, how many values does DFS holds on its stack at once?
    (unlike BFS that holds B^L)
    Thanks again and again ,this is a topic of 3 semesters just in between 10-20

  • @isaacfash580
    @isaacfash580 2 ปีที่แล้ว +23

    For the backtracking how did E connect straight with C? No connection exist between them, it should go back to B, A, C and then G. Am I right?

    • @rohan8758
      @rohan8758 2 ปีที่แล้ว +2

      you are right dude

    • @027_fervezahamed.a7
      @027_fervezahamed.a7 ปีที่แล้ว

      while back track it already visited b and a so only

  • @ABDULMUTALLIBAUWAL
    @ABDULMUTALLIBAUWAL 4 วันที่ผ่านมา

    Thank you very much i m highly appreciated I'm going to write my exam tomorrow on this topic❤❤❤

  • @tannubajpai4782
    @tannubajpai4782 2 ปีที่แล้ว +1

    Nice one Bhanu Priya Ma'am

  • @chethanm3694
    @chethanm3694 2 ปีที่แล้ว

    good teaching..
    thank u..

  • @daredevilrbl1254
    @daredevilrbl1254 2 ปีที่แล้ว +1

    What "n" in time complexity ?

  • @kaviya1146
    @kaviya1146 2 ปีที่แล้ว +1

    Tqq sis for this useful session 👌👌

  • @reyy9220
    @reyy9220 3 หลายเดือนก่อน

    you're awesome thank you sm for these videos

  • @dikshakaushal9711
    @dikshakaushal9711 3 ปีที่แล้ว +5

    E node should be back toh A nd then it traversed to C nd G

  • @mohamedessam3054
    @mohamedessam3054 3 ปีที่แล้ว +1

    BFS is optimal assuming uniform cost across edges otherwise it is not optimal

  • @learnandgetresult5754
    @learnandgetresult5754 3 ปีที่แล้ว +1

    Nice presentation mem

  • @Naveen.1431
    @Naveen.1431 13 วันที่ผ่านมา

    TQ Mam ❤

  • @sadanandacharb8284
    @sadanandacharb8284 ปีที่แล้ว

    When a weighted graph is given, what is the order we should select the adjacent edge in DFS, should we select the least cost edge first ? please answer this

  • @srichandanajada9603
    @srichandanajada9603 3 ปีที่แล้ว +3

    BFS implemented by FIFO Principle.
    Similarly, DFS implemented by what??

  • @Parikarthik369
    @Parikarthik369 ปีที่แล้ว

    Tq so much mam love ❤️ u mam

  • @manikantareddymanikantared557
    @manikantareddymanikantared557 3 ปีที่แล้ว +1

    Thank you 🤗

  • @sunnysai8811
    @sunnysai8811 2 ปีที่แล้ว +4

    At 9:16 some aunty in telugu speaking " Ha em anavu" 😂😂

  • @alberthmckenzie2772
    @alberthmckenzie2772 4 ปีที่แล้ว +7

    Thank you for allowing me to survive University.

  • @FundamentalofElectronicsbyDrHa
    @FundamentalofElectronicsbyDrHa 3 ปีที่แล้ว +3

    backtracking node E to C How?

    • @greeshma-sp9tv
      @greeshma-sp9tv 3 ปีที่แล้ว +2

      Not possible ryt ? I too had same doubt. !!

  • @user-tu9kl7kz9y
    @user-tu9kl7kz9y ปีที่แล้ว

    everything is from javatpoint

  • @mahalakshmia3287
    @mahalakshmia3287 หลายเดือนก่อน +3

    Aiml students assemble

  • @Yourtutorsahil
    @Yourtutorsahil 2 ปีที่แล้ว +1

    maam please provide notes

    • @memakky2410
      @memakky2410 ปีที่แล้ว

      Make your own 🤣

  • @ilovekdrama4207
    @ilovekdrama4207 10 หลายเดือนก่อน

    What is n?

  • @satorugojo6881
    @satorugojo6881 ปีที่แล้ว

    I'm the .8K liker

  • @ramuvasupalli3329
    @ramuvasupalli3329 2 ปีที่แล้ว +1

    Mam can i see you face mam😊

  • @xiaomichina5884
    @xiaomichina5884 4 ปีที่แล้ว +8

    Please mam show your face I have a great wish to see our teachers at least once

  • @poovarasus5905
    @poovarasus5905 ปีที่แล้ว

    hi to all CSE (ksr students)

  • @sankarsarkar2740
    @sankarsarkar2740 3 ปีที่แล้ว

    You don't know what you say

  • @tamoorahmad5070
    @tamoorahmad5070 4 ปีที่แล้ว +3

    not really helping.