Chapter 7: Relations Flashcards

1
Q

What is a relation?

A

A connection between two sets. a relation R from s -> T is a subset of S x T

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

Give examples of relations

A

Two column table in a relational database- binary relation
database set of n-ary relations
The graph of a function
A function with exactly one t with (s, t) in R

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

Give the identity relation on s

A

{(s, s) in S x S | s in S}

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

Give the relational composite

A

R’ = {(s,s’’) in S x S’’ | exists s’ in S. (s,s’) in R and (s’,s’’) in R’}

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

What operations can be performed on relations

A

Union: R U S = {(a,b) in A x B | (a,b) in R or S}
Intersection: R and S = {(a,b) in A x B | (a,b) in R and S}
Complement: Rc = {(a,b) in A x B | (a,b) not in R}
Opposite/inverse Rop = {(a,b) in A x B | (b,a) in R}

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

Define a partial function

A

for every s in S there is at most one t in T with

s mapped to t

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

What is the domain of definition of a partial function?

A

{s in S | fs is defined}.

There is a unique total function g: dom f to T for which all s in dom f are defined as gs = fs

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

Give the composite of two partial functions

A

(g . f) s = g(fs) if fs and g(fs) are defined

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

What is a binary relation

A

A relation from a set to itself: S -> S

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

What is a directed graph?

A

A directed graph on a set is given by a binary relation on S. elements of S are nodes and the pairs in the relation the edges

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

What is reflexivity? What is the reflexive closure?

A

A binary relation is reflexive if for all s in S, sRs.

The reflexive closure of a relation A is:
R U Identity_a

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

What is symmetry? What is the symmetric closure?

A

A binary relation is symmetric if for all s, s’ in S sRs’ and s’Rs

The symmetric closure is R U Rop

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

What is anti symmetry?

A

if aRb and bRa then a=b

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

What is transitivity? What is the transitive closure?

A

A binary relation is transitive if for s, s’, s’’ in S
sRs’ and s’Rs’’ implies sRs’’

If there is a path from s to s’ then there is an edge from s to s’

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

What is an equivalence relation?

A

A binary relation that is reflexive, symmetric and transitive

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

Describe Mod as an equivalence relation

A

Mod 3 gives us 3 equivalence classes {0,1,2}
We can calculate with these classes by adding or multiplying.
Hence for every number n we may calculate with equivalence classes modulo n

17
Q

How do we find the multiplicative inverse? i.e m^-1 (mod n)

A

Find a number such that m x l = 1 (mod n)
i.e. m x l = i x n + 1
Do this using Euclid’s Algorithm

18
Q

How do we calculate a^b (mod n)?

A

alg 1: calculate a^b then calculate remainder when dividing by n
alg 2: keep multiplying by base and calculating the remainder when dividing by n at each step
alg 3: bring down the number of multiplications is brought down using the squaring operation

19
Q

What is a partial order?

A

A partial order on a set S is a binary relation which is reflexive, anti symmetric and transitive.
A set together with a partially order is a poset

20
Q

What is the quotient of S with respect to ~?

A

The set of equivalence classes of set S with respect to relation ~, written S\~

21
Q

What is a Hasse Diagram?

A

We draw partial orders as an undirected graph that is oriented on the page. An element is <= another if it sits lower on the page. We don’t draw transitive connections

22
Q

What is a total order?

A

A partial order <= with the property that for all s, s’ in S
s <= s’ or s] <= s

23
Q

Define maximal/minimal of a poset (P, <=)

A

maximal if for all p’ if p <= p’ then p = p’

minimal if for all p’ if p’ <= p then p’ = p

24
Q

Define greatest and least of a poset (P, <=)

A

Greatest if for all p’ p’ <= p

Least if for all p’ p <= p’

25
Q

Define Upper and lower bound of a set S of poset (P, <=)

A

Upper bound if for all p’ in S, p’ <= p

Lower bound if for all p’ in S, p <= p’

26
Q

Define p as Least upper and Greatest lower bound of a subset S of the poset (P, <=)

A

Least Upper Bound (supremum) if an upperbound for S and if p’ is an upperbound for S then p <= p’

Greatest lower bound (infimum) if a lower bound and if p’ is a lower bound for s then p’ <= p