Lecture 7 Flashcards
Define an Algorithm?
An algorithm is an ordered set of unambiguous, executable steps that defines a terminating process.
An algorithm can be seen as a tool for solving a well-specified computational problem.
Pseudo code notation
INPUT– indicates a user will be inputting something
OUTPUT– indicates that an output will appear on the screen
WHILE– aloop(iterationthat has aconditionat the beginning)
FOR– a counting loop (iteration)
REPEAT – UNTIL– a loop (iteration) that has a condition at the end
IF – THEN – ELSE– a decision (selection) in which a choice is made any instructions that occur inside a selection or iteration are usually indented
What is stepwise refinement?
Stepwise refinement: Divide the problem into smaller problems (top-down methodology)
What is a Flowchart?
A flowchart is a diagram that represents a set of instructions.
What is recursion?
The execution of a procedure leads to another execution of the procedure
How does the binary search work?
First check the middle list element
If the key matches the middle element, we are done
If the key is less than the middle element, the key must be in the first half
If the key is larger than the middle element, the key must be in the second half
Big O
Measured as number of instructions executed
Big theta notation or Big O: Used to represent efficiency classes
Example: Insertion sort is in Θ(n2)
Best, worst, and average case analysis
What is software verification and what are the two types?
To assure that software fully satisfies all the expected requirements.:
Dynamic verification, also known as Test or Experimentation - This is good for finding bugs
Static verification, also known as Analysis - This is useful for proving correctness of a program although it may result in false positives
Big O
Measured as number of instructions executed
Big theta notation or Big O: Used to represent efficiency classes
Example: Insertion sort is in Θ(n2)
Best, worst, and average case analysis
What is software verification and what are the two types?
To assure that software fully satisfies all the expected requirements.:
Dynamic verification, also known as Test or Experimentation - This is good for finding bugs
Static verification, also known as Analysis - This is useful for proving correctness of a program although it may result in false positives
What is Validation?
Validation. The assurance that a product, service, or system meets the needs of the customer and other identified stakeholders. It often involves acceptance and suitability with external customers.
What is Verification?
The evaluation of whether or not a product, service, or system complies with a regulation, requirement, specification, or imposed condition. It is often an internal process