WorksheetsDAA-Quiz1
Total questions: 20
Worksheet time: 20mins
........................... , ........................ and ...........................are the different ways in which an algorithm can be specified.
Asymptotic Notations, Flowchart, Pseudocode
English like statements, Flowchart, Pseudocode
English like statements,Sets, Pseudsocode
None of the above
Algorithm can be represented graphically using...........................
barchart
Graph
Pie chart
Flowchart
...............................is defined as step by step procedure for solving a particular problem
Space complexity
Time complexity
Performance Analysis
Algorithm
An Algorithm's performance an be analysed by using............................
Time complexity
Space Complexity
Number of inputs
Time and space complexity
..............................is defined as the amount of Computer time required to complete the execution of a program/problem
Space Complexity
Time complexity
CPU Time
None of these
Upper bound running time complexity of an algorithm is also called as.....................
Best case time complexity
Worst case time complexity
Average case time complexity
None of these
.......................is the amount of computer memory required to the execute the program /problem.
Time complexity
Space complexty
Memory complexity
None of these
Lower bound running time complexity of an algorithm is also called as.................
Best case time complexty
Worst case time complexity
Average case time complexity
None of these
............................Notation is used to represent strict upper bound running time complexity of an algotihm
Big-oh
Big-Omega
Theta
None of these
............................Notation is used to represent strict lower bound running time complexity of an algorithm.
Big-Oh
Big-Omega
Theta
None of these
.................................notation denotes Average case Time complexity
Big-Oh
Big Omega
Theta
None of these
........................................Notations are called as Asymptotic Notations.
Big-oh
Big-Omega
little-Theta
little-oh
theta
......................is used to represent strict upper bound running time complexity where as.................is used to represent upper bound running time complexity of an algorithm.
Big-oh,little-oh
little-oh,Big-oh
Big-oh,small-oh
small-oh,Big-oh
......................is used to represent strict lower bound running time complexity where as.................is used to represent lower bound running time complexity of an algorithm.
Big-Omega,small-omega
Big-Omega,little-omega
lttle-omega,Big-omega
small-omega,Big-Omega
Let f(n) and g(n) be two non-negative functions,f(n)=O(g(n)) if and only if..........................
f(n)<=c*g(n)
f(n)>=c*g(n)
f(n)<c*g(n)
f(n)<c*g(n)
Let f(n) and g(n) be two non-negative functions,f(n)= ω (g(n)) if and only if..........................
f(n)<=c*g(n)
f(n)>=c*g(n)
f(n)<c*g(n)
f(n)<c*g(n)
Let f(n) and g(n) be two non-negative functions,f(n)= θ (g(n)) if and only if..........................
c1*g(n)<=f(n)<=c2*g(n)
c1*g(n)>=f(n)>=c2*g(n)
c1*g(n)<f(n)<c2*g(n)
c1*g(n)>f(n)>c2*g(n)
...................................are the characteristics of an algorithm
Input
infiniteness
Effectiveness
output
finiteness
Find the time complexity for the following algorithm using step count method.
Algorithm sum(a,n)
{
nsum=0;
for(i=1;i<=n;i++)
{
nsum=nsum+a[i];
}
}
2n+2 units
2n+1 units
n+1 units
n+2 units
Find the space complexity for the following algorithm
Algorithm sum(a,b,c)
{
a=10;
b=20;
c=30;
d=a+b+c;
}
3 units
4 units
5 units
6 units
