Essentially, two well-known algorithms are implemented to solve the first three problems defined in section 1. Following two sections gives a high level explanation of the two algorithms.