CS401A's Pre-Finals: Design & Analysis of Algrthms. Module 04 Flashcards

For pre-final and final exams. (49 cards)

1
Q

Definition of || What is

  • It is also known as “proof by exhaustion.”
A

Brute-Force Algorithm || Brute Force Algorithm Design Technique?

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

Definition of Brute-Force Algorithm

What is Brute Force Algorithm Design Technique?
* It is also known as

A

“proof by exhaustion.”

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

Definition of || What is

  • It is a method of mathematical proof in which the statement to be proved is split into a finite number of cases or sets of equivalent cases, where each type of case is checked to see if the proposition in question holds.
A

Brute-Force Algorithm || Brute Force Algorithm Design Technique?

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

Definition of || What is

  • It is a straightforward approach to solve a problem based on the problem’s statement and definitions of the concepts involved.
A

Brute-Force Algorithm || Brute Force Algorithm Design Technique?

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

Definition of || What is

It is a straightforward approach in the sense that it specifically gives an idea of what approach to use.

A

Brute-Force Algorithm || Brute Force Algorithm Design Technique?

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

Definition of || What is

  • “Force” comes from using computer power, not intellectual power, In short, Brute Force means “just do it”.
A

Brute-Force Algorithm || Brute Force Algorithm Design Technique?

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

Definition of Brute-Force Algorithm

What is Brute Force Algorithm Design Technique?
* “\_\_\_\_\_” comes from using computer power, not intellectual power, In short, \_\_\_\_\_ \_\_\_\_\_ means “\_\_\_\_ \_\_ \_\_”.

A

Force
Brute Force
just do it

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

Definition of || Importance of Using

  • It is applicable to a very wide variety of problems,

such as sorting, searching, string matching.

A

Brute-Force Algorithm || Brute Force Algorithm Design Technique

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

Definition of || Importance of Using

  • It yields reasonable algorithms of at least some practical value with no limitation on instance size.
A

Brute-Force Algorithm || Brute Force Algorithm Design Technique

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

Definition of || Importance of Using

  • Sometimes, a particular problem can be solved so quickly with a \_\_\_\_\_ \_\_\_\_\_ \_\_\_\_\_\_ that it does not make sense to waste time devising a more elegant solution.
A

Brute-Force Algorithm || Brute Force Algorithm Design Technique
Brute Force method

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

Definition of || Importance of Using

  • It can still be useful for solving small-size instances of a problem.
A

Brute-Force Algorithm || Brute Force Algorithm Design Technique

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

Definition of || Importance of Using

  • It can serve as an important theoretical or education purpose.
A

Brute-Force Algorithm || Brute Force Algorithm Design Technique

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

Definition of || Strengths of

  • There is wide applicability of the technique.
A

Brute-Force Algorithm || Brute Force Algorithm Design Technique

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

Definition of || Strengths of

  • It is simple, yields reasonable algorithms for some important problems and yields standard algorithms for simple computational tasks and graph traversal problems.

(e.g., matrix multiplication, sorting, closest-pair; convex-hull),

A

Brute-Force Algorithm || Brute Force Algorithm Design Technique

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

Definition of || Strengths of

  • It is simple, yields \_\_\_\_\_\_\_\_\_\_ \_\_\_\_\_\_\_\_\_\_ for some important problems and yields \_\_\_\_\_\_\_\_ \_\_\_\_\_\_\_\_\_\_ for simple computational tasks and graph traversal problems.

(e.g., matrix multiplication, sorting, closest-pair; convex-hull),

A

Brute-Force Algorithm || Brute Force Algorithm Design Technique
reasonable algorithms
standard algorithms

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

Definition of || Weaknesses of

  • It rarely yields efficient algorithms.
A

Brute-Force Algorithm || Brute Force Algorithm Design Technique

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

Definition of || Weaknesses of

  • Some are unacceptably slow

(such as the recursive algorithm for computing Fibonacci numbers).

A

Brute-Force Algorithm || Brute Force Algorithm Design Technique

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

Definition of || Weaknesses of

  • It is not as constructive as some other design techniques.
A

Brute-Force Algorithm || Brute Force Algorithm Design Technique

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

Application of Brute Force Algorithm

A
  • Sorting problem
  • Searching problem
  • Brute Force String Matching
  • Exhaustive Search
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

Application of

asks to rearrange the items of a given list in ascending or descending order.

A

Brute Force Algorithm
Sorting problem

21
Q

Application of

List of Sorting Algorithms

A

Brute Force Algorithm
* Selection sort
* Bubble sort

22
Q

Application of

is a type of sorting algorithm in which the smallest element in the unsorted portion of a list is selected and then swapped with the element at the beginning of the sorted portion of the list. The steps are then repeated until all of the data are sorted.

A

Brute Force Algorithm
* Selection sort

23
Q

Application of

is a type of sorting algorithm that compares the adjacent pair of elements of the list and swaps them if they are in the wrong order. The steps through the list are repeated until no more swaps are required, which indicates that the list is sorted.

A

Brute Force Algorithm
* Bubble sort

24
Q

Application of

This shows the ‘\_\_\_\_\_\_\_\_ \_\_’ of the largest element to the last position on the list.

A

