What is a Problem? What is an Algorithm?
A problem in a computer science perspective must generally be something that can be answered by a computer. You would get the data from whatever source, you as the human would ask the question of how to store it or represent it or find a part of it or something, and then the computer would perform specific actions that lead to the answer to your question.
You can do something like set specific constraints and put in specific data into the computer, and then given your logical arguments and values, the computer can then output a valid answer by performing whatever calculations you instructed it to.
You need a well defined mathematical input and so this way you can get and interpret the well defined mathematical output
So this very British man is posing the question of what value squared is equal to 2, not really, he is saying it possible for x to in an integer, so a whole number from -infinity to infinity.
The answer is obviously no because for the statement to be true, you would need to get He brings up a good point though, you can either outright solve this by using regular math principles like a human would, or you can calculate the square of each integer until you get one that is larger or equal to 2.
In practice, for a human at least, the first option is much easier, you solve the problem outright with algebra, however for a computer, at least in writing the code, it is much easier to actually implement the second option, so he says we have to be mindful that there are different solutions to different problems and that we need to know which ones are better
What is an Algorithm
Algorithm: is a general and simple set of steps which if followed solve a problem.
The output of an Algorithm is the CORRECT solution to a given problem
An algorithm can be described in basic steps, this can be basic steps of arithmetic, or simple logical operations like if/then statements and what not.
Following this definition, it is the SECOND SOLUTION that actually works like an algorithm, it is also best to have an algorithm that can apply to a wide range of changes to your given problem.
Al-Khwarizmi and Euclid
Algorithms can actually be defined before computers came into existence, many years before hand in face. Mathematician Al-Khwarizmi is considered the father of algebra and authored the book “The Compendious Book on Calculation by Completion and Balancing”
His name in Latin was written as Algorithmi and this is also where we get the name of Algorithm from. This is also where we get the solution for how to solve quadratic equations using the compiling the square method.
Euclid also did some shit regarding this. He made one of the first algorithms, even before the word algorithm became a thing
Algorithms are basically perfect for computers because they are simple and repetitive, meaning they are perfect for a CPU or GPU
From Mathematics to digital Computers
You need to think about how you would actually take your algorithm and then convert it into computer code. You can have mathematical values and then you need to find out how to convert them into code.
Take:
What is x?
This is gotten algebraically pretty easily because you know you can just subtract the pi squared and then use it to logically complete the square right. This however is much more difficult for a computer because a computer does not know how to balance an equation like this, it only things in assignment and operation
Not what the fuck he talked about though okay, I am surprised, he says that you cannot represent pi as something in a computer because computers store values in memory and have finite space, pi being irrational does not work here. This is fucking stupid because his whole point is just using an approximation of pi using a floating point basically.
Herrings method or something
For approximating the square root of numbers:
You basically keep on squaring halved numbers until you eventually get the correct or well, as good as it can really get or as good as you want it to get approximation

