| N | Risk | WGT | HGT | Collesterol |
|---|---|---|---|---|
| 1 | high | high | short | more than 200 |
| 2 | high | high | med | more than 200 |
| 3 | med | high | tall | 100-200 |
| 4 | low | high | tall | less than 100 |
| 5 | low | med | tall | 100-200 |
| 6 | med | med | short | 100-200 |
| 7 | low | med | short | less than 100 |
| 8 | high | med | med | more than 200 |
| 9 | med | low | short | more than 200 |
| 10 | med | low | tall | more than 200 |
| 11 | low | low | med | less than 100 |
| 12 | med | low | med | more than 200 |
2. Show that the McCulloch-Pitts neuron with the following activation function will not calculate the logic function implies: -x + y + 1. Assume that the threshold is 0 -- that is, the neuron fires when its activation is greater than or equal to 0. And assume that the inputs are either 1 or 0.
3. Design a McCulloch-Pitts neuron to calculate the logic function implies. HINT: Draw the truth table for implies. For each row of the table, make an inequality in which the left hand side has the following form: w1 * X + w2 * Y + c. For the first row, you would get the inequality: w1 + w2 + c >= 0 because X=1, Y=1, and the function is true in that case. Solve the four inequalities for w1, w2, and c.
4. For the XOR network in figure 11.12 on page 473, determine whether the following weight parameters provide a network that recognizes XOR: WH1 = -2.0, WH2 = -2.0, WHB = 2.5, WOB=2.0, W01= -5.0m W02= - 4.0, WOH=-11.0.
5. Suppose you are trying to solve the following bin-packing problem. You have a collection of boxes numbers 0, 1, 2, ..., n-1. Each box has an associated weight. You have a collection of containers, each of which has a maximum weight of W. The idea is to place boxes into a container, never exceeding its capacity but filling it as closely as possible to its capacity. For example, suppose b1=10, b2=15, and b3=20 and W=30. If you place b1 and b2 into the container, you have 5 pounds of unused capacity. However, if you place b1 and b3 in the container, you have achieved an optimal packing. This is the kind of optimization problem that genetic algorithms can be handle.
Develop a binary function that can be used by a GA for this problem. Illustrate its use with an example involving a small number of boxes. Show that your representation would allow both crossover and mutation.
6. For the same GA as in the preceding problem, describe an evaluation function that can be used to determine the fitness of the different chromosomes. In other words, given your representation in problem 5, describe a way to distinguish a good fit from a bad fit. Obviously, a chromosome in which the total weight of the container exceeds its capacity is a bad fit. One that perfectly fills the container is a perfect fit. (You can assume that the program has a separate data structure to store the weights of the individual boxes so that b1's weight can be looked up in a table, and so on.