Attribution Non-Commercial (BY-NC)

68 views

Attribution Non-Commercial (BY-NC)

- Exercise 06
- Shell Script Algorithms
- JavaScript_Data_Structures_and_Algorithms.pdf
- ds-study-qs
- Compare AStar Dijkshitra
- DAA 2marks With Answers
- daa prev final.docx
- Analysis & Design of Algorithm June 2010
- Closest Pair Problem
- Sorting Algorithms
- Algorithm 1
- lec5.pdf
- ai
- ArtificialIntelligence_4_InformedSearch
- Database 1
- 3
- 8-Heap
- 09 Informed Search (1)
- Lecture-30-CS210-2012.pptx
- prac_quiz1sol.pdf

You are on page 1of 8

(A) Definite ness (B) correct ness (C) Effectiveness (D) A and C

(02) which of the following technique is not using for solve a 0-1knapsack problem (A) Greedy (B) Dynamic programming (C) branch and bound (D) all of the above

(03)For the following program gives Big O analysis of the running time (in terms of n) For (i=0; i<n; i++) A*i+ = +; (A) O(n-1) (B) O(n) (C) O(n2) (D) O(log n)

(04) For the following program gives Big O analysis of the running time (in terms of n) For (i=0; i< n; i++) For (j=i; j< n; j++) For (k=j; k< n; k++) S++; (A) O(n-1) (B) O(n2) (C) O(n3) (D) O(log n)

(05) For the following program gives Big O analysis of the running time (in terms of n) For (i=0; i < n*n; i++)

A*i+ = i;

(A) O(n-1)

(B) O(n2)

(C) O(n3)

(D) O(log n)

(06) Given f(n) = log2n , g(n) = n which function is asymptotically faster (A) f(n) is faster than g(n) (B) g(n) is faster than f(n)

(C) Either f(n) or g(n) (D) Neither f(n) nor g(n) (07) Which of the following are true (a) 33n3 + 4n2 = p (n2) (b) n! = O(nn) (c) 10n2 + 9 = O(n2) (d) 6n3 /(log n +1) = O(n3) (A) a,b and c (B)a and c (C) a and b (D) all are true (08) n! = (A) O( 2n) (B) (2n) (C) A and B (D) O(n100)

None of them are correct (09) T (n) = 8T (n/2) + n2, T (1) = 1 then T (n) = (A) (n2) (B) (n3) (C) (n4) (D) (n)

(10) T (n) = 3T (n/4) + n then T (n) = (A) O (n2) (B) O (n3) (C) O (n) (D) O (n4)

(11) T (n) = 4T (n/2) + n then T (n) = (A) (n2) (B) (n3) (C) (n4) (D) (n)

(12) T (n) = 2T (n/2) + cn then T (n) = (A) O (log n) (B) O (n log n) (C) O (n2 log n) (D) O (n2) (13) T (n) = 2T (n/2) + n2 then T (n) = (A) (n2) (B) (n3) (C) (n4) (D) (n)

(A) O (n3)

(B) O (n2)

(C) O (n)

(D) O (n4)

(15) T (n) = 9T (n/3) + n then T (n) = (A) (n4) (B) (n3) (C) (n2) (D) (n)

(16) T (n) = T (n/2) + 1 then T (n) = (A) O (log n) (B) O (2 log n) (C) O (n log n) (D) O (n2) (17) T (n) = T (n/2) + n2 then T (n) = (A) (n4) (B) (n3) (C) (n2) (D) (n)

(18) T (n) = 4T (n/2) + n2 then T (n) = (A) (n log n) (B) (n3 log n) (C) (n2 log n) (D) (n4 log n) (19) T (n) = 7T (n/2) + n2 then T (n) = (A) (n2.5) (B) (n2.807) (C) (n2.85) (D) (n2.75)

(20) T (n) = 2T (n/2) + n3 then T (n) = (A) (n4) (B) (n3) (C) (n2) (D) (n)

(21) T (n) = T (9n/10) + n then T (n) = (A) (n4) (B) (n3) (C) (n2) (D) (n)

(22) T (n) = 16T (n/4) + n2 then T (n) = (A) (n log n) (B) (n3 log n) (C) (n2 log n) (D) (n4 log n) (23) T (n) = 7T (n/3) + n2 then T (n) = (A) (n4) (B) (n3) (C) (n2) (D) (n)

(24) T (n) = 7T (n/2) + n2 then T (n) = (A) (nlog7) (B) (nlog5) (C) (nlog9) (D) (nlog3)

(A) (n4)

(B) (n3)

(C) (n2)

(D) (n)

