Open navigation menu
Close suggestions
Search
Search
en
Change Language
Upload
Sign in
Sign in
Download free for days
0 ratings
0% found this document useful (0 votes)
11 views
Ada Pyq
This is a ADA PYQ file for GTU students
Uploaded by
darshil.20becev124
AI-enhanced title
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
Download now
Download
Save ADA PYQ For Later
Download
Save
Save ADA PYQ For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
0 ratings
0% found this document useful (0 votes)
11 views
Ada Pyq
This is a ADA PYQ file for GTU students
Uploaded by
darshil.20becev124
AI-enhanced title
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
Download now
Download
Save ADA PYQ For Later
Carousel Previous
Carousel Next
Save
Save ADA PYQ For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
Download now
Download
You are on page 1
/ 5
Search
Fullscreen
Seat No. Enrolment No. GUJARAT TECHNOLOGICAL UNIVERSITY BE - SEMESTER-V (NEW) EXAMINATION ~ SUMMER 2019 Subject Codi Subject Name: Analysis and Design of Algorithms Time: 02:30 PM TO 05:00 PM Instructions: 1. Attempt all questions. 2. Make suitable assumptions wherever necessary. 3. Figures to the right indicate full marks. Q.1 (a) What isan algorithm? How it differ from flowchart? (b) Give cifference of dynamic programming and divide-and- (©) Explain Asymptotic notation, Arrange the growth rate of 2! conquer method. 1, log n, n logn, 3° and n in increasing order of growth. Q2 (a) Differentiate greedy and dynamic programming. (b) Find out the @-notation for the function: f(n)=27n"+16n, (©) What is recurrence? Explain recursion-tree method with suitable example, OR (©) Write the Master theorem. Solve following recurrence using it. wT j=9T(n/3) +n (ii) T(n)=3T(n/4) + nln Q3° (a) Use Iteration method to solve recurrence T(n) = T(n-1) + 1 , here T()= (1). (b) Explain general characteristics of greedy algorithms. ) Using dynamic programming find out the optimal sequence for the matrix chain multiplication of Asio, Bios, Caz, Dizen and Eno matrices. oR Q3 (a) Write the best and worst running time of Insertion sort algorithm. Why it differ? (b) What are the steps for dynamic programming? Explain principal (O} of optimality, Determine LCS of (1,0,0,1,0,1,0.1} and {0,1,0,1,1.0,1,1,0) Qa (a) What is string-matching problem? Define valid shift and invalid shift, (b)_ Define P, NP, NP-complete and NP-hard problems. © Q4 (a) Write pseudo-code for Naive-String-1 Explain 0/1 knapsack using suitable example. OR hing algorithm, (b) Define spanning tree and MST. How Krushkal’s algorithm is te) different from Prim’s algorithm. Explain fractional knapsack problem with example. Q5 (a) Define graph, complete graph and connected graph. (b) Differentiate BFS and DFS. © Write and explain Dijkastra algorithm with example. ‘OR Q5 (a) Explain“P= NP?” problem. (b) Write just steps for Backtracking and Branch-and-Bound © algorithms, Explain travelling salesman problem, Prove that it is NP complete problem. Total Mar! 150703 Date: 06/06/2019 0 MARKS 03 07 03 07 07 03 07 03 07 03 07 03 07 03 07 03 07GUJARAT TECHNOLOGICAL UNIVERSITY 'SEMESTER-V (NEW) EXAMINATION ~ WINTER 2018 Subject Code:2150703 Date:27/11/72018 Subject Name: Analysis and Design of Algorithms ime: 10:30 AM TO 01:00 PME ‘Total Marks: 70 Instructions: 1 Attempt all questions. 2 Make suitable assumptions whercver necessary. Figures to the right indicate full marks, QA (a) Define Algorithm, Time Complenity and Space Complexity. 03 (Differentiate branch and bound and back tracking algorithm. os (e) Analyze Selection sort algorithm in best ease and worst cas. 0 Q2- (a) Solve the recurrence Ten) = 772) +0 03 (by Explain: Articulation Point, Graph, Twwe oO fe) Write Merge sort algorithm and compute its worst case and best-case 07 time complexity. Sort the List GUJARAT in alphabetieal order using merge sor. oR (©) Comider Knapsack capacity W=9, w = (34,5,7) and v=(1240,25.42) 07 find the maximum profit using dynamic methox: Q3- (a) Differentiate the Greedy And Dynamic Algorithm. 03 by Demonstrate Binary Search method to search Key = 14, form the array. 04 A=S24,78. 10,13, 14,609. (©) Solve Making change problem using dynamic technique. di = 1.d2=2, 07 Bet, 4-6, Coleulate for making change of Rs. 10. OR 3° (a) Find out the NCR (3)Using Dynamic Method 03 (b)_ Find single source shortest path using Dijkstra’s algorithm form atoe Os 2 7-H = (€) For the following chain of matrices find he order of parenthesization 07 for the optimal chain multiplication (13,5.89,3.34). QA (@) Explain Tower of Hanoi Problem, Derive its recursion equation and 03 ‘computer it's time complexity. (b) Explain finite automata algorithm for string matching 4 (©) Find out LCS of A=(K,A.N.D.LA.P) and B= [A,N,D.L) 7 OR Q4 (a) Explain Principle of Optimality with example. 03 Define BFS. How itis differ from DFS, oO 4e) Solve the following instance of knapsack problem using Backtracking 07 “Technique. The Capacity ofthe Knapsack W = 8 and w= (2.34.8) and value v= (3.56.10) QS (a) Draw the state space tee Diagram for 4 Queen problem. 03 (by Define P, NP, NP-Hard and NP-Complete Problem. os (€} Find out the Mi sven Graph, mum Spanning Tree using Kruskal Algorithm for 07 QS (a) Explain naive string matching algorithm with example. 03 (b) Explain DFS algorithm in bref. (©) Find all pair of shortest path using Floyd's Algorithm forgiven graph OT Ca ea => &GUJARAT TECHNOLOGICAL UNIVERSITY (-V (NEW) - EXAMINATION ~ SUMMER 2018 Subject Code:2150703 Date:04/05/2018 Analysis and Design of Algorithms :30 PM to 05:00 PM Total Marks: 70 Instrvttons: 1. Attempt al questions. 2 Make suitable assumptions wherever necessary. 2. Figures to the right indicate fall marks. Qa) _ Define Algorithm, Discuss key characteristics of algorithm. (b) Prove or disprove that fin) = 1 +243 +..0 + €@in"2), (6) Which are the hasie ste Derive its time comple: 1 of counting sort? Write counti Ly in worst case. sort algorithm, Q2 (a) What are the advantages of dynamic programming method over devide-&- ‘conquer method? () Solve following recurrence using recursion tree method: Tn) = 3T(w3) + 3, (©) Write standard(conventional) algorithm and Strassen’s algorithm for matrix ‘multiplication problem. What is the recurrence for Strassen’s algorithm”? Solve it using master method to derive time complexity of Strassen's algorithm, OR (€) Discuss best ease, average ease and worst ease time complesity of quick sort. Q3° (a) Justify with example that shortest paih problem satisfies the pri coptiriality. (b) Which are the the basic steps of the development of the dynamic programming algorithm? Mention any two examples of dynamic programming that we are using in seal life. (©) Solve the following making change problem using dynamic programming method: Amount = Rs. 7 ankl Denominations: (Rs. 1, Rs. 2 and Rs. 4) oR ciple of Q3- (a) Justify with example that longest path problem does not satisfy the principle of optimality (b) Discuss general characteristics of greedy method. Mention any two examples of greedy method that we are using in rel life, (e) Solve all pair shortest path problem for the following graph using Floyd's algorithm. 03 07 03 07 07 03 4 07 03 07a @) o © ay o © w o © a o © What ate the disadvantages of greedy method over dynamic programming 03, raethod? \What is DFS? Explain with example, Show the ordering of vertices produced 04 by Topological-sort for the following graph, Solve the following Knapsack Problem using greedy method. Number of 07 50, 40,30, 20, 10) Waite an algorithm for Huttman code. 03 ‘What is an approximation algorthen? Explain performance ratio for o approximation algorithm, Explain use of branch and bound technique for solving assignment problem, 07 Explain polynomial-time reduction algorithm, of Working modulo = 11, How many spurious hits does the Rabin-Karp 07 ‘matcher encounter in the text T'= 3141592653889703 when looking forthe pattern P=26? oR Which are the three major concepts use to show thata problem isan NP. 03, ‘Complete problem? Explain breadth fast search with example, o4 Find minimum spanning tree for the following undirected weighted graph 07 using Kruskal’s algorithm,Enrolment No. GUJARAT TECHNOLOGICAL UNIVERSITY BE -SEMESTER-V (NEW) - EXAMINATION ~SUMMER 2016 Date:21/05/2016 Subject Name:Analysis and Design of Algorithms 202: :30 PM to 05:00 PM Instructions: 2 Qs Qs Qs os Os as (a) (b) (a) b) (b) (a) ib) @ ib) (a) ib) (a) ») (@) ) x ‘Attempt all questions, Make suitable assumptions wherever necessary. igures tothe right indicate full marks. Why do we use asymptotic notations in the study of algorithms? Briefly describe the commonly used asymptotic notations. Define MST. Explain Kruskal’s algorithm with example for construction of MST. Explain finite automata for sting matching with example. Write a brief note on NP.completeness and tbe classes-P, NP and NPC. OR ‘What isthe basic idea behind Rabin — Karp algorithm’? What is expected runing time of this algorithm ? Explain it with example. Explain in brief characteristics of greedy algorithms. Compare Greedy Method ‘with Dynamic Programming Method. Explain the use of Divide snd Conquer Technique for Binary Search Methos.What is the complexity of Binary Search Methoe!? Explain it with example. ‘oR Explain Breadth First Traversal Method for Graph with algorithm, Explain Depth First Traversal Method for Graph with algorithm. ‘Wit is an amortized analysis? Expl using suitable example, Discuss Assembly Line Scheduling problem using dynamie programming with example. aggregate method of amortized analysis oR Write a program/algorithm of Quick Sort Method and analyze it with example, Explain Backiracking Method. What is N-Queens Problem? Give solution of 4 ‘Queens Problem using Backtracking Method, Explain Chained Matrix Multiplication with example. Explain Selection Som Algorithm and give its best case, worst case and av ccase complexity with example, oR Discuss matrix multiplication problem using divide and conquer technique. Sort the letters of word “EDUCATION” in alphabetical order using insertion sort ‘Total Marks: 70 07 07 0 07 07 7 07 07 o o
You might also like
The Subtle Art of Not Giving a F*ck: A Counterintuitive Approach to Living a Good Life
From Everand
The Subtle Art of Not Giving a F*ck: A Counterintuitive Approach to Living a Good Life
Mark Manson
4/5 (6388)
Principles: Life and Work
From Everand
Principles: Life and Work
Ray Dalio
4/5 (634)
The Gifts of Imperfection: Let Go of Who You Think You're Supposed to Be and Embrace Who You Are
From Everand
The Gifts of Imperfection: Let Go of Who You Think You're Supposed to Be and Embrace Who You Are
Brené Brown
4/5 (1160)
Never Split the Difference: Negotiating As If Your Life Depended On It
From Everand
Never Split the Difference: Negotiating As If Your Life Depended On It
Chris Voss
4.5/5 (983)
The Glass Castle: A Memoir
From Everand
The Glass Castle: A Memoir
Jeannette Walls
4/5 (8302)
Grit: The Power of Passion and Perseverance
From Everand
Grit: The Power of Passion and Perseverance
Angela Duckworth
4/5 (633)
Sing, Unburied, Sing: A Novel
From Everand
Sing, Unburied, Sing: A Novel
Jesmyn Ward
4/5 (1254)
The Perks of Being a Wallflower
From Everand
The Perks of Being a Wallflower
Stephen Chbosky
4/5 (10337)
Shoe Dog: A Memoir by the Creator of Nike
From Everand
Shoe Dog: A Memoir by the Creator of Nike
Phil Knight
4.5/5 (933)
Her Body and Other Parties: Stories
From Everand
Her Body and Other Parties: Stories
Carmen Maria Machado
4/5 (887)
The Hard Thing About Hard Things: Building a Business When There Are No Easy Answers
From Everand
The Hard Thing About Hard Things: Building a Business When There Are No Easy Answers
Ben Horowitz
4.5/5 (361)
Hidden Figures: The American Dream and the Untold Story of the Black Women Mathematicians Who Helped Win the Space Race
From Everand
Hidden Figures: The American Dream and the Untold Story of the Black Women Mathematicians Who Helped Win the Space Race
Margot Lee Shetterly
4/5 (1007)
Steve Jobs
From Everand
Steve Jobs
Walter Isaacson
4/5 (3237)
Elon Musk: Tesla, SpaceX, and the Quest for a Fantastic Future
From Everand
Elon Musk: Tesla, SpaceX, and the Quest for a Fantastic Future
Ashlee Vance
4.5/5 (581)
The Emperor of All Maladies: A Biography of Cancer
From Everand
The Emperor of All Maladies: A Biography of Cancer
Siddhartha Mukherjee
4.5/5 (297)
A Man Called Ove: A Novel
From Everand
A Man Called Ove: A Novel
Fredrik Backman
4.5/5 (5058)
Angela's Ashes: A Memoir
From Everand
Angela's Ashes: A Memoir
Frank McCourt
4.5/5 (943)
The Art of Racing in the Rain: A Novel
From Everand
The Art of Racing in the Rain: A Novel
Garth Stein
4/5 (4346)
The Yellow House: A Memoir (2019 National Book Award Winner)
From Everand
The Yellow House: A Memoir (2019 National Book Award Winner)
Sarah M. Broom
4/5 (100)
The Little Book of Hygge: Danish Secrets to Happy Living
From Everand
The Little Book of Hygge: Danish Secrets to Happy Living
Meik Wiking
3.5/5 (458)
Brooklyn: A Novel
From Everand
Brooklyn: A Novel
Colm Toibin
3.5/5 (2091)
Yes Please
From Everand
Yes Please
Amy Poehler
4/5 (1993)
Devil in the Grove: Thurgood Marshall, the Groveland Boys, and the Dawn of a New America
From Everand
Devil in the Grove: Thurgood Marshall, the Groveland Boys, and the Dawn of a New America
Gilbert King
4.5/5 (278)
The World Is Flat 3.0: A Brief History of the Twenty-first Century
From Everand
The World Is Flat 3.0: A Brief History of the Twenty-first Century
Thomas L. Friedman
3.5/5 (2283)
Bad Feminist: Essays
From Everand
Bad Feminist: Essays
Roxane Gay
4/5 (1077)
The Woman in Cabin 10
From Everand
The Woman in Cabin 10
Ruth Ware
3.5/5 (2780)
A Tree Grows in Brooklyn
From Everand
A Tree Grows in Brooklyn
Betty Smith
4.5/5 (2032)
The Outsider: A Novel
From Everand
The Outsider: A Novel
Stephen King
4/5 (2839)
The Sympathizer: A Novel (Pulitzer Prize for Fiction)
From Everand
The Sympathizer: A Novel (Pulitzer Prize for Fiction)
Viet Thanh Nguyen
4.5/5 (141)
A Heartbreaking Work Of Staggering Genius: A Memoir Based on a True Story
From Everand
A Heartbreaking Work Of Staggering Genius: A Memoir Based on a True Story
Dave Eggers
3.5/5 (692)
Team of Rivals: The Political Genius of Abraham Lincoln
From Everand
Team of Rivals: The Political Genius of Abraham Lincoln
Doris Kearns Goodwin
4.5/5 (1912)
Wolf Hall: A Novel
From Everand
Wolf Hall: A Novel
Hilary Mantel
4/5 (4087)
On Fire: The (Burning) Case for a Green New Deal
From Everand
On Fire: The (Burning) Case for a Green New Deal
Naomi Klein
4/5 (76)
Fear: Trump in the White House
From Everand
Fear: Trump in the White House
Bob Woodward
3.5/5 (830)
Manhattan Beach: A Novel
From Everand
Manhattan Beach: A Novel
Jennifer Egan
3.5/5 (906)
Rise of ISIS: A Threat We Can't Ignore
From Everand
Rise of ISIS: A Threat We Can't Ignore
Jay Sekulow
3.5/5 (144)
John Adams
From Everand
John Adams
David McCullough
4.5/5 (2544)
The Light Between Oceans: A Novel
From Everand
The Light Between Oceans: A Novel
M L Stedman
4.5/5 (813)
The Unwinding: An Inner History of the New America
From Everand
The Unwinding: An Inner History of the New America
George Packer
4/5 (45)
Little Women
From Everand
Little Women
Louisa May Alcott
4.5/5 (2369)
The Constant Gardener: A Novel
From Everand
The Constant Gardener: A Novel
John le Carré
4/5 (277)