Social Icons

Wednesday, December 13, 2017

What is Algorithm ?




1 - Overview of an algorithm


An algorithm is a finite and unambiguous sequence of operations or instructions to solve a problem or obtain a result.

The word algorithm comes from the Arabic name الخوارزمي of the 9 th century Persian mathematician Al-Khwārizmî. The domain that studies algorithms is called algorithmics. Today we find algorithms in many applications such as computer operation, cryptography, information routing, planning and optimal use of resources, image processing, word processing, bio -informatic, etc.


2 - General definition of an algorithm


An algorithm is a general method for solving a type of problem. It is correct when, for each instance of the problem, it ends by producing the correct output, that is, it solves the problem. The effectiveness of an algorithm is measured notably by its computation time, by its consumption of RAM memory (assuming that each instruction has a constant execution time), by the precision of the results obtained (for example with use of probabilistic methods, like the Monte-Carlo method), its scalability (its ability to be effectively parallelized), etc. The computers on which these algorithms run are not infinitely fast: machine time remains a limited resource, despite a steady increase in computer performance. An algorithm will therefore be said to perform well if it uses sparingly the resources available to it, that is to say the CPU time, RAM memory and (aspect object of recent research) the power consumption. The analysis of the algorithmic complexity makes it possible to predict the evolution in computation time necessary to bring an algorithm to completion, according to the quantity of data to be processed.

3 - Some related definitions


George Boolos -1940-1996-, philosopher and mathematician, proposed the following definition  "Explicit instructions for determining the nth member of a set, for n an arbitrarily large integer. Such instructions are given in a very explicit manner, in a form that can be used by a calculating machine or by a human who is able to transpose very elementary operations into symbols. "
Donald Knuth (1938-) listed the following five properties as the prerequisites of an algorithm:

    finitude: "An algorithm must always end after a finite number of steps. "
    precise definition: "Each step of an algorithm must be precisely defined, the actions to be transposed must be specified rigorously and unambiguously for each case. "
    entries: "uantities given to it before an algorithm starts. These entries are taken from a specified set of objects. "
    outputs: "... quantities having a specified relationship with the inputs. "
    performance: "... all the operations that the algorithm must perform must be sufficiently basic to be able to be carried out in finite time by a man using a paper and a pencil. "

Gérard Berry -1948-, a researcher in computer science, gives the following general definition:

    "An algorithm is simply a way of describing in great detail how to do something." It turns out that many mechanical actions, all probably, lend themselves to such decortication. The goal is to evacuate the thought of the calculation, in order to make it executable by a digital machine (computer ...). We only work with a digital reflection of the real system with which the algorithm interacts.

4 - Practical approaches for solving algorithmic problems


The algorithmic has developed some strategies to solve the problems:

    greedy algorithm: a first algorithm can often be proposed by studying the problem very gradually: we solve each sub-problem locally hoping that all of their results will compose a solution of the global problem. We are talking about a greedy algorithm. The greedy algorithm is often only a first step in writing a more efficient algorithm;
    divide and conquer: to improve the performance of algorithms, a common technique is to divide the data of a problem into subsets of smaller sizes, to obtain data that the algorithm can handle on a case by case basis. A second step in these algorithms is to "merge" the partial results to obtain a global solution. These algorithms are often associated with recursion;
    exhaustive search (or combinatorial): a method using the huge computing power of computers is to look at all possible cases. This is only possible in certain particular cases (the combinatorics are often stronger than the huge power of computers, however huge);
    top-down / bottom-up decomposition: (top-down decomposition, upward decomposition) top-down decompositions consist of trying to break down the problem into sub-problems to be solved successively, the decomposition going as far as trivial problems that are easy to solve. The global algorithm is then given by the compound of the algorithms defined during the decomposition. The bottom-up approach is the opposite approach, it consists of simple algorithms, solving only one stage of the problem, to try to compose them to obtain a global algorithm;
    pre-processing / post-processing: sometimes, some algorithms have one or two phases identified as pre-treatments (to be done before the main algorithm), or post-processing (to be done after the main algorithm), to simplify the process. writing of the general algorithm;
    dynamic programming: it applies when the optimization problem is composed of several sub-problems of the same nature, and an optimal solution of the global problem is obtained from optimal solutions of the sub-problems.

