0% found this document useful (0 votes)
0 views

Algorithms MCQ

The document is an exam preparation guide for algorithms, consisting of 30 questions across 13 topics including numerical problems, graph algorithms, and the master method. Each question provides multiple-choice options and feedback sections for answers. The content is structured to test knowledge on various algorithmic concepts and their complexities.

Uploaded by

nourhano021
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
0 views

Algorithms MCQ

The document is an exam preparation guide for algorithms, consisting of 30 questions across 13 topics including numerical problems, graph algorithms, and the master method. Each question provides multiple-choice options and feedback sections for answers. The content is structured to test knowledge on various algorithmic concepts and their complexities.

Uploaded by

nourhano021
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 23

Algorithms Exam prep

Algorithms
30 questions 13 topics

Numerical problems Models of computation Matrix operations The master method


Computational Combinational circuits Image processing Parallel prefix
geometry Induction and recursion Pointer jumping
Graph algorithms Asymptotic analysis Divide-and-conquer

All questions One question

Question 1 Feedback

The master theorem is applied on the recurrences of the following type:

Consider the following statements:

1. is the number of subproblems.


2. is the size of each subproblem.
3. The size of subproblems might not be the same.

Choose the correct option-

Choose an answer

A Only statement 2 is true.

B Only statement 1 is true.


C Statements 1, 2, and 3 are true.

D Statements 1 and 2 are true.

Show solution

Question 2 Feedback

What is the running time of the standard RAM algorithm?

Choose an answer

Show solution

Question 3 Feedback

A parallel system having a collection of m processors and only single item is sorted per processor.
What is the time required to perform the sorting?

Choose an answer

A time

B time
C time

D time

Show solution

Question 4 Feedback

According to the principle of mathematical induction,


is equal to ______________,
where belongs to the set of natural number.

Choose an answer

Show solution

Question 5 Feedback

Choose the option containing true statements for the given graph?
The given graph is not complete but connected.

The edge (D, F) is the bridge of the graph.

The diameter of the graph is 3.

Choose an answer

A 1 and 3

B only 1

C 2 and 3

D 1 and 2

Show solution

Question 6 Feedback
Identify the following assertions about GPGPU is true?

Choose an answer

A Parallel computing may be used to harness the power of GPUs for general uses.

B The usage of graphics processing units for general-purpose computation weakens CPU
architecture.

C GPGPU stands for Grouped Processor GPU

D The graphics processing unit (GPU) is a processor extension.

Show solution

Question 7 Feedback

For the component labeling algorithm, what is the time complexity for the divide and conquer
method?

Choose an answer

Show solution

Question 8 Feedback
Which of the following integral power algorithm have a running time and an extra space for
data items?

Choose an answer

A Standard brute force algorithm

B Recursive doubling algorithm

C Horner’s rule-based algorithm

D Iterative algorithm

Show solution

Question 9 Feedback

What is the time complexity for solving the maximum sum subsequence problem for the CREW
PRAM?

Choose an answer

A time

B
time

C time

D time

Show solution

Question 10 Feedback
What is the output of test(4) for the following code of recursion?

Choose an answer

A 1213214321

B 121321143211211

C 121312141213121

D 121324321

Show solution

1 2 3 Next

0/30 answered Save


COMPANY

LEGAL & POLICIES

CHEGG PRODUCTS AND SERVICES

CHEGG NETWORK

CUSTOMER SERVICE

© 2003-2022 Chegg Inc. All rights reserved.


Algorithms Exam prep

Algorithms
30 questions 13 topics

Numerical problems Models of computation Matrix operations The master method


Computational Combinational circuits Image processing Parallel prefix
geometry Induction and recursion Pointer jumping
Graph algorithms Asymptotic analysis Divide-and-conquer

All questions One question

Question 11 Feedback

Which of the following is the recursive relation that satisfies the greatest common divisor problem
according to the Euclidean algorithm?

Choose an answer

Show solution
Question 12 Feedback

Suppose the input data is sorted on RAM. So, worst-case for the sequential algorithm that is based
on comparison sorting will run in_____time.

Choose an answer

A time

B time

C time

D time

0/30 answered Save


Show solution

Question 13 Feedback

What is the total time taken by the PRAM minimum algorithm?

Choose an answer

A time

B time

C time

D time

Show solution
Question 14 Feedback

The Hyper quicksort is the modification of quicksort in parallel models. What is the running time of
hyper quicksort?

Choose an answer

Show solution

Question 15 Feedback

Choose the option containing true statements for the given graph?

Choose an answer

A 1-(iii) and 2-(ii)

B 1-(ii) and 2-(iii)

1-(iii) and 2(i)


