2a. Draw the graph with vertices V = {A,B,C,D,E,F,G,H} and edges E ={(A,B), (A,C), (B,H), (C,B), (C,F), (D,B), (D,E), (F,H), (G,A), (G,F)}.
2b. Is the graph a DAG? Yes the graph is a Directed Acyclic Graph (DAG) since it contains no cycles.
2c. What, if any, are the source vertices? D and G are source vertices since they only have edges leading
out of the vertex and no edges leading into them.
2d. What, if any are the sink vertices? E and H are sink vertices since they only have edges leading into
them and no edges leading out.
2e. What is the longest path?
G - A - C - F - H and G - A - C - B - H each have 5 vertices and 4 edges and are the longest in this graph.
YES
R = {(1,60), (2,30), (3,20), (4,15), (5,12), (6,10), (10,6), (12,5), (15,4), (20,3), (30,2) (60,1)}
A function is a special type of relatiion in which the second member of an ordered pair is uniquely
determined by the first member. The enumeration above of all elements of R allows us to conclude
that R is a function by inspection of all ordered pairs.
The Domain and Range of the function R = {1,2,3,4,5,6,10,12,15,20,30,60}
--- OR
NO it is not a function if we consider the Domain and Range all integers,
because there are some values (eg 7) in the Domain that have no associated values
in the range!!!!
5a. Show that congruence mod5 is an equivalence relation over the set of integers.
i. reflexive: a = a (mod 5) if there exists an integer k such that a - a = 5k. Solving the
integer equation for k, we get k=0.
ii. symmetric: a = b (mod 5) implies that a-b = 5k. Since we are dealing with integers, multiply
both sides of this equation by -1 to obtain b-a = 5 (-k). Hence b=a (mod 5).
iii. transitive: a = b (mod 5) implies that a-b=5k for some integer k.
b = c (mod 5) implies that b-c=5n for some integer n.
a-b+b-c = (a-b) + (b-c) = 5k + 5n = 5(k+n) k+n is an integer since the
integers are closed under addition, hence a=c(mod5).
[0] = {...-15, -10, -5, 0, 5, 10, 15, ...}
[1] = {...-14, -9, -4, 1, 6, 11, 16, ...}
[2] = {...-13, -8, -3, 2, 7, 12, 17, ...}
[3] = {...-12, -7, -2, 3, 8, 13, 18, ...}
[4] = {...-11, -6, -1, 4, 9, 14, 19, ...}