Skip to main content

Define algorithm and write a note on Complexity and Time- Space Tradeoff with example.


ASSIGNMENT SET -2
Q.1.Define algorithm and write a note on Complexity and Time- Space Tradeoff with example.
Answer:- Algorithm is a step-by-step procedure, which defines a set of instructions to be executed in a certain order to get the desired output. Algorithms are generally created independent of underlying languages, i.e. an algorithm can be implemented in more than one programming language.
From the data structure point of view, following are some important categories of algorithms −
Search − Algorithm to search an item in a data structure.
Sort − Algorithm to sort items in a certain order.
Insert − Algorithm to insert item in a data structure.
Update − Algorithm to update an existing item in a data structure.
Delete − Algorithm to delete an existing item from a data structure.
Characteristics of an Algorithm
Not all procedures can be called an algorithm. An algorithm should have the following characteristics −
Unambiguous − Algorithm should be clear and unambiguous. Each of its steps (or phases), and their inputs/outputs should be clear and must lead to only one meaning.
Input − an algorithm should have 0 or more well-defined inputs.
Output − an algorithm should have 1 or more well-defined outputs, and should match the desired output.
Finiteness − Algorithms must terminate after a finite number of steps.
Feasibility − should be feasible with the available resources.
Independent − an algorithm should have step-by-step directions, which should be independent of any programming code.
How to Write an Algorithm?
There are no well-defined standards for writing algorithms. Rather, it is problem and resource dependent. Algorithms are never written to support a particular programming code.

Comments

Popular posts from this blog

MCA212 – ADVANCED DATA STRUCTURE BK ID B1476

ASSIGNMENT   DRIVE SPRING- 2018 PROGRAM MASTER OF COMPUTER APPLICATION SEMESTER II SUBJECT CODE & NAME MCA212 – ADVANCED DATA STRUCTURE BK ID B1476 NUMBER OF ASSIGNMNETS, CREDITS & MARKS 2, 4 Credits, and 30 marks each    ASSIGNMENT SET -1 Q.1. List and explain any Five types of graph.                                      10 Answer: - There are various types of graphs depending upon the number of vertices, number of edges, interconnectivity, and their overall structure. We will discuss only a certain few important types of graphs in this chapter. Null Graph A graph having no edges is called a Null Graph. Example (9899682018 What’s App and call) YOU CAN CONTACT US 10 A.M TO 8 P.M CHARGES – ASSIGNMENTS PER SEM 600, PER PAPER 150
should be approximately of 400 words. Each question is followed by evaluation scheme. Q.No Assignment Set -1 Questions Marks Total Marks 1 List and explain any Five types of graph. [5*2] 10 2 Explain 1. Fixed block storage allocation. 2. Variable block storage allocation [5+5] 10 3 What is the use of external Storage Devices? Explain any two external storage devices [4+3+3] 10 Q.No Assignment Set -2 Questions Marks Total Marks 1 Define algorithm and write a note on Complexity and Time- Space Tradeoff with example [2+4+4] 10 2 Define Queue and explain a. Array implementation of queue b. Linked list implementation of queue [2+4+4] 10 3 List the Advantages and Disadvantages of Linear and linked representation of tree. [5+5] 10

Define operating system. Explain any four major functions of Operating system

Q.1. Define operating system. Explain any four major functions of Operating system.            2+8 Answer:- Operating System :- Operating System is a System Software (Set of system programs) which provides an environment to help the user to execute the programs. The Operating System is a resource manager which allocates and manages various resources like processor(s), main memory, input/output devices and information on secondary storage devices.    (9899682018 What’s App and call) YOU CAN CONTACT US 10 A.M TO 8 P.M CHARGES – ASSIGNMENTS PER SEM 600, PER PAPER 150