# Motivations of Data Structures and Algorithms

## Full text

(1)

(2)

### Introduction of Algorithms

(3)

Introduction of Algorithms

### descriptions to get something done correctly/efﬁciently by computer

(4)

Introduction of Algorithms

### input, output, deﬁniteness, ﬁniteness, effectiveness

H.-T. Lin (NTU CSIE) Motivations of DSA 3/24

(5)

Introduction of Algorithms

## }

(6)

Introduction of Algorithms

### —discrete math helps!

H.-T. Lin (NTU CSIE) Motivations of DSA 5/24

## i=k ==> i=k+1

(7)

Introduction of Algorithms

(8)

### Expressing Algorithms with Pseudo Code

(9)

Expressing Algorithms with Pseudo Code

## return minpos

(10)

Expressing Algorithms with Pseudo Code

### goal of pseudo code: communicate efﬁciently

H.-T. Lin (NTU CSIE) Motivations of DSA 9/24

## if a < b then ...

(11)

Expressing Algorithms with Pseudo Code

## if arr[b] < arr[a] then ...

(12)

Expressing Algorithms with Pseudo Code

### goal of pseudo code: communicate effectively

H.-T. Lin (NTU CSIE) Motivations of DSA 11/24

## every iteration

(13)

Expressing Algorithms with Pseudo Code

## swap(arr[min], arr[i])

(14)

### Introduction of Data Structures

(15)

Introduction of Data Structures

### within computer

(16)

Introduction of Data Structures

### = ⇒ different organization scheme (data structure)

H.-T. Lin (NTU CSIE) Motivations of DSA 15/24

## 依尾數分十份

(17)

Introduction of Data Structures

### algorithm :: data structure ∼ recipe :: kitchen structure

(18)

Introduction of Data Structures

### rule of thumb for speed: often-get ⇔ “nearby”

H.-T. Lin (NTU CSIE) Motivations of DSA 17/24

(19)

Introduction of Data Structures

(20)

### Why Data Structures and Algorithms?

(21)

Why Data Structures and Algorithms?

### use storage/computation resources properly =⇒ good program

(22)

Why Data Structures and Algorithms?

### understand tradeoff =⇒ good program

H.-T. Lin (NTU CSIE) Motivations of DSA 21/24

(23)

Why Data Structures and Algorithms?

## transmission/computation

(24)

Why Data Structures and Algorithms?

### programming :: building house ∼ coding :: construction work

H.-T. Lin (NTU CSIE) Motivations of DSA 23/24

## veriﬁcation: proof/test/debug

(25)

Why Data Structures and Algorithms?

(26)

Updating...

## References

Related subjects :