Notions and Notation Flashcards

1
Q

graph. :

A

a finite, nonempty set V (vertex set) and a set E (edge set) whose elements e in E are pairs (a,b) with a,b in V

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

digraph:

A

a directed graph, where edges go only 1 way - undirected graphs are well. undirected, they go both

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

multigraph:

A

a graph with parallel edges

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

2 vertices connected by an edge are:

A

adjacent, neighbours, the edge is incident on the 2 vertices

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

start and end vertex of a directed edge:

A

start = tail (vertex), predecessor
end = tip (vertex), successor

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

complete graphs:

A

Kn, all vertices are connected to each other
|E|=(n(n-1))/2

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

path graphs:

A

Pn, a line, string of vertices connected by 1 or 2 edges depending on if its an end one or not
|E|=|V|-1

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

cycle graphs:

A

Cn, aka circuit graphs, 1 cycle, a ring of however many vertices, what if you connected the end vertices of a path graph
|E|=|V|

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

complete bipartite graphs:

A

Km,n - vertex set is the union of 2 sets, and the edge set is each vertex of one set connecting to every vertex of the other
|E|=|V1|*|V2|

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

bipartite graph:

A

each vertex from the first set can be connected to only some of the vertices of the second, but the 2 vertex sets are still disjoint and each edge connects one vertex from one set to one in the other

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

cube graphs:

A

Id - the d-dimensional cube graph, each vertex is a string of d 0s and 1s, and all possible vertex labels occur. edges connect the vertices that differ by exactly one digit
|V|=2^d, |E|=d2^(d-1)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

degree:

A

the degree of a vertex (deg(v)) is the number of edges connected to that vertex, or the number of times it appears in the edge set - digraphs have deg(in)(v) and deg(out)(v)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

handshaking lemma:

A

if G(V,E) is an undirected graph, Σdeg(v)=2|E|

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

corollary of the handshaking lemma:

A

in an undirected graph, there must be an even number of vertices with odd degree

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

edge list:

A

take a vertex set {1,2,3}. the edge set is smth like E={(1,2),(2,3),(1,3)} - if every vertex is contained within the edge list, we can just use the edge list

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

adjacency matrix:

A

the adjacancy matrix A has elements Aij=1 if an edge between the vertices i and j exist, and 0 otherwise - row is the first/tail vertex, column is the second/tip in a digraph - if it’s a multigraph, take the number of edges

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

degree and adjecancy matrix:

A

you can calculate the degree of a vertex by summing the row/column, and for deg(out) you take the row and deg(in) take the column

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

adjacency list:

A

a list of all the vertices a given vertex v is connected to, Av, in a digraph you have the predecessor and successor lists for the vertices that precede or succeed v

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

isomorphism:

A

2 graphs are isomorphic if there exists a bijection f:V1->V2 such that the edge (F(a),F(b)) in E2 iff (a,b) in E1
|V1|=|V2| and |E1|=|E2|
deg(v)=deg(F(v))

20
Q

degree sequence:

A

a list of degrees of vertices of an undirected graph, arranged in ascending order
isomorphic graphs have the same degree sequence, but 2 graphs with the same degree sequence aren’t necessarily isomorphic

21
Q

subgraph:

A

a subgraph G’(V’,E’) is a part of a graph G(V,E) such that V’⊆V and E’⊆E
a subgraph induced by V’ is a subgraph that only contains vertices in V’ and edges that only involve vertices in V’

22
Q

k-colouring:

A

a function f:V->{1,…,k} that assigns distinct values to adjacent vertices - adjacent vertices must have different colours - if a graph has a k colouring we say it’s k-colourable

23
Q

examples of graphs and colourings:

A

the complete graphs Kn are n-colourable
Km,n (the complete bipartite graph) is 2-colourable (1 for each set)

24
Q

chromatic number:

A

the chromatic number χ(G) is the smallest number k such that G is k-colourable

25
Q

lemmas from the chromatic number:

A

any graph has χ(G)=2 iff it’s bipartite
if H is a subgraph of G and G is k-colourable, so is H
if H is a subgraph of G, χ(H)<=χ(G)

26
Q

the greedy colouring algorithm:

A

order the vertices, order some colours, colour the first one the first colour, go through each vertex choosing the first possible colour that isn’t the same as that of an adjacent vertex, stop when they’re all coloured
may not give χ(G), but will give an upper bound
basic step is lookin at neighbour’s colours, with 2|E| basic steps

