Download presentation
Presentation is loading. Please wait.
1
Data Types http://cis.k.hosei.ac.jp/~yukita/
2
2 Arithmetic funtions ans laws
3
3 The Associative Law
4
4 The Identity Law
5
5 The Inverse Law
6
6 The Commutative Law
7
7 Data Types Algebras such as groups, rings, etc. are familiar data types in mathematics. CS handles other data types other than those algebras. –stacks –queues –arrays –binary trees –other useful data structures A data type consists of various sets of data together with operations between them definable in a distributive category and equations expressible in a distributive category.
8
8 Stacks (Rough View)
9
9 Pop revised to avoid stack underflow
10
10 Push revised for symmetry
11
11 Axioms
12
12 Definition.
13
13 Ex. 1. Infinite stacks
14
14 Note Just from the axioms, we do not know whether the stacks are finite.
15
15 Definition. Stacks of X
16
16 Ex. 2.
17
17 Notation
18
18 Ex. 3. The usual operation of pushing an element on a stack
19
19 Ex. 4. Imperative computing of the depth of a stack
20
20 Ex. 5. Tests on stacks
21
21 Arrays - the store function
22
22 Arrays - the read function
23
23 Binary Trees
24
24 Two operations make and break
25
25 Def. Binary Tree
26
26 Queues
27
27 Pointers
28
28 Turing Machines
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.