Homeworks for the course CS 5354/CS 4365, Fall 2019

General comments:

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

2. (Due September 4) Let us consider the following expert rules:

Describe step-by-step -- like we did in class and like it is described in the handout -- 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)?

3. (Due September 4) Similar to what we did in class, use calculus to find the values x and y for which the value x2 − x*y + y2 + x + y is the smallest possible.

4. (Due September 5) Either select a project or make an appointment with the instructor regarding possible projects.

5. (Due September 16) Write a program that simulates fuzzy control with the three rules that we had in class:

Your program should input ΔT and return the corresponding control u.

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 thing, 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 that are listed in the handout) and values ΔT = +3 and ΔT = −3. For each of these two values of ΔT, your program should compute the resulting control value corresponding to the following two pairs of "and"- and "or"-operations: cases:

Reminder about linear interpolation: The general formula for a linear function whose value is equal to y1 when x = x1 and equal to y2 when x = x2 is y = y1 + k*(x − x1), where k is the following ratio:

k = (y2 − y1)/(x2 − x1).

Reminder about integration: For any function f(u) on an interval [a,b], its integral over this interval can be computed as an integral sum

f(u1) * Δu + f(u2) * Δu + ...,
where: A sample code that we discussed in class for computing the integral is as follows. Let us assume that we already have a method for computing f(u), then we can compute the integral by using the following method:
public static double integral (double a, double b){
  double sum = 0.0;
  double u = a;
  double delta_u = 0.1; % any small number will do
  while(u <= b){
    sum += f(u) * delta_u;
    u += delta_u;}
  return sum;
}

6. (Due September 18) Use linear interpolation to come up with an appropriate fuzzy analogue of exclusive or.

7. (Due October 2) Use Lagrange multiplier method to solve the following constraint optimization problem: find a point on a unit circle x12 + x22 = 1 which is the furthest away from the point (3, 4).

8. (Due October 2) Perform the first step of gradient descent to find the minimum of a function 2(x1 − 2)2 + 3(x2 + 2)2. Start with a point (0, 0) and use α = 0.1.

9. (Due October 14) Write a program that uses backpropagation to train a traditional 3-layer neural network. Submit the printout of your code and the printout of an example that you used to test your code.

Comments: