Homeworks for the course CS 5354/CS 4365, Summer 2021

General comments:

1. (Due July 8)

Solution

2. (Due July 8) We know that:

What you need to do:

Solution

3. (Due July 8) If the degree of confidence in a statement A is 0.7 and the degree of confidence in a statement B is 0.8, then what are the estimated degrees of confidence in statements A & B and A \/ B? Consider two cases:

Solution

4. (Due July 12) Let us consider the following expert rules:

Describe step-by-step -- like we did in class and like it is described in the corresponding lecture -- how you would translate these rules into a formula for the corresponding predicate R(b,t,p) meaning that if the cat is in the state b and you have time t, then it is reasonable to play it for time p.

Let us now assume that:

What will then be the resulting degree μR(b,t,p)?

Solution

5. (Due July 9) Prepare a project that you would like to do for the class.

6. (Due July 12) What is the distance D(a,b) between the points a = (1, 2) and b = (6, −10)?

Solution

7. (Due July 12) What is the squared distance D2(a,b) between the points a = (1, 2, 3) and b = (−1, −2, −3)?

Solution

8. (Due July 12) Use differentiation to find the minimum (= smallest value) of the expression (2x − 5)2 + 3x − 6.

Solution

9. (Due July 12) Suppose that we have the following reasonableness degrees:

What will be the result of centroid defuzzification?

Solution

10. (Due July 14) Write a program that simulates fuzzy control with the three rules that we had in class:

Your program should:

Use separate methods for computing the corresponding membership functions, for computing the "and"-operation, and for computing the "or"-operation, so that if you will need to change one of these operations, all you would have to do it replace the corresponding method without having to change the main method.

Test your program on the example of membership functions that we had in class and values ΔT = +3 and ΔT = −3. For each of these two values of ΔT, use your program to compute the resulting control value corresponding to the following two pairs of "and"- and "or"-operations: cases:

Solution

11. (Due July 13) Write a general program for computing an integral of a given function over a given range. Test it by showing how to compute the integral of x2 on the interval [0,1].

Solution

12. (Due July 14) Reproduce, in all detail, the proof that linear interpolation is the most robust.

Solution: see Section 3 of Lecture 3.

13. (Due July 14) Different marks on a 0-to-5 scale correspond to different degrees of confidence. For each possible degree corresponding to marks on a scale from 0 to 5, find the mark on a 0-to-4 scale which leads to the closest value of the degree.

Solution

14. (Due July 14) Reproduce, in all detail, the proof that algebraic product is the most robust "and"-operation.

Solution: se Section 5 of Lecture 3.

15. (Due July 14) As you know, in the usual 2-valued logic, negation is defined by the formulas f(0) = 1 and f(1) = 0. We would like to extend this function f(x) to all possible values x from the interval [0,1]. Such an extension is known as the negation operation. What is the most robust negation operation?

Solution

16. (Due July 16) Prove that for the case when f(a) > f(b), linear interpolation is also the only maximally individually robust interpolation.

Solution

17. (Due July 20) Use the least squares method to find the dependence y = c1 * x + c2 for the case when we have the following three measurements:

Solution

18. (Due July 20) Suppose that we know that f(0) = 2 and f(2) = 1. Use variational derivative to find the value f(1) for which the sum (f(1) − f(0))2 + (f(2) − f(1))2 attains its smallest possible value.

Solution

19. (Due July 20) Let us assume that we know the values f(a) and f(b) for some a and b, and we want to interpolate, i.e., to find the values f(x) for all x between a and b. By definition, the maximally individually robust interpolation f(x) must satisfy the inequality |f(x) − f(y)| ≤ r * |x − y| for all x and y, where r = |f(b) − f(a)|/|b − a|. Provide an example of the values x and y showing that when a = 0, b = 1, f(a) = 0, and f(b) = 1, the function f(x) = x2 is not a maximally individually robust interpolation. Hint: it is sufficient to consider values 0, 0.5, and 1.

Solution

20. (Due July 20) We have shown that the only maximally individually robust "or"-operation is max(a,b). Maximally individually robust means, in this case, that for all possible values a, b, a′, and b′, we must have |f\/(a,b) − f\/(a′,b′)| ≤ max(|a − a′|, |b − b′|). Provide an example of the values a, b, a′, and b′ showing that the "or"-operation a + b − a * b is not maximally individually robust. Hint: it is sufficient to consider values 0, 0.5, and 1.

Solution

21. (Due July 20). Which "and" and "or"-operations should we use in the following two situations:

Solution

22. (Due July 20). So how can we use fuzzy techniques to come up with explainable AI?

Solution

23. (Due July 20) What is tuning? What is the difference between tuning and machine learning?

Solution

24. (Due July 21) Write a program that, given two arrays of values x(1), ..., x(K) and y(1), ..., y(K), uses the least squares method to find the values of the parameters c1 and c2 of the linear dependence y = c1 * x + c2. Test your method on two examples:

25. (Due July 26) Suppose that a 2-layer neural network has two inputs x1 = 0 and x2 = 1.

What will be the result z of this data processing in the following two situations:

Solution

26. (Due July 26) What will be the result of max-pooling three values x1 = 0, x2 = 1, and x3 = −1? of sum-pooling these three values?

Solution