(26 T (n) = 2T (n/4) + n then T (n) ) = (A) (n log n) B) (n log n( ) (C) (n2 log n) (D) (n3 log n) (27 T (n) = T (n) +1 then T (n) = ) (A) (n log n) B) (n log n( ) (C) (log n) (D) (n2 log n) (28) T (n) = 100T (n/99) + log (n!) then T (n) = (A) (n log n) B) (n log n( ) (C) (n2 log n) (D) (n3 log n) (29) T (n) = T (n-1) + n4 then T (n) = (A) (n4) (B) (n3) (C) (n2) (D) (n)

(30) T (n) = 2T (n/2) + 3n2 and T (1) = 11 then T (n) = (A) O (n3) (B) O (n2) (C) O (n) (D) O (n4) (31) T (n) = 1 for n=1 = 2 * T (n - 1) for n >1 then T (n) = (A) 2 n (B) 2 n-1 (C) 2 n-2 (D) 2 n-3

(32) T (n) = 4T (n/2) + n2n then T (n) = (A) (n3n) (B) (n2) (C) (n2n) D) (nn( )

(33) T (n) = 2T (n/2) + (n/ log n) then T (n) = (A) (n log n) (B) (n log n log n) (C) (n2 log n log n) (D) (n2 log n) (34) T (n) = T (n/2) + T (n/4) + T (n/8) + n then T (n) = (A) (n4) (B) (n3) (C) (n2) (D) (n)

(D) objects

(36) A machine took 200 sec to sort 200 names, using bubble sort. In 800 sec, it can approximately sort (A) 400 names (B) 800 names (C) 750 names (D) 1800 names

(37) Linked lists are not suitable for (A) Insertion sort (B) Binary search (C) Radix sort (D) Polynomial manipulation (38) Which of the following is useful in implementing quick sort? (A) Stack (B) List (B) Set (D) Queue

(39) A machine needs a minimum of 100 sec to sort 1000 names by quick sort. The minimum time needed to sort 1000 names by quick sort. The minimum time needed to sort 100 names will be approximately? (A) 50.2 sec (B) 6.7 sec (C) 72.7 sec (D) 11.2 sec (40) Given 2 sorted lists of size m and n respectively. Number of comparisons needed in the worst case by the merge sort algorithm will be (A) mn (B) max(m,n) (C) min(m,n) (D) m+n-1

(41) The depth of a complete binary tree with n nodes is (A) log (n+1)-1 (B) log n (C) log (n-1)+ 1 (D) log n +1

(42) Average successful search time taken by binary search on a sorted array of items is (A) 2.6 (B) 2.7 (C) 2.8 (D) 2.9

(43) Average successful search time for sequential search on n items is (A) n/2 (B) (n-1)/2 (C) (n+1)/2 (D) n2

(44) The maximum number of comparisons needed to sort 7 items using radix sort is (assume each item is a 4 digit decimal number) (A) 280 (B) 40 (C) 47 (D) 38

(45) In Randomized Quick sort, the expected running time of any input is (A) O(n) (B) O(n2) (C) O(n log n ) (D) O(n3)

(46) If Total complexity after micro analysis is 5n3 + 10n2 + 100 n +400 logn+ 10, The Big Oh complexity is (A) O(n2) (B) O(n3) (C) O(nlogn) (D) O(n2logn)

(47) In Strassens Multiplication Algorithm the T(n) is A) 7T (n) + bn2 B) 7T (n/2) + bn2 C) 8T (n/2) + bn2 D) 7T (n/2) + bn

(48) T (n) = 4 T (n/2) + n then in Big Oh Notation it is A) O (n2) B) O(4) (C) O(n) D) O(log(n))

(49) In T(n) = a * T(n/b) + f(n) , a refers to (A) Size of sub problem (C) Size of the problem (B) No. of sub problems (D) Time to combine solutions

(50) 0-1 knapsack be solved using (A) dynamic programming (D) All A,B,C,E (B) Backtracking (E) Genetic Programming (C) Branch & Bound

(51) In depth first search algorithm the no. of recursive calls we have to make are (A) 2 (B) 1 (C) 6 (D) depends on the graph

(52) O (f(n)) minus O(f(n)) is equal to (A) Zero (B) A constant (C) f(n) (D) O(f(n))

(53) Quick sort is solved using (A) Divide and conquer (C) Dynamic Programming (54) For i = 1 to n-1 do (B) Greedy Programming (D) Branch and bound

2.1 For j = 1 to n-1-i do 2.2.1 If (a*j+1+ < a*j+) then swap a*j+ and a*j+1+ Given code is for (A) Bubble sort (B) Insertion sort (C) Quick Sort (D) Selection Sort

(55) Worst case complexity of quick sort is (A) O(n) (B) O(logn) (C) O(nlogn ) (D) O(n2)

(56) The sub problems in Divide and Conquer are considered to be A) Distinct (B) overlapping (C) large size (D) small size

