26 Matching Annotations
  1. Oct 2018
  2. Oct 2017
    1. algorithms require two important control structures: iteration and selection

      Python provides loop and conditional statements.

      Loop sttements:

      1. while loop
      2. for loop

      Conditional statements:

      1. if statement
      2. ifelse statement
    1. called __add__ in Python

      The operator module exports a set of efficient functions corresponding to the intrinsic operators of Python. For example, operator.add(x, y) is equivalent to the expression x+y.

    2. Python supports the object-oriented programming paradigm

      The main OOP concepts:

      1. an object as a model of a real object
      2. a class as a factory for objects or as a template that defines the structure of objects from this class and behavior of objects from this class
      3. an object as an instance of a class
      4. a method with or without parameters describes the behavior of instances
      5. calling or invoking method
    1. algorithms require constructs that perform sequential processing, selection for decision-making, and iteration for repetitive contro

      Programming languages provide control structures for sequential, conditional and iterative performing partial actions.

    2. Programming is the process of taking an algorithm and encoding it into a notation, a programming language, so that it can be executed by a computer

      This is programming in the narrow sense of the word. Programming in a broader sense contains also analysis of the problem, design the solution, testing, debugging, maintaining.

    3. Algorithms describe the solution to a problem in terms of the data needed to represent the problem instance and the set of steps necessary to produce the intended result

      Algorithm is a transformation of valid input data to corresponding otput data.

      Features of a good algorithms:

      Precision– the steps are precisely stated(defined).

      Uniqueness– results of each step are uniquely defined and only depend on the input and the result of the preceding steps.

      Finiteness– the algorithm stops after a finite number of instructions are executed.

      Input– the algorithm receives input.

      Output– the algorithm produces output.

      Generality– the algorithm applies to a set of inputs.

    1. two important areas
      1. The study of algorithms and data structures makes you better algorithmic problem solver.
      2. For algorithms implementation is used Python programming language. Review this language is not exhaustive. For more details I refer you to the parallel course Python Basics.
    1. seeing how different algorithms are designed helps us to take on the next challenging problem that we are given.

      There are general design techniques (strategies) for solving algorithmic problem:

      1. Brute Force
      2. Backtracking
      3. Greedy approach
      4. Dynamic Programming
      5. Divide and Conquer
  3. Sep 2017