DISCRETE QUIZ (Terminologies only!)

0.0(0)
studied byStudied by 0 people
0.0(0)
full-widthCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/18

flashcard set

Earn XP

Description and Tags

still study the shit

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

19 Terms

1
New cards

Graph Traversal

refers to the process of visiting vertices and edges in a graph in s systematic manner Traversal is essential in computer science as it forms the basis for solving many real-world problems, such as searching, pathfinding, and network analysis.

2
New cards

Algorithm

is a step-by-step procedure used to systematically explore all the nodes (vertices) and edges of a graph, defines a clear set of rules for visiting nodes to achieve a specific goal, such as finding a path, determining connectivity, or analyzing relationships within the graph.

3
New cards

Depth-First Search (DFS)

explores as far as possible along one branch before backtracking.
It uses a stack (either explicitly or through recursion) to keep track of nodes to visit next.

uses a stack to manage vertices:


Analogy: Exploring a maze by following one path until you reach a dead end, then backtracking to try another route.

4
New cards

Breadth-First Search (BFS)

explores all neighbors of a node first before moving to nodes at the next level. ensures that all nodes at a distance of n from the starting node are visited before any nodes at a distance of n + 1.


It uses a queue to maintain the order of nodes to visit.
Analogy: Visiting all nearby locations in a city before exploring areas further away.

5
New cards

Maze Solving, cycle detection and topological sorting

Applications of DFS

6
New cards

Maze-solving

can find a path from the start to the end in a maze by exploring one possible route at a time.
Backtracking allows it to handle dead ends efficiently.

7
New cards

Cycle Detection

In undirected graphs, DFS can detect cycles by checking if a node has been visited and is not the direct parent.

8
New cards

Topological Sorting

organizes tasks with dependencies in a linear order.
Example: Course scheduling, where prerequisites dictate the order of courses.

9
New cards

Web crawling, social media connections, shortest path in unweighted graphs

Application of BFS

10
New cards

BFS use cases

Navigation systems: Find the shortest route in city maps.


Social network analysis: Discover the shortest connection between two people.


Level-wise processing:
Analyze nodes level by level, e.g., finding all employees at the same management level.

11
New cards

Choose BFS

knowt flashcard image
12
New cards

Choose DFS

knowt flashcard image
13
New cards

Web Crawling

search engines use BFS to crawl web pages, starting from a webpage systematically visits all connected links

14
New cards

Social Media Connections

Finding mutual friends or suggesting people you may know

15
New cards
16
New cards

Breadth First Search

What does BFS mean?

17
New cards

Depth First Search

What does DFS mean?

18
New cards

stacking

What does DFS use?

19
New cards

what does BFS mean?