Structures Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

division theorem

A

backwards E unique numbers q, r such that

a = qb + r and 0 <= r < b

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

simple divisibility facts

A

c | a implies c | (sa)
if c | a and c|b then c|(a+b)
[ if a = k1c, b = k2c then a+b=(k1 + k2)c

if c | a and c | b then c | (sa+tb)

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

Euclidean Algorithm

A

the gcd of two numbers is the gcd of b and the remainder of a divided by b (provided b ≠ 0
gcd(a,b) = gdc(b, rem(a,b))

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

what is the relationship of gcd with respect to a and b?

A

gcd(a,b) is an integer linear combination of a and b.

gcd(a,b) = sa+tb

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

Fundamental Theorem of Arithmetic

A

Every integer > 1 factors uniquely into a weakly decreasing sequence of primes

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

Congruence (in number theory)

A

Congruence is a relation between two numbers, a and b. It’s determined by another parameter n, where n is considered to be greater than one. All of these, as usual, are integers.

it is defined as follow: a is congruent to b mod n if n divides a minus b or a minus b is a multiple of n.

Def : a =_ b (mod n) iff n|(a-b)

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

remainder lemma

A

a =_ b (mod n) iff rem(a,n) = rem(b,n)

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

when is it okay to cancel out a k within a mod equation

A

When k has no common factors of n

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

Euler’s Theorem

A

for k relatively prime to n:
k ^ ( phi * (n)) = _ 1 (mod n)

phi(mn) = phi(m) * phi(n) if m, n are relatively prime.

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

a relatively prime number

A

Two real numbers are relatively prime if and only if their gcd is 1

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

Fermat’s Little Theorem

A

given n is prime
a**(n-1) = 1 (Z sub(n) )

e.g. what is rem(24^78, 79) ?

Since 79 is prime and 24 is not a multiple of 79, Fermat’s Little Theorem is applicable, and it implies that is congruent to 1 modulo 79.

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

Walk

A

follow successive edges (which can repeat)

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

Path

A

a walk comprised of successive edges that do not repeats traversal of any edge

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

True or false - The shortest walk between two vertices is a path

A

True

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

length n walk relation

A

v g^n w IFF

What this means is with two vertices, v and w, there is this Gn relation between v and w if there exists a length n walk from v to w.

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

minimal subject (schedule)

A

has no prerequisites within a dag

17
Q

antichain (scheduling)

A

A set of subjects with no indirect prerequisites among them (they can be taken in any order)

18
Q

a chain (dag schedule)

A

The sequence of subjects that must be taken in order (subjects are comparable)

19
Q

minimum # terms to graduate

A

minutes parallel time = max chain size

20
Q

max term load

A
# processor for 
minimum time <= max antichain size
21
Q

Dilworth’s Lemma

A

every n-vertex DAG has
a chains of size > t
or antichain of size >= n/t

every n-vertex DAG has a chain of size > and/or anti-chains of size sqrt(n)

22
Q

tree

A

various definitions:

1) a connected graph with no cycles
2) a tree is a connect graph with every edge a cut edge
3) edge-minimal connected graph
4) an edge-maximal acyclic graph
5) graph in which there is a unique path between any 2 vertices

23
Q

cycle

A

Cycle is a close walk of length > two that doesn’t cross itself

24
Q

“pure” trees

A

unordered, unrooted, undirected trees

25
Q

what is a cut edge

A

An edge is a cut edges if removing it from the graph disconnect two vertices.

an edge is not a cut dged iff it is on a cycle

26
Q

spanning subgraph

A

a spanning subgraph of graph G is a subgraph that has all the vertices of G. A spanning tree is a spanning subgraph that is a tree.

27
Q

what are the ways to grow a minimum weight spanning tree (MST’s)

A
  • Start at any vertex, keep building one tree. (Prim)
  • Keep choosing minimum weight edge between different components (Kruskal)
  • grow trees in parallel (Meyer)
28
Q

We can build a minimum spanning tree using the gray-edges technique, which involves coloring _____ black and white, selecting the _____ gray edge, and reiterating until we obtain a tree.

A

components, minimum-weight

29
Q

What is the largest possible number of vertices in a tree whose vertices are all leaves?

A

2

30
Q

What is the smallest possible number of leaves in a tree with 99 vertices?

A

2

31
Q

What is the largest possible number of leaves in a tree with 99 vertices?

A

98

32
Q

What is the largest possible number of leaves in a forest with 1000 vertices?

A

1000

33
Q

t/f – An MST of a graph G is always unique.

A

False. This is only true when the edge weights of G are distinct. Otherwise, consider a complete graph with all edges having equal weights. This graph obviously does not have a unique MST.