How To Exam?

a knowledge trading engine...


Anna University Trichy 2009 B.E Computer Science Logic and functional programming - Question Paper

Thursday, 17 January 2013 12:40Web


logic and functional programming is 7th semester exam ques. paper of BE computer science engg.

603

B* IL (Computer En(j VII tia Semester *wmhullttt LOGIC AND FUNCTIONAL PROGRAMMING PBjwMrSE*4SS-C Tunc allowed: 3 h&urt_Maximum Mrks: 100

Atote : Attempt Jive questions, taking Hf feasttmr quesiiottsfrvm each part.

Fart-A

1* {a) What do you ntean by lexical scoping ? Explain with the teip of some examples    S

(b) Ejtploin the fcltowifVB ;

(i) Atom (ii)CAR (iii)Cdf (jv) Fiat list. 12

1 (4) Write a LISP equipment of following boolean fimeikfls;

NOT, AND, XOR* XNOR, OR,    10

lb) Write a recursive function to oampuie x\    10

3.    (i) Write a fund km in LISP which returns sum of tubes

of firct n naiujtt! numbers &iven valuc n-    10

(&> Write a ftinclion in LISP to confute binomial coefficient "C using recursive formulas c (0, i) " t c (n+ rt) J

c (n, r) = c {n- ltr)+c (n-l.f- !). 10

4,    (a) Wriie a function in LISP which l&s all the muhipies

of its aqgumeni lying between 1 sod lOCKAlso define all functions which you use in this definition. 10

603-00 P-2(Q-8>(0J)    P-T-O.

Explain the following in context of LISP:

(i)    Mtijti-vaEued function

ft)


(ii)    Macros and their definition pitd expansion,

F1-B

& (a)

tb)


What arc the requirements of paradigm shifting from prooedtirai to nflfi-ftfijcedjjra; language ?    |(j

Describe aft least two teal world problems to which Prolog is best suited language,    10

& Explain progressive subsiitntjon with the help of some suitable cxampks,    20

7.    (a) Define ML Write pnxtdurc in Prolog to find union

and intersection of two sets,    J5

(b> Taking suitable predicates, define the following relations :

(i)    Atint

(ii)    Cousin. .    5

8.    (a) What do you mean by meta-progEanuitmg ? Discira

in brief.    5

(b) Write a program in Prolog which converts the lower-case-lctter in input file to upper-case-tetter in ihc output file,    15








Attachment:

( 0 Votes )

Add comment


Security code
Refresh

Earning:   Approval pending.
You are here: PAPER Anna University Trichy 2009 B.E Computer Science Logic and functional programming - Question Paper