C
D 1-(ii) and 2-(ii)

Show solution

Question 16 Feedback

Choose the correct cost of the array packing problem (size ) solved using a PRAM model?

Choose an answer

A with processors

B
with processors

C with processors

D
with processors

Show solution

Question 17 Feedback

Which of the following condition is satisfied by the bitonic sequence ?

Choose an answer

B
C
D

Show solution

Question 18 Feedback

Which is the correct Warshall algorithm to find out the transitive closure of a Boolean matrix?

Choose an answer

A for r = 1 to m, do for s = 1 to m, do for r = 1 to m, do

B for r = 1 to m, do for s = 1 to m, do for t = 1 to m, do

C for r = 1 to m, do for s = 1 to m, do for t = 1 to m, do

D for r = 1 to m, do for s = 1 to m, do for t = 1 to m, do

Show solution

Question 19 Feedback

The Gaussian elimination algorithm is sensitive to which of the following error?

Choose an answer

A Random error

B Mean square error


C Truncation error

D Roundoff error

Show solution

Question 20 Feedback

Which option describes the correct space complexity of the Merge Sort algorithm?

Choose an answer

A The auxiliary space complexity of Merge Sort is and for in-place merge sort is
.

B The auxiliary space complexity of Merge Sort is and for in-place merge sort is
.

C The auxiliary space complexity of Merge Sort is and for in-place merge sort is
.

D The auxiliary space complexity of Merge Sort is and for in-place merge sort is
.

Show solution

Prev 1 2 3 Next
COMPANY

LEGAL & POLICIES

CHEGG PRODUCTS AND SERVICES

CHEGG NETWORK

CUSTOMER SERVICE

© 2003-2022 Chegg Inc. All rights reserved.


Algorithms Exam prep

Algorithms
30 questions 13 topics

Numerical problems Models of computation Matrix operations The master method


Computational Combinational circuits Image processing Parallel prefix
geometry Induction and recursion Pointer jumping
Graph algorithms Asymptotic analysis Divide-and-conquer

All questions One question

Question 21 Feedback

Which of the following options is used to represent the cost-optimal running time of the mesh
semi-group algorithm?

Choose an answer

Show solution
Question 22 Feedback

What is the running time of Dijkstra’s algorithm for finding a single-source shortest path problem
for a weighted directed graph?

Choose an answer

Show solution

0/30 answered Save


Question 23 Feedback

What is important for an algorithm to solve the problem in computational geometry on NOW,
Cluster, and grids systems?

Choose an answer

A Data redistribution

B Data cleaning

C Data sorting

D Data size

Show solution
Question 24 Feedback

Given a linked list of size 6. What is the number of iterations needed to find the distance of all
nodes?

Choose an answer

A 4

B 6

C 3

D 2

Show solution

Question 25 Feedback

Select the correct order of steps for finding the smallest element from the list of elements?

Find the median of sublists

Find the median of the list

Divide the list into three sublists based on the median

Sort the sublists

Choose an answer
A 1,4,2,3

B 4,1,2,3

C 2,3,4,1

D 2,3,1,4

Show solution

Question 26 Feedback

Consider the given sorted list of elements-

4, 7 10, 14, 18, 25, 37, 60, 74, 89

Consider the following statements-

1. The number of key comparisons required for the search of 12 is three.


2. The number of key comparisons required for the search of 60 is two.

Select the correct option.

Choose an answer

A Both statements are wrong.

B Statement 1 is wrong and statement 2 is right.

C The output of the algorithm for the given list is unpredictable.

D Statement 2 is wrong and statement 1 is right.

Show solution
Question 27 Feedback

Given, Big is transitive by relation. For and , choose the valid


option from the options below.

Choose an answer

Show solution

Question 28 Feedback

What is an optimal time for maximal overlapping points using the CREW PRAM algorithm with
processors?

Choose an answer

Show solution
Question 29 Feedback

Consider the following two statements for linear array Merge Sort of element with processors.

During each recursive step, rotation of the data performed through all

processors results in the running time of

The total cost of the algorithm is more than the Merge Sort performed using a single
processor.

Choose the correct option-

Choose an answer

A Both statements are false.

B Only the second statement is false.

C Both statements are true.

D Only the first statement is false.

Show solution

Question 30 Feedback
What is error bound for trapezoidal integration if be a function that is twice differentiable on
the interval [a, b] and n be a positive integer:

Choose an answer

Show solution

Prev 1 2 3

COMPANY

LEGAL & POLICIES

CHEGG PRODUCTS AND SERVICES

CHEGG NETWORK
CHEGG NETWORK

CUSTOMER SERVICE

© 2003-2022 Chegg Inc. All rights reserved.

You might also like