Exercise 1 Yes. If an element exists in the subset, then it exists in the

advertisement
Exercise 1
1. Yes. If an element exists in the subset, then it exists in the set. If an element exists in two sets,
then it exists in the union of the two sets, so if an element exists in the union of two subsets,
then it exists in the union of the two full sets.
2. Yes. If an element exists in a subset of one set, then the intersection of two subsets are the
minimum intersection of the two full sets of which the subsets are subsets of.
Exercise 2
a
0
0
0
0
0
0
0
0
1
1
1
1
1
1
1
1
b
0
0
0
0
1
1
1
1
0
0
0
0
1
1
1
1
c
0
0
1
1
0
0
1
1
0
0
1
1
0
0
1
1
aVcVd bVcVd a V d c V d b V d
d aVbVd a V b
0
0
1
1
1
1
1
1
1
1
1
0
0
1
1
1
0
0
1
1
1
1
1
1
1
1
1
1
1
1
0
1
0
1
1
1
1
1
1
0
1
1
1
0
1
1
1
1
0
1
1
1
1
1
1
0
1
1
1
1
1
1
0
1
0
1
1
1
1
0
1
1
1
1
1
1
0
1
1
1
0
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
0
1
0
1
1
0
1
0
1
1
0
1
1
1
1
1
0
1
0
1
1
0
1
0
1
1
0
1
1
1
0
1
This formula is not satisfiable, the table above tests all possible inputs against each function to be joined
with and statements, and no single column outputs truth for all component outputs.
Exercise 3
Possible combinations:
2, 2
2, 5
2, 6
2, 2
2, 5
2, 6
5, 6
5, 2
6, 2
5, 6
5, 2
6, 2
2 ∗ 4 + 2 ∗ 11 + 4 ∗ 7 + 4 ∗ 8
= 7.5
12
Exercise 4
With two vertices:
a
b
Adding another edge between a and b would be adding a parallel edge, which violates the rules of a
simple graph. No loops can be added either.
Adding additional vertices (3+):
a
c
b
When the additional vertex is added, an edge is added. This increases the degree of the existing vertex
to with the new vertex is connected, but the new vertex has the same degree as the other existing edge.
From here a third edge can be added between a and c, in which case all vertices would have the same
degree. This is the case with all vertices added beyond 2 vertices.
Exercise 5
f(n)
either O, W, or Q
g(n)
1 100n + log n n + (log n)
2 n log n
10n log(10n)
Q
Q
3 n1.01
n(log n) 2
O
n
W
2
4 (log n)
3 n
5n2
log n
n
3
Q
1. 100n + log n = O(n)
n + (log n) = O(n)
2. n log n = O(n log n)
10n log(10n) = O(n log n)
3. Exponential will grow faster than loglinear
4. n will grow faster than polylogarithmic
5. n32n = O(cn)
3n = O(cn)
Download