AL

Cards (32)

  • Induction
    The inductive step is the part where to generalize your basis and take it a step further
  • Data type

    Refers to the kinds of data that a variable may hold in a given programming language
  • Theorem
    A mathematical statement which is proven to be true
  • O(log n)
    Logarithmic if the largest term in the formula is a constant times a logarithm of n, then the algorithm is "Big- O on the logarithm of n"
  • Lemma
    A statement that has been proven true in order to further help in proving another statement
  • Array
    Allocated sequentially in contiguous memory locations
  • Proof
    A logical argument that tries to show that a statement is true
  • Array information

    • One dimensional
    • Two dimensional
  • Implies
    One method for proving the existence of such an object is to prove that P ⇒ Q (P implies Q)
  • Informal
    Pseudo-Language is a combination of the informal English statements and the constructs of a programming language
  • Inductive
    The inductive step is the part where to generalize your basis and take it a step further
  • Data Structure

    A way to organize data
  • Odd number

    Can be characterized by n = 2k + 1
  • Debugging should not be the most-time consuming part of programming
  • Contradiction
    A common form of proving a theorem is assuming the theorem is false, and then show that the assumption is false itself
  • Pseudocode
    The textual representation of an algorithm's flowchart. It is an English-like representation of the code required for an algorithm
  • Outputs
    Data items resulting from the execution of an algorithm
  • How to design/create programs

    1. Input and Output Specification
    2. Algorithm and Data Structure Design
    3. Translation of Algorithm to a certain Programming Language
    4. Program Testing and Debugging
  • Algorithm
    A finite sequence of instructions that can be performed in a finite length of time in order to solve a problem(s)
  • Pseudo-Language

    A combination of the informal English statements and the constructs of a programming language
  • Data type refers to the kinds of data that a variable may hold in a given programming language
  • Data Structure is simply a way to organize data
  • Designing Data Structure and Algorithm is expressed in pseudocode or pseudo-language
  • Once we have designed a data structure and an algorithm, we have now a program expressed in pseudocode or pseudo-language. And yet, we cannot run this program on a computer unless we translate that pseudo code into a programming language of your choice
  • Criteria for Algorithms

    • Input
    • Output
    • Definiteness
    • Finiteness
    • Effectiveness
  • A computer cannot perform an instruction if it has insufficient information or if the result of the execution could be inherently undefined
  • Big-O Notation

    • Quadratic
    • Linear
    • Logarithmic
  • Rules for Big-O Notation

    1. Rule 1 - for loops
    2. Rule 2 - Nested for loops
    3. Rule 3 - Consecutive statements
    4. Rule 4 - if else
  • Pseudocode is the textual representation of an algorithm's flowchart. It is an English-like representation of the code required for an algorithm
  • Data Types and Values in Algorithmic Language

    • Real Number
    • Character String or String Constant
  • One-dimensional Array

    Start + k (i-1)
  • Two-dimensional Array

    • Row-major: Start + k ( [ ( i - 1) n] + [ j - 1] )
    • Column-major: Start + k ( [ ( j - 1) m] + [ i - 1] )