Introduction to complexity - Data Structures - Lecture Slides, Slides of Data Structures and Algorithms

Some concept of Data Structures are Abstract, Balance Factor, Complete Binary Tree, Dynamically, Storage, Implementation, Sequential Search, Advanced Data Structures, Graph Coloring Two, Insertion Sort. Main points of this lecture are: Introduction to Complexity, Algorithm, Precise Set, Leads, Algorithm, Precisely, Concept, Formalize, Thinking, Appropriate Mechanizable

Typology: Slides

2012/2013

Uploaded on 04/30/2013

dinpal
dinpal 🇮🇳

3.6

(12)

73 documents

1 / 37

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Introduction to complexity
Docsity.com
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25

Partial preview of the text

Download Introduction to complexity - Data Structures - Lecture Slides and more Slides Data Structures and Algorithms in PDF only on Docsity!

Introduction to complexity

An Introduction

  • In the 1930’s before computers were used, mathematicians worked hard to formalize and study the concept of the algorithm. - But what exactly is an algorithm?

An algorithm is a precise set of instructions that leads to a solution. In other words, an algorithm is a precisely stated method for solving a problem.

7

The subject was founded by Knuth (who coined the term "analysis of algorithms" in the mid-sixties) and is well illustrated by his monumental series, The Art of Computer Programming The field entertains close ties with a number of areas like discrete mathematics, combinatorial analysis, probability theory, analytic number theory, asymptotic analysis, complexity theory, and sometimes statistical physics.

Analysis of Algorithms is a field in computer science whose overall goal is an understanding of the complexity of algorithms. While an extremely large amount of research is devoted to worst-case evaluations,

Data Structures and Algorithms

  • A data structure defines the admissible atomic steps and a control structure determines how these steps are to be combined to yield the desired algorithm. This view is stated very succinctly in the well known slogan ``algorithm = data structure + control''.

Mathematical Examples

  • factorial function

factorial(0) = 1 factorial(n) = n * factorial(n-1) [for n>0]

  • Let's compute factorial(3). factorial(3) = 3 * factorial(2) = 3 * ( 2 * factorial(1) ) = 3 * ( 2 * ( 1 * factorial(0) )) = 3 * ( 2 * ( 1 * 1 ) )) = 6

Fibonacci function:

  • fibonacci(0) = 1
  • fibonacci(1) = 1
  • fibonacci(n) = fibonacci(n-1) + fibonacci(n-2) [for n>1]
  • This definition is a little different than the previous ones because It has two base cases, not just one; in fact, you can have as many as you like.
  • In the recursive case, there are two recursive calls, not just one. There can be as many as you like.