SlideShare a Scribd company logo
Topic:
Languages Of AI (lisp/prolog)

Group Members:
Shagufta Arif (027)
Sania Alyas (020)
Maryam Afza (006)
What is LISP??
LISP stands for (LIST
PROCESSING). It was invented
by John McCarthy in 1958. As its
name implies, LISP is a
programming language that
manipulates LISTS.
LISP Discription:
A list is either empty or non-empty.
[a, b, c, d]
Empty: []
Non-empty: head=[a] tail=[b, c, d]
Example:
 We can implement a function to compute

factorials using recursion:
 (defun factorial (N)
"Compute the factorial of N."
(if (= N 1)
1
(* N (factorial (- N 1)))))
Example:
 Here are some simple example using the if

operator:
 CL-USER(): (if (> 3 4)"yes“ "no")
ANS:
"no“
Applications of LISP:
 Mathematics
 Artificial intelligence and natural language

processing.
 Expert Systems (diagnosis, identification,
design )
Advantages of LISP:
 Common Lisp is :
 a general-purpose programming language and an AI

language

 Common Lisp programs are:
 easy to test
 easy to maintain (depending on programming
style)

 intractive
Cont…
 Provides clear syntax
 LISP expressions are case-insensitive.
 runtime typing:
the programmer need not bother about type
declarations

 several data types:
numbers, strings, arrays, lists, char, symbols etc.
Disadvantages of LISP
 The major disadvantage is due to the

lack of popularity and lack of
widespread support and knowledge.
 It is relatively hard to find Lisp
programmers.
What is PROLOG?
 PROLOG is a declarative language

where programs are expressed in
terms of relations.
 A program in PROLOG can use logical
reasoning to answer questions that
can be inferred from the knowledge
base.
Cont …
A Prolog language designed in Europe to
support natural language processing.
It was created by Alain and Robert 1972 as an
alternative to the Lisp programming languages.
Conti…
 There are three basic stratgies in Prolog:
facts, rules, and queries.
 A collection of facts and rules which
describe some collection of relationships is
called a knowledge base.
 That is, Prolog programs simply are
knowledge bases.
Conti…
Prolog includes an inference engine, which is
a process for reasoning logically about
information. The inference engine includes a
pattern matcher, which retrieves stored
(known) information by matching answers to
questions.
One important feature of Prolog is find all
possible solutions rather than only one.
PROLOG Example
mortal(X) :- man(X)

% Xismortal
if X is a man.
% Socrates is a man

man(socrates).
and then ask Prolog
?- mortal(socrates). % Is Socrates
mortal?
and it will immediately tell me yes
Applications of PROLOG
 Expert systems
 Relational queries
 Parsing of context free language
 Natural language processing

 Natural support of

pattern-matching
Advantages of PROLOG
 The language works well for tasks like

proving mathematical theorems
 It has built-in list handling, very useful for
representing sequences, trees, and so on.
 It is easy to read and write programs which
build structures.
Similarities:
 One of the similarities that makes these

languages unique is their ability to rewrite
themselves as the program is running.
 In Lisp, the program itself can be treated as
data that the program can manipulate.
 The both languages are object oriented
programming languages.
Differences:
 The main difference between the two languages
is the way problems are described.
 In Lisp, the programmer must describe how the
computer will solve the problem (chess game).
 In Prolog, the developer does not need to
describe how, but rules points the program

toward the desired results. (medical symptoms).
 Prolog is not a general-purpose theorem prover.
LISP is a general purpose theorem
 PROLOG has many functional languages other
than LISP.
LISP & PROLOG

PROGRAMMING LANGUAGE
Arithmetic Operations
Point of comparison

LISP

PROLOG

ADD

(+2 3)

2+3

SUBTRACT

(-5 2)

(5-2)

MULTIPLICATION

(* 3 2)

(2*3)

DIVISION

(/ 6 2)

(6/2)

BRACES

(+3 (* 3 2 ) 4)

(3+ (3 *2)
Logical operations
Point of comparison

LISP

PROLOG

SMALLER

(< 3 4 )
True

3<4
yes

GREATER

(> 3 4 )
NIL

3>4
No

Smaller than or equal (< = 3 2)
Nil

Greater than or equal ( > = 3 2)

3=<2
No

true

3>=2
Yes

Equal

( = 3 4)
Nil

3 =:= 4
no

Not Equal

( = 3 4 )
True

( 3 == 4)
Yes
PROLOG Example
 age(john,32).
 age(agnes,41).

 age(george,72).
 age(hiba,2).
 age(thomas,25).

QUERIES
age(hiba,2).
agnes(41).
Thanks

More Related Content

What's hot

Presentation on python data type
Presentation on python data typePresentation on python data type
Presentation on python data type
swati kushwaha
 
Python Data-Types
Python Data-TypesPython Data-Types
Python Data-Types
Akhil Kaushik
 
Advance LISP (Artificial Intelligence)
Advance LISP (Artificial Intelligence) Advance LISP (Artificial Intelligence)
Advance LISP (Artificial Intelligence)
wahab khan
 
Intro to python
Intro to pythonIntro to python
Intro to python
Mohamed Essam
 
Datastrucure
DatastrucureDatastrucure
Datastrucure
Mohamed Essam
 
Object reusability in python
Object reusability in pythonObject reusability in python
Object reusability in python
Learnbay Datascience
 
Chapter 10 data handling
Chapter 10 data handlingChapter 10 data handling
Chapter 10 data handling
Praveen M Jigajinni
 
Ground Gurus - Python Code Camp - Day 3 - Classes
Ground Gurus - Python Code Camp - Day 3 - ClassesGround Gurus - Python Code Camp - Day 3 - Classes
Ground Gurus - Python Code Camp - Day 3 - Classes
Chariza Pladin
 
Regular Expressions
Regular ExpressionsRegular Expressions
Regular Expressions
Akhil Kaushik
 
Bhushan Rathi
Bhushan RathiBhushan Rathi
Bhushan Rathi
Bhushan Rathi
 
Labelled Variables in Logic Programming: A First Prototipe in tuProlog
Labelled Variables in Logic Programming: A First Prototipe in tuPrologLabelled Variables in Logic Programming: A First Prototipe in tuProlog
Labelled Variables in Logic Programming: A First Prototipe in tuProlog
Roberta Calegari
 
Compiler_Project_Srikanth_Vanama
Compiler_Project_Srikanth_VanamaCompiler_Project_Srikanth_Vanama
Compiler_Project_Srikanth_VanamaSrikanth Vanama
 
Clean code
Clean codeClean code
Clean code
Smita Prasad
 
Data types in python lecture (2)
Data types in python lecture (2)Data types in python lecture (2)
Data types in python lecture (2)
Ali ٍSattar
 
Aaa ped-3. Pythond: advanced concepts
Aaa ped-3. Pythond: advanced conceptsAaa ped-3. Pythond: advanced concepts
Aaa ped-3. Pythond: advanced concepts
AminaRepo
 
Python 3 Programming Language
Python 3 Programming LanguagePython 3 Programming Language
Python 3 Programming Language
Tahani Al-Manie
 
OODP Unit 1 OOPs classes and objects
OODP Unit 1 OOPs classes and objectsOODP Unit 1 OOPs classes and objects
OODP Unit 1 OOPs classes and objects
Shanmuganathan C
 
Python libraries
Python librariesPython libraries
Python libraries
Venkat Projects
 
Doppl development iteration #4
Doppl development   iteration #4Doppl development   iteration #4
Doppl development iteration #4
Diego Perini
 

What's hot (20)

Presentation on python data type
Presentation on python data typePresentation on python data type
Presentation on python data type
 
Python Data-Types
Python Data-TypesPython Data-Types
Python Data-Types
 
Advance LISP (Artificial Intelligence)
Advance LISP (Artificial Intelligence) Advance LISP (Artificial Intelligence)
Advance LISP (Artificial Intelligence)
 
Intro to python
Intro to pythonIntro to python
Intro to python
 
Datastrucure
DatastrucureDatastrucure
Datastrucure
 
Object reusability in python
Object reusability in pythonObject reusability in python
Object reusability in python
 
Chapter 10 data handling
Chapter 10 data handlingChapter 10 data handling
Chapter 10 data handling
 
Ground Gurus - Python Code Camp - Day 3 - Classes
Ground Gurus - Python Code Camp - Day 3 - ClassesGround Gurus - Python Code Camp - Day 3 - Classes
Ground Gurus - Python Code Camp - Day 3 - Classes
 
Regular Expressions
Regular ExpressionsRegular Expressions
Regular Expressions
 
Bhushan Rathi
Bhushan RathiBhushan Rathi
Bhushan Rathi
 
Labelled Variables in Logic Programming: A First Prototipe in tuProlog
Labelled Variables in Logic Programming: A First Prototipe in tuPrologLabelled Variables in Logic Programming: A First Prototipe in tuProlog
Labelled Variables in Logic Programming: A First Prototipe in tuProlog
 
Compiler_Project_Srikanth_Vanama
Compiler_Project_Srikanth_VanamaCompiler_Project_Srikanth_Vanama
Compiler_Project_Srikanth_Vanama
 
Clean code
Clean codeClean code
Clean code
 
Data types in python lecture (2)
Data types in python lecture (2)Data types in python lecture (2)
Data types in python lecture (2)
 
Aaa ped-3. Pythond: advanced concepts
Aaa ped-3. Pythond: advanced conceptsAaa ped-3. Pythond: advanced concepts
Aaa ped-3. Pythond: advanced concepts
 
Python 3 Programming Language
Python 3 Programming LanguagePython 3 Programming Language
Python 3 Programming Language
 
OODP Unit 1 OOPs classes and objects
OODP Unit 1 OOPs classes and objectsOODP Unit 1 OOPs classes and objects
OODP Unit 1 OOPs classes and objects
 
Python libraries
Python librariesPython libraries
Python libraries
 
record_linking
record_linkingrecord_linking
record_linking
 
Doppl development iteration #4
Doppl development   iteration #4Doppl development   iteration #4
Doppl development iteration #4
 

Viewers also liked

Pioneers of Information Science in Europe: The Oeuvre of Norbert Henrichs
Pioneers of Information Science in Europe: The Oeuvre of Norbert HenrichsPioneers of Information Science in Europe: The Oeuvre of Norbert Henrichs
Pioneers of Information Science in Europe: The Oeuvre of Norbert Henrichs
Wolfgang Stock
 
Introduction to XML
Introduction to XMLIntroduction to XML
Introduction to XML
shannonsdavis
 
What&rsquo;s new in Visual C++
What&rsquo;s new in Visual C++What&rsquo;s new in Visual C++
What&rsquo;s new in Visual C++
Microsoft
 
Making Information Usable: The Art & Science of Information Design
Making Information Usable: The Art & Science of Information DesignMaking Information Usable: The Art & Science of Information Design
Making Information Usable: The Art & Science of Information Design
Hubbard One
 
Vb.net session 15
Vb.net session 15Vb.net session 15
Vb.net session 15Niit Care
 
Python Tools for Visual Studio: Python na Microsoftovom .NET-u
Python Tools for Visual Studio: Python na Microsoftovom .NET-uPython Tools for Visual Studio: Python na Microsoftovom .NET-u
Python Tools for Visual Studio: Python na Microsoftovom .NET-uNikola Plejic
 
Prolog -Cpt114 - Week3
Prolog -Cpt114 - Week3Prolog -Cpt114 - Week3
Prolog -Cpt114 - Week3a_akhavan
 
Part 1 picturebox using vb.net
Part 1 picturebox using vb.netPart 1 picturebox using vb.net
Part 1 picturebox using vb.net
Girija Muscut
 
Transforming the world with Information technology
Transforming the world with Information technologyTransforming the world with Information technology
Transforming the world with Information technology
Glenn Klith Andersen
 
Logical Programming With ruby-prolog
Logical Programming With ruby-prologLogical Programming With ruby-prolog
Logical Programming With ruby-prolog
Preston Lee
 
Debugging in visual studio (basic level)
Debugging in visual studio (basic level)Debugging in visual studio (basic level)
Debugging in visual studio (basic level)
Larry Nung
 
How Not To Be Seen
How Not To Be SeenHow Not To Be Seen
How Not To Be Seen
Mark Pesce
 
Cognitive information science
Cognitive information scienceCognitive information science
Cognitive information science
S. Kate Devitt
 
Part 5 create sequence increment value using negative value
Part 5 create sequence increment value using negative valuePart 5 create sequence increment value using negative value
Part 5 create sequence increment value using negative value
Girija Muscut
 
Part2 database connection service based using vb.net
Part2 database connection service based using vb.netPart2 database connection service based using vb.net
Part2 database connection service based using vb.net
Girija Muscut
 
Part 8 add,update,delete records using records operation buttons in vb.net
Part 8 add,update,delete records using records operation buttons in vb.netPart 8 add,update,delete records using records operation buttons in vb.net
Part 8 add,update,delete records using records operation buttons in vb.net
Girija Muscut
 
Information Overload and Information Science / Mieczysław Muraszkiewicz
Information Overload and Information Science / Mieczysław MuraszkiewiczInformation Overload and Information Science / Mieczysław Muraszkiewicz
Information Overload and Information Science / Mieczysław Muraszkiewicz
Zakład Systemów Informacyjnych, Instytut Informacji Naukowej i Studiów Bibliologicznych (UW)
 
Part 3 binding navigator vb.net
Part 3 binding navigator vb.netPart 3 binding navigator vb.net
Part 3 binding navigator vb.net
Girija Muscut
 
Science Information Literacy Tutorials and Pedagogy
Science Information Literacy Tutorials and Pedagogy Science Information Literacy Tutorials and Pedagogy
Science Information Literacy Tutorials and Pedagogy
Eleni Zazani
 
RuleML2015: Explanation of proofs of regulatory (non-)complianceusing semanti...
RuleML2015: Explanation of proofs of regulatory (non-)complianceusing semanti...RuleML2015: Explanation of proofs of regulatory (non-)complianceusing semanti...
RuleML2015: Explanation of proofs of regulatory (non-)complianceusing semanti...
RuleML
 

Viewers also liked (20)

Pioneers of Information Science in Europe: The Oeuvre of Norbert Henrichs
Pioneers of Information Science in Europe: The Oeuvre of Norbert HenrichsPioneers of Information Science in Europe: The Oeuvre of Norbert Henrichs
Pioneers of Information Science in Europe: The Oeuvre of Norbert Henrichs
 
Introduction to XML
Introduction to XMLIntroduction to XML
Introduction to XML
 
What&rsquo;s new in Visual C++
What&rsquo;s new in Visual C++What&rsquo;s new in Visual C++
What&rsquo;s new in Visual C++
 
Making Information Usable: The Art & Science of Information Design
Making Information Usable: The Art & Science of Information DesignMaking Information Usable: The Art & Science of Information Design
Making Information Usable: The Art & Science of Information Design
 
Vb.net session 15
Vb.net session 15Vb.net session 15
Vb.net session 15
 
Python Tools for Visual Studio: Python na Microsoftovom .NET-u
Python Tools for Visual Studio: Python na Microsoftovom .NET-uPython Tools for Visual Studio: Python na Microsoftovom .NET-u
Python Tools for Visual Studio: Python na Microsoftovom .NET-u
 
Prolog -Cpt114 - Week3
Prolog -Cpt114 - Week3Prolog -Cpt114 - Week3
Prolog -Cpt114 - Week3
 
Part 1 picturebox using vb.net
Part 1 picturebox using vb.netPart 1 picturebox using vb.net
Part 1 picturebox using vb.net
 
Transforming the world with Information technology
Transforming the world with Information technologyTransforming the world with Information technology
Transforming the world with Information technology
 
Logical Programming With ruby-prolog
Logical Programming With ruby-prologLogical Programming With ruby-prolog
Logical Programming With ruby-prolog
 
Debugging in visual studio (basic level)
Debugging in visual studio (basic level)Debugging in visual studio (basic level)
Debugging in visual studio (basic level)
 
How Not To Be Seen
How Not To Be SeenHow Not To Be Seen
How Not To Be Seen
 
Cognitive information science
Cognitive information scienceCognitive information science
Cognitive information science
 
Part 5 create sequence increment value using negative value
Part 5 create sequence increment value using negative valuePart 5 create sequence increment value using negative value
Part 5 create sequence increment value using negative value
 
Part2 database connection service based using vb.net
Part2 database connection service based using vb.netPart2 database connection service based using vb.net
Part2 database connection service based using vb.net
 
Part 8 add,update,delete records using records operation buttons in vb.net
Part 8 add,update,delete records using records operation buttons in vb.netPart 8 add,update,delete records using records operation buttons in vb.net
Part 8 add,update,delete records using records operation buttons in vb.net
 
Information Overload and Information Science / Mieczysław Muraszkiewicz
Information Overload and Information Science / Mieczysław MuraszkiewiczInformation Overload and Information Science / Mieczysław Muraszkiewicz
Information Overload and Information Science / Mieczysław Muraszkiewicz
 
Part 3 binding navigator vb.net
Part 3 binding navigator vb.netPart 3 binding navigator vb.net
Part 3 binding navigator vb.net
 
Science Information Literacy Tutorials and Pedagogy
Science Information Literacy Tutorials and Pedagogy Science Information Literacy Tutorials and Pedagogy
Science Information Literacy Tutorials and Pedagogy
 
RuleML2015: Explanation of proofs of regulatory (non-)complianceusing semanti...
RuleML2015: Explanation of proofs of regulatory (non-)complianceusing semanti...RuleML2015: Explanation of proofs of regulatory (non-)complianceusing semanti...
RuleML2015: Explanation of proofs of regulatory (non-)complianceusing semanti...
 

Similar to Presentation1

Programming Languages - Functional Programming Paper
Programming Languages - Functional Programming PaperProgramming Languages - Functional Programming Paper
Programming Languages - Functional Programming PaperShreya Chakrabarti
 
PARADIGM IT.pptx
PARADIGM IT.pptxPARADIGM IT.pptx
PARADIGM IT.pptx
jamesmarken1
 
LISP: назад в будущее, Микола Мозговий
LISP: назад в будущее, Микола МозговийLISP: назад в будущее, Микола Мозговий
LISP: назад в будущее, Микола Мозговий
Sigma Software
 
CPPDS Slide.pdf
CPPDS Slide.pdfCPPDS Slide.pdf
CPPDS Slide.pdf
Fadlie Ahdon
 
Lecture 2 lisp-Overview
Lecture 2 lisp-OverviewLecture 2 lisp-Overview
Prolog (present)
Prolog (present) Prolog (present)
Prolog (present) Melody Joey
 
Declarative programming language
Declarative programming languageDeclarative programming language
Declarative programming language
Vinisha Pathak
 
LISP: Introduction to lisp
LISP: Introduction to lispLISP: Introduction to lisp
LISP: Introduction to lisp
DataminingTools Inc
 
LISP: Introduction To Lisp
LISP: Introduction To LispLISP: Introduction To Lisp
LISP: Introduction To Lisp
LISP Content
 
Learning and Modern Programming Languages
Learning and Modern Programming LanguagesLearning and Modern Programming Languages
Learning and Modern Programming Languages
Ray Toal
 
Programing paradigm &amp; implementation
Programing paradigm &amp; implementationPrograming paradigm &amp; implementation
Programing paradigm &amp; implementation
Bilal Maqbool ツ
 
Python programming
Python programmingPython programming
Python programming
noor_faiza
 
OBJECT ORIENTED PROGRAMMING.docx
OBJECT ORIENTED PROGRAMMING.docxOBJECT ORIENTED PROGRAMMING.docx
OBJECT ORIENTED PROGRAMMING.docx
AleKi2
 
Prolog Programming Language
Prolog Programming  LanguageProlog Programming  Language
Prolog Programming Language
Reham AlBlehid
 
Let's LISP like it's 1959
Let's LISP like it's 1959Let's LISP like it's 1959
Let's LISP like it's 1959
Mohamed Essam
 
On being a professional software developer
On being a professional software developerOn being a professional software developer
On being a professional software developer
Anton Kirillov
 
Unit 1
Unit 1Unit 1
Unit 1
ankita1317
 
JAVA
JAVAJAVA
Антон Кириллов, ZeptoLab
Антон Кириллов, ZeptoLabАнтон Кириллов, ZeptoLab
Антон Кириллов, ZeptoLab
Diana Dymolazova
 

Similar to Presentation1 (20)

Programming Languages - Functional Programming Paper
Programming Languages - Functional Programming PaperProgramming Languages - Functional Programming Paper
Programming Languages - Functional Programming Paper
 
PARADIGM IT.pptx
PARADIGM IT.pptxPARADIGM IT.pptx
PARADIGM IT.pptx
 
LISP: назад в будущее, Микола Мозговий
LISP: назад в будущее, Микола МозговийLISP: назад в будущее, Микола Мозговий
LISP: назад в будущее, Микола Мозговий
 
CPPDS Slide.pdf
CPPDS Slide.pdfCPPDS Slide.pdf
CPPDS Slide.pdf
 
Lecture 2 lisp-Overview
Lecture 2 lisp-OverviewLecture 2 lisp-Overview
Lecture 2 lisp-Overview
 
Prolog (present)
Prolog (present) Prolog (present)
Prolog (present)
 
Declarative programming language
Declarative programming languageDeclarative programming language
Declarative programming language
 
LISP: Introduction to lisp
LISP: Introduction to lispLISP: Introduction to lisp
LISP: Introduction to lisp
 
LISP: Introduction To Lisp
LISP: Introduction To LispLISP: Introduction To Lisp
LISP: Introduction To Lisp
 
Learning and Modern Programming Languages
Learning and Modern Programming LanguagesLearning and Modern Programming Languages
Learning and Modern Programming Languages
 
Programing paradigm &amp; implementation
Programing paradigm &amp; implementationPrograming paradigm &amp; implementation
Programing paradigm &amp; implementation
 
Python programming
Python programmingPython programming
Python programming
 
3.5
3.53.5
3.5
 
OBJECT ORIENTED PROGRAMMING.docx
OBJECT ORIENTED PROGRAMMING.docxOBJECT ORIENTED PROGRAMMING.docx
OBJECT ORIENTED PROGRAMMING.docx
 
Prolog Programming Language
Prolog Programming  LanguageProlog Programming  Language
Prolog Programming Language
 
Let's LISP like it's 1959
Let's LISP like it's 1959Let's LISP like it's 1959
Let's LISP like it's 1959
 
On being a professional software developer
On being a professional software developerOn being a professional software developer
On being a professional software developer
 
Unit 1
Unit 1Unit 1
Unit 1
 
JAVA
JAVAJAVA
JAVA
 
Антон Кириллов, ZeptoLab
Антон Кириллов, ZeptoLabАнтон Кириллов, ZeptoLab
Антон Кириллов, ZeptoLab
 

Recently uploaded

Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
TechSoup
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
Nguyen Thanh Tu Collection
 
How to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP ModuleHow to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP Module
Celine George
 
PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.
Dr. Shivangi Singh Parihar
 
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama UniversityNatural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Akanksha trivedi rama nursing college kanpur.
 
Assignment_4_ArianaBusciglio Marvel(1).docx
Assignment_4_ArianaBusciglio Marvel(1).docxAssignment_4_ArianaBusciglio Marvel(1).docx
Assignment_4_ArianaBusciglio Marvel(1).docx
ArianaBusciglio
 
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat  Leveraging AI for Diversity, Equity, and InclusionExecutive Directors Chat  Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
TechSoup
 
Top five deadliest dog breeds in America
Top five deadliest dog breeds in AmericaTop five deadliest dog breeds in America
Top five deadliest dog breeds in America
Bisnar Chase Personal Injury Attorneys
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
Sandy Millin
 
The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
Israel Genealogy Research Association
 
Digital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental DesignDigital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental Design
amberjdewit93
 
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)
Academy of Science of South Africa
 
Best Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDABest Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDA
deeptiverma2406
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
EverAndrsGuerraGuerr
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Thiyagu K
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
Jean Carlos Nunes Paixão
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
camakaiclarkmusic
 
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
IreneSebastianRueco1
 
MASS MEDIA STUDIES-835-CLASS XI Resource Material.pdf
MASS MEDIA STUDIES-835-CLASS XI Resource Material.pdfMASS MEDIA STUDIES-835-CLASS XI Resource Material.pdf
MASS MEDIA STUDIES-835-CLASS XI Resource Material.pdf
goswamiyash170123
 

Recently uploaded (20)

Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
 
How to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP ModuleHow to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP Module
 
PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.
 
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama UniversityNatural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
 
Assignment_4_ArianaBusciglio Marvel(1).docx
Assignment_4_ArianaBusciglio Marvel(1).docxAssignment_4_ArianaBusciglio Marvel(1).docx
Assignment_4_ArianaBusciglio Marvel(1).docx
 
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat  Leveraging AI for Diversity, Equity, and InclusionExecutive Directors Chat  Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
 
Top five deadliest dog breeds in America
Top five deadliest dog breeds in AmericaTop five deadliest dog breeds in America
Top five deadliest dog breeds in America
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
 
The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
 
Digital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental DesignDigital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental Design
 
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
 
South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)
 
