0 votes
1 view
in AI and Deep Learning by (42.1k points)

The problem is to teach the computer to do an addition. Computers know numbers: he "knows" that after 1 goes 2 after 2 goes 3 and so on. Having that data computer can easily get the next number.

Next, computer have the knowledge that x+0=x and x+(y+1)=(x+1)+y. This axioms let computer to do addition. For example, to add 5 and 3, computer makes following: 5+3 = 5+(2+1) = (5+1)+2 = 6+2 = 6+(1+1) = (6+1)+1 = 7+1 = 8.

But this is too long to add numbers in such a way. The problem is to develop a program that can improve this way of addition using the rules of mathematics and logic. The goal should be that addition must be executed in O(log(N)) time, not O(N) time, N is the magnitude of added numbers.

Does this program have any science value? Is there any program that can do such things?

1 Answer

0 votes
by (90.8k points)

Recurrent Neural Network (RNN) can be trained to add arbitrary numbers.

Though it is simpler to do so in binary than other number systems since binary is just 1s and 0s thus it is easier to represent this using neural networks. You just need to work in binary then change the resulting sum back to the number system of your choice.

The reason for using RNNs is that you can teach them the addition of arbitrarily long binary codes. This is not feasible for typical ANNs as they can be limited to a particular length of binary code. 

Although simpler approaches might work without needing much data e.g. linear regression.

Essentially, a label is nothing but a function f(x) at some x = a where x is typically an array of vectors x1, x2, …etc. So given enough examples of addition i.e. having the numbers you want to add as attributes and the sum as the label, your model should be able to perform addition once you have good training accuracy.

A linear regression model treats every data point as

f(x) = ax1+bx2+cx3+…

Essentially, once you learn a, b,c,.. are always 1, your model should be able to perform addition.

Trying to use images directly where you would have the issue of A+B>=10 is a more complex way of dealing with this problem. I would first identify the digits to convert it into integers (or even floats) and then deal with this.

Welcome to Intellipaat Community. Get your technical queries answered by top developers !


Categories

...