Save as PDF

Opens your browser print dialog — select "Save as PDF" to download.

Total No. of Questions : 8
Total No. of Printed Pages : 6
Roll No. ...
CB-402 (GS)
B.Tech., (Computer Science and Business System)
IV Semester
Examination, June 2022
Grading System (GS)
Design and Analysis of Algorithms
Time : Three Hours
Maximum Marks : 70

Note:

i) Answer any five questions.

किन्हीं पाँच प्रश्नों को हल कीजिए।

ii) All questions carry equal marks.

सभी प्रश्नों के समान अंक हैं।

iii) In case of any doubt or dispute the English version question should be treated as final.

किसी भी प्रकार के संदेह अथवा विवाद की स्थिति में अंग्रेजी भाषा के प्रश्न को अंतिम माना जा���ेगा।
1.

a) Define the algorithm and its properties. Explain asymptotic notations for analyzing algorithm with example and Show that 10n² + 5 ∈ O(n²). (7)

एल्गोरिथम और उसके गुणों को परिभाषित करें। एल्गोरिथम का विश्लेषण करने के लिए एसिम्प्टोटिक नोटेशन को उदाहरण सहित समझाइए और दिखाइए कि 10n² + 5 ∈ O(n²).

b) Find the upper bound of recurrences given below by substitution method (7)

प्रतिस्थापन विधि द्वार नीचे दी गई पुनरावृति की ऊपरी सीमा ज्ञात कीजिए।

i) 2T(n/2) + n

ii) T(n/2) + 1

2.

a) Explain the Brute Force method. Write an algorithm for selection sort and apply it to the list of items 66, 11, 33, 55, 44, 22, 77. Also computer time complexity for the average case. (7)

ब्रूट फो��्स विधि को समझाइए। चयन प्रवर के लिए एक एल्गोरिथम लिखें और इसे आइटम 66, 11, 33, 55, 44, 22, 77 की सूची में लागू करें। औसत मामले के लिए कम्प्यूटर समय जटिलता भी।

b) Design Binary Search algorithm and derive its complexity by applying Master Theorem. (7)

बाइनरी सर्च एल्गोरिथम बनाइए और इसके एप्लाइंग मास्टर थ्योरम की कॉम्प्लेक्सिटी प्राप्त करें।
3.

a) Discuss how to find maximum and minimum elements in an array recursively? Trace the same for the following data sets 65, 70, 75, 80, 85, 60, 55, 50. Also derive the worst-case complexity. (7)

किसी सरणी में अधिकतम और न्यूनतम तत्वों को पुनरावर्ती रूप से कैसे खोजा जाए चर्चा करें। निम्न डाटा सेट 65, 70, 75, 80, 85, 60, 55, 50 के लिए इसे ट्रेस करें। सबसे खराब स्थिति वाली जटिलता भी प्राप्त करें।

b) Briefly explain Strassen's matrix multiplication. Apply it to multiply the following matrices. Explain how this method is better than the direct multiplication method. (7)

स्ट्रैसेन के मैट्रिक्स गुणन को संक्षेप में समझाइए। निम्नलिखित मैट्रिक्स को गुणा करने के लिए इसे लागू करें। यह विधि प्रत्यक्ष गुणन विधि से किस प्रकार बेहतर है? समझाइए।
[1 0 2]   [2 1 0]
[4 1 1] x [3 2 0]
[0 1 3]   [2 0 1]
                        
4.

a) Explain the concept of Divide & Conquer. Design an algorithm for Merge Sort and derive its time complexity. (7)

डिवाइड एंड कंकर की अवधारणा को स्पष्ट कीजिए। मर्ज सॉर्ट के लिए एक एल्गोरिथम डिजाइन करें और इसकी समय जटिलता प्राप्त करें।

b) Explain the concept of the Greedy Technique for Prim's Algorithm, determine the minimum cost spanning tree of the graph of figure: (7)

प्राइम के एल्गोरिथम के लिए ग्रीडी टेक्नीक की अवधारणा को समझाइए। आकृति के ग्र��फ की न्यूनतम लागत फैले हुए पेड़ का निर्धारण करें।
Diagram for Question
5.

a) Explain the dynamic programming. Compute the shortest path from vertex 1 to all other vertices using a dynamic programming approach. (7)

डायनेमिक प्रोग्रामिंग को समझाइए। डायनेमिक प्रोग्रामिंग दृष्टिकोण का उपयोग करके शीर्ष 1 से अन्य सभी शीर्षों तक सबसे छोटे पथ की गणना करें।
Diagram for Question

b) Using Floyd's algorithm, find all pairs of shortest path for the graph in the figure given below: (7)

फ्लॉयड के एल्गोरिथम का उपयोग करते हुए, नीचे दिए गए चित्र में ग्राफ के लिए सबसे छोटे पथ के सभी जोड़ों खोजें।
Diagram for Question
6.

a) Explain Backtracking Concept. Construct the state-space tree for solving 4-Queen's problem using backtracking. (7)

बैकट्रैकिंग कॉन्सेप्ट को समझाइए। बैकट्रैकिंग का उपयोग करके 4-Queen की समस्या को हल करने के लिए स्टेट-स्पेस वृक्ष का निर्माण करें।

b) How Branch and Bound algorithm is different from Backtracking? Solve the following instance of the Knapsack Problem by the Branch and Bound method. Given Knapsack capacity = 10. (7)

बैकट्रैकिंग से ब्रांच और बाउंड एल्गोरिथम कैसे अलग है? नैप्सैक समस्या के निम्नलिखित उदाहरण को ब्रांच और बाउंड विधि से हल करें। दी गई नैप्सैक क्षमता = 10 है।
Item 1 2 3 4
Weight 4 7 5 3
Value 40 42 15 12
7.

a) What is a Decision Tree? Give a decision tree for 3 elements selection sort for arranging the items in ascending order and estimate its lower bound. (7)

डिसीजन ट्री क्या है? वस्तुओं को आरोही क्रम में व्यवस्थित क��ने के लिए 3 तत्वों के चयन प्रकार के लिए एक निर्णय वृक्ष दें और इसकी निकली सीमा का अनुमान लगाइए।

b) Design a BFS algorithm to check the connectivity of a given graph. Explain with an example. (7)

किसी दिए गए ग्राफ की कनेक्टिविटी की जांच करने के लिए एक BFS एल्गोरिथम डिजाइन करें। उदाहरण सहित समझाइए।
8.

Explain any four of the followings with examples: (14)

i) Class P

i) क्लास P

ii) Class NP

ii) क्लास NP

iii) NP-Complete Problem

iii) NP-संपूर्ण समस्या

iv) NP-Hard Problem

iv) NP-हार्ड समस्या

v) Graph Coloring

v) ग्राफ कलरिंग

vi) Hamilton Cycle

vi) हैमिल्टन साइकिल