Best Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDABest Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDA
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
 
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
 
MASS MEDIA STUDIES-835-CLASS XI Resource Material.pdf
MASS MEDIA STUDIES-835-CLASS XI Resource Material.pdfMASS MEDIA STUDIES-835-CLASS XI Resource Material.pdf
MASS MEDIA STUDIES-835-CLASS XI Resource Material.pdf
 

Presentation1

  • 1.
  • 2. Topic: Languages Of AI (lisp/prolog) Group Members: Shagufta Arif (027) Sania Alyas (020) Maryam Afza (006)
  • 3. What is LISP?? LISP stands for (LIST PROCESSING). It was invented by John McCarthy in 1958. As its name implies, LISP is a programming language that manipulates LISTS.
  • 4. LISP Discription: A list is either empty or non-empty. [a, b, c, d] Empty: [] Non-empty: head=[a] tail=[b, c, d]
  • 5. Example:  We can implement a function to compute factorials using recursion:  (defun factorial (N) "Compute the factorial of N." (if (= N 1) 1 (* N (factorial (- N 1)))))
  • 6. Example:  Here are some simple example using the if operator:  CL-USER(): (if (> 3 4)"yes“ "no") ANS: "no“
  • 7. Applications of LISP:  Mathematics  Artificial intelligence and natural language processing.  Expert Systems (diagnosis, identification, design )
  • 8. Advantages of LISP:  Common Lisp is :  a general-purpose programming language and an AI language  Common Lisp programs are:  easy to test  easy to maintain (depending on programming style)  intractive
  • 9. Cont…  Provides clear syntax  LISP expressions are case-insensitive.  runtime typing: the programmer need not bother about type declarations  several data types: numbers, strings, arrays, lists, char, symbols etc.
  • 10. Disadvantages of LISP  The major disadvantage is due to the lack of popularity and lack of widespread support and knowledge.  It is relatively hard to find Lisp programmers.
  • 11. What is PROLOG?  PROLOG is a declarative language where programs are expressed in terms of relations.  A program in PROLOG can use logical reasoning to answer questions that can be inferred from the knowledge base.
  • 12. Cont … A Prolog language designed in Europe to support natural language processing. It was created by Alain and Robert 1972 as an alternative to the Lisp programming languages.
  • 13. Conti…  There are three basic stratgies in Prolog: facts, rules, and queries.  A collection of facts and rules which describe some collection of relationships is called a knowledge base.  That is, Prolog programs simply are knowledge bases.
  • 14. Conti… Prolog includes an inference engine, which is a process for reasoning logically about information. The inference engine includes a pattern matcher, which retrieves stored (known) information by matching answers to questions. One important feature of Prolog is find all possible solutions rather than only one.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21. PROLOG Example mortal(X) :- man(X) % Xismortal if X is a man. % Socrates is a man man(socrates). and then ask Prolog ?- mortal(socrates). % Is Socrates mortal? and it will immediately tell me yes
  • 22. Applications of PROLOG  Expert systems  Relational queries  Parsing of context free language  Natural language processing  Natural support of pattern-matching
  • 23. Advantages of PROLOG  The language works well for tasks like proving mathematical theorems  It has built-in list handling, very useful for representing sequences, trees, and so on.  It is easy to read and write programs which build structures.
  • 24. Similarities:  One of the similarities that makes these languages unique is their ability to rewrite themselves as the program is running.  In Lisp, the program itself can be treated as data that the program can manipulate.  The both languages are object oriented programming languages.
  • 25. Differences:  The main difference between the two languages is the way problems are described.  In Lisp, the programmer must describe how the computer will solve the problem (chess game).  In Prolog, the developer does not need to describe how, but rules points the program toward the desired results. (medical symptoms).  Prolog is not a general-purpose theorem prover. LISP is a general purpose theorem  PROLOG has many functional languages other than LISP.
  • 27. Arithmetic Operations Point of comparison LISP PROLOG ADD (+2 3) 2+3 SUBTRACT (-5 2) (5-2) MULTIPLICATION (* 3 2) (2*3) DIVISION (/ 6 2) (6/2) BRACES (+3 (* 3 2 ) 4) (3+ (3 *2)
  • 28. Logical operations Point of comparison LISP PROLOG SMALLER (< 3 4 ) True 3<4 yes GREATER (> 3 4 ) NIL 3>4 No Smaller than or equal (< = 3 2) Nil Greater than or equal ( > = 3 2) 3=<2 No true 3>=2 Yes Equal ( = 3 4) Nil 3 =:= 4 no Not Equal ( = 3 4 ) True ( 3 == 4) Yes
  • 29. PROLOG Example  age(john,32).  age(agnes,41).  age(george,72).  age(hiba,2).  age(thomas,25). QUERIES age(hiba,2). agnes(41).