USC CS170 Final Exam

0.0(0)
studied byStudied by 0 people
0.0(0)
call with kaiCall with Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/32

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 1:49 AM on 12/15/25
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

33 Terms

1
New cards

Kruskal's Algorithm

Builds a tree one edge at a time.

- Sort all edges by their weights

(Loop)

- Choose the minimum weight edge and join - corresponding vertices (subject to cycles)

- Go to the next edge

- Continue until all vertices are connected

2
New cards

Runtime of Kruskal's Algorithm

O(ElogE + V*E)

3
New cards

Minimum Spanning Tree (MST)

A spanning tree of a weighted undirected graph with the minimum total edge weight

4
New cards

Bipartite Graph

A graph is bipartite if the vertices can be partitioned into two disjoint (independent) sets X and Y such that all edges go only between X and Y (none from X to X or Y to Y)

5
New cards

T/F A graph is bipartite if and only if it is two-colorable

T

6
New cards

Matching (Def)

A subset of edges is matching if no two edges have a common vertex (mutually disjoint)

7
New cards

Maximum matching

A maximum matching is a matching with the largest possible number of edges

8
New cards

Walk

"A walk is a sequence of vertices in the graph that traverse edges in the graph"

9
New cards

Walk vs path

"A walk is a path if all vertices are distinct"

10
New cards

Equivalence relation.

a relation that is reflexive, symmetric, and transitive

11
New cards

p --> q

-P v q

12
New cards

-(p --> q)

P ^ -q

13
New cards

"If p, then q"

Converse

Contrapositive

Inverse

Converse: "If q, then p" (q --> p)

Contrapositive: "If not q, then not p) (-q --> -p)

Inverse" "If not p, then not q (-p --> -q)

14
New cards

CNF (Conjunctive Normal Form)

Separated with AND's

15
New cards

DNF (Disjunctive Normal Form)

Separated with OR's

16
New cards

Contrapositive of (p → q)

(-q → -p)

17
New cards

Permutations (ordered or not ordered)

Ordered

18
New cards

Permutation function

P(n,k) = n!/(n-k)!

19
New cards

Combination function

C(n,k) = n!/(k!(n-k)!) = (nk)

20
New cards

Combinations - does order matter?

No

21
New cards

Counting using bijection formula

total/bars!(total-bars)!

22
New cards

Handshaking lemma for directed graphs

The sum of the out-degrees of all vertices equals the sum of the in-degrees of all vertices and equals the number of edges

23
New cards

Circuit

A walk that ends where it begins

24
New cards

Cycle

A circuit that only repeats the first and last vertice

25
New cards

Handshaking lemma for undirected graphs

The degree of a vertex v in an undirected graph is the number of edges that are incident on v

The sum of the degrees of all the vertices of the graph equals twice the number of edges

net degree = 2E

26
New cards

Eulerian walk

A walk which traverses every edge of the graph exactly once

27
New cards

Degree's of vertices to make a Eulerian walk possible

Either 0 or 2 odd vertices

28
New cards

Eulerian cycle

A Eulerian walk that starts and ends at the same vertex

29
New cards

Hamiltonian path

A path that visits every vertex noce

30
New cards

Hamiltonian cycle

A Hamiltonian path that ends where it begins

31
New cards

3 equivalent statements for trees

1. G is a tree

2. Every two nodes of G are joined by a unique path

3. G is connected and V = E + 1

32
New cards

Euler's formula

If G is a connected planar graph with V vertices, E edges and F faces, then V - E + F = 2

33
New cards

Coloring planar graphs

Any simple planar graph can be colored with <= 4 colors