SlideShare a Scribd company logo
Dear students get fully solved assignments
Send your semester & Specialization name to our mail id :
help.mbaassignments@gmail.com
or
call us at : 08263069601
[ SUMMER 2015 ] ASSIGNMENT
PROGRAM MCA(REVISED FALL 2012)
SEMESTER 4
SUBJECT CODE & NAME MCA4040- ANALYSIS AND DESIGN OF ALGORITHM
CREDIT 4
BK ID B1480
MARKS 60
Answer all questions
Q. 1. Write the steps involved in analyzing the efficiency of non-recursive algorithms.
Answer:The studyof algorithmsiscalledalgorithmics.Itis more than a branch of computer science.
It is the core of computer science and is said to be relevant to most of science, business and
technology.Analgorithmisasequence of unambiguous instructions for solving a problem, i.e., for
obtaining a required output for any legitimate input in finite amount of time.
The three algorithms used to find the gcd of two numbers are
 Euclid’s algorithm
 Consecutive integer
Q. 2. Define selection sort and explain how to implement the selection sort?
Answer:Incomputerscience,selectionsortisa sortingalgorithm, specificallyanin-place comparison
sort. Ithas O(n2) time complexity,makingitinefficient on large lists, and generally performs worse
than the similar insertion sort. Selection sort is noted for its simplicity, and it has performance
advantages over more complicated algorithms in certain situations, particularly where auxiliary
memory is limited.
The algorithmdividesthe inputlistintotwoparts:the sublist of items already sorted, which is built
up from left to right at the front (left) of the list, and
Q. 3. Define Topological sort. And explain with example.
Answer:In computer science, a topological sort (sometimes abbreviated topsort or toposort) or
topological ordering of a directed graph is a linear ordering of its vertices such that for every
directed edge uv from vertex u to vertex v, u comes before v in the ordering. For instance, the
verticesof the graphmay representtaskstobe performed,andthe edgesmayrepresentconstraints
that one task mustbe performedbefore another; in this application, a topological ordering is just a
valid sequence for the tasks. A topological ordering is possible if and only if the graph has no
directed cycles, that is, if it is a directed acyclic
Q. 4. Explain good-suffix and bad-character shift in Boyer-Moore algorithm.
Answer:In computer science, the Boyer–Moore string search algorithm is an efficient string
searching algorithm that is the standard benchmark for practical string search literature. It was
developed by Robert S. Boyer and J Strother Moore in 1977. The algorithm preprocesses the string
beingsearchedfor(the pattern),butnotthe stringbeingsearchedin(the text).Itisthuswell-suited
for applications in which the pattern is much shorter than the text or where it persists across
multiple searches. The Boyer-Moore algorithm uses information gathered during the preprocess
step to skip sections of the text, resulting in a lower constant factor than many other string
algorithms. In general, the algorithm runs faster
Q. 5. Solve the Knapsack problem using memory functions.
Item 1 2 3 4
Weight 2 6 4 8
Value (in Rs.) 12 16 30 40
Knapsack capacity is given as W=12. Analyze the Knapsack problem using memory functions with
the help of the values given above.
Answer:The classical Knapsack Problem (KP) can be described as follows. We are given a set
N={1,…,n} of items, each of them with positive profit pj and positive weight wj, and a knapsack
capacityc. The problemasksfor a subsetof itemswhose total weightdoesnot exceed the knapsack
capacity, and whose profit is a maximum. It can be formulated as the following Integer Linear
Program (ILP):
(KP)max∑j∈Npjxj(1)
Q. 6. Describe Variable Length Encoding and Huffman Encoding.
Answer:Variable Length Encoding:In coding theory a variable-length code is a code which maps
source symbols to a variable number of bits.Variable-length codes can allow sources to be
compressed and decompressed with zero error (lossless data compression) and still be read back
symbol bysymbol.Withthe rightcodingstrategyan independentandidentically-distributed source
may be compressedalmost arbitrarily close to its entropy. This is in contrast to fixed length coding
methods,forwhichdatacompressionisonlypossible for large blocks of data, and any compression
beyond the logarithm of the total number of possibilities comes with a finite (though perhaps
arbitrarily small) probability of failure.
Dear students get fully solved assignments
Send your semester & Specialization name to our mail id :
help.mbaassignments@gmail.com
or
call us at : 08263069601

