wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Analysis and design of algorithms

Total questions: 22

Worksheet time: 11mins

Name
Class
Date
1.

What is the purpose of using Big-O notation in computer science?

a)

To determine the profitability of an algorithm

b)

To compare the time complexity of algorithms

c)

To measure the color complexity of an algorithm's output

d)

To calculate the exact runtime of an algorithm in seconds

2.

What does it mean to 'analyse the suitability of different algorithms for a given task and data set'?

a)

To choose the best algorithm based on its color and style

b)

To select the most cost-effective algorithm

c)

To determine which algorithm performs best for specific conditions

d)

To use the same algorithm for all tasks

3.

What is the primary purpose of using algorithms in routing problems?

a)

To increase the complexity of data transmission

b)

To find the shortest route for data packets on the Internet

c)

To reduce the speed of data transmission

d)

To increase data packet size

4.

How do algorithms contribute to the security of communications?

a)

By encrypting communications to make them unhackable

b)

By making communications faster

c)

By reducing the cost of communications

d)

By publicizing the communication data

5.

What is the purpose of writing a compiler program?

a)

To convert machine code into a high-level language

b)

To translate a high-level language to machine code

c)

To increase the execution time of programs

d)

To debug programs automatically

6.

What type of diagram is predominantly used in the image to represent algorithm processes?

a)

Pie chart

b)

Flowchart

c)

Bar graph

d)

Line graph

7.

What is a crucial characteristic of a good algorithm regarding its execution steps?

a)

It should execute in as many steps as possible

b)

It should execute efficiently, in as few steps as possible

c)

It should execute only with user intervention at each step

d)

It should execute differently each time it is run

8.

Why must a good algorithm always terminate?

a)

To ensure it runs indefinitely

b)

To avoid using any system resources

c)

To ensure it does not enter an infinite loop

d)

To make it easier to write

9.

What is the relationship between problem size and execution time as described in the material?

a)

The smaller the problem size, the longer the execution time

b)

The execution time is not related to the problem size

c)

The larger the problem size, the longer the execution time

d)

The execution time decreases as the problem size increases

10.

How is the order of magnitude for a linear function written according to the learning material?

a)

O(n)

b)

O(n^2)

c)

O(log n)

d)

O(1)

11.

According to the learning material, what does the function f(n) = 3n represent?

a)

A quadratic function

b)

A linear function

c)

A logarithmic function

d)

An exponential function

12.

Which term in a quadratic function becomes dominant as n increases?

a)

an

b)

bn

c)

c

d)

an^2

13.

What is the order of magnitude of a quadratic function?

a)

O(n)

b)

O(n^2)

c)

O(n^3)

d)

O(log n)

14.

When comparing algorithms, which terms of the quadratic function are generally not considered due to their lesser significance?

a)

an and bn

b)

bn and c

c)

an and c

d)

an^2 and bn

15.

How does the function f(n) change in relation to n, based on the logarithmic function described?

a)

Increases rapidly

b)

Decreases rapidly

c)

Increases very slowly

d)

Remains constant

16.

What is the order of magnitude of a logarithmic function typically written as?

a)

O(n log n)

b)

O(n^2)

c)

O(log n)

d)

O(n)

17.

What does Big-O notation measure in the context of algorithms?

a)

The memory usage of an algorithm

b)

The time complexity of an algorithm

c)

The number of lines in the algorithm code

d)

The number of programmers needed to write the algorithm

18.

Which statement best describes the behavior of an algorithm with time complexity O(n)?

a)

The execution time decreases as the number of items increases

b)

The execution time remains constant regardless of the number of items

c)

The execution time increases linearly as the number of items increases

d)

The execution time increases exponentially as the number of items increases

19.

According to Big-O notation, what happens to the time complexity when processing 10,000 items compared to 5,000 items in a linear algorithm?

a)

It takes four times as long

b)

It takes half as long

c)

It takes twice as long

d)

It takes the same amount of time

20.

In Big-O notation, why is there no such thing as O(2n + 1) for the analysis of algorithms?

a)

Because the constant and lower order terms are not considered in Big-O

b)

Because it indicates a non-deterministic algorithm

c)

Because it represents an impossible scenario

d)

Because it suggests the algorithm is not scalable

21.

What type of algorithm is described as "Divide and conquer" in the context of reducing the problem size at each pass?

a)

Linear search algorithm

b)

Binary tree search algorithm

c)

Depth-first search algorithm

d)

Quick sort algorithm

22.

What is a permutation in the context of arranging items?

a)

The process of selecting items based on a specific rule

b)

The number of ways n items can be arranged

c)

The method of grouping items into sets

d)

The sequence of sorting items from highest to lowest