Brute Force Algorithm
* Bubble sort
bubbling up

25
# **Application of** deals with finding a given value called the `______ ___` in a given list or set.
**Brute Force Algorithm** **Searching problem** **search key**
26
# **Application of** (sometimes called a linear search) examines a sequence of data objects one by one until a match is encountered (successful search), or the list is exhausted without finding a match (unsuccessful search).
**Brute Force Algorithm** * **Sequential Search**
27
# **Application of** (sometimes called a `______ ______`) examines a sequence of data objects one by one until `_ _____ __ ___________` (successful search), or `___ ____ __ _________ _______ _______ _ _____` (unsuccessful search).
**Brute Force Algorithm** * **Sequential Search** linear search a match is encountered the list is exhausted without finding a match
28
# **Application of** It is the process of finding the exact copy of pattern/s ***P*** with all substrings of a given text ***T***.
**Brute Force Algorithm** **Brute Force String Matching**
29
# **Application of** Those comparisons between substring and pattern proceed character by character unless a mismatch is found.
**Brute Force Algorithm** **Brute Force String Matching**
30
# **Application of** Whenever a mismatch is found, the pattern is shifted one (1) position to the right and comparison is repeated until a match is found or until the end of the text is reached.
**Brute Force Algorithm** **Brute Force String Matching**
31
# **Application of** **Brute Force String Matching** *Rules:*
**Brute Force Algorithm** 1. Align pattern at the beginning of the text. 2. Moving from left to right, compare each character of pattern to the corresponding character in the text until (a) all characters are found to match (successful search) or (b) a mismatch is detected. 3. While the pattern is not found and the text is not yet exhausted, realign pattern one (1) position to the right and repeat Step 2.
32
# **Application of** It is a brute-force approach to a combinatorial problem.
**Brute Force Algorithm** **Exhaustive Search**
33
# **Application of** It essentially generates a list of all potential solutions to the problem systematically, evaluates potential solutions one by one, disqualifies the infeasible ones, and, for an optimization problem, keeps track of the best one found so far.
**Brute Force Algorithm** **Exhaustive Search**
34
# **Application of** When the search ends, announce the solution/s found.
**Brute Force Algorithm** **Exhaustive Search**
35
# **Application of** **Exhaustive Search** These are the important problems:
**Brute Force Algorithm** * **Traveling Salesman Problem (TSP)** * **Assignment problem**
36
# **Application of** — Its goal is to find the least expensive or shortest way to visit through a given set of n cities once and return to the original starting point.
**Brute Force Algorithm** * **Traveling Salesman Problem (TSP)**
37
# **Application of** * **Traveling Salesman Problem (TSP)** *Rules:*
**Brute Force Algorithm** 1. Choose a reference point or a vertex where you want to start. 2. List all the Hamilton circuits with that reference point. 3. Determine the cost (or distance) associated with each of these Hamilton circuits. 4. The Hamilton circuit with the lowest cost (or shortest distance) is the optimal solution.
38
# **Application of** is a path that begins and ends at the same vertex and passes through all other vertices of the graph exactly one time.
**Brute Force Algorithm** A **Hamiltonian circuit**
39
# **Application of** It is named after the Irish mathematician Sir William Rowan Hamilton (1805-1865), who became interested in such cycles as an application of his algebraic discoveries.
**Brute Force Algorithm** A **Hamiltonian circuit**
40
# **Application of** It is named after the `_____ _____________ ___ _______ _____ ________` (`_________`), who became interested in such cycles as an application of his algebraic discoveries.
**Brute Force Algorithm** A **Hamiltonian circuit** Irish mathematician Sir William Rowan Hamilton 1805-1865
41
# **Application of** — It requires pairing of n people to execute n jobs in such a way that the total cost/profit of the pairings is minimized or maximized.
**Brute Force Algorithm** * **Assignment problem**
42
# **Application of** *Characteristics of an Assignment Problem*
**Brute Force Algorithm** ○ Each entity is to be assigned to exactly one (1) task. ○ Each task is to be performed by exactly one (1) entity.
43
# **Application of** ○ It is also known as Flood's Technique or Matrix Reduction Method.
**Brute Force Algorithm** *Hungarian Method*
44
# **Application of** *Hungarian Method* ○ It is also known as `_______ _________` or `______ _________ ______`.
**Brute Force Algorithm** Flood's Technique Matrix Reduction Method
45
# **Application of** ○ It is used to find minimum matches in which the time of completion or cost of making all activities by the number of persons is minimized.
**Brute Force Algorithm** *Hungarian Method*
46
# **Application of** ○ It was first published by Harold W. Kuhn in 1955.
**Brute Force Algorithm** *Hungarian Method*
47
# **Application of** *Hungarian Method* ○ It was first published by `______ __ ____` in `____`.
**Brute Force Algorithm** Harold W. Kuhn 1955
48
# **Application of** ○ It was based on the earlier work of Hungarian mathematicians Dénes König and Jenö Egerváry.
**Brute Force Algorithm** *Hungarian Method*
49
# **Application of** *Hungarian Method* ○ It was based on the earlier work of Hungarian mathematicians `_____ _____` and `____ ________`.
**Brute Force Algorithm** Dénes König Jenö Egerváry