2 | Proof by I, proof by C, algorithm Flashcards

1
Q

Three types of Proof?

A
  1. Direct proof
  2. Indirect proof
    proof by contradiction
  3. Proof by induction
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Steps for Proof by Induction

A

Theorem, eg P(n)

Base case, eg for a (often 0 or 1) prove P(a)

Induction hypothesis (IH) eg that for some value k, P(k) holds

Induction step (IS) Show that if P(k) holds, P(k+1) also holds.

–> combination of these steps shows that P(n) is true for all values of n.

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

Definition of an algorithm

A

Algorithm is a set of rules for carrying out calculation.

Execution of an algorithm must not include
- subjective decisions
- call for some intuition

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

Deterministic algorithm?

A
  • given a particular input, will always produce the same output
  • underlying machine always passing through the same sequence of states.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

P Class?

A
  • decisions problems
  • easily solvable in Polynomial time w/ deterministic machine
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

NP Class?

A
  • decisions problems
  • Nondeterministic Polynomial time: solvable in polynomial time by a nondeterministic Turing machine.
  • verifiable in polynomial time by a deterministic Turing machine.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

NP-hard class

A
  • (believed) can not be solved in polynomial time
  • at least as hard as the hardest problem in NP
  • Not all NP-hard problems are in NP.
  • It takes a long time to check them.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

NP Complete class

A
  • both NP and NP-hard: hard problems in NP.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is a tractable problem

A

Tractable means that a problem can be solved in practice as well as in theory

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

What is an intractable problem

A

problems that can be solved in theory but not in practice .

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

What is a heuristic?

A
  • cannot control the error and it may be difficult to estimate it
  • designed for problem solving more quickly when classic methods are too slow for finding an exact or approximate solution,
  • or when classic methods fail to find any exact solution in a search space.
  • This is achieved by trading optimality, completeness, accuracy, or precision for speed.
  • In a way, it can be considered a shortcut.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Symbol for:

for all

A

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

Symbol for:

such that

A


:

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

Symbol for:

there exists

A

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