SlideShare ist ein Scribd-Unternehmen logo
1 von 30
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

Weitere ähnliche Inhalte

Was ist angesagt?

Presentation on python data type
Presentation on python data typePresentation on python data type
Presentation on python data typeswati kushwaha
 
Advance LISP (Artificial Intelligence)
Advance LISP (Artificial Intelligence) Advance LISP (Artificial Intelligence)
Advance LISP (Artificial Intelligence) wahab khan
 
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 - ClassesChariza Pladin
 
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 tuPrologRoberta Calegari
 
Compiler_Project_Srikanth_Vanama
Compiler_Project_Srikanth_VanamaCompiler_Project_Srikanth_Vanama
Compiler_Project_Srikanth_VanamaSrikanth Vanama
 
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 conceptsAminaRepo
 
Python 3 Programming Language
Python 3 Programming LanguagePython 3 Programming Language
Python 3 Programming LanguageTahani 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 objectsShanmuganathan C
 
Doppl development iteration #4
Doppl development   iteration #4Doppl development   iteration #4
Doppl development iteration #4Diego Perini
 

Was ist angesagt? (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
 

Andere mochten auch

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 HenrichsWolfgang Stock
 
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 DesignHubbard 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.netGirija Muscut
 
Transforming the world with Information technology
Transforming the world with Information technologyTransforming the world with Information technology
Transforming the world with Information technologyGlenn Klith Andersen
 
Logical Programming With ruby-prolog
Logical Programming With ruby-prologLogical Programming With ruby-prolog
Logical Programming With ruby-prologPreston 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 SeenMark Pesce
 
Cognitive information science
Cognitive information scienceCognitive information science
Cognitive information scienceS. 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 valueGirija 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.netGirija 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.netGirija Muscut
 
Part 3 binding navigator vb.net
Part 3 binding navigator vb.netPart 3 binding navigator vb.net
Part 3 binding navigator vb.netGirija 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
 

Andere mochten auch (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...
 

Ähnlich wie Presentation1

Programming Languages - Functional Programming Paper
Programming Languages - Functional Programming PaperProgramming Languages - Functional Programming Paper
Programming Languages - Functional Programming PaperShreya Chakrabarti
 
LISP: назад в будущее, Микола Мозговий
LISP: назад в будущее, Микола МозговийLISP: назад в будущее, Микола Мозговий
LISP: назад в будущее, Микола МозговийSigma Software
 
Prolog (present)
Prolog (present) Prolog (present)
Prolog (present) Melody Joey
 
Declarative programming language
Declarative programming languageDeclarative programming language
Declarative programming languageVinisha Pathak
 
LISP: Introduction To Lisp
LISP: Introduction To LispLISP: Introduction To Lisp
LISP: Introduction To LispLISP Content
 
Learning and Modern Programming Languages
Learning and Modern Programming LanguagesLearning and Modern Programming Languages
Learning and Modern Programming LanguagesRay Toal
 
Programing paradigm &amp; implementation
Programing paradigm &amp; implementationPrograming paradigm &amp; implementation
Programing paradigm &amp; implementationBilal Maqbool ツ
 
Python programming
Python programmingPython programming
Python programmingnoor_faiza
 
OBJECT ORIENTED PROGRAMMING.docx
OBJECT ORIENTED PROGRAMMING.docxOBJECT ORIENTED PROGRAMMING.docx
OBJECT ORIENTED PROGRAMMING.docxAleKi2
 
Prolog Programming Language
Prolog Programming  LanguageProlog Programming  Language
Prolog Programming LanguageReham 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 1959Mohamed Essam
 
On being a professional software developer
On being a professional software developerOn being a professional software developer
On being a professional software developerAnton Kirillov
 
Антон Кириллов, ZeptoLab
Антон Кириллов, ZeptoLabАнтон Кириллов, ZeptoLab
Антон Кириллов, ZeptoLabDiana Dymolazova
 

Ähnlich wie 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
 

Kürzlich hochgeladen

Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...pradhanghanshyam7136
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentationcamerronhm
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxAreebaZafar22
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxDr. Ravikiran H M Gowda
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Pooja Bhuva
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsMebane Rash
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfNirmal Dwivedi
 
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...Amil baba
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...Nguyen Thanh Tu Collection
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxJisc
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfSherif Taha
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxCeline George
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfDr Vijay Vishwakarma
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.christianmathematics
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.pptRamjanShidvankar
 
How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17Celine George
 
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxOn_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxPooja Bhuva
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Jisc
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.MaryamAhmad92
 

Kürzlich hochgeladen (20)

Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptx
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptx
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17
 
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxOn_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 

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).