# CS502 Quiz 1 Solution

### CS502 Solved MCQs Of Quiz 1

 Post Title CS502 Quiz 1 Solution Book Code CS502 Degree BSIT/BSCS/Other University Virtual Univerity of Pakistan CS502 Quiz 1 / Quiz 2/ Quiz 3 CS502 Quiz 1 Mid/Final CS502 Midterm MCQs Also, Read CS401 Solved MCQs Midterm Also, Read CS502 Lecture Wise MCQs Midterm

## CS502 Quiz 1 Solution

An algorithm is well defined computational procedure that takes.  (CS502)

Design, analysis

Design, analysis

Key, analysis

Input, output

The result of asymptotical analysis of n(n-3) and 4n&n is that ……………..(CS502)

Both are asymptotically equivalent

n(n-1) is asymptotically greater

n(n-1) is asymptotically less

Both are asymptotically not equivalent

Two functions 4n2 and (8n2 + 2n -3) are ……………(CS502)

Hard to calculate

Related to power functions

Asymptotically equivalents

Not equivalent

Two functions are said to be asymptotically equivalent if they have?  (CS502)

The same number of polynomials

The same growth rate for large n

Same input

Been proved as equivalent

The important factors to measure the running time at the brute force 2-d maxima algorithm are.  (CS502)

Count the number of times an element of p is accessed

All of the above

Count the number of steps of the pseudo-code that is executed

The number of comparisons that are performed

For n> 1,..............divides into two halves, sorts the two, and then combine them together.  (CS502)

Insertion sort

Quicksort

Merge sort

Heapsort

Two functions 4n2 and (8n2+2n-3) are …………..

Asymptotically equivalent

Hard to calculate

Not equivalent

Related to power functions

Array divided into …………sub arrays while copying seve technique to selection problem.  (CS502)

3

2

1

4

In average case time, the probability of seeing input is denoted by ……………(CS502)

P[1]

P[1]

p(1)

P{1}

In running time analysis we are also conc earned about the ……… required by the algorithm.  (CS502)

Code

Memory

Both space and memory

Space

In the merge sort algorithm to merge two lists of size n/2 to a list of size n, take………time?  (CS502)

Theta nlog(n)

Theta (n)

Theta log (n)

Theta log2 (n)

In the statement if [p(i)x) & (p[i] y < p[i]y)] the number of times elements of pase accessed is……….(CS502)

4

1

2

3

The total no. of arguments passed to merge sort algorithms ……………(CS502)

3

2

4

5

While applying the sieve techniques ………….. the subarray will contain all elements that are less than pivot element x.  (CS502)

A[1,.......n]

A[p+1,.........n]

A[q]

A[1………q-1]

In order to say anything meaningful about our algorithms, it will be important for us to settle on a …………..(CS502)

Java program

Mathematical model of computation

C++program

Pseudo program

Which symbol is used for omega notation?  (CS502)

[4]

[e]

[O]

In average case time, the probability of seeing input is denoted by ……………(CS502)

P[1]

P[1]

p(1)

P{1}

While applying the sieve techniques ………….. the subarray will contain all elements that are less than pivot element x.  (CS502)

A[1,.......n]

A[p+1,.........n]

A[q]

A[1………q-1]

 CS502 Quiz 1 Solution