Search Header Logo

AP CSP - Unit Algorithms (2)

Authored by Quốc Thư

Computers

9th Grade

Used 26+ times

AP CSP - Unit Algorithms (2)
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

29 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

2 mins • 5 pts

Media Image

A mathematician comes up with an algorithm to search a matrix for a value.

This table shows how many steps the algorithm requires for different matrix sizes:

Which function best describes how the number of steps changes as the matrix size (nnn) increases?

2/n

n/2

n

n2

2n

2.

MULTIPLE SELECT QUESTION

2 mins • 5 pts

Media Image

Kora implements an algorithm for determining whether a list has duplicate values.

She counts the number of steps required by the algorithm for increasing list lengths and comes up with this table:

Based on the table, which of the following statements describe the run time for this algorithm?

The algorithm does not run in reasonable time.

The algorithm runs in polynomial time.

The algorithm runs in superpolynomial time.

The algorithm runs in reasonable time.

3.

MULTIPLE SELECT QUESTION

2 mins • 5 pts

One way to measure the efficiency of an algorithm is to count how many steps it requires for different input sizes and then use a function to describe how the number of steps increases in proportion to the input size.

The table below lists various efficiencies, where n represents the input size.

Categorize each efficiency as superpolynomial:

n2+6n

6n

6n6

62n^2

n/6

4.

MULTIPLE SELECT QUESTION

2 mins • 5 pts

Reese develops an algorithm to determine all the possible pizza topping combinations.

For a list of 3 possible toppings ("pepper", "pineapple", "mushroom"), their algorithm generates these combinations:

- pepper

- pineapple

- mushroom

- pepper, pineapple

- pepper, mushroom

- pineapple, mushroom

- pepper, pineapple, mushroom

They try out the algorithm on increasing numbers of toppings and record the number of steps it takes.

Their findings are summarized in this table:

Based on the table, which of the following statements describe the run time for this algorithm?

The algorithm runs in reasonable time.

The algorithm runs in superpolynomial time.

The algorithm runs in polynomial time.

The algorithm does not run in reasonable time.

5.

MULTIPLE CHOICE QUESTION

2 mins • 5 pts

Media Image

A mathematician comes up with an algorithm for multiplying two matrices together.

This table shows how many steps the algorithm requires for different matrix sizes:

Which function best describes how the number of steps changes as the matrix size (n) increases?

1/n

n

n2

n3

2n

6.

MULTIPLE SELECT QUESTION

2 mins • 5 pts

Media Image

Meredith implements a "graph coloring" algorithm, which comes up with colors for graph vertices such that no neighboring vertices share the same color.

The algorithm outputs graph colorings like this one:

Based on the table, which of the following statements describe the run time for this algorithm?

The algorithm runs in reasonable time.

The algorithm does not run in reasonable time.

The algorithm runs in superpolynomial time.

The algorithm runs in polynomial time.

7.

MULTIPLE CHOICE QUESTION

2 mins • 5 pts

Which of the following is the best description of parallel computing?

A computational model in which a program is broken into smaller subproblems, some of which are executed simultaneously.

The use of multiple computing devices to work on different parts of a problem.

The technology which powers online experiences with multiple simultaneous users, such as multi-player computer games.

The mechanism by which a computer can run multiple applications at once, by switching between them so quickly the user cannot tell.

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?