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
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
- Design and Analysis of Algorithms MCQ : Part-1
- Design and Analysis of Algorithms MCQ : Part-2
- Watch the audio-video format of these MCQs
Thanks for this site…