Final Flashcards

awdawdwad

1
Q

What is a binary relation from A to B?

A

For sets A and B, a subset of A × B

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

What is a binary relationship on A?

A

Any subset of A × A

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

The number of relations from A to B is?

A

2^|A||B|

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

What is a function?

A

denoted f : A → B, is a relation from A to
B in which every element of A appears exactly once as
the first component of an ordered pair in the relation

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

For the function f : A → B, What is the domain? The codomain?

A

Domain = A. Codomain = B.

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

What is the range of a function?

A

The subset of B consisting of
those elements that appear as second components in the
ordered pairs of f

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

What is a one to one function?

A

if each element of B appears at most once as the image
of an element of A.

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

How many one-to-one functions from A to B?

A

|B|^|A|

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

What is a onto function?

A

a function f that maps an element x to every element y. That means, for every y, there is an x such that f(x) = y

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

The number of onto functions from A to B, where
|A| = m, |B| = n and m ≥ n is?

A

n!S(m, n)

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

The number of ways in which it is possible to distribute
the m distinct objects into n identical containers, with no
container left empty, is

A

s(m.n)

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

The number of ways to distribute m distinct objects into n distinct containers, such that no container is left empty is

A

n!S(m, n)

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

What is a binary operation on A?

A

For any nonempty sets A, B, any function
f : A × A → B is called a binary operation on A. If
B ⊆ A, then the binary operation is said to be closed
(on A) (or A is closed under f ).

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

What is a unary/monary operation on A?

A

A function g : A → A is called unary, or monary,
operation on A.
Example
g : Z → Z, where g(a) = −a.

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

What is a communitive function?

A

f (a, b) = f (b, a)

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

What is an associative function?

A

f for all
a, b, c ∈ A, f (f (a, b), c) = f (a, f (b, c))

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

What is an identity in a function?

A

An
element x ∈ A is called an identity (or identity
element) for f if f (a, x) = f (x, a) = a, for all a ∈ A.

If f has an identity, then that identity is unique.

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

When can you use Combinations with Repetition?

A

Selecting r objects from a collection of n objects where
repetition is allowed and order doesn’t matter.

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

what is a homogenous vs non homogenous function?

A

When f (n) = 0 for all n ≥ 0, the relation is called
homogeneous; otherwise it is called
non-homogeneous

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

What is a trail?

A

No edge repeated. If There’s a Trail, There’s Path

21
Q

What is a circuit?

A

Closed x-x trail

21
Q

What is a path?

A

No vertex repeated

22
Q

What is a cycle?

A

Closed x-x path

23
Q

For any graph G = (V, E), the number of components
of G is denoted by what?

24
Q

What is a complete graph?

A

a loop-free undirected graph, where
for all a, b ∈ V, a ̸= b, there is an edge {a, b}.

25
Q

What is a pendant vertex?

A

A vertex of degree one?

26
Q

What is the relationship between degree of vertices and edges in a undirected graph?

A

total deg of all vertices = 2 |E|

27
Q

What is a regular graph?

A

An undirected graph (or multigraph) where each vertex
has the same degree is called a regular graph. If
deg(v) = k for all vertices v, then the graph is called
k-regular.

28
Q

what is a n-cube?

A

n-cube or n-dimensional hypercube is the graph
Qn = (V, E) where
|V| = 2n
and the vertices are labelled with n-bit
binary strings
v1, v2 ∈ E if and only if the labels for v1 and v2
differ in exactly one position.

29
Q

What is the minimum number of
colours needed to properly colour G called

A

chromatic number of G and is written χ(G).

30
Q

What is a bipartite graph?

A

A graph G = (V, E) is called bipartite if V = V1 ∪ V2
with V1 ∩ V2 = ∅, and every edge of G is of the form
{a, b} with a ∈ V1 and b ∈ V2. If each vertex in V1 is
adjacent to every vertex in V2, we have a complete
bipartite graph. In this case, if |V1| = m and |V2| = n,
then the graph is denote by Km,n.

