I'm aware that neural networks are probably not designed to do that, however asking hypothetically, is it possible to train the deep neural network (or similar) to solve math equations?
So given the 3 inputs: 1st number, operator sign represented by the number (1 - +
, 2 - -
, 3 - /
, 4 - *
, and so on), and the 2nd number, then after training the network should give me the valid results.
Example 1 (2+2
):
- Input 1:
2
; Input 2:1
(+
); Input 3:2
; Expected output:4
- Input 1:
10
; Input 2:2
(-
); Input 3:10
; Expected output:0
- Input 1:
5
; Input 2:4
(*
); Input 3:5
; Expected output:25
- and so
The above can be extended to more sophisticated examples.
Is that possible? If so, what kind of network can learn/achieve that?