Described the algorithm in the report for ex. b)