5 - Formal study


Many formal or theoretical tools have been developed to describe the algorithms, to study them, to express their qualities, to be able to compare them:

    Thus, to describe the algorithms, algorithmic structures have been highlighted: control structures and data structures.
    To justify the quality of the algorithms, the notions of correction, completeness and termination were put in place.
    Finally, to compare the algorithms, a theory of the complexity of the algorithms has been defined.

6 - Algorithmic structures


The concepts implemented in algorithmic, for example according to the approach of N. Wirth for the most widespread languages ​​(Pascal, C, etc.), are in small numbers. They belong to two classes:

Control structures

        -sequences
        -conditional
        -loops

Data structures

        -constants
        -variables
        -arrays
        -recursive structures (lists, trees, graphs)

This division is sometimes difficult to perceive for some languages ​​(Lisp, Prolog ...) more based on the notion of recursion where certain control structures are implicit and, therefore, seem to disappear.


Younes Derfoufi

No comments:

Post a Comment

Python Exercises With Solutions

  1. Exercises on Python Strings
  2. Exercises on Python lists
  3. OOP Exercices with solutions
  4. Exercises on Python File I/O
  5. Python Dictionary Exercises
  6. Python Sets Exercises
  1. Python Arithmetic Exercises
  2. Equations & System Of Equations
  3. Polynomials and Functions
  4. Python Arithmetic Exercises 
  5. Numpy, Matplolib, Sympy , Scipy - Exercises
  6. Python Arithmetic Exercises
  1. Python GUI Tkinter Exercises



Younes Derfoufi

Category Of Mobile Courses

Actualités (644) Adsense (1) Affiliation (1) Algebraic Topology (2) Algorithmic (1) all-news (30) Android (5) Android App (8) Android app without code (4) Android Apps (256) Android Development (4) Android download (2) Android OS (3) AngularJS (1) Automata theory and formal language (5) Bootstrap CSS (1) C programming (5) Category and Functor (8) CMS (3) Computer Glossary (18) Create Mobile App With Ionic Framework (2) CSS (2) CSS-Cascading-Style-Sheets (4) Developpement Java (13) Differential Geometry (1) Django-Python-Framework (9) dropshiping (26) Earn Money by Internet (4) Emplois (23) Framework php (2) Fraud (2) HTML (7) Java For Beginners (10) Javascript (12) Kotlin Programming Language (8) Kotlin For Mobile Android (1) Linux Download (2) Marketing (5) Mobile (3) Mobile Courses (4) Mobile Marketing (4) MoneyGram (1) News (721) Node.js (5) Open Source (1) Photoshop (1) Protect Computer (1) Python (35) Python BeautifulSoup (1) Python For Data Science (2) Python PyQt (4) Python Reference (1) Python Source Code (1) Python-Books (6) Python-DVD-Training (1) Python-Exercises (297) Python-Framework (1) Python-IDE (1) Python-Kivy-Framework (2) Python-Modules (1) Python-pdf (2) Python-pyQt (1) Référencement (2) Script PHP (2) Security (6) SEO (1) Snipping Tool: Faq (1) Social Networks (1) Source Code (4) Statistics With SPSS (2) Surveillance Software (1) Travail à domicile (6) Tutoriels php en vidéos (2) Tutoriels-MySql (6) tutoriels-php (19) Utilitaires (1) VPS (1) Web Hosting (1) Webcam (1) Webmarketing (11) Western Union (1) Windows 10 (1) Windows 7 (4) Windows 7 Faq (2) Windows 8 (1) Windows Accessories (1) Windows Download (8) Windows Drivers (1) Windows Fonts (1) Windows Power Shell (2) Windows Registry (2) Windows Security (18) Windows Software (2) Windows Spyware (2) Windows utilities (3) Windows Virus (2) Windows Vista (3) Windows Wireless (1) Windows xp (1) Wordpress (1)
 

Sample text

Sample Text

 
Blogger Templates