Sign in to follow this  

'simple' academic neural nets question

This topic is 3860 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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? :)

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

This topic is 3860 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this