Week 6
Going a bit of course and starting my journey into learning algorithms. I will continue trying to get my parser to work, I have yet to ask my professor about some of the bugs in my code, so it will need to be done after spring break when I see him next. Doing a bit of research on algorithms, it is said that DFS(depth first search) and BFS(breadth first search) are very important algorithms to know, so I looked up some example codes and YouTube videos with explanations to get a basic understanding of both of these algorithms. Depth first search is search algorithm that goes to the furthest child nodes of each vertices and adds each passing node to a stack, knocking off each vertices that no more nodes to explore, which starts when the search has gotten to the furthest node and pops each searched node of the stack seeing if any of the previous nodes have nodes that haven't yet been explored. Similarly, for Breadth first search we search each vertices but instead of going to the furthest vertex you explore each node you touch and knock it off a queue, adding each node to the queue and knocking it off once there are no further nodes touching it that haven't been searched. Having looked at some of the code that was used to utilized the algorithms, I have decided to delay my algorithm journey because I do not yet understand all the code being used for the algorithm. Instead, I shall increase my java knowledge by trying to do some projects and expanding my java code knowledge, so I can one day be ready to implement these algorithms and resume my journey.
The pic above is the breadth first search process and how it adds to a queue.
The Sites I Used(cited) :
Bari, Abdul. “5.1 Graph Traversals - BFS & DFS -Breadth First Search and Depth First Search.” YouTube, YouTube, 24 Feb. 2018, https://www.youtube.com/watch?v=pcKY4hjDrxk.
“Breadth First Search or BFS for a Graph.” GeeksforGeeks, 18 Oct. 2021, https://www.geeksforgeeks.org/breadth-first-search-or-bfs-for-a-graph/?ref=lbp.
“Depth First Search or DFS for a Graph.” GeeksforGeeks, 30 Jan. 2022, https://www.geeksforgeeks.org/depth-first-search-or-dfs-for-a-graph/.
Sites for the Pics used:
“Breadth First Search: Complete Guide to Breadth First Search Strategy.” EDUCBA, 3 Mar. 2021, https://www.educba.com/breadth-first-search/.
“Depth-First Search (DFS) – Algorithms and Data Structures.” CrazyforCode, 9 Apr. 2016, http://www.crazyforcode.com/depth-first-search-dfs-algorithms-data-structures/.
Very interesting!
ReplyDelete