Sure. the algorithm for kicking a ball might look something like this:
Look at the ball
Switch weight to left foot
Bring right foot back
Take aim at the ball
Fling right foot forward
Follow through
The “task” can be anything: extracting roots, determining a number to be prime or not, tracking subatomic particles in a colision, or tying your shoes. A task can have more than one algortithm, and some may be more efficient than others.
A definition commonly given in computer science courses is as follows: An algorithm is a finite, ordered set of unambiguous, executable steps, defining a terminating process, that provides a solution to a problem.
Loosely speaking, a “task” is a statement of the form “Given input satisfying conditions A, produce ouput satisfying conditions B.”
No. You have, arguably, given a task, which, if spelled out more explicitly, might read something like “Given 1 and 1, produce the sum of 1 and 1.” However, you haven’t given an algorithm, because you haven’t provided any instructions for how to complete this task.
In this case, your task could be “Given a ball and a leg, produce the kicking of that ball by that leg.”
In a very formal sense, algorithms are easy to understand–an algorithm is a Turing machine, and a Turing machine is an algorithm. This precise sense is necessary for showing that some problems can’t be solved by an algorithm (technicalities suppressed here).
For the common definition, a list of unambiguous steps to be taken in solving a problem is what’s usually given.
Or, in the loosest terms, an algorith is just a method. It will specify where you start, where you are going to end, and what exact sequence of steps you will take to get from one to the other. This can be very simple - for example, a recipe, even for hot water, is an algorithm. They can also be very complex - for example, the sequence of steps to generate a session key for a secure online transaction and apply it to the data to be exchanged. So long as you have a defined starting point (it can be very general, so long as it’s well defined), a defined ending point, and a method to get from the start to the end, you have an algorithm.
Note that an algorithm doesn’t have to terminate in certain cases. The algorithms used deep inside an OS that maintain resources and such are intended to run forever. When they actually do halt, that’s a bad thing in this case.
The processes are implementations of the algorithms. I know, I write the research papers for the algorithms that others have turned into real code used in real systems. I was just being informal. But it raises a good point.
What’s the difference between a program and an algorithm? What I have told students over the years:
A program is what I tell a computer.
An algorithm is what I tell a human being.
Computers need all the details and every comma in the right place. You can skip over details with humans. Also with humans, the more they know, the more you can leave out. E.g., “Throw these values into a hash table…” might be adequate in some cases.