27
Q

floor and ceiling:

A

x is a real number
the floor ⌊x⌋ is the greatest integer <=x
the ceiling ⌈x⌉ is the least integer >=x
for all real x, x<⌊x⌋+1

28
Q

logs and lengths in decimal digits:

A

the decimal representation of a natural number n has exactly d=1+log10(n) digits
NOTE!! this is the number of digits and Not a decimal number it’s just named confusingly :(

29
Q

square matrix multiplication:

A

basic step is arithmetic operations of 2 real numbers (addition and multiplication)
ABij=(n)Σ(k=1)AikBkj
that’s n^2(n+(n-1))=2n^3+n^2 total operations
cause n multiplications and n-1 additions for 1 entry, and n^2 entries

30
Q

primality testing:

A

in these cases we use the worst case efficiency, cause you test for primes by testing all divisors from 2 to root(n) and if there’s no divisors it’s prime, so it could be 1 step or it could be root(n)-1 or inbetween, take the worst case root(n)-1
measure size of input with d=log10(n) (no. of digits)
basic step is n mod b (does b divide n, if yes, n mod b = 0)

31
Q

upper bound of asymptotic growth:

A

f(n)=O(g(n)) if ∃ c1>0 such that for all sufficiently large n, f(n)<=c1(g(n))
primality testing takes O(10^(d/2)) steps

32
Q

lower bound of asymptotic growth:

A

f(n)=Ω(g(n)) if ∃ c2>0 such that for all sufficiently large n, f(n)>=c2(g(n))

33
Q

both bounds of asymptotic growth:

A

f(n)=Θ(g(n)) if f(n)=O(g(n)) and f(n)=Ω(g(n))
greedy colouring takes Θ(|E|) basic steps, taking c1 as 1 and c2 as 3
matrix multiplication takes Θ(n^3) steps, by putting n^3 or 3n^3 on either side of 2n^3-n^2 and combining

34
Q

walk:

A

a series of edges, if v0=vn, it’s a closed walk

35
Q

length of a walk:

A

no. of edges in the sequence

36
Q

trail:

A

a walk where all the edges are distinct, closed trail has v0=vn

37
Q

path:

A

a trail where all the vertices are distinct

38
Q

cycle:

A

a closed trail with all distinct vertices except v0 and vn, which are the same

39
Q

trails paths and walks connection:

A

all trails are walks and all paths are trails, venn diagram is 3 concentric circles with walks on the outside and paths in the centre

40
Q

connected:

A

2 vertices are connected if there’s a walk between them, a graph is connected if all vertices are connected

41
Q

equivalence relation:

A

a relation ~ is equivalent if it’s:
reflexive - a~a
symmetric - a~b -> b~a
transitive - a~b and b~c -> a~c
equivalance class is the disjoint subset of all the equivalent things, such as areas of rectangles on a 2d plane - each area has its own equivalence class of rectangles that don’t overlap

42
Q

equivalence relation in undirected graphs:

A

they are reflexive by definition
they are symmetric as a walk can be reversed
they are transitive cause you can attach 2 walks together to create a walk between the first vertex of the first walk and the last of the second

43
Q

connected component:

A

of an undirected graph
a subgraph induced by an equivalence class under the relation ‘is-connected-to’ on V
p sure on a connected graph, there is only one connected component, just showing how many bits there are
the equivalence class then contains the vertices that are part of that connected subgraph

44
Q

accessibility:

A

a vertex b is accessible (or reachable) from another vertex a if a digraph G contains a walk from a to b - also all vertices are accessible from themselves

45
Q

strongly/weakly connected:

A

in a digraph, 2 vertices a and b are strongly connected if there exists a walk from a to b and from b to a
they’re weakly connected if only one of those walks exists
a digraph is strongly connected if all vertices are strongly connected
it’s weakly connected if all vertices are weakly connected, same as saying if all edges were converted to undirected ones, it would be connected

46
Q

|G|:

A

the graph you get when you convert all directed edges of a directed multigraph to undirected ones - if you have a->b and b<-a, it becomes 2 parallel edges

47
Q

connected vertices are always joined by a path proof:

A

going a to b
if all vertices in the sequence of the walk are distinct, it’s a path, you’re done
if not, remove everything before the last appearance of a and after the first appearance of b
then, for each other repeated vertex, remove everything between their first appearance and the first vertex after the last appearance (so take out the last one)
do that for all of them and voila a path, as there can only be so many repeated vertices