31
Q

What is the chromatic polynomial?

A

the chromatic
polynomial of G, denoted P(G, λ), is the number of
ways we can properly colour the vertices of G using at
most λ colours.

32
Q

What is a tree and a forest?

A

Let G = (V, E) be a loop-free undirected graph. The
graph is called a tree if G is connected and contains no
cycles. If G contains no cycles, we call it a forest.

33
Q

What does a removal of a edge of a tree do?

A

Disconects; If a and b are vertices in a tree T = (V, E), then there
is a unique path that connects these vertices.

34
Q

What is a spanning tree and a spanning forest?

A

A spanning tree for a connected graph is a spanning
subgraph that is a tree. A spanning forest for a graph
is a spanning subgraph that is a forest.

35
Q

How do you know if a graph G is connected using trees?

A

If G = (V, E) is an undirected graph, then G is
connected if and only if G has a spanning tree.

36
Q

What is the relationship between verticies and edges in trees?

A

In every tree T = (V, E), |V| = |E| + 1.

37
Q

How many pendant verticies does a tree have?

A

For every tree T = (V, E), if |V| ≥ 2, then T has at
least two pendant vertices.

38
Q

How many
distinct paths are there (as subgraphs) in a tree T?

A

(n choose 2)

39
Q

What is the in and out degree?

A

the in degree of v is the number of edges in G that
are incident into v. id(v).
b) the out degree of v is the number of edges in G
that are incident from v. od(v).

40
Q

What is a directed tree?

A

If G is a directed graph, then G is called a directed tree
if the undirected graph associated with G is a tree

41
Q

What is a rooted tree?

A

When G is a directed tree, G is called a rooted tree if
there is a unique vertex r, called the root, in G with
id(r) = 0, and for all other vertices v, id(v) = 1.

42
Q

What are leafs and branch nodes?

A

In a rooted tree, a vertex with out degree 0 is called a
leaf (or terminal vertex). All other vertices are called
branch nodes (or internal vertices).

43
Q

What is a binary tree?

A

A rooted tree is called binary if for each vertex v,
od(v) = 0, 1, or 2. If od(v) = 0 or 2 for all v, then the
rooted tree is called a complete binary tree.

44
Q

What are m-ary trees?

A

Let T = (V, E) be a rooted tree and let m ∈ Z
+
. We
call T an m-ary tree if od(v) ≤ m for all v ∈ V. When
m = 2, the tree is called a binary tree. If od(v) = 0 or
m, for all v ∈ V, then T is called a complete m-ary
tree. The special case of m = 2 results in a complete
binary tree.

Let T = (V, E) be a complete m-ary tree with |V| = n.
If T has ℓ leaves and i internal vertices, then
(a) n = mi + 1;
(b) ℓ = (m − 1)i + 1;
(c) i = (ℓ − 1)/(m − 1) = (n − 1)/m.

45
Q

What is height and balance?

A

If T = (V, E) is a rooted tree and h is the largest level
number achieved by a leaf of T, then T is said to have
height h. A rooted tree T of height h is said to be
balanced if the level number of every leaf in T is h − 1
or h.

46
Q

What is distance in a weighted graph?

A

Distance in a Weighted Graph
Consider loop-free connected digraphs with weights
assigned to the edges. Note: If (x, y) ̸∈ E, we define
wt(x, y) = ∞. The length of a weighted directed path is
the sum of the weights of each edge. The distance from
a to b is
d(a, b) =

length of a shortest a − b path
∞ if no a − b path exists

47
Q

Distance from a Vertex to a Set

A

Distance from a Vertex to a Set
For fixed v0 ∈ V and S ⊂ V with v0 ∈ S. Then
S = V − S and we define the distance from v0 to S by
d(v0, S) = min
v∈S
{d(v0, v)}