A point p is said to be dominated by point q if p.x=q.x&p.y=q.y 2 true. In RAM computation model, RAM stands for Random Access Model.

Similar documents
Design and Analysis of Algorithms

Algorithms, Design and Analysis. Order of growth. Table 2.1. Big-oh. Asymptotic growth rate. Types of formulas for basic operation count

CS 4407 Algorithms Lecture 2: Iterative and Divide and Conquer Algorithms

CS 4407 Algorithms Lecture 3: Iterative and Divide and Conquer Algorithms

Principles of Algorithm Analysis

Topic 17. Analysis of Algorithms

The Time Complexity of an Algorithm

Analysis of Algorithm Efficiency. Dr. Yingwu Zhu

CSE332: Data Structures & Parallelism Lecture 2: Algorithm Analysis. Ruth Anderson Winter 2019

CSED233: Data Structures (2017F) Lecture4: Analysis of Algorithms

Divide and Conquer Algorithms

CSE332: Data Structures & Parallelism Lecture 2: Algorithm Analysis. Ruth Anderson Winter 2018

CSE332: Data Structures & Parallelism Lecture 2: Algorithm Analysis. Ruth Anderson Winter 2018

Data Structures and Algorithms

Module 1: Analyzing the Efficiency of Algorithms

The Time Complexity of an Algorithm

Computational Complexity

Divide and Conquer Algorithms

Advanced Algorithmics (6EAP)

Ch 01. Analysis of Algorithms

Omega notation. Transitivity etc.

CS173 Running Time and Big-O. Tandy Warnow

Great Theoretical Ideas in Computer Science. Lecture 7: Introduction to Computational Complexity

Module 1: Analyzing the Efficiency of Algorithms

Divide-and-conquer: Order Statistics. Curs: Fall 2017

Asymptotic Notation. such that t(n) cf(n) for all n n 0. for some positive real constant c and integer threshold n 0

Ch01. Analysis of Algorithms

COMP 9024, Class notes, 11s2, Class 1

CPS 616 DIVIDE-AND-CONQUER 6-1

Lecture 2. Fundamentals of the Analysis of Algorithm Efficiency

Analysis of Algorithms

Big O 2/14/13. Administrative. Does it terminate? David Kauchak cs302 Spring 2013

P, NP, NP-Complete, and NPhard

data structures and algorithms lecture 2

Growth of Functions. As an example for an estimate of computation time, let us consider the sequential search algorithm.

CS483 Design and Analysis of Algorithms

Mergesort and Recurrences (CLRS 2.3, 4.4)

CS481: Bioinformatics Algorithms

CS Analysis of Recursive Algorithms and Brute Force