More Related Content

DOCX
Mit203 analysis and design of algorithms
PDF
A lexisearch algorithm for the Bottleneck Traveling Salesman Problem
PPT
Discrete lecture 01
PDF
Symmetric Key Generation Algorithm in Linear Block Cipher Over LU Decompositi...
DOCX
Ca notes
PDF
Common fixed point theorems for contractive maps of
PDF
Bq25399403
PDF
ALTERNATIVE METHOD TO LINEAR CONGRUENCE
Mit203 analysis and design of algorithms
A lexisearch algorithm for the Bottleneck Traveling Salesman Problem
Discrete lecture 01
Symmetric Key Generation Algorithm in Linear Block Cipher Over LU Decompositi...
Ca notes
Common fixed point theorems for contractive maps of
Bq25399403
ALTERNATIVE METHOD TO LINEAR CONGRUENCE

What's hot (19)

PDF
Fixed point theorem in chatterjea mapping
PDF
Icitam2019 2020 book_chapter
PPTX
Daa unit 3
PPT
grammer
PPTX
Computability - Tractable, Intractable and Non-computable Function
PDF
50120140502014
PPT
Software tookits for machine learning and graphical models
PDF
An Index Based K-Partitions Multiple Pattern Matching Algorithm
PDF
A1802040111
PDF
Introduction to Max-SAT and Max-SAT Evaluation
PDF
Bron Kerbosch Algorithm - Presentation by Jun Zhai, Tianhang Qiang and Yizhen...
PDF
Local Closed World Semantics - DL 2011 Poster
PPTX
NP completeness
PDF
Common Fixed Point Theorem for Weakly Compatible Maps in Intuitionistic Fuzzy...
PDF
Writing a SAT solver as a hobby project
DOCX
Bca2020 data structure and algorithm
PDF
Bt0080 fundamentals of algorithms2
PDF
Introduction to Bayesian Analysis in Python
PPTX
Fuzzy set
Fixed point theorem in chatterjea mapping
Icitam2019 2020 book_chapter
Daa unit 3
grammer
Computability - Tractable, Intractable and Non-computable Function
50120140502014
Software tookits for machine learning and graphical models
An Index Based K-Partitions Multiple Pattern Matching Algorithm
A1802040111
Introduction to Max-SAT and Max-SAT Evaluation
Bron Kerbosch Algorithm - Presentation by Jun Zhai, Tianhang Qiang and Yizhen...
Local Closed World Semantics - DL 2011 Poster
NP completeness
Common Fixed Point Theorem for Weakly Compatible Maps in Intuitionistic Fuzzy...
Writing a SAT solver as a hobby project
Bca2020 data structure and algorithm
Bt0080 fundamentals of algorithms2
Introduction to Bayesian Analysis in Python
Fuzzy set
Ad

Viewers also liked (18)

DOCX
Mb0047 management information system
PPTX
Tecnología de punta
PPTX
Target audience research task 1
PPTX
Argentina estado tucumán
PPTX
Contaminacion ambiental
PDF
A fórmula humana para a inovação
PPTX
Diseño grafico
DOCX
Elias hidalgo asig 4
PPTX
Las redes sociales y el mercado digital
PPTX
C+C Film Magazines
DOC
Españolddd
PPTX
PPTX
Transfusión
PPTX
School Plots For Sale Gurgaon
DOCX
Mca 4030 programming in java
PPTX
Ayuda al medio ambiente con tu viejo movil
Mb0047 management information system
Tecnología de punta
Target audience research task 1
Argentina estado tucumán
Contaminacion ambiental
A fórmula humana para a inovação
Diseño grafico
Elias hidalgo asig 4
Las redes sociales y el mercado digital
C+C Film Magazines
Españolddd
Transfusión
School Plots For Sale Gurgaon
Mca 4030 programming in java
Ayuda al medio ambiente con tu viejo movil
Ad

Similar to Mca 4040 analysis and design of algorithm (20)

