CS 502 – Fundamentals of Algorithms Current Solved Quiz 2021
In selection problem the sieve technique works in
- Non-recursive manner
- Constant time
- Phases
- One complete go
In selection problem the sieve technique
- Add some more input items each time
- Do not work recursively
- Do not uses divide and conquer approach
- Eliminates undesired data items each time
In the analysis of selection algorithm we got the convergent
- Harmonic
- Linear
- Arithmetic
- Geometric
Identify the TRUE statement
- The knapsack problem does not belong to the domain of optimization problem
- The knapsack problem belong to the domain of optimization problem
- The knapsack problem can not be solved by using dynamic programming
- The knapsack problem is optimally solved by using brute force algorithm
The only way to convert an empty string into a string of I character is by doing j insertions represented as
- E (I , j) =l
- E (I , 0) = i
- E (0 , j) = j
- E (I , j) = j
__________ provide us more accurate result when input values are not closer with each other
- Average
- Median
In merge sort algorithm we split the array around the ________ index q.
- Entering
- Mid
- Exiting
- Summing
Matrix multiplication is a (n)__________ option.
- Commutative
- Associative
- Neither commutative nor associative
- Commutative but not associative
The sieve technique works where we have to find __________ item(s) from a large input
- Single
- Two
- Three
- Similar
For average-case time analysis of quick sort algorithm pivot selection is on average basis from
- Half of the input value
- All possible random values
- Pivot is input separately
- Values greater than 5
Algorithm is a sequence of computational steps that ……the input into output
- Merge
- Assign
- Transform
- Integrate
If matrix A of dimension p x q is multiply with matrix B of dimension q x r then each entry in resultant matrix takes…….time
- O (q)
- O (1)
- O (P X q)
- O (q x r)
CS 502 – Fundamentals of Algorithms Current Solved Quiz 2021
In Dynamic programming based solution of knapsack problem if we decide to take an object T then we gain
- W (total weight of knapsack)
- V (Total value of all items)
- V i (value of object i)
- None of the given option
In the statement output p[i].x ,p[i].y , the number of time elements of p are accessed is……..
- 1
- 2
- 3
- 4
In heap sort algorithm the total running time for heapify procedure procedure is ___________
- Theta (log n)
- Order (log n)
- Omega (log n)
- O (1) i.e constant time
Pseudo code algorithms are to be read by
- People
- RAM
- Computer
- Compiler
If pj dominates pi and pi dominates ph then pj also dominates ph .It mean domince relation is
- Transitive
- Non transitive
- Equation
- Symbolic
_________ is a method of solving a problem in which we check all possible solutions to the problem to find the solution we need.
- Plane-sweep Algorithm
- Sorting Algorithm
- Brute-force Algorithm
- Greedy approach
In sorting the key value or attribute _______ from an ordered domain
- Must be
- Not always
The worst case running time of quick sort algorithm
- Cannot be quadratic
- Is quadratic
- Is always exponential
- Is linear
In max heap (for Heap sort algorithm when every time maximum element is removed from top we replace it with _______ leaf in the tree
- Second last
- Last
- First
- Any
Consider three matrices X , Y , Z of dimensions 1 x 2 x 3 x 4 x respectively .The number of multiplications of X(YZ) is
- 16
- 32
- 26
- 32
Which of the following is calculated with Big O notation
- Medium bound
- Upper bound
- Lower bound
- Both upper and lower bounds
While sorting the ordered domain means for any two input elements x and y ________ satisfies only
- X < y
- X > y
- X = y
- All of the above
CS 502 – Fundamentals of Algorithms Current Solved Quiz 2021
Which one is not passed as parameter in quick sort algorithm?
- End of the array
- Middle of the array
- Array (containing input elements)
- Start of the array
In selection problem the rank of an element will be its _______ position if we sort the data
- First
- Final
- Second last
- Last
Election algorithm takes theta
- (n2)
- (n)
- Log(n)
- Nlog(n)
The only way to convert a string of I character into the empty string is with I deletion represented as ____
- E (o , j) = j
- E (I , j) = i
- E (0 , I) = j
- E ( I , 0) = i
To find maximal points in brute-force algorithm each point of the space is compared against _____ of that space
- One other point
- All other point
- Few other point
- Most of the other points
Heaps can be stored in arrays without using any pointers; this is due to the ____________ nature of the binary tree,
- 1. left-complete
- right-complete
- tree nodes
- tree leaves
Sieve Technique can be applied to selection problem?
- True
- False
A heap is a left-complete binary tree that conforms to the ___________
- increasing order only
- decreasing order only
- heap order
- (log n) order
A (an) _________ is a left-complete binary tree that conforms to the heap order
- heap
- binary tree
- binary search tree
- array
- pivot
- Sieve
- smaller sub problems
- Selection
In Sieve Technique we do not know which item is of interest
- True
- FalseThe recurrence relation of Tower of Hanoi is given below T(n)={1 if n=1 and 2T(n-1) if n >1 In order to move a tower of 5 rings from one peg to another, how many ring moves are required?
16
10
32
31In the analysis of Selection algorithm, we eliminate a constant fraction of the array with each phase; we get the convergent _______________ series in the analysis,
linear
arithmetic
geometric
exponentFor the heap sort, access to nodes involves simple _______________ operations.
arithmetic
binary
algebraic
logarithmicFor the sieve technique we solve the problem,
recursively
mathematically
precisely
accuratelyThe sieve technique works in ___________ as follows
phases
numbers
integers
routinesSlow sorting algorithms run in,
T(n^2)
T(n)
T( log n)A (an) _________ is a left-complete binary tree that conforms to the heap order
heap
binary tree
binary search tree
arrayIn the analysis of Selection algorithm, we make a number of passes, in fact it could be as many as,
T(n)
T(n / 2)
log n
n / 2 + n / 4The sieve technique is a special case, where the number of sub problems is just
5
many
1
fewIn which order we can sort?
increasing order only
decreasing order only
increasing order or decreasing order
both at the same timeAnalysis of Selection algorithm ends up with,
T(n)
T(1 / 1 + n)
T(n / 2)
T((n / 2) + n)The analysis of Selection algorithm shows the total running time is indeed ________in n,
arithmetic
geometric
linear
orthogonalHow many elements do we eliminate in each time for the Analysis of Selection algorithm?
n / 2 elements
(n / 2) + n elements
n / 4 elements
2 n elementsFor the heap sort we store the tree nodes in
level-order traversal
in-order traversal
pre-order traversal
post-order traversal
One of the clever aspects of heaps is that they can be stored in arrays without using any _______________.
pointers
constants
variables
functions
Divide-and-conquer as breaking the problem into a small number of
pivot
Sieve
smaller sub problems
Selection
How much time merge sort takes for an array of numbers?
T(n^2)
T(n)
T( log n)
T(n log n)
The reason for introducing Sieve Technique algorithm is that it illustrates a very important special case of,
divide-and-conquer
decrease and conquer
greedy nature
2-dimension Maxima
The number of nodes in a complete binary tree of height h is
2^(h+1) – 1
2 * (h+1) – 1
2 * (h+1)
((h+1) ^ 2) – 1
Sieve Technique applies to problems where we are interested in finding a single item from a larger set of _____________
n items
phases
pointers
constant
Memorization is?
To store previous results for future use
To avoid this unnecessary repetitions by writing down the results of recursive calls and looking them up again if we need them later
To make the process accurate
None of the above
Which sorting algorithm is faster
O (n log n)
O n^2
O (n+k)
O n^3
Quick sort is
Stable & in place
Not stable but in place
Stable but not in place
Some time stable & some times in place
One example of in place but not stable algorithm is
Merger Sort
Quick Sort
Continuation Sort
Bubble Sort
In Quick Sort Constants hidden in T(n log n) are
Large
Medium
Small
Not Known
Continuation sort is suitable to sort the elements in range 1 to k
K is Large
K is not known
K may be small or large
K is small
In stable sorting algorithm.
If duplicate elements remain in the same relative position after sorting
One array is used
More than one arrays are required
Duplicating elements not handled
Which may be a stable sort?
Merger
Insertion
Both above
None of the above
An in place sorting algorithm is one that uses ___ arrays for storage
Two dimensional arrays
More than one array
No Additional Array
None of the above
We do sorting to,
keep elements in random positions
keep the algorithm run in linear order
keep the algorithm run in (log n) order
keep elements in increasing or decreasing order
In Sieve Technique we donot know which item is of interest
True
False
Sorting is one of the few problems where provable ________ bonds exits on how fast we can sort,
upper
lower
average
log n
The reason for introducing Sieve Technique algorithm is that it illustrates a very important special case of,
divide-and-conquer
decrease and conquer
greedy nature
2-dimension Maxima
Analysis of Selection algorithm ends up with,
T(n)
T(1 / 1 + n)
T(n / 2)
T((n / 2) + n)
In in-place sorting algorithm is one that uses arrays for storage :
An additional array
No additioanal array
Both of above may be true according to algorithm
More than 3 arrays of one dimension.
Which sorting algorithn is faster :
O(n^2)
O(nlogn)
O(n+k)
O(n^3)
The running time of quick sort depends heavily on the selection of
No of inputs
Arrangement of elements in array
Size o elements
Pivot elements
Which may be stable sort:
Bubble sort
Insertion sort
Both of above
For the Sieve Technique we take time
T(n / 3)
n^2
n/3
More Quiz click here
If you are going for finest contents like I do, just visit this website every day because it
presents feature contents, thanks
naturally like your web site however you have to test the spelling on several of your posts.
A number of them are rife with spelling problems
and I to find it very troublesome to tell the truth however I
will certainly come again again.
I blog quite often and I seriously thank you for your information. This great article has truly
peaked my interest. I am going to take a note of your website and keep checking for new information about once per week.
I opted in for your RSS feed too.