CS401A's Prelims: Design and Analysis of Algorithms Flashcards

For preliminary exams.

1
Q

“A computer is a stupid machine
with the ability to do incredibly smart things, while computer programmers are smart people with the ability to do incredibly stupid things.”

A

Bill Bryson

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

A set of finite and detailed step-by-step instructions performed to complete a specific task is what we call an

A

algorithm

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

Did you know that the word algorithm comes from Persian scientist, mathematician, and author

A

Abu Abdullah
Muhammad bin Musa al-Khwarizmi?

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

on the other hand, is the design and analysis
of computer algorithms.

A

Algorithmics,

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

pertains to the method or mathematical process behind the conception of an algorithm

A

The design part

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

while the
deals with the determination of the
computational complexity of an algorithm.

A

analysis part

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

starts from defining the
problem cautiously by describing the set of instances

A

Notion of Algorithm

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

The algorithm
will often be divided into sections:

A

Parts/Components (Input)

Actions/Steps/Methods (Processing)

Outcome (Output)

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

5 properties of Algorithm or the Characteristics of Algorithm

A

Input Specification
Output Specification
Definiteness
Finiteness
Effectiveness

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

(Characteristics of Algorithm)

The inputs must be clearly
identified.

A

Input Specification

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

(Characteristics of Algorithm)

The output, as well as its
relationship to the input/s, must be clearly
identified

A

Output Specification

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

(Characteristics of Algorithm)

The steps in the algorithm must be
precisely defined;

A

Definiteness

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

The algorithm must always come to an
end after a finite number of steps and using a finite
amount of resources.

A

Finiteness

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

All operations to be performed
must be sufficiently basic that they can be done
exactly and in finite time.

A

Effectiveness

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

An algorithm is represented using two (2) common
techniques:

A

pseudocode and flowchart.

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

_____ means imitation

A

Pseudo

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

_____ refers to instructions written in a programming
language.

A

code

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

This term is a generic way of describing an algorithm without using any specific
programming language-related notations.

A

Pseudocode

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

It is a method of expressing an algorithm
by a collection of connected geometric shapes containing descriptions of the algorithm’s steps.

20
Q

There is no strict set of standard notations for
pseudocode, but the most widely recognized are:

A

Input
Output
If-then-else
For
Repeat-Until
While

21
Q

a user will be inputting
something.

22
Q

an output will
appear on the screen.

23
Q

a decision (selection) in
which a choice is made

A

If-then-else

24
Q

counting loop (iteration)

25
Q

loop (iteration) that has a condition at the end

A

Repeat-Until

26
Q

loop (iteration) that has a condition at the beginning

27
Q

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

A

Sorting Problem

28
Q

It deals with finding a given value called the “search key” in a given list or set.

A

Searching Problem

29
Q

It deals with non-numerical data that intensifies the interest of researchers and
computing practitioners in string-handling algorithms.

A

String Processing Problem

30
Q

This is a sequence of characters from an alphabet

31
Q

comprise letters, numbers, and special characters .

A

Text strings

32
Q

comprise zeros and ones.

A

Bit strings

33
Q

can be modeled by strings of characters from the four-character alphabet {A, C, G, T}.

A

Gene sequences

34
Q

It deals with objects and their connections

A

Graph Problem

35
Q

It deals with how one can reach all the points in a network.

A

Graph-traversal algorithms

36
Q

a traversing algorithm where one should start traversing from a
selected node (source or starting node) and traversing the graph layerwise

A

Breadth First Search (BFS)

37
Q

a recursive algorithm that uses the idea of backtracking. The word
“backtrack” means that when one is moving forward, and there are no more nodes along the
current path, s/he moves back on the same path to find nodes to traverse.

A

Depth First Search (DFS)

38
Q

It deals with what is the best route between two (2) cities.

A

Shortest-path algorithms

39
Q

It deals with a set of courses with their prerequisites
consistent or self-contradictory

A

Topological sorting for graphs with directed edges

40
Q

It’s about finding the right arrangement (like a permutation, combination or subset) that meets specific rules and has a desired feature. Tough computing stuff.

A

Combinatorial problems

41
Q

It deals with finding the shortest tour through 𝑛 cities that visits every
city exactly once

A

Traveling Salesman Problem (TSP)

42
Q

It deals with assigning the smallest number of colors to the vertices of a graph
so that no two (2) adjacent vertices are the same color.

A

Graph-coloring problem

43
Q

It deals with geometric objects such as points, lines, and polygons.

A

Geometrical problems

44
Q

Two (2) Classic Problems of Computational Geometry

A

Closest-pair problem
Convex-hull problem

45
Q

given 𝑛 points in the plane, find the closest pair among them.

A

Closest-pair problem

46
Q

this asks to find the smallest convex polygon that would include all the points of a
given set

A

Convex-hull problem

47
Q

It involves mathematical objects of continuous nature

A

Numerical problems