You are on page 1of 2

Q:- 1 We know that in-degree of a vertex v, denoted by deg−(v)

and out-degree of a vertex v, denoted by deg+ (v) Then, Find the in-
degree and out-degree of each vertex in the graph G with directed
edges shown in below figure.

Solution:

In-degrees:
deg−(a)=2, deg−(b)=2, deg−(c)=3, deg−(d)=2, deg−(e)=3, deg−(f)=0.

Out-degrees:
deg+(a)=4, deg+(b)=1, deg+(c)=2, deg+(d)=2, deg+(e)=3, deg+(f)=0.

Q2:- Determine whether each of these functions from {a, b, c, d} to


itself is one-to-one,
a) f(a)=b, f(b)=a, f(c)=c, f(d)=d
Solution:
Is one-to-one—each element maps to a distinct element.

b) f(a)=b, f(b)=b, f(c)=d, f(d)=c


Solution:
Not one-to-one, since b is the image of both a and b.

c) f(a)=d, f(b)=b, f(c)=c, f(d)=d


Solution:
Not one-to-one, since d is the image of both a and d.

You might also like