(57) Which of the following name does not relate to stacks? (A) FIFO lists (B) LIFO list (C) Piles (D) Push-down lists (58 Which of the following data structure is linear type? (A) Strings (B) Lists (C) Queues D) All of above

(59) In a graph if e=(u, v) means (A) u is adjacent to v but v is not adjacent to u (B) e begins at u and ends at v (C) u is processor and v is successor (D) both b and c (60) An algorithm that calls itself directly or indirectly is known as (A) Sub algorithm (61) In a Heap tree (A) Values in a node is greater than every value in left sub tree and smaller than right sub tree (B) Values in a node is greater than every value in children of it (C) Both of above conditions applies (D) none of above conditions applies (62) (B) Recursion (C) Polish notation (D) Traversal algorithm

- Exercise 06Uploaded byvaomaxem
- Shell Script AlgorithmsUploaded byMariya James
- JavaScript_Data_Structures_and_Algorithms.pdfUploaded byRuben Cerciu
- ds-study-qsUploaded byAbhijeet Panwar
- Compare AStar DijkshitraUploaded byRadha Raman
- DAA 2marks With AnswersUploaded bymiraclesuresh
- daa prev final.docxUploaded bymanikanta
- Analysis & Design of Algorithm June 2010Uploaded byPrasad C M
- Closest Pair ProblemUploaded byHamid Nasir
- Sorting AlgorithmsUploaded byMirza Zeeshan Baig
- Algorithm 1Uploaded byDebranjan Pal
- lec5.pdfUploaded byElvis Capia Quispe
- aiUploaded byapi-367177857
- ArtificialIntelligence_4_InformedSearchUploaded byMarawan Okasha
- Database 1Uploaded byNAZI
- 3Uploaded bygunawan61
- 8-HeapUploaded byanon_112800657
- 09 Informed Search (1)Uploaded byhariprasathk
- Lecture-30-CS210-2012.pptxUploaded byMoazzam Hussain
- prac_quiz1sol.pdfUploaded byporkerria
- Analysis of Data StructureUploaded byLisa B Arnold
- Les07.pptUploaded byMac Millan
- A1-S1-2012-8-PuzzleUploaded byAnonymous rWLvaNQ
- Longest-Palindromic-Substring.pptxUploaded bymyraata
- Evolutionary Learning of an Evaluation Function for CheXUploaded byDarren Hassan
- 49_Parveen research paper final paper.docxUploaded byMadhusudan Thakur
- UNIT - VUploaded byJit Agg
- speedup.pptUploaded bybhar
- About Programming ContestUploaded byyeshue
- les19Uploaded byAbdul Ghaffar

- DATA STRUCTURES WITH CUploaded by許智淵
- Data StuctureUploaded byapi-3782519
- job shopUploaded byDwita Juliarta
- Data StructuresUploaded byapi-3729436
- Ada solutions 11th exerciseUploaded bysathwick
- InterviewQ AlgorithmUploaded byXiaomin Ding
- Quantum Computing - GruskaUploaded byRaaj Chatterjee
- 4th Semester 5 Years Questions - CSE - NUUploaded byKhokanuzzaman Khokan
- preparingyourstudentsforsuccessontheapcsprinciplesexamUploaded byapi-236387090
- GATE QuestionsUploaded byAkhil Verma
- Chapter One.pdfUploaded byefrax3
- TRUNCATED BOOLEAN MATRICES FOR DNA COMPUTATIONUploaded byBilly Bryan
- NP-hard Graph Problems on Clique-Width Bounded GraphsUploaded byShreyas Shirwadkar
- GAIntroUploaded byMbairassem Isidore
- MPC Model Predictive ControlUploaded byñ=?!2
- Design And Analysis of Algorithms LabUploaded byRajendraYalaburgi
- 006Uploaded byabdel_lak
- AlgorithmsUploaded byAnirban Mitra
- Lecture 01Uploaded byziactn
- 08 Hopfield NetworksUploaded byanand
- NIELIT Scientist ‘B’ Recruitment 2016 _ ComputerUploaded byKriti Gupta
- Binary searchUploaded byJunaid khan
- Chapter_02 Fundamental AnalysisUploaded byNipaporn Tanny Thipmanee
- codeforcoder_CSE-408_MCQ-1Uploaded byMaheswari Chimata
- CS2303 2 MarksUploaded bysankarwinning
- 1-s2.0-S0377221799002842-mainUploaded byAntonio
- Sec AUploaded byroufix
- 03 Measuring Runtime and PseudocodeUploaded byChengwei Joe Dai
- Mipt 2014 Burunduk1.EnUploaded byVishal Golcha
- A Proof for a QuickHull AlgorithmUploaded byRahul Mehta