Chapter 3: Algorithms

Réussis tes devoirs et examens dès maintenant avec Quizwiz!

Question Mode Multiple Choice Question Which of these statements is true about worst-case complexity?

Worst-case analysis estimates how many operations an algorithm needs to guarantee that it can find the solution.

Question Mode Multiple Select Question Select all that apply Which of the following problems are known to be tractable.

Searching for an element in a list Sorting a list

Multiple Choice Question Determine the number of bit operations used to compute the boolean product of A and B, where A and B are 2×2 zero-one matrices.

16

Multiple Choice Question Find the number of additions and multiplications of integers, required to multiply two 3 × 3 matrices with integer entries.

18 additions and 27 multiplications

Find the least number of multiplications of integers used to multiply the matrices A, B, and C, where A is 20×10, B is 10×30, and C is 30×40, all with integer entries.

20000

Question Mode Multiple Choice Question Find the highest number of multiplications of integers that may be needed to multiply the matrices A, B, and C, where A is 20×10, B is 10×30, and C is 30×40, all with integer entries. This results from the least efficient ordering of operations.

30000

Multiple Select Question Select all that apply Which of statements are true about worst-case and average-case complexity?

Average-case analysis provides an estimate of the average number of operations an algorithm uses with an input of size n. Worst-case estimate can never be smaller than an average-case estimate.

Question Mode Fill in the Blank Question Problems for which a solution can be checked in polynomial time are said to belong to the class (BLANK 1) . Problems for which a solution can be found with an algorithm with polynomial time worst-case complexity are said to belong to the class (BLANK 2).

Blank 1: NP Blank 2: P

Question Mode Fill in the Blank Question An analysis of the number of operations required to solve a problem of a particular size involves the (BLANK 1 and 2) of the algorithm. An analysis of the computer memory required involves the (BLANK 3 and 4) of the algorithm.

Blank 1: time Blank 2: complexity Blank 3: space Blank 4: complexity

Question Mode Fill in the Blank Question A problem that is solvable using an algorithm with polynomial worst-case complexity is called (BLANK 1) . Problems that cannot be solved using an algorithm with worst-case polynomial time complexity are called (BLANK 2) . Problems for which it can be shown that no algorithm exists for solving them are called (BLANK 3).

Blank 1: tractable Blank 2: intractable Blank 3: unsolvable

Question Mode Multiple Select Question Select all that apply Why do we measure time complexity in terms of the number of operations required instead of actual computer time? (Select all that apply.)

Different computers take different amounts of time to perform the same basic operations. Computer processing speeds have been increasing as time passes. There are many reasons why the same instance of an algorithm on different occasions may take different amounts of time to execute.

Multiple Select Question Select all that apply Which of the following are algorithmic paradigms?

Greedy algorithms Brute-force algorithms

Question Mode Multiple Select Question Select all that apply Which of these statements is true about the time complexity of a linear search?

The algorithm may require Ω(n) comparisons for some input of size n. The algorithm requires no more than O(n) comparisons for all input of size n elements.

Question Mode Multiple Select Question Select all that apply Which of these are true statements?

The worst-case complexity of insertion sort and bubble sort are the same. It may be the case that for a particular sequence bubble sort is more efficient than insertion sort.

Question Mode Multiple Select Question Select all that apply Which of these are true?

The worst-case complexity of insertion sort is Θ(n2) comparisons. The most efficient comparison sorting algorithms can sort n items using Θ(n log n) comparisons. The worst-case complexity of bubble sort is Θ(n2) comparisons.

Question Mode Multiple Select Question Select all that apply Which of these is true?

There are matrix multiplication algorithms that are faster than Θ(n3). The algorithm for matrix multiplication uses Θ(n3) operations.

Multiple Select Question Select all that apply Which of these is true?

There are matrix multiplication algorithms that are faster than Θ(n^3). The algorithm for matrix multiplication uses Θ(n^3) operations.

Question Mode Multiple Select Question Select all that apply Which of these considerations are important reasons for studying the computational complexity of algorithms?

We want to know which of several possible algorithms to use. We want to know how much memory will be required. We need to estimate the time required to solve a problem of a specific size.

Question Mode Multiple Choice Question Give a big-Θ estimate for the number of arithmetic operations and comparisons used by the brute-force algorithm for finding the closest pair of n points in the plane.

Θ(n^2)


Ensembles d'études connexes

BIO 102 - ASSESSMENT QUESTIONS (FINAL)

View Set

CWNA Chapter 3: Radio Frequency Components, Measurements, and Mathematics

View Set

Monopolistic Competition and Oligopoly

View Set

Observational Behavior- Ch 5 Foundations of Employee Motivation

View Set

Dr. Bailey Interpersonal Communication Final Exam

View Set

Chapter 34 Care of Patients With Dysrhythmias

View Set

Drugs for Osteoarthritis/ Drugs used in Rheumatoid Arthritis (MDM)

View Set

Ch 19: Program Design and Technique for Speed and Agility Training

View Set

Principles of Management Exam 2 Ch.7-8

View Set