Home » Machine Learning/Artificial Intelligence

Introduction to Quantifiers in the knowledge representation in an Agent (based on Artificial Intelligence)

In this article we are going to study about the quantifiers and their need in knowledge representation in an intelligent agent. We will study about the types of quantifiers, their properties, their applications and will also look at some examples for understanding them better.
Submitted by Monika Sharma, on June 04, 2019

As we know that in an AI-based agent, the knowledge is represented through two types of logic: The propositional logic and the predicate logic. In the propositional logic, we have declarative sentences, and in the predicate logic, we have a predicate defining a subject. But in both these systems, we were not able to define the quantity of any subject.

For example:

The predicate logic: like(boy, apple) defines that boy likes apple. But take a look at the following two statements:

  • Some boys like apple
  • All boys like apple

These sentences cannot be defined completely with the help of first-order predicate logic. So, to solve this issue, the quantifiers were used.

Quantifiers are the quantity defining terms which are used with the predicates.

Types of quantifiers

There are two types of quantifiers:

1) Universal Quantifier

The universal quantifier is used to define the whole subject population under the predicate. It can be used anywhere where the phrases like: 'for all', 'for each', 'for every' are used.

The symbol '∀' is used to represent universal Quantifier. To combine the universal quantifier with the predicate and the subject, implication sign, '->' is used.


    ∀x: Boy(x) -> like(x,Apple) 

The above statement says that: 'All boys like apple'.

2) Existential Quantifier

The Existential Quantifier is used at the places where only some part of the subject's population is to be defined under the predicate. It can be used at all the places where the following phrases are used: 'There exist', 'For some', 'For at least', etc.

The Existential Quantifier is represented by the symbol '∃'. To combine the Existential quantifier with the predicate and the subject, the conjunction symbol, '^' is used.


    ∃x: Boy(x) ^ like(x,apple)

The above statement depicts that there exists a boy who likes apple. Or we can say that there are some boys who like an apple.

Properties of Quantifiers

  • ∀x.∀y is the same as ∀y.∀x
  • ∃x.∃y is the same as ∃y.∃x
  • ∃x.∀y is not the same as ∀y.∃x
  • Quantifier duality: Each quantifier can be expressed using the other one. This is done by complementing and changing the symbols.


    ∀x likes(x, Ice-cream) is equivalent to ~∃x ~likes(x, Ice-cream).
    ∃x likes(x, Chocolate) is equivalent to ~∀x ~likes(x, chocolate). 


Comments and Discussions



Languages: » C » C++ » C++ STL » Java » Data Structure » C#.Net » Android » Kotlin » SQL
Web Technologies: » PHP » Python » JavaScript » CSS » Ajax » Node.js » Web programming/HTML
Solved programs: » C » C++ » DS » Java » C#
Aptitude que. & ans.: » C » C++ » Java » DBMS
Interview que. & ans.: » C » Embedded C » Java » SEO » HR
CS Subjects: » CS Basics » O.S. » Networks » DBMS » Embedded Systems » Cloud Computing
» Machine learning » CS Organizations » Linux » DOS
More: » Articles » Puzzles » News/Updates

© some rights reserved.