Beep Boop Bip
[Return] [Entire Thread] [Last 50 posts] [First 100 posts]
Posting mode: Reply
Name
Email
Subject   (reply to 1002)
Message
BB Code
File
File URL
Embed   Help
Password  (for post and file deletion)
  • Supported file types are: BMP, C, CPP, CSS, EPUB, FLAC, FLV, GIF, JPG, OGG, PDF, PNG, PSD, RAR, TORRENT, TXT, WEBM, ZIP
  • Maximum file size allowed is 10000 KB.
  • Images greater than 260x260 pixels will be thumbnailed.
  • Currently 1064 unique user posts.
  • board catalog

File 129830710196.jpg - (179.83KB , 1024x638 , BanchouShark.jpg )
1002 No. 1002 [Edit]
so is it like possible to create an algorithm to calculate any function using only addition and subtraction.
I tried my hand at that the day and I couldn't find a way to calculate multiplication that didn't involve integers(2.45*3.68 for example) as I couldn't find a way to move a number's decimal place using only addition or subtraction.
what do you guys think
am I missing something here?
>> No. 1003 [Edit]
I dont think its possible
why would you want to do that
>> No. 1004 [Edit]
>>271
I haven't the slightest clue
an impulse I guess
>> No. 1005 [Edit]
2.45+2.45+2.45+...(368 times)

Then move the decimal place two places.

To move the decimal place x times you have to divide by 10 x times. To divide by 10 you have to multiply with 0.1.

Fuck. It's impossible.
>> No. 1006 [Edit]
>>270
Multiplication is not repeated addition, at least when it involves non-whole numbers. That's just something that elementary school teachers teach because it's easier for kids to "understand" even though they're not really understanding it on a conceptual basis.

There's a reason why it's one of the 4 elementary mathematical operations. Just go google "multiplication is not repeated addition" and you should get a lot of hits.

So to answer your question, it's impossible.
>> No. 1007 [Edit]
>>274
>There's a reason why it's one of the 4 elementary mathematical operations

On a second thought, I'm not sure if this is correct. I think most(?) mathematicians consider there to be only 3 basic operations (addition, multiplication, and exponentation) since subtraction is just an inverse of addition and division is an inverse of multiplication.
>> No. 1011 [Edit]
>>278
http://academic.evergreen.edu/projects/biophysics/technotes/misc/bin_math.htm
>> No. 2813 [Edit]
>create an algorithm to calculate any function using only addition and subtraction.
If you allow only linear functions, your output can only be a linear function of the input. But add simple non-linearity (e.g. in the form of ReLU function) and yes you can approximate any (*) function to any precision you'd like. It's basically what neural networks do. https://en.wikipedia.org/wiki/Universal_approximation_theorem

(*) Computable, continuous, and probably differentiable if you want to be pedantic.

Post edited on 27th Jul 2022, 7:22pm
>> No. 2977 [Edit]
2,45*3.68 = 0,0001 x (245*368)
>> No. 2978 [Edit]
>>2977
You can obviously carry out any finite precision arithmetic (and in practice, finite precision arithmetic is all there is) if you track the precision yourself, since that's how computers do it. But that's not strictly speaking "only addition and subtraction" as I interpreted the question since you track the pair (significand, precision). Although I suppose it's a minor point since even rational numbers are constructed as equivalence classes.

Even allowing linear functions isn't enough for arbitrary computation (since the output can only be linear in the input), but with non-linearity added we can approximate functions to arbitrary precision we choose. If we go further and allow feedback, then we just have turing machines and we can compute any computable function.
>> No. 2979 [Edit]
>>2978
You might also be interested in the complexity class p/poly. The circuit model of complexity is in some sense more "natural" to analyze since it's a simple feed-forward network. Of course the limitation is a circuit has fixed number of inputs, so the language decided by a given circuit has finite, bounded string length. If you loosen this by allowing circuit families, you get p/poly which is stronger than p.

There are very interesting theorems here, e.g. bounded-depth circuits using AND, OR, NOT, and mod-p gates can't compute mod q, for p and q distinct primes. (Razborov Smolensky theorem). This can be considered as a more general-case of the fact that parity is not in AC0 (try it out, computing parity for an n-bit input requires log-depth circuits!).

What's interesting is that if you allow mod-6 gates you get surprising power, and so far not much is known about what's not solvable. A somewhat recent result (2010-ish) is nexp not in acc0[m] for any m, i.e. it's only recently that we've been able to prove bounded-depth circuits with boolean and modulo gates can't decide languages in NEXP.

The above can be extended to arithmetic circuits as well, which are essentially what simple neural networks are. See https://core.ac.uk/download/pdf/4894171.pdf

Post edited on 31st Oct 2022, 2:29am
>> No. 3134 [Edit]
>>2979
You don't need to go to arithmetic circuits, you can look at class TC0, since majority function can approximately be treated as an activation function.
[Return] [Entire Thread] [Last 50 posts] [First 100 posts]

View catalog

Delete post []
Password  
Report post
Reason  


[Home] [Manage]



[ Rules ] [ an / foe / ma / mp3 / vg / vn ] [ cr / fig / navi ] [ mai / ot / so / tat ] [ arc / ddl / irc / lol / ns / pic ] [ home ]