Design and Analysis of Algorithms MCQ with Answers pdf

26. The binomial coefficient is represented as ___.
a. kCn
b. nCk
c. n+1Ck
d. nCk+1
Answer (B)

27. ___ is the technique by which we make a function perform faster by trading space for time.
a. Divide and conquer
b. Greedy
c. Memoization
d. Recursion
Answer (C)

28. The root node in the B-Tree technique has ___ limit on the number of children?
a. Lower
b. Upper and Lower
c. Upper
d. No
Answer (C)

29. The shift table is to be initialized to ___ to compute the bad character shift.
a. The number of matches of the pattern with the text
b. The number of mismatches occurring
c. Length of the pattern-1
d. Length of the pattern
Answer (D)

30. Each slot of the bucket array in separate chaining stores ___.
a. Records
b. A pointer to a linked list
c. Hash key values
d. Both b & c
Answer (B)

31. The best possible value of the problem objective, written as a function of the state, is called the ___.
a. Value function
b. Control variables
c. Policy function
d. Principle of Optimality
Answer (A)

32. If we have materials of different values per unit volume and maximum amounts, the ___ Knapsack problem finds the most valuable mix of materials that fit in a knapsack of fixed volume.
a. Bounded
b. Binary
c. 0-1
d. Fractional
Answer (D)

33. We use ___ for finding solutions to sub-problems, so as to reduce recalculation.
a. Backtracking
b. Recursion
c. Memoization
d. Branch and bound algorithms
Answer (C)

34. With respect to finding the time complexity of Kruskal’s algorithm, which operation keeps track of the parent pointer until it reaches the root parent?
a. Makeset
b. Union
c. Find
d. Merge
Answer (C)

35. ___ means calculating the minimum amount of work required to solve the problem.
a. Upper-bound
b. Lower–bound
c. Adversary
d. Problem reduction
Answer (B)

36. In a decision tree, a node represents a ___.
a. Input value
b. Output value
c. Solution
d. Decision
Answer (D)

37. An algorithm that defines every operation exclusively is called ___ algorithm.
a. NP-hard
b. Deterministic
c. Non-deterministic
d. NP-complete
Answer (B)

38. ___ problems include counting of structures of a specific kind and identifying the largest, smallest or optimal objects.
a. Combinatorial
b. Traveling Salesman
c. Knapsack problem
d. Use cases
Answer (A)

39. ___ is a sequence of data elements connected to each other where every element has a link field referring to the location of the next element.
a. Array
b. Stack
c. List
d. Queue
Answer (C)

40. ___ organizes details of all candidate solutions and discards large subsets of fruitless candidates by using upper and lower estimated bounds of the quantity being optimized.
a. Approximation algorithms
b. Dynamic programming
c. Greedy algorithm
d. Branch and Bound
Answer (D)

41. Which one of the following statements is true?
a. An algorithm should have one or more inputs externally and it should produce one or more output.
b. An algorithm may or may not terminate after a finite number of steps.
c. To analyze an algorithm means to determine the number of resources necessary to execute it.
d. Procedure, function and subroutine are synonyms for an algorithm.
Answer (C)

42. The two main conditions for theta notation are ___ and___.
a. f(n)=O(g(n)), f(n)≠Θ(g(n))
b. f(n)>O(g(n)), f(n)=Θ(g(n))
c. f(n)≠O(g(n)), f(n)≥Θ(g(n))
d. f(n)>O(g(n)), f(n)>Θ(g(n))
Answer (A)

43. Identify the true and false statements from the following with respect to measuring the running time of an algorithm.
1. Firstly, recognize the basic operation of an algorithm.
2. Identifying the basic operation of an algorithm is difficult.
a. 1-T, 2-F
b. 1-T, 2-T
c. 1-F, 2-T
d. 1-F, 2-F
Answer (A)

44. The two primitive operations of the function Fact(x) are ___ and ___.
a. Indexing an array, comparing two numbers
b. To check if the value of x is 1, To multiply x and Fact(x-1)
c. To check if the value of x is 1, To multiply x
d. To multiply x and Fact(x-1), Compare two numbers
Answer (B)

45. The smoothness rule assumes that T(n) Є Θ(n2) if ___ is a smooth function and ___ is eventually non-decreasing.
a. n2, T(n)
b. Θ(n2), T(n)
c. T(n), n2
d. Θ(n),n
Answer (A)

46. In which method of coding does the code of a symbol not depend on the frequency of occurrence of that symbol?
a. Variable length coding
b. Fixed length coding
c. Static Huffman coding
d. Adaptive Huffman coding
Answer (B)

47. Which among the following is not a reason to perform the empirical analysis?
a. To check the accuracy of the algorithm.
b. To reduce the use of mathematical analysis and algorithm visualization.
c. To compare the efficiencies of different algorithms working to solve the same problem.
d. To develop the algorithm’s efficiency class.
Answer (B)

48. In distribution counting, one array is used to store ___ value and another to store ___ list of elements.
a. Frequency, Sorted
b. Distribution, Sorted
c. Frequency, Unsorted
d. Sorted, Unsorted
Answer (B)

49. In a knapsack problem, if a set of items are given, each with a weight and a value, the goal is to find the number of items that ___ the total weight and ___ the total value.
a. Minimizes, Minimizes
b. Maximizes, Maximizes
c. Maximizes, Minimizes
d. Minimizes, Maximizes
Answer (D)

