CS621: Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 35–Himalayan Club example; introducing Prolog Himalayan Club example Introduction through an example (Zohar Manna, 1974):
Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.
CS621: Artificial Intelligence
Pushpak BhattacharyyaCSE Dept., IIT Bombay
Lecture 35–Himalayan Club example; introducing Prolog
Problem in Declarative Form
Compute_length ([Head|Tail], Length):-
Length is Tail_length+1.
High level explanation:
The length of a list is 1 plus the length of the tail of the list, obtained by removing the first element of the list.
This is a declarative description of the computation.