• Tidak ada hasil yang ditemukan

ARAHAN KEPADA CALON: - EPrints USM

N/A
N/A
Protected

Academic year: 2024

Membagikan "ARAHAN KEPADA CALON: - EPrints USM"

Copied!
4
0
0

Teks penuh

(1)

UNTVERSITI SAINS

MALAYSIA

Peperiksaan Semester Kedua Sidang

Akademik

1993194

APril

1994

CSI502 - Functional Programming Masa: t3jarnl

ARAHAN KEPADA CALON:

.

Sila pastikan bahawa kertas peperiksaan

ini

mengandungi

EMPAT

muka surat yang berc6tak sebelum anda memulakan peperilaaan ini.

I

, trx

I (..

...21-

(2)

- 2

_ tcsr502l

Answer ALL

questions.

1. (a) (i)

Define

briefly the notions

of:

-

Cartesian

product of A and B

sets,

-

relations

and

functions,

-

graph

of

function,

-

domain and range of function,

-

functional

term,

value of term.

(ii) Let z=fl(x,y), x=f2( z,xl) be total functions and x,y,z,xl

be variables. Given the

following

words:

fl(x,y) f2(xl,z)

f 1 (f2(x I ,f 1

(x,y)) fL f2(xl,z) f2(x1,z,x)

Indicate

which of these words are

tenns

( YeVNo)

(2sl100)

(b) (i) Define

an operator of

primitive recursion

f=R(g,h).

(ii)

Give

an

example

of a primitive

recursive function.

(iii) Is

the

function z=xv

a

primitive

recursive function (Yes/f.{o).

(zst[w) (c) Define

an operator

of

unbounded

minimization M(0

(15/100)

(d) (l)

Define

the

class

of primitive

recursive functions.

(ii)

State

and

discuss the nneaning

of

Church-Kleene thesis.

(iii) Prove that x+y is a primitive

rccursive function.

(iv) V/hat are the functions f5 and f6 given by

the schema

of

recursive

derivation? The

answer

must be written

as

elementary function, for

exampleo

z=f(x,y)=x*y. Will

you compute, piease, the

value f(2)

realizing the schema of recursive derivation.

88

...31-

(3)

[cs1502]

-3-

Recursive scherna

fl=i, x[x]

f2=hxlx+11 f3=),xlx2x3

[x2

] f4=f2f3

f5 to

satisfv

f5(0,x2)=fl(x2)

f5 (Y+ 1,x2)=f4(Y, f5 (Y,

x2)'x2\

f=f6=f5(fl,fl) END

of recursive schema

(3sl100)

2. (a) Givethedefinition of thefollowing

objects

and

notions:

(i)

variables, operations,

algorithm

representation ,

(ii)

direct and data

flow

controle,

(iii)

mapping of an algorithm,

(iv)

realization of an algorithm.

(v)

comparative nonprocedurality of an algorithm representations

(2sl100)

(b) (i)

Give a

{efinition of

an asynchronous block, trigger and control functions.

(ii)

Define an asynchronous program

(iii)

Give an example of asynchronous

program

(251100)

(c)

Define the rules

of

asynchronous program execution, including the

following:

(i) rulesofasynchronousblockexecution,

(ii)

condition of asynchronous program completion,

(iii)

rules

of

asynchronous program execution.

(zsl100)

...4t_

i

' ,sg

,'.t

(4)

lcsr502l

-4-

(d)

Develope an asynchronous progrirm of

pipe-line

execution of the algorithm (Fig.

1)

Procedures input(v,n) and

output(v,n)

can be used to take or to

put

a value

from/in

n-values box v

If

you want, instead

of

trigger and control functions you can use Petri nets to define a control.

y-5valuesbox z-3valuesbox f-3vaiuesbox

(25l100)

3. (a) Define a formal model

of computations including:

(i)

computational model, tenns and their attributes,

(ii)

non-interpreted computations

(

notion

of

(V,W)-plan),

(iii)

algorithm

of

(V,W)-plan building

with

minimum number of terms,

(iv)

notion of interpretation.

(40/100)

x,t-unlimitedboxes Fig.

1.

(b)

Describe the derivation algorithm, including:

(D

the formulation of problem of program synthesis,

(ii)

a bottom-up part of algorithm,

(iii)

an up-down part

of

algorithm,

(iv)

feasible modifications of problem of program synthesis

(c) Describe an algorithm to buid an application problem solution

including:

(i)

an algorithm of choice,

(ii) list

basic strategies of operation choice.

- oooOooo -

(3sl100)

algorithm,

(251100)

90

Referensi

Dokumen terkait

The dirnensions of the cross section in milimeters for the shaft and tube are as shown- If a torque of 8 kNm is apptied to both ends of the composite shaft, ftnd lij sudut piuh

a b o lcIS3ll -3- Anda scorang percka bcntuk sistcm pcngurusln maklumat yang ditugaskan untuk membangunkan satu sistom pcrakaunan yang baru bagi .sesuatu.iabatan di syarikat anda..

i Tulis satu keratan program dengan menggunakan arahan-arahan primitif output dan atribut GKS untuk memaparkan objek di atas' ii Tulis satu prosedur untuk melakar poligon bertutup

Berikan rekabentuk suatu pangkalan data pelancungan berorientasikan objek untuk menyimpan data berkenaan Sandar-bandar, hotel, tugu peringatan dan restoran dengan maklumat berikut: 1

1s/100 ba8aim.ana ia boleh 20/100 20/100 e Katakan keperluan sesuatu pangkalan data universiti untuk mengendalikan transkrip pelajar adalah berikut: i Universiti itu menyimpan untuk

5 markah Nyatakan yang mana diantara yang berikut bergantung keadaan laluan: Tekanan, haba" entalpi, suhu, entropi, ketumpatan, kerja dan kelikatan.. Sfafe which of the following

Huraikan perbezaan-perbezaan di antara Sistem Maklumat dan Teknologi Maklumar 40/100 a Semua pelabur saham di Bursa Saham-Kuala Lumpur BS-KL, tidak kira sama ada mereka itu pelabur

s0/t00 Dalam suatu penyelidikan yang dijatankan ke atas lalang 'Imperata Cylindrica' ukuran- ukuran panjang daun yang baru muncul dan panjang tangkai bunga bagi suatu sampel sepuluh