Can a neural network learn a multiplexer model?
Yes, this is a relatively simple template for a large neural network.
You will need at least 3 layers, I think, assuming sigmoid functions:
- 1st level can test C> k (and maybe also scale A and B down to the linear range of the sigmoid function)
- The second level can compute A / 0 and 0 / B conditionally at the 1st level
- The third (output) layer can do a weighted sum to give A / B (you may need to make this layer linear rather than sigmoid depending on the scale of the values you want)
Having said that, if you really know the structure of your problem and what calculation you want to perform, then Neural Networks are unlikely to be the most efficient solution: they are better in situations where you know little about the exact calculations needed to model functions / relationships.
source to share