DAA_Home

DAA

DAA Tutorial

DAA Tutorial includes all topics of algorithm, asymptotic analysis, algorithm control structure, recurrence, master method, recursion tree method, simple sorting algorithm, bubble sort, selection sort, insertion sort, divide and conquer, binary search, merge sort, counting sort, lower bound theory etc.

What is Algorithm?

Finte set of instruction to solve a problem or finite sequence of instruction of solvig a problem

Why study Algorithm?

As the speed of processor increases, performance is frequently said to be less central than other software quality characteristics (e.g. security, extensibility, reusability etc.).

longer computation time, to name a few mean slower results, less through research and higher cost of computation (if buying CPU Hours from an external party). The study of Algorithm, therefore, gives us a language to express performance as a function of problem size.

Difference with Algorithm and Program

Algorithm Program
it is design phase it is implemenation phase
It is use any language to write it is use Programming language
it is use H/W and os Analysis It is use H/W and OS Testing

Characteristics of Algorithms

  • Input: It is supply zero or more quantities.
  • Output: It results in at least one quantity.
  • Definiteness:Each instruction should be clear and ambiguous.
  • Finiteness:An algorithm should terminate after executing a finite number of steps.
  • Effectiveness: Every instruction should be fundamental to be carried out, in principle, by a person using only pen and paper.

Advantages of an Algorithm

  • Effective Communication: it is written in a natural language or any language like English,Hindi,etc it becomes easy to understand the step-by-step delineation of a solution to any particular problem.
  • Easy Debugging:A well-designed algorithm facilitates easy debugging to detect the logical errors that occurred inside the program.
  • Independent of Programming Language: it is a language-independent, it can be easily coded by incorporating any high-level language.

Disadvantages of an Algorithm

  • Developing algorithms for complex problems would be time-consuming and difficult to understand.
  • It is a challenging task to understand complex logic through algorithms.

How to Analyze and algorithm

  • Time: How many time consuming to taken a complte given problem
  • Space: How many Space or memeory consuming to taken a complte given problem
  • Network: how to data is transfer
  • Power: How much the power consuming of given algorithm in the find out solation
  • CPU Register: how many cpu register to use in given algorithm

How to write algorithm

  • Alg swap(a,b)
  • {
  • temp =1
  • a=b
  • b=temp
  • }

Note:

1. Every single state of Algorithm take 1 unit Time

2.

the website developed by Narayan Mane ©:2021

Home

No comments:

Post a Comment

How do you select data from a table in SQL?

Create Table How do you select data a table in SQL? The SELECT statement is used to se...