magpakailanman
Member
No matter how hard I try I am stuck to this paper and never get sucessfull
I am having problem with this question paper and I will need it by next week..
I am willing to pay
I have been ask to give 12 solutions to all the datastructures
--------------------
Mapping
The aim of this practical session is to help you consider the dis/advantages of different
symbolic data structures and different styles of symbolic processing. There is quite a bit to do
here so do not expect to complete it in an hour.
The practical is based on three datastructures which capture information about students and
their courses, these datastructures are as follows...
For each of the datastructures above you are required to attempt to build a lookup function
using each of the different approaches (i) - (iv) below. The lookup function should take a
student name and field name as well as a datastructure as its args so (lookup 'alf 'course data)
should return ncc for example.
(i) using the matcher
(ii) using a lisp mapping function (like find-if/remove-if-not & you can also use member)
with some predicate or an anonymous lambda form.
(iii) using -> but not using the matcher
(iv) writing a (recursive?) function without using the matcher or ->
1. an association list with a primary ordering of course attribute and a secondary ordering of
student, eg:
((course (alf . ncc) (sue . aat) (ralf . ncc) (nancy . ncc) ...)
(year (sue . 2) (nancy . 1) (ralf . 3) ...)
(age (ralf . 22) (alf . 29) ...)
...etc...
)
2. a flat unordered list of name-value associations (NB: this is not what we have described as
an association list because the name-value pairs are not sublisted), eg:
((alf age 29 year 2 course ncc)
(sue course aat year 3 age 22)
...etc...
)
3. a set of tuples with an implicit ordering of name-age-course-year, eg:
((alf 29 ncc 2)
(sue 22 aat 3)
(nancy 23 ncc 1)
...etc...
)
I am having problem with this question paper and I will need it by next week..
I am willing to pay
I have been ask to give 12 solutions to all the datastructures
--------------------
Mapping
The aim of this practical session is to help you consider the dis/advantages of different
symbolic data structures and different styles of symbolic processing. There is quite a bit to do
here so do not expect to complete it in an hour.
The practical is based on three datastructures which capture information about students and
their courses, these datastructures are as follows...
For each of the datastructures above you are required to attempt to build a lookup function
using each of the different approaches (i) - (iv) below. The lookup function should take a
student name and field name as well as a datastructure as its args so (lookup 'alf 'course data)
should return ncc for example.
(i) using the matcher
(ii) using a lisp mapping function (like find-if/remove-if-not & you can also use member)
with some predicate or an anonymous lambda form.
(iii) using -> but not using the matcher
(iv) writing a (recursive?) function without using the matcher or ->
1. an association list with a primary ordering of course attribute and a secondary ordering of
student, eg:
((course (alf . ncc) (sue . aat) (ralf . ncc) (nancy . ncc) ...)
(year (sue . 2) (nancy . 1) (ralf . 3) ...)
(age (ralf . 22) (alf . 29) ...)
...etc...
)
2. a flat unordered list of name-value associations (NB: this is not what we have described as
an association list because the name-value pairs are not sublisted), eg:
((alf age 29 year 2 course ncc)
(sue course aat year 3 age 22)
...etc...
)
3. a set of tuples with an implicit ordering of name-age-course-year, eg:
((alf 29 ncc 2)
(sue 22 aat 3)
(nancy 23 ncc 1)
...etc...
)

