Classic Algorithms – Graph Traversal (CS2004, 2024-2025)

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/23

flashcard set

Earn XP

Description and Tags

Vocabulary flashcards covering key terms and definitions from the lecture on classic graph-traversal algorithms, including DFS, BFS, exhaustive, best-first, A*, and minimum spanning trees.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

24 Terms

1
New cards

Graph (G = (V,E))

A data structure consisting of a set of vertices (nodes) V and a set of edges (connections) E linking pairs of vertices.

2
New cards

Vertex (Node)

An individual element or point in a graph where edges meet; part of the set V.

3
New cards

Edge

A connection between two vertices u and v in a graph, written as e = (u,v) or (v,u).

4
New cards

Undirected Graph

A graph whose edges have no orientation; movement is allowed both ways along each edge.

5
New cards

Directed Graph (Digraph)

A graph whose edges are ordered pairs, giving each edge a single direction (arrow).

6
New cards

Weighted Graph

A graph in which every edge is assigned a numerical value (weight) representing cost, length, etc.

7
New cards

Complete Graph

A graph in which every pair of distinct vertices is connected by an edge.

8
New cards

Graph Traversal

The process of systematically visiting every vertex (and often every edge) of a graph, usually exactly once.

9
New cards

Depth-First Strategy

A way of exploring a graph by following a path as far as possible before backtracking when a dead end is reached.

10
New cards

Depth-First Search (DFS)

A traversal algorithm that visits a start node, recursively explores as deep as possible, backs up on dead ends, and ends when all vertices reachable from the start are visited.

11
New cards

Dead End (DFS)

A node that has no unvisited adjacent vertices (directed: no outgoing edges) during depth-first search.

12
New cards

DFS Time Complexity

O(n + m) where n is the number of vertices and m is the number of edges, because each vertex and edge is processed once.

13
New cards

Exhaustive Search

A brute-force technique that systematically explores every possible path in a graph; always finds the goal but is usually impractical.

14
New cards

Exhaustive Search Complexity

Worst-case O((n−1)!), arising in complete graphs as the number of possible paths grows factorially.

15
New cards

Breadth-First Search (BFS)

A traversal method that explores all neighbors of the start node first, then their neighbors, level by level until the goal is found.

16
New cards

Best-First Search

An improvement on DFS that uses a heuristic to choose which node to expand next, preferring nodes estimated to be closer or cheaper to the goal.

17
New cards

Heuristic (in Search)

A rule of thumb or informed estimate that guides a search algorithm toward promising paths (e.g., straight-line distance).

18
New cards

A* Search

A best-first search that scores each partial path with f = g + h, where g is the cost so far and h is an admissible estimate of the cost to the goal, guaranteeing an optimal path.

19
New cards

f = g + h Function

The evaluation formula in A* where g is accumulated path cost and h is estimated remaining cost; the path with the smallest f is expanded next.

20
New cards

Greedy Search

A special case of best-first search where g is considered zero and decisions are based solely on the heuristic h, making locally optimal choices.

21
New cards

Spanning Tree

A sub-graph that is a tree containing all vertices of the original connected, undirected graph with no cycles.

22
New cards

Minimum Spanning Tree (MST)

A spanning tree whose total edge weight is the smallest possible among all spanning trees of the graph.

23
New cards

Prim’s Algorithm

A greedy algorithm for finding an MST by starting at an arbitrary vertex and repeatedly adding the lightest edge connecting the growing tree to a new vertex.

24
New cards

MST Applications

Used in network design, approximation for NP-hard problems (e.g., Traveling Salesperson), cosmology mapping, cancer imaging, and more.