Question

Neural Networks

We will now build some neural networks to represent basic boolean functions. For simplicity, we use the threshold function as

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Let the threshold function be denoted by g(t)

a) OR

Output table for OR Function
x1 x2 y
0 0 0
0 1 1
1 0 1
1 1 1

g(w1*0+w2*0+w3)=0 (x1=0,x2=0) \Rightarrow g(w3)=0 ...................(1)
g(w1*0+w2*1+w3)=1 (x1=0,x2=1) \Rightarrow g(w2+w3)=1 ...................(2)
g(w1*1+w2*0+w3)=1 (x1=1,x2=0) \Rightarrow g(w1+w3)=1 ...................(3)
g(w1*1+w2*1+w3)=1 (x1=1,x2=1) \Rightarrow g(w1+w2+w3)=1 ...................(4)

From (1), g(w3)=0 \Rightarrow w3=0
From (2), g(w2+w3)=1 \Rightarrow w2+w3>0 => w2>0 \Rightarrow w2=1
From (3), g(w1+w3)=1 \Rightarrow w1+w3>0 => w1>0 \Rightarrow w1=1

Hence. w1=1,w2=1,w3=0
These can be verified by putting in (4)

a) AND

Output table for AND Function
x1 x2 y
0 0 0
0 1 0
1 0 0
1 1 1

g(w1*0+w2*0+w3)=0 (x1=0,x2=0) \Rightarrow g(w3)=0 ...................(1)
g(w1*0+w2*1+w3)=0 (x1=0,x2=1) \Rightarrow g(w2+w3)=0 ...................(2)
g(w1*1+w2*0+w3)=0 (x1=1,x2=0) \Rightarrow g(w1+w3)=0 ...................(3)
g(w1*1+w2*1+w3)=1 (x1=1,x2=1) \Rightarrow g(w1+w2+w3)=1 ...................(4)

From (1), g(w3)=0 \Rightarroww3=-1 as w3=0 will not satisfy equation (4).
From (2), g(w2+w3)=0 \Rightarroww2+w3<=0 \Rightarrow w2+(-1)<=0 \Rightarrow w2=1 as w2=0,-1 will not satisfy equation (4).
From (3), g(w1+w3)=0 \Rightarroww1+w3<=0 \Rightarrow w1+(-1)<=0 \Rightarrow w1=1 as w1=0,-1 will not satisfy equation (4).

Hence. w1=1,w2=1,w3=-1

c) XOR

Output table for XOR Function
x1 x2 y
0 0 0
0 1 1
1 0 1
1 1 0

Boolean Representation of XOR -
x1x2'+x1'x2 (x1' represents x1 complement)
Simplification -
\Rightarrowx1'x2 + x1x2' + x1'x1 + x2'x2
\Rightarrowx1(x1' + x2') + x2(x1' + x2')
\Rightarrow(x1 + x2)(x1' + x2')
\Rightarrow(x1 + x2)(x1x2)'
It is a combination of 1 OR, 2 AND and 1 NOT function.
1 D う 1 90224

Add a comment
Know the answer?
Add Answer to:
Neural Networks We will now build some neural networks to represent basic boolean functions. For simplicity, we use the threshold function as our basic units instead of the sigmoid function, where th...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT