Adobe PDF (224.51 kB)
Title Details:
Exercise 5: Lists in Prolog
Authors: Sgarbas, Kyriakos
Description:
Abstract:
This exercise introduces lists as the basic data structures used in Prolog along with the operator "|", the list head separator. The implementation of the member/2, append/3, and take/3 functions are explained using Prolog's symmetric condition calls. Queries include implementing Prolog functions to find items that appear only once in a list, as well as calculating sums of numbers that appear in lists. Finally the lists are used as memory to perform lookups on the road map example.
Linguistic Editors: Sarafidis, Michail
Technical Editors: Papadogonas, Ioannis
Type: Chapter
Creation Date: 02-05-2024
Item Details:
License: Attribution - NonCommercial - ShareAlike 4.0 International (CC BY-NC-SA 4.0)
Handle http://hdl.handle.net/11419/13276
Bibliographic Reference: Sgarbas, K. (2024). Exercise 5: Lists in Prolog [Chapter]. In Sgarbas, K. 2024. Artificial Intelligence Laboratory Exercises with the Prolog Language [Laboratory Guide]. Kallipos, Open Academic Editions. https://hdl.handle.net/11419/13276
Language: Greek
Is Part of: Artificial Intelligence Laboratory Exercises with the Prolog Language
Publication Origin: Kallipos, Open Academic Editions