Problem Solving with Algorithms and Data Structures - Part 1
Programming has changed over the years. It has gone through a rapid evolution. Yet some of the basic principles have remained constant. Primarily, the science of computing is to solve the problems using computers.
We are going to understand fundamental relation between the computer science and the algorithms and data structures with the aid of Python programming language. This series of articles is kind of an excerpt plus my understanding of the book Problem Solving with Algorithms and Data Structures.
Computer science:
- study of problems, problem-solving, and the solutions that come out of the problem-solving process.
- given a problem, a computer scientist’s goal is to develop an algorithm, a step-by-step list of instructions for solving any instance of the problem that might arise.
- algorithms are finite processes that if followed will solve the problem.
- algorithms are solutions.
A problem is computable if an algorithms exists for solving it. Hence the word computable
for the problems that can be solved using algorithms. And to reiterate algorithms are solutions to a problem or many problems. Solutions are independent from the machines.
Abstraction is a general idea of looking at the problems and its solutions in two different perspectives viz. physical and logical. An example to demonstrate this peculiarity in abstractions can be found within our usage patterns with computers. Most people use computers to work and solve their tasks with the functions provided in the machine. They view this idea of working machine presented to them as “interfaces” in a logical way i.e. user perspective. However a computer programmer or a scientist have more detailed and physical perspective of “under the hood”.
Programming:
Programming is the process of taking an algorithm and encoding it into a notation that can be executed by a computer. The encoded notation is a programming language. Without an algorithm there can be no program.
Computer science is not the study of programming or programming languages. Programming is an important part used by scientists to represent their solutions to the problems in computer science. Algorithms have a stepwise process and input data to provide intended solution to a problem. And programming languages are created to provide a set of notations to represent these processes and their data in the form of a program.
NOTE: This is Part 1 of a multi-part series.
Part 2 is coming soon.