0% found this document useful (0 votes)
99 views6 pages

CSE 101 Final Cheat Sheet

cheat sheet

Uploaded by

John Aloud
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
99 views6 pages

CSE 101 Final Cheat Sheet

cheat sheet

Uploaded by

John Aloud
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Graph Searchi finis all vertices reachable from a Vertex

and
·
huput graph starting Vertex
·
Runtime OCIUIHED

DFS : Finds connected components


all in
graph
Input
graph
·

·
output Dfs forest (forest structure given by prev
array
·
Rentine OCIUIHEl)

Scc : finds all SCC

Input graph
·

output sec
·
Runtime OCIVI + IE)

BFS : finds shortest path Creeds equal weight edges


Input and
graph stating vetex
·

·
Runtime OCIUI + IE1)

Peter
Dijkstral finds shortest path
verter
:

Impact and
starting
graph
·

Driny : Creates MST OCIU log()


·

Input graph with


pos edge weights
·

output list of edge


·

Algo :
pick smallest edge that keeps corrected
~
Runtime =
Dijkstra

krykal : Create must


·
Algo : Sort edge by weight , pick lightest edge
Rentine : OCEI logli) which
by rank

· OCVR +
/EllogIvi) leader method
Edge type : Tree edge : solid edge in DAS
Back edge : leads to crestor

fired : leads to descendent

Cross : neither

DAG Linearization : elges decreasing post return of vertice


decreating post
: are list
,

Exchange argument : for some input I let o


,
be - such that all constraints are

met .
Let of be a valid solution that doesn't include g Then
.

,
there exists a os
solution

by adding g
to os
,
show Os'LOS.

Master Theorem : Ten) = atc/b) + ocnd) · TC) =

Good dAnd

=>

Hamiltonian = ND

TSP in NP

You might also like