The given two problems are solved by using Handshaking (and marriage) theorem.
a. Assume a graph has 5 vertices of degree 1, 40 vertices of degree 2, and 5 vertices of degree 3. How many edges should the graph have?
b. Assume we have employees Alice, Bob, and Charles and there are four jobs to be done. Alice can do job 1 or 2, Bob can do job 2 or 3, and Charles can do jobs 2 or 4. Draw a bipartite graph representing this situation, and indicate a complete matching from employees to jobs on this graph.