Algorithms Test 1. Question 1. (10 points) for (i = 1; i <= n; i++) { j = 1; while (j < n) {

CS 231: Algorithmic Problem Solving

Lecture 1: Asymptotics, Recurrences, Elementary Sorting

Data Structures and Algorithms. Asymptotic notation

Introduction. An Introduction to Algorithms and Data Structures

Algorithms and Their Complexity

Algorithm Analysis, Asymptotic notations CISC4080 CIS, Fordham Univ. Instructor: X. Zhang

IS 709/809: Computational Methods in IS Research Fall Exam Review

Analysis of Algorithms

CSE373: Data Structures and Algorithms Lecture 3: Math Review; Algorithm Analysis. Catie Baker Spring 2015

Asymptotic Running Time of Algorithms

MA008/MIIZ01 Design and Analysis of Algorithms Lecture Notes 2

Analysis of Algorithms I: Asymptotic Notation, Induction, and MergeSort

Algorithms Design & Analysis. Analysis of Algorithm

Input Decidable Language -- Program Halts on all Input Encoding of Input -- Natural Numbers Encoded in Binary or Decimal, Not Unary

Algorithm Design and Analysis

LECTURE NOTES ON DESIGN AND ANALYSIS OF ALGORITHMS

Review Of Topics. Review: Induction

Asymptotic Analysis of Algorithms. Chapter 4

Divide & Conquer. CS 320, Fall Dr. Geri Georg, Instructor CS320 Div&Conq 1

CS 4407 Algorithms Lecture 2: Growth Functions

Sorting. Chapter 11. CSE 2011 Prof. J. Elder Last Updated: :11 AM

Lecture 1 - Preliminaries

COMP 355 Advanced Algorithms

Copyright 2000, Kevin Wayne 1

V. Adamchik 1. Recurrences. Victor Adamchik Fall of 2005

Computer Algorithms CISC4080 CIS, Fordham Univ. Outline. Last class. Instructor: X. Zhang Lecture 2

Computer Algorithms CISC4080 CIS, Fordham Univ. Instructor: X. Zhang Lecture 2

An analogy from Calculus: limits

Growth of Functions (CLRS 2.3,3)

CS 344 Design and Analysis of Algorithms. Tarek El-Gaaly Course website:

Recursion. Computational complexity

COMP 355 Advanced Algorithms Algorithm Design Review: Mathematical Background

Week 5: Quicksort, Lower bound, Greedy

Algorithm. Executing the Max algorithm. Algorithm and Growth of Functions Benchaporn Jantarakongkul. (algorithm) ก ก. : ก {a i }=a 1,,a n a i N,

Linear Selection and Linear Sorting

Analysis of Algorithms [Reading: CLRS 2.2, 3] Laura Toma, csci2200, Bowdoin College

Fast Sorting and Selection. A Lower Bound for Worst Case

Algorithm efficiency can be measured in terms of: Time Space Other resources such as processors, network packets, etc.

Analysis of Algorithms CMPSC 565

Introduction. How can we say that one algorithm performs better than another? Quantify the resources required to execute:

1 Quick Sort LECTURE 7. OHSU/OGI (Winter 2009) ANALYSIS AND DESIGN OF ALGORITHMS

Divide and Conquer Algorithms. CSE 101: Design and Analysis of Algorithms Lecture 14

Great Theoretical Ideas in Computer Science. Lecture 9: Introduction to Computational Complexity

Analysis of Algorithms - Using Asymptotic Bounds -

Algorithms And Programming I. Lecture 5 Quicksort

CMPT 307 : Divide-and-Conqer (Study Guide) Should be read in conjunction with the text June 2, 2015

3. Algorithms. What matters? How fast do we solve the problem? How much computer resource do we need?

Analysis of Algorithms

CSE 373: Data Structures and Algorithms Pep Talk; Algorithm Analysis. Riley Porter Winter 2017

CSCE 750 Final Exam Answer Key Wednesday December 7, 2005

Design and Analysis of Algorithms

Data Structures and Algorithms CSE 465

Sorting Algorithms. We have already seen: Selection-sort Insertion-sort Heap-sort. We will see: Bubble-sort Merge-sort Quick-sort

CS 310 Advanced Data Structures and Algorithms

Lecture 2. More Algorithm Analysis, Math and MCSS By: Sarah Buchanan

Divide and Conquer Problem Solving Method

Divide and Conquer. Recurrence Relations

COMP Analysis of Algorithms & Data Structures

Running Time Evaluation

Find an Element x in an Unsorted Array

Transcription:

In analysis the upper bound means the function grows asymptotically no faster than its largest term. 1 true A point p is said to be dominated by point q if p.x=q.x&p.y=q.y 2 true In RAM computation model, RAM stands for Random Access Model. 3 false A Function f(n) = n(logn+1)/2 is asymptotically equivalent to n log n. Here Upper Bound means the function f(n) grows asymptotically faster than n log n. 4 not The sequence of merge sort algorithm is: 5 Devide-Conquer-Combine The Omega-notation allows us to state only the asymptotic bounds. 6 Lower If input n is odd, then median will be 7 (n+1)/2 In plane sweep approach, a vertical line is swept across the 2d-plane from 8 Left to Right Sorting can be in 9 Both increasing and decreasing order Pseudo code of algorithms are to be read by 10 People

Question # 1 of 10 ( Start time: 09:46:15 PM ) Total Marks: 1 In Selection algorithm, we assume pivot selection takes theta running time. n ( answer) n2 n3 log(n) Question # 2 of 10 ( Start time: 09:47:10 PM ) Total Marks: 1 The function f(n)=n(logn+1)/2 is asymptotically equivalent to nlog n. Here Lower Bound means function f(n) grows asymptotically at as fast as nlog n. Normal Least Most ( answer) All Question # 3 of 10 ( Start time: 09:48:39 PM ) Total Marks: 1 While solving Selection problem, in Sieve technique we choose pivot Minimum element Maximum element Randomly ( answer) Average element Question # 4 of 10 ( Start time: 09:49:25 PM ) Total Marks: 1 Asymptotic growth rate of the function is taken over case running time. Best Average Worst ( answer) Normal Question # 5 of 10 ( Start time: 09:50:00 PM ) Total Marks: 1 For the worst-case running time analysis, the nested loop structure containing one for and one while loop, might be expressed as a pair of nested summations. 1 2 3

4 ( answer) not cnfrm Question # 6 of 10 ( Start time: 09:51:26 PM ) Total Marks: 1 8n2 + 2n - 3 will eventually exceed c2*(n) no matter how large we make c2. ( answer) Question # 7 of 10 ( Start time: 09:52:37 PM ) Total Marks: 1 The ancient Roman politicians understood an important principle of good algorithm design that is plan-sweep algorithm. ( answer) In we have to find rank of an element from given input. Merge sort algorithm Slection problem ( answer) Brute force technique Plane Sweep algorithm Question # 9 of 10 ( Start time: 09:54:47 PM ) Total Marks: 1 In addition to passing in the array, the other arguments passed to Merge Sort algorithm are indices of the array that we are to sort. First Sub ( answer) Main & Sub Sub & Main Question # 10 of 10 ( Start time: 09:56:10 PM ) Total Marks: 1 In 2d-space a point is said to be if it is not dominated by any other point in that space. Member Minimal Maximal ( answer)

Question # 1 of 10 ( Start time: 10:09:04 PM ) Total Marks: 1 If input n is odd, the median will be (n+1)/ 2 (Answer) n/2 Question # 2 of 10 ( Start time: 10:09:04 PM ) Total Marks: 1 When writing pseudo code, those are omitted that detract from the main ideas of the algorithm. Essentials Details (Answer) Summaries Inputs Question # 3 of 10 ( Start time: 10:10:55 PM ) Total Marks: 1 Recurrence can be described in terms of a tree. Yes (Answer) No Question # 4 of 10 ( Start time: 10:11:52 PM ) Total Marks: 1 In RAM computation model, RAM stands for Random Access Model. (Answer) Question # 5 of 10 ( Start time: 10:12:24 PM ) Total Marks: 1 An algorithm is a mathematical entity that is dependent on a specific programming language. (Answer) Question # 6 of 10 ( Start time: 10:13:39 PM ) Total Marks: 1 Rank of an element can be defined as One minus the number of elements that are smaller Two plus the number of elements that are greater One plus no of elements that are smaller (Answer) Two minus the number of elements that are smaller

Question # 7 of 10 ( Start time: 10:14:37 PM ) Total Marks: 1 After sorting in merge sort algorithm, merging process is invoked. (Answer) Question # 8 of 10 ( Start time: 10:15:09 PM ) Total Marks: 1 Algorithm is a mathematical entity, which is independent of a specific machine and operating system. (Answer) Question # 9 of 10 ( Start time: 10:15:39 PM ) Total Marks: 1 Sieve technique is very important special case of Divide-and-Conquer strategy. (Answer) Question # 10 of 10 ( Start time: 10:16:09 PM ) Total Marks: 1 For small values of n, any algorithm is fast enough. Running time does become an isuue when n gets large. (Answer) Fast Question # 1 of 10 ( Start time: 10:37:05 PM ) Total Marks: 1 Pseudo code of algorithms are to be read by. People ok RAM Computer Compiler

Question # 2 of 10 ( Start time: 10:37:35 PM ) Total Marks: 1 If we associate (x, y) integers pair to cars where x is the speed of the car and y is the nega tion of the price. High y value for a car means a car. Fast Slow Expensive Cheap ok Question # 3 of 10 ( Start time: 10:38:54 PM ) Total Marks: 1 After sorting in merge sort algorithm, merging process is invoked. ok Question # 4 of 10 ( Start time: 10:39:19 PM ) Total Marks: 1 In the statement output P[i].x, P[i].y, the number of times elements of P are accessed is 1 2 ok 3 4 Question # 5 of 10 ( Start time: 10:39:42 PM ) Total Marks: 1 In selection problem, the rank of an element will be its position if we sort the input data. first final ok Second last Last Question # 6 of 10 ( Start time: 10:40:03 PM ) Total Marks: 1...of reference is an important fact of current processor technology. Defining Assigning Formality Locality ok

Question # 7 of 10 ( Start time: 10:40:39 PM ) Total Marks: 1 In Selection problem, the Sieve technique works in Non-recursive manner Constant time Phases ok One complete go Question # 8 of 10 ( Start time: 10:41:07 PM ) Total Marks: 1 Brute-force algorithm for 2D- Maxima is operated by comparing pairs of points. Two Some Most All ok Question # 9 of 10 ( Start time: 10:42:21 PM ) Total Marks: 1 Floor and ceiling are to calculate while analyzing algorithms. Very easy Usually considered difficult ok Question # 10 of 10 ( Start time: 10:42:58 PM ) Total Marks: 1 The function f(n)= n(logn+1)/2 is asymptotically equivalent to n log n. Hre Upper Bound means the function f(n) grows asymptotically faster than n log n. More Quiet Not ok At least CS502 Fundamentals of Algorithms Quiz No. 1, File 6 Question # 1 of 10 ( Start time: 10:51:54 PM ) Total Marks: 1 Median is not useful measure of central tendency of given input set especially when the d istribution of values is highly skewed.

Question # 2 of 10 ( Start time: 10:52:29 PM ) Total Marks: 1 Al-Khwarizmi was a/an... Artist Mathematician ok Astronomer Khalifah Question # 3 of 10 ( Start time: 10:52:56 PM ) Total Marks: 1 In merge sort algorithm, we split the array around the index q. Entring Mid ok Exiting Summing Question # 4 of 10 ( Start time: 10:54:06 PM ) Total Marks: 1 is one of the few problems, where provable lower bounds exist on how fast w e can sort. Searching Sorting ok Both Searching & Sorting Graphing Question # 5 of 10 ( Start time: 10:55:29 PM ) Total Marks: 1 In asymptotical analysis of n*(5 + 2) 3, as n becomes large, the dominant (fastest growing) term is some constant times n_1 n n+1 n*n Question # 6 of 10 ( Start time: 10:56:41 PM ) Total Marks: 1 The total running time for Selection algorithm is Quadratic

Linear ok Geometric Exponential Question # 7 of 10 ( Start time: 10:57:12 PM ) Total Marks: 1 When writing pseudo code, those are omitted that detract from the main ideas of the algorithm. Essentials Details ok Summaries Inputs Question # 8 of 10 ( Start time: 10:57:35 PM ) Total Marks: 1 The ancient Roman politicians understood an important principle of good algorithm desig n that is plan-sweep algorithm. ok Question # 9 of 10 ( Start time: 10:57:58 PM ) Total Marks: 1 In analysis, the Lower Bound means the function grows asymptotically at least as fast as i ts largest term. ok In asymptotical analysis of n(n - 3) and 4n*n, as n becomes large, the dominant (fastest growing) term is some constant ti mes. n+1 n-1 n ok n*n CS502 Fundamentals of Algorithms Quiz No. 1, File 7

Question # 1 of 10 ( Start time: 11:04:26 PM ) Total Marks: 1 In merge sort algorithm, we split the array around the index q. Entring Mid ok Exiting Summing Question # 2 of 10 ( Start time: 11:04:41 PM ) Total Marks: 1 provides us more accurate result when input values are not closer with each other. Average Median ok Question # 3 of 10 ( Start time: 11:05:30 PM ) Total Marks: 1 Recurrence can be described in terms of a tree. Yes ok No Question # 4 of 10 ( Start time: 11:05:51 PM ) Total Marks: 1 The time assumed for each basic operation to execute on RAM model of computation is Infinite ok Continuous Constant Variable Question # 5 of 10 ( Start time: 11:06:17 PM ) Total Marks: 1 If pj dominates pi and pi dominates ph then pj also dominates ph. It means dominance rel ation is Transitive ok Non Transitive Equation Symbolic Question # 6 of 10 ( Start time: 11:06:46 PM ) Total Marks: 1 Selection algorithm takes theta

(n2) (n) ok log(n) nlog(n) Question # 7 of 10 ( Start time: 11:07:28 PM ) Total Marks: 1 Algorithm analysts know for sure about efficient solutions for NP-complete problems. ok Question # 8 of 10 ( Start time: 11:08:12 PM ) Total Marks: 1 Brute-force algorithm uses no intelligence in pruning out decisions. ok Question # 9 of 10 ( Start time: 11:08:52 PM ) Total Marks: 1 In RAM computation model, RAM stands for Random Access Model. ok Question # 10 of 10 ( Start time: 11:09:10 PM ) Total Marks: 1 For solving Selection problem, we introduced Sieve technique due to Using Decrease and Conquer strategy Avoiding to sort all input data Eliminating Rank of an element Using Brute-force approach CS502 Fundamentals of Algorithms Quiz No. 1, File 8 Question # 1 of 10 ( Start time: 11:25:00 PM ) Total Marks: 1 Before sweeping a vertical line in plane sweep approach, in start sorting of the points is d one in increasing order of their coordinates.

X Y Z X & Y Question # 3 of 10 ( Start time: 11:26:39 PM ) Total Marks: 1 The number of accesses to any element of space is not counted for the running time calcu lation of algorithm. Question # 4 of 10 ( Start time: 11:28:01 PM ) Total Marks: 1 Quick sort is best from the perspective of Locality of reference. ok Question # 5 of 10 ( Start time: 11:28:34 PM ) Total Marks: 1 In the statement "if (P[i].x < P[j].x) & (P[i].y < P[j].y)", the number of times elements of P are accessed is 1 2 3 4 ok Question # 6 of 10 ( Start time: 11:28:56 PM ) Total Marks: 1 provides us more accurate result when input values are not closer with each other. Average Median ok Question # 7 of 10 ( Start time: 11:29:28 PM ) Total Marks: 1 The brute-force algorithm for 2D-Maxima runs in order O( ) time. n n(log n) n*n ok n3

Question # 8 of 10 ( Start time: 11:30:58 PM ) Total Marks: 1 Rank of an element can be defined as One minus the number of elements that are smaller Two plus the number of elements that are greater One plus the number of elements that are smaller ok Two minus the number of elements that are smaller Question # 9 of 10 ( Start time: 11:31:29 PM ) Total Marks: 1 In pseudo code, the level of details depends on intended audience of the algorithm. ok Question # 10 of 10 ( Start time: 11:32:03 PM ) Total Marks: 1 In Sieve technique, we solve the problem In recursive manner Non recursively Using Merge Sort algorithm Using Brute force technique CS502 Fundamentals of Algorithms Quiz No. 1, File 9 Question # 3 of 10 ( Start time: 11:25:20 PM ) Total Marks: 1 When writing pseudo code, those are omitted that detract from the main ideas of the algorithm. Essentials Details Summaries Inputs Question # 4 of 10 ( Start time: 11:26:29 PM ) Total Marks: 1 f(n) is a set of functions such that there exist positive constants c1, c2 and n0 such that 0 <= c1g(n) <= f(n) <= c2g(n) for all n _ n0 Then f(n) is asymptotically g(

n). Less than Greater than Equivalent to Not equivalent to Question # 5 of 10 ( Start time: 11:27:11 PM ) Total Marks: 1 If the indices passed to merge sort algorithm are,then this means that there is o nly one element to sort. Small Large Equal Not Equal Question # 6 of 10 ( Start time: 11:27:46 PM ) Total Marks: 1 Algorithm is a sequence of computational steps that...the input into output. Merge Assign Transform Integrate Question # 7 of 10 ( Start time: 11:28:27 PM ) Total Marks: 1 Merge sort is based on. Brute-force Plan-sweep Axis-sweep Divide and Conquer Question # 8 of 10 ( Start time: 11:29:00 PM ) Total Marks: 1 The sequence of merge sort algorithm is: Divide-Combine-Conquer Conquer-Divide-Combine Divide-Conquer-Combine Combine-Divide-Conquer Question # 9 of 10 ( Start time: 11:29:30 PM ) Total Marks: 1

In we have to find rank of an element from given input. Merge sort algorithm Selection problem Brute force technique Plane Sweep algorithm Question # 10 of 10 ( Start time: 11:30:18 PM ) Total Marks: 1 In the statement "if (P[i].x < P[j].x) & (P[i].y < P[j].y)", the number of times elements of P are accessed is 1 2 3 4