Mathematical Notations and Functions



Floor and Ceiling

  • n is called the floor of X if nif n is the greatest number that is smaller than X
  • n is called the ceiling of X if n is the smallest number that is greater than X




  • Remainder Function [modular arithmetic]




    Integer and Absolute Value


    Decimal is not an integer : 3.45 is a decimal , 3 is an integer .
    Absolute value of X : gives the positive value of X even if X is negative
    Summation - Given the limits of a particular variable the values each index of that variable hold will added to the return of the summation function
    Factorial - Same as the summation function but the operation here is multiplication the product is returned in as the final value from the function
    Permutations - Suppose a set contains a few elements , the arrangements of these elements is called as a permute
    The number of arrangements of these elements without any repeatations is called as permuataions
    A formula to find the permutations of n number is by factorial
    i.e permutations (n) = factorial (n)


    Algorithmic Notations


    1. Name of the algorithm
    2. Comments
    3. Data Type
    4. Variable names
    5. Steps [declarations / Macros]
    6. Assignment Statement
    7. Expression [Conditions]
    8. Input and Output
    9. Goto Statements
    10. End Statements
    11. Functions or Procedures



    Control Structure


    The mechanism that allows us to control the flow of the execution are called control structures.
    There are four main catergories of control structures
    1. Sequence
    2. Selection
    3. Iteration
    4. Branching

    Complexity of algorithms