DOCX
Mit203 analysis and design of algorithms
DOCX
Mca4040 analysis and design of algorithm
PDF
ADA complete notes
PDF
Cs6402 scad-msm
PDF
The Design and Analysis of Computer Algorithms [Aho, Hopcroft & Ullman 1974-0...
DOC
ALGORITHMS - SHORT NOTES
PDF
D E S I G N A N D A N A L Y S I S O F A L G O R I T H M S J N T U M O D E L...
PPTX
Design Analysis of Algorithm_Introduction-1.pptx
PPTX
Design and Analysis of Algorithm_Introduction-1.pptx
PDF
Solution 3.
DOCX
CS 6402 – DESIGN AND ANALYSIS OF ALGORITHMS questio
PDF
Cs6402 design and analysis of algorithms may june 2016 answer key
PDF
Introduction To Algorithms 4th Thomas H Cormen Charles E Leiserson
PPTX
Algorithm Homework Help
PPTX
L1_DatabAlgorithm Basics with Design & Analysis.pptx
PDF
Bt0080 fundamentals of algorithms1
PPT
Parallel_Algorithms_In_Combinatorial_Optimization_Problems.ppt
PPT
Parallel_Algorithms_In_Combinatorial_Optimization_Problems.ppt
PPT
Parallel_Algorithms_In_Combinatorial_Optimization_Problems.ppt
PPT
Parallel_Algorithms_In_Combinatorial_Optimization_Problems.ppt
Mit203 analysis and design of algorithms
Mca4040 analysis and design of algorithm
ADA complete notes
Cs6402 scad-msm
The Design and Analysis of Computer Algorithms [Aho, Hopcroft & Ullman 1974-0...
ALGORITHMS - SHORT NOTES
D E S I G N A N D A N A L Y S I S O F A L G O R I T H M S J N T U M O D E L...
Design Analysis of Algorithm_Introduction-1.pptx
Design and Analysis of Algorithm_Introduction-1.pptx
Solution 3.
CS 6402 – DESIGN AND ANALYSIS OF ALGORITHMS questio
Cs6402 design and analysis of algorithms may june 2016 answer key
Introduction To Algorithms 4th Thomas H Cormen Charles E Leiserson
Algorithm Homework Help
L1_DatabAlgorithm Basics with Design & Analysis.pptx
Bt0080 fundamentals of algorithms1
Parallel_Algorithms_In_Combinatorial_Optimization_Problems.ppt
Parallel_Algorithms_In_Combinatorial_Optimization_Problems.ppt
Parallel_Algorithms_In_Combinatorial_Optimization_Problems.ppt
Parallel_Algorithms_In_Combinatorial_Optimization_Problems.ppt

Recently uploaded (20)

PDF
RMMM.pdf make it easy to upload and study
PDF
Module 4: Burden of Disease Tutorial Slides S2 2025
PPTX
Pharmacology of Heart Failure /Pharmacotherapy of CHF
PPTX
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
PDF
Sports Quiz easy sports quiz sports quiz
PDF
VCE English Exam - Section C Student Revision Booklet
PPTX
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PDF
Pre independence Education in Inndia.pdf
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PDF
2.FourierTransform-ShortQuestionswithAnswers.pdf
PDF
Insiders guide to clinical Medicine.pdf
PDF
Anesthesia in Laparoscopic Surgery in India
PPTX
Pharma ospi slides which help in ospi learning
PDF
102 student loan defaulters named and shamed – Is someone you know on the list?
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PDF
Basic Mud Logging Guide for educational purpose
PPTX
Renaissance Architecture: A Journey from Faith to Humanism
PDF
TR - Agricultural Crops Production NC III.pdf
RMMM.pdf make it easy to upload and study
Module 4: Burden of Disease Tutorial Slides S2 2025
Pharmacology of Heart Failure /Pharmacotherapy of CHF
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
Sports Quiz easy sports quiz sports quiz
VCE English Exam - Section C Student Revision Booklet
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
Abdominal Access Techniques with Prof. Dr. R K Mishra
Pre independence Education in Inndia.pdf
Final Presentation General Medicine 03-08-2024.pptx
2.FourierTransform-ShortQuestionswithAnswers.pdf
Insiders guide to clinical Medicine.pdf
Anesthesia in Laparoscopic Surgery in India
Pharma ospi slides which help in ospi learning
102 student loan defaulters named and shamed – Is someone you know on the list?
Supply Chain Operations Speaking Notes -ICLT Program
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
Basic Mud Logging Guide for educational purpose
Renaissance Architecture: A Journey from Faith to Humanism
TR - Agricultural Crops Production NC III.pdf

Mca 4040 analysis and design of algorithm

  • 1. Dear students get fully solved assignments Send your semester & Specialization name to our mail id : help.mbaassignments@gmail.com or call us at : 08263069601 [ SUMMER 2015 ] ASSIGNMENT PROGRAM MCA(REVISED FALL 2012) SEMESTER 4 SUBJECT CODE & NAME MCA4040- ANALYSIS AND DESIGN OF ALGORITHM CREDIT 4 BK ID B1480 MARKS 60 Answer all questions Q. 1. Write the steps involved in analyzing the efficiency of non-recursive algorithms. Answer:The studyof algorithmsiscalledalgorithmics.Itis more than a branch of computer science. It is the core of computer science and is said to be relevant to most of science, business and technology.Analgorithmisasequence of unambiguous instructions for solving a problem, i.e., for obtaining a required output for any legitimate input in finite amount of time. The three algorithms used to find the gcd of two numbers are  Euclid’s algorithm  Consecutive integer Q. 2. Define selection sort and explain how to implement the selection sort? Answer:Incomputerscience,selectionsortisa sortingalgorithm, specificallyanin-place comparison sort. Ithas O(n2) time complexity,makingitinefficient on large lists, and generally performs worse than the similar insertion sort. Selection sort is noted for its simplicity, and it has performance advantages over more complicated algorithms in certain situations, particularly where auxiliary memory is limited. The algorithmdividesthe inputlistintotwoparts:the sublist of items already sorted, which is built up from left to right at the front (left) of the list, and
  • 2. Q. 3. Define Topological sort. And explain with example. Answer:In computer science, a topological sort (sometimes abbreviated topsort or toposort) or topological ordering of a directed graph is a linear ordering of its vertices such that for every directed edge uv from vertex u to vertex v, u comes before v in the ordering. For instance, the verticesof the graphmay representtaskstobe performed,andthe edgesmayrepresentconstraints that one task mustbe performedbefore another; in this application, a topological ordering is just a valid sequence for the tasks. A topological ordering is possible if and only if the graph has no directed cycles, that is, if it is a directed acyclic Q. 4. Explain good-suffix and bad-character shift in Boyer-Moore algorithm. Answer:In computer science, the Boyer–Moore string search algorithm is an efficient string searching algorithm that is the standard benchmark for practical string search literature. It was developed by Robert S. Boyer and J Strother Moore in 1977. The algorithm preprocesses the string beingsearchedfor(the pattern),butnotthe stringbeingsearchedin(the text).Itisthuswell-suited for applications in which the pattern is much shorter than the text or where it persists across multiple searches. The Boyer-Moore algorithm uses information gathered during the preprocess step to skip sections of the text, resulting in a lower constant factor than many other string algorithms. In general, the algorithm runs faster Q. 5. Solve the Knapsack problem using memory functions. Item 1 2 3 4 Weight 2 6 4 8 Value (in Rs.) 12 16 30 40 Knapsack capacity is given as W=12. Analyze the Knapsack problem using memory functions with the help of the values given above. Answer:The classical Knapsack Problem (KP) can be described as follows. We are given a set N={1,…,n} of items, each of them with positive profit pj and positive weight wj, and a knapsack capacityc. The problemasksfor a subsetof itemswhose total weightdoesnot exceed the knapsack capacity, and whose profit is a maximum. It can be formulated as the following Integer Linear Program (ILP): (KP)max∑j∈Npjxj(1) Q. 6. Describe Variable Length Encoding and Huffman Encoding. Answer:Variable Length Encoding:In coding theory a variable-length code is a code which maps source symbols to a variable number of bits.Variable-length codes can allow sources to be compressed and decompressed with zero error (lossless data compression) and still be read back
  • 3. symbol bysymbol.Withthe rightcodingstrategyan independentandidentically-distributed source may be compressedalmost arbitrarily close to its entropy. This is in contrast to fixed length coding methods,forwhichdatacompressionisonlypossible for large blocks of data, and any compression beyond the logarithm of the total number of possibilities comes with a finite (though perhaps arbitrarily small) probability of failure. Dear students get fully solved assignments Send your semester & Specialization name to our mail id : help.mbaassignments@gmail.com or call us at : 08263069601