Neural Networks
Homework 2, Due 21 January 2011
1. (Haykin 3/e problem 1.3)
a. The perceptron may be used to perform numerous logic function. Demonstrate the
implementation of the binary logic function AND, OR, and COMPLEMENT.
(Assume the input
to AND and OR is two numbers drawn from {-1,1} representing false and true (respectively) and
the input to COMPLEMENT is one number drawn from {-1,1}.
To implement AND, we can use weights
u
w
=[m
0.511
]
T
for the bias,
x
, and
y
respectively.
These values yield the following truth table:
AND
x
y
bias
v, y
1
1
1
1.5, 1
1
-1
1
-.5, -1
-1
1
1
-.5, -1
-1
-1
1
-2.5, -1
To implement OR, we can use weights
u
w
=[
111
]
T
yielding this truth table:
OR
x
y
bias
v, y
1
1
1
3, 1
1
-1
1
1, 1
-1
1
1
1, 1
-1
-1
1
-1, -1
Finally, to implement NOT, we can use weights
u
w
=[
01
]
T
yielding truth table:
NOT
x
bias
v, y
1
1
1, 1
-1
1
-1, -1
b.A basic limitation of the perceptron is that it cannot implement the EXCLUSIVE-OR function.
Explain the reason for this limitation.