Graphs 2 cs320

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

1/23

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

24 Terms

1
New cards

What is a directed graph?

A graph where edges have direction, from node u to node v.

2
New cards

What does it mean for a graph to be strongly connected?

Every node is reachable from every other node and vice versa.

3
New cards

How can you test for strong connectivity in a directed graph?

Run BFS from a node in both the graph and its reverse; all nodes must be reachable both ways.

4
New cards

What is a Directed Acyclic Graph (DAG)?

A directed graph with no cycles.

5
New cards

What is a topological ordering?

An ordering of nodes such that for each edge (u, v), u comes before v.

6
New cards

Does every DAG have a topological ordering?

Yes.

7
New cards

What is the time complexity of topological sorting?

O(m + n)

8
New cards

What does the cut property in MSTs state?

The minimum-cost edge crossing any cut must be part of the MST.

9
New cards

What is Kruskal's algorithm?

A greedy algorithm that adds edges in increasing order of weight unless it forms a cycle.

10
New cards

What is Prim's algorithm?

A greedy algorithm that grows the MST by repeatedly adding the cheapest edge from explored to unexplored nodes.

11
New cards

What is a minimum spanning tree (MST)?

A subset of edges that connects all vertices with minimum total weight and no cycles.

12
New cards

Why must the MST be a tree?

It connects all nodes and contains no cycles.

13
New cards

What does Cayley’s formula state?

There are n^(n-2) spanning trees in a complete graph with n nodes.

14
New cards

What data structure is used in Kruskal’s algorithm?

Union-Find (Disjoint Set Union)

15
New cards

What is the running time of Kruskal’s algorithm?

O(m log n)

16
New cards

What is the cut property used for in Prim’s algorithm?

It ensures that the algorithm adds the correct edges to form the MST.

17
New cards

What is the purpose of lexicographic tie-breaking in MST algorithms?

To handle equal-weight edges without ambiguity.

18
New cards

What is single-linkage clustering?

A greedy clustering method using edge distances, effectively Kruskal’s algorithm stopped at k clusters.

19
New cards

How does single-linkage clustering relate to MSTs?

It builds the MST and removes the k-1 largest edges to form k clusters.

20
New cards

What is spacing in clustering?

The minimum distance between any two objects in different clusters.

21
New cards

What is k-clustering of maximum spacing?

A clustering that maximizes the minimum distance between clusters.

22
New cards

How is the MST used in clustering?

To find k clusters by removing the k-1 most expensive edges.

23
New cards

How does the MST help in gene mapping?

It clusters genes by minimizing recombination distances, revealing chromosome structures.

24
New cards