50. What describes a set of well-defined instructions used to accomplish a particular software function?
a. Algorithm
b. Protocol
c. Interface
d. Framework
Answer (A), Explanation: A set of well-defined instructions used to accomplish a particular software function is referred to as an algorithm.

Test Your IQ on Design and Analysis of Algorithms MCQs

0
Created on By Sofia Islam

Analysis & Design of Algorithm Quiz

At Eguardian India, we understand the importance of understanding the fundamentals of algorithm design and analysis. To help students get a better grasp of the concepts, we have created an Analysis and Design of an Algorithm Quiz.

This quiz will test your knowledge of algorithm design and analysis, and help you gain a better understanding of the topic. So, why wait? Take the quiz now and find out how well you know your algorithms!

1 / 25

A process is a ___ of activities actually being carried out executed, to solve a problem.

2 / 25

The symbol ¬ is used for ___

3 / 25

If n is ___ we set both the minimum and maximum to the value of the first element, and then we process the rest of the elements in pairs.

4 / 25

The key at reach node is greater than or equal to the key at its ___.

5 / 25

___ is a method of expressing algorithms by a collection of geometric shapes with imbedded descriptions of algorithmic steps.

6 / 25

While proving a theorem, if an unrequired lemma is proved, we may ignore it. The only loss is the loss of efforts in proving the lemma. Such a problem is called ___.

7 / 25

A problem is ___ if it is NP and for which no polynomial time deterministic TM solution is known so far.

8 / 25

The size of a problem is measured in terms of the ___.

9 / 25

Halting problem is ___.

10 / 25

___ may consist of various numbers of loops, nested or in sequence.

11 / 25

___ is an abstract entity constituted of mathematical objects like sets and a function.

12 / 25

___ model is the corresponding grammatical model that matches turing machines in computational power.

13 / 25

When two keys HASH to the same slot, we call the situation as ___

14 / 25

In a ___ the previous pointer of the head of the list points to the tail, and the next pointer of the tail of the list points to the head.

15 / 25

Every member of any language is said to be a ___.

16 / 25

A minimum spanning tree of a weighted connected graph is its ___ with the smallest weight

17 / 25

Algorithms based on Greedy technique are used for solving ___.

18 / 25

___ is a bottom up approach for solving problem

19 / 25

___ is conceptually a top down approach for solving problems.

20 / 25

A terminal node from which there is no legal move is a ___ position.

21 / 25

___ is a variant of a nim game and it is played with matches.

22 / 25

A ___ is a collection of Binomial trees.

23 / 25

All leaves have the same depth, which is the tree’s ___.

24 / 25

The insert operation on a stack is often called ___.

25 / 25

A stack is an ordered list in which all insertions and deletions are made at one end, called the___.

Your score is

The average score is 0%

0%

FAQs

Q1: What is the difference between a graph algorithm and a network algorithm?

Ans: Graph algorithms are used for analyzing and manipulating data that is structured as a graph, while network algorithms are used for analyzing and manipulating data that is structured as a network.

Graph algorithms focus on finding solutions to problems related to the structure of the graph, such as shortest paths or minimum spanning trees. Network algorithms focus on optimizing communication between nodes in the network, such as routing protocols or distributed consensus protocols.

Q2: What is the difference between an algorithm and a program?

Ans: An algorithm is a set of instructions for completing a task, while a program is an implementation of an algorithm. An algorithm can be written in any language, while a program must be written in a specific programming language.

Algorithms are often expressed as pseudocode, which is not executable code and cannot be run on a computer. Programs are executable code and can be run on computers to perform tasks.

Q3: What is the difference between a algorithm and a software algorithm?

Ans: An algorithm is a set of instructions for solving a problem, while a software algorithm is an algorithm that has been coded into a computer program.

Software algorithms are used to automate processes and make them more efficient. They can be used to solve complex problems quickly and accurately.

Q4: How can I choose the right algorithm for a problem?

Ans: First, you should understand the problem and the data available to you. Then, research different algorithms that may be applicable and consider their strengths and weaknesses.

Finally, experiment with different algorithms to see which one provides the best results for your problem. Make sure to document your process so you can easily refer back to it if needed.

Q5: What are some common algorithm design patterns?

Ans: Common algorithm design patterns include divide and conquer, dynamic programming, greedy algorithms, and backtracking. Divide and conquer involves breaking down a problem into smaller subproblems which are then solved independently.

Dynamic programming is an optimization technique that solves subproblems to build up a solution to the main problem. Greedy algorithms involve making the best decision at each step in order to reach an optimal solution. Backtracking is a form of recursion which explores all possible solutions before choosing the best one.

Q6: What is a Turing machine?

Ans: A Turing machine is a theoretical model of computation that was proposed by Alan Turing in 1936. It consists of an infinite tape, a head which reads and writes symbols, and a set of instructions that tell the head how to move around the tape. The Turing machine can be used to solve any problem that can be described using an algorithm.

Conclusion

This article has provided an overview of Design and Analysis of Algorithms MCQ with Answers. We have explored the basic concepts, problems and their solutions related to algorithms to gain a strong understanding of the topic.

Additionally, you can use this information in your day-to-day work as a programmer.

Thanks for visiting our website, if you like the post on Design and Analysis of Algorithms MCQ with Answers pdf share on social media.

Read & Watch More Related MCQs

Share on Social Media

1 thought on “Design and Analysis of Algorithms MCQ with Answers pdf”

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top