'simple' academic neural nets question

Started by
2 comments, last by Timkin 16 years, 11 months ago
I was going through some past examination papers with a friend recently and one of the questions was the typical 'XOR with 2 hidden nodes' problem. If I remember it correctly, it then said that it could be generalised to a half-adder by adding a second output node, the idea being that the SUM output comes from the current XOR implementation, and the CARRY output comes from an AND implementation. However, I couldn't work out how to get an AND from it, given that the outputs from the 2 hidden nodes are the same in both the (0,0) case and the (1,1) case. The input->hidden layer performed the (A AND NOT B) and (NOT A AND B) roles, with the hidden->output layer effectively performing an OR operation on those two outputs. Did I misread it, and is a 3rd hidden node required? I think the activation function only output -1 or 1 in each case but I could be remembering that wrong also! With a continuous activation function I can imagine that another solution might present itself, but I couldn't even mentally picture that after bashing my head against the wall with the discrete approach. Can someone point me in the right direction so I can work this out, for my own sanity? :)
Advertisement
If you connected the input nodes directly to the new output node, bypassing the hidden layer, and setting an appropriate threshold, that could give the and operation. Maybe that's what it meant?
Yes, I thought that it's quite trivial if you don't have to 'undo' what the hidden nodes have done!

I think it would also be fairly easy if the activation function didn't clamp things to -1 or 1 as presumably I could produce 4 different combinations of values, which would be linearly separable down the middle, splitting the XOR outputs appropriately, and separable at one extreme or the other, just separating off the true AND output.
If you read what I wrote previously, ignore it... that was a multi-valued logic network...sorry... yes, you should be able to make a half-adder simply adding a second output and ensuring that one output is singly connected to each hidden node and the other output is singly connected to all nodes (hidden and input).

Cheers,

Timkin

This topic is closed to new replies.

Advertisement