
Computational Models
•The concept of a computational model
•Basic computational models
•The von Neumann computational model
•Key concepts relating to computational models
CH01
TECH
Computer Science
The concept of a
computational model
•Model: Foundation or paradigm
•Level of abstraction
•Computational Model
4Computer architecture
4Computer language
Interpretation of concept of a
computational model
•Computational Model
4(1) Basic items of computation
4(2) Problem description model
4(3) Execution model
(1) Basic items of computation
4e.g. data, object, argument and functions, element of
sets and the predicates
(2) Problem description model
•Problem description model
4Style
4Method
•Problem description style
4Procedural
4Declarative
•Procedure style
f(algorithm for solving the problem is stated)
•Declarative style
f(all the facts and relationships relevant to the given problem is
stated)
Problem description style (e.g.)
Calculate n factorial, n!
•Procedural style
•int nfac (int n) {
int fac = 1;
if (n > 0)
for ( int i = 2; i <= n; i++ )
fac = fac * i;
return fac; }
•Declarative style
fac (0) = 1;
fac ( n>0 ) = n * fac ( n-1 );