Lab 3 1. Prolog facts and rules ------------------------- Here are some facts about two cyclists: armstrong is faster than virenque. virenque is stronger than armstrong. monday's race is short. tuesday's race is long. The rules are: If the race is short, the faster of the two cyclists wins. If the race is long, the stronger of the two cyclists wins. a. Formalize this problem, implement the necessary Prolog facts and rules. b. What queries do you need to execute in order to find out: - who wins the race on monday? - who wins the race on tuesday? 2. Prolog data structures ------------------------- Let figure/2 be a predicate with two arguments. The first argument is the name of a geometric figure. The second argument is a data structure that stores the lenght of each egde. (A triangle has 3 endges, a square has 4 edges but they are all of equal length, so only one needs to be stored.) figure('ABC', triangle(10,3,5)). figure('XYZ', triangle(5,6,8)). figure('MNPQ', square(10)). Write a predicate that computes the perimenter (sum of the lengths of the edges) for any figure (triangle or square). How many arguments will it have? What queries will you execute? 3. Start working on Assignment 1 -----------------------------