AP CSP - Unit Algorithms (2)

AP CSP - Unit Algorithms (2)

9th Grade

29 Qs

quiz-placeholder

Similar activities

Introduction to Programming

Introduction to Programming

9th - 12th Grade

25 Qs

Computing For The Win/Win

Computing For The Win/Win

5th - 12th Grade

26 Qs

Code.org: Unit 1 Test

Code.org: Unit 1 Test

6th - 9th Grade

34 Qs

CS-9 Programming Language, Algorithm & Flowchart: Rabin Ghimire

CS-9 Programming Language, Algorithm & Flowchart: Rabin Ghimire

9th Grade

25 Qs

iGCSE Computer Science: AI & Emerging Trends

iGCSE Computer Science: AI & Emerging Trends

9th - 12th Grade

25 Qs

APCSP Unit Algorithm

APCSP Unit Algorithm

9th Grade

29 Qs

Programming and data structures revision

Programming and data structures revision

9th - 10th Grade

25 Qs

Understanding Algorithms and Phishing

Understanding Algorithms and Phishing

3rd Grade - University

24 Qs

AP CSP - Unit Algorithms (2)

AP CSP - Unit Algorithms (2)

Assessment

Quiz

Computers

9th Grade

Hard

Created by

Quốc Thư

Used 26+ times

FREE Resource

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.

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?