ELI5: Explain Like I'm 5

Computational complexity of mathematical operations

Computational complexity is a way of measuring how difficult it is to perform a mathematical operation using a computer. Imagine you are playing with blocks, and you have to count how many blocks you have. If you only have a few blocks, this is easy - you can count them by eye. But if you have hundreds or thousands of blocks, it would take you a lot longer to count them!

Similarly, some mathematical operations are easy to compute for small numbers, but become very time-consuming for larger numbers. For example, adding two numbers is very easy - you can do it in your head, or with a calculator. But multiplying two very large numbers can take a long time, even for a powerful computer. This is because the computer has to perform the operation many times, and each step takes a certain amount of time.

To measure the computational complexity of a mathematical operation, we use a unit of measurement called "time complexity". This tells us how many steps a computer would need to take in order to perform the operation. For example, adding two numbers might have a time complexity of O(1), meaning that it takes one step to perform the operation. Multiplying two large numbers might have a time complexity of O(n^2) or O(n^3), meaning that it takes n squared or n cubed steps to perform the operation, where n is the number of digits in the input numbers.

In summary, computational complexity is a measure of how difficult it is to perform a mathematical operation using a computer, and we use time complexity as a way of measuring this difficulty. Operations that take many steps to perform are more computationally complex, and can be more time-consuming for a computer to complete.