HiveBrain v1.2.0
Get Started
← Back to all entries
patternMinor

Does time or space complexity of arithmetic operations get affected by the number of digits?

Submitted by: @import:stackexchange-cs··
0
Viewed 0 times
spaceoperationsthenumberdigitstimeaffectedgetdoescomplexity

Problem

Suppose I have two 5-digit numbers (A and B) and two 50-digit numbers(C and D). Do the operations A+B and C+D have equal complexity in terms of time and space? or C+D is more complex due to the size of digits?

Solution

The complexity of arithmetic operations is typically measured in bit operations, though not everybody agrees this is the correct measure. There is a Wikipedia page listing the complexity of the best algorithms currently known for various operations, including addition and multiplication.

Context

StackExchange Computer Science Q#124158, answer score: 3

Revisions (0)

No revisions yet.