Week 1 Flashcards

1
Q

Criteria of algorithms?

A
  1. Input: zero or more quantities are externally supplied
  2. Output: at least one quantity produced
  3. Definiteness: each instruction is clear and unambiguous
  4. Finiteness: if we trace out the instructions of an algorithm, then for all cases the algorithm terminates after a finite number of steps
  5. Effectiveness: every instruction must be very so that it can be carry out by a person only by pencil and paper
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Components of Pseudocode?

A
  1. Variable
  2. Iterative
  3. Selection
  4. Module
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Disadvantages of Recursive?

A
  1. Memory allocation
  2. Finite condition (avoid infinite loop)
  3. Debugging technique
  4. Understanding of scope variable
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Term of module in programming language?

A
  1. procedure
  2. sub
  3. function
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

communication with the caller dialing module?

A
  1. using parameter
  2. by value
  3. by reference/location
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Disadvantages of Recursive algorithm?

A
  1. memory allocation
  2. finite condition (avoid infinite loop)
  3. debugging technique
  4. understanding of scope variable
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is module?

A

several lines of algorithm that work for certain function can be group in a module

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Components of Pseudocode?

A
  1. variable
  2. iterative
  3. selection
  4. module
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

basic steps of algorithm?

A
  1. simplify problem
  2. build mathematically solving plan
  3. design an algorithm
  4. test correctness of program
  5. implement the algorithm to a programming language
  6. documentation
  7. analyze complexity of the program
How well did you know this?
1
Not at all
2
3
4
5
Perfectly