×

Resolution Method in AI

Resolution Method in AI

Resolution method is an inference rule which is used in both Propositional as well as First-order Predicate Logic in different ways. This method is basically used for proving the satisfiability of a sentence. In resolution method, we use Proof by Refutation technique to prove the given statement.

The key idea for the resolution method is to use the knowledge base and negated goal to obtain null clause (which indicates contradiction). Resolution method is also called Proof by Refutation. Since the knowledge base itself is consistent, the contradiction must be introduced by a negated goal. As a result, we have to conclude that the original goal is true.

Resolution Method in Propositional Logic

In propositional logic, resolution method is the only inference rule which gives a new clause when two or more clauses are coupled together.

Using propositional resolution, it becomes easy to make a theorem prover sound and complete for all.

The process followed to convert the propositional logic into resolution method contains the below steps:

  • Convert the given axiom into clausal form, i.e., disjunction form.
  • Apply and proof the given goal using negation rule.
  • Use those literals which are needed to prove.
  • Solve the clauses together and achieve the goal.

But, before solving problems using Resolution method, let’s understand two normal forms

Conjunctive Normal Form (CNF)

In propositional logic, the resolution method is applied only to those clauses which are disjunction of literals. There are following steps used to convert into CNF:

1) Eliminate bi-conditional implication by replacing A ? B with (A ? B) ? (B ?A)

2) Eliminate implication by replacing A  ?   B with ¬A V B.

3) In CNF, negation(¬) appears only in literals, therefore we move it inwards as:

  • ¬ ( ¬A) ? A (double-negation elimination
  • ¬ (A ? B) ? ( ¬A V ¬B) (De Morgan)
  • ¬(A V B) ? ( ¬A ? ¬B) (De Morgan)

4) Finally, using distributive law on the sentences, and form the CNF as:

(A1 V B1) ? (A2 V B2) ? ….  ? (An V Bn).

Note: CNF can also be described as AND of ORS

Disjunctive Normal Form (DNF)

This is a reverse approach of CNF. The process is similar to CNF with the following difference:

(A1 ? B1) V (A2 ? B2) V…V (An ? Bn). In DNF, it is OR of ANDS, a sum of products, or a cluster concept, whereas, in CNF, it is ANDs  of Ors.

Example OF Propositional Resolution

Consider the following Knowledge Base:

  1. The humidity is high or the sky is cloudy.
  2. If the sky is cloudy, then it will rain.
  3. If the humidity is high, then it is hot.
  4. It is not hot.

Goal: It will rain.

Use propositional logic and apply resolution method to prove that the goal is derivable from the given knowledge base.

Solution: Let’s construct propositions of the given sentences one by one:

  1. Let, P: Humidity is high.

                    Q: Sky is cloudy.

It will be represented as P V Q.

2) Q: Sky is cloudy.                      …from(1)

Let, R: It will rain.

It will be represented as b?  R.

3) P: Humidity is high.                 …from(1)

Let, S: It is hot.

It will be represented as P  ?   S.

4) ¬S: It is not hot.

Applying resolution method:

In (2), Q ? R will be converted as (¬Q V R)

In (3), P ?  S will be converted as (¬P V S)

Negation of Goal (¬R): It will not rain.

Finally, apply the rule as shown below:

Negation of Goal (¬R):

After applying Proof by Refutation (Contradiction) on the goal, the problem is solved, and it has terminated with a Null clause ( Ø ). Hence, the goal is achieved. Thus, It is not raining.

Note: We can have many examples of Proposition logic which can be proved with the help of Propositional resolution method.

Resolution Method in FOPl/ Predicate Logic

Resolution method in FOPL is an uplifted version of propositional resolution method.

In FOPL, the process to apply the resolution method is as follows:

  • Convert the given axiom into CNF, i.e., a conjunction of clauses. Each clause should be dis-junction of literals.
  • Apply negation on the goal given.
  • Use literals which are required and prove it.
  • Unlike propositional logic, FOPL literals are complementary if one unifies with the negation of other literal.

For example: {Bird(F(x)) V Loves(G(x), x)} and {¬Loves(a, b) V ¬Kills(a, b)}

Eliminate the complementary literals Loves(G(x),x) and  Loves(a,b)) with ? ={a/G(x), v/x} to give the following output clause:

{Bird(F(x)) V ¬Kills(G(x),x)}

The rule applied on the following example is called Binary Resolution as it has solved exactly two literals. But, binary resolution is not complete. An alternative approach is to extend the factoring i.e., to remove redundant literals to the first order case. Thus, the combination of binary resolution and factoring is complete.

Conjunctive Normal Form

There are following steps used to convert into CNF:

  • Eliminate the implications as:

?x: A(x)   ?     B(x) with {¬ x: ¬A( ?x) V B(x)}

  • Move negation (¬) inwards as:

              ¬?x: A becomes ?x: ¬A and,

               ¬?x: A becomes ?x: ¬A

It means that the universal quantifier becomes existential quantifier and vice-versa.

  • Standardize variables: If two sentences use same variable, it is required to change the name of one variable. This step is taken so as to remove the confusion when the quantifiers will be dropped.

For example: { ?x: A(x) V ?x: B(x)}

  • Skolemize: It is the process of removing existential quantifier through elimination.
  • Drop universal quantifiers: If we are on this step, it means all remaining variables must be universally quantified. Drop the quantifier.
  • Distribute V over ?: Here, the nested conjunction and disjunction are flattened.

Example of FOPL resolution

Consider the following knowledge base:

  1. Gita likes all kinds of food.
  2. Mango and chapati are food.
  3. Gita eats almond and is still alive.
  4. Anything eaten by anyone and is still alive is food.

Goal: Gita likes almond.

Solution: Convert the given sentences into FOPL as:

Let, x be the light sleeper.

  1. ?x: food(x) ? likes(Gita,x)
  2. food(Mango),food(chapati)
  3. ?x?y: eats(x,y) ? ¬ killed(x ? food(y)
  4. eats(Gita, almonds) ? alive(Gita)
  5. ?x: ¬killed(x) ? alive(x)
  6. ?x: alive(x) ?  ¬killed(x)

Goal: likes(Gita, almond)

Negated goal: ¬likes(Gita, almond)

Now, rewrite in CNF form:

  1. ¬food(x) V likes(Gita, x)
  2. food(Mango),food(chapati)
  3. ¬eats(x,y) V killed(x) V food(y)
  4. eats(Gita, almonds), alive(Gita)
  5. killed(x) V alive(x)
  6. ¬alive(x) V ¬killed(x)

Finally, construct the resolution graph:

construct the resolution graph

Hence, we have achieved the given goal with the help of Proof by Contradiction. Thus, it is proved that Gita likes almond.

Note: There can be several examples of Resolution method in FOPL


Related Topics

What is Artificial Super Intelligence (ASI)

Before starting with Artificial Super Intelligence, first, we have to know what Artificial Intelligence is. Artificial Intelligence is a field which has a long history. Artificial intelligence is the ability...

3 minutes read.

Propositional Logic

It is a branch of logic which is also known as statement logic, sentential logic, zeroth-order logic, and many more. It works with the propositions and its logical connectivities. It deals with the...

5 minutes read.

Constraint Satisfaction Problems in Artificial Intelligence

Constraint Satisfaction Problems in Artificial Intelligence We have seen so many techniques like Local search, Adversarial search to solve different problems. The objective of every problem-solving technique is one, i.e., to find a solution to...

5 minutes read.

Neural Networks

Neural Networks are one of the most popular techniques and tools in Machine learning. Neural Networks were inspired by the human brain as early as in the 1940s. Researchers studied the...

5 minutes read.

Reinforcement Learning in AI

Reinforcement Learning in AI Reinforcement LearningMarkov’s Decision ProcessQ leaningGreedy Decision MakingNIM GameNIM Game Implementation with Python Reinforcement Learning Reinforcement Learning is about learning from experience, where agents are given a set of rewards...

15 minutes read.

Top 10 Artificial Intelligence Technologies in 2024

Artificial Intelligence Technologies in 2020 1. Augmented Reality This is one of the most fascinating technology nowadays. Augmented Reality is the use of text, graphics, audio, etc. in real time. In Simple...

4 minutes read.

The Wumpus World

The Wumpus world is a game playing which provides an environment to the knowledge-based agent to showcase its stored knowledge. It was developed by Gregory Yob in 1973. About the game:  It...

3 minutes read.

Alpha-beta Pruning | Artificial Intelligence

Alpha-beta pruning is an advance version of MINIMAX algorithm. The drawback of minimax strategy is that it explores each node in the tree deeply to provide the best path among all the...

3 minutes read.

Gradient Descent

Gradient Descent When training a neural network, an algorithm is used to minimize the loss. This algorithm is called as Gradient Descent. And loss refers to the incorrect outputs given by...

6 minutes read.

Quantifying Uncertainty

The concept of quantifying uncertainty relies on how an agent can keep away uncertainty with a degree of belief. The term uncertainty refers to that situation or information which is either unknown or...

5 minutes read.

Resolution Method in AI

Resolution Method in AI Resolution method is an inference rule which is used in both Propositional as well as First-order Predicate Logic in different ways. This method is basically used for proving the...

5 minutes read.

Hidden Markov Models

Hidden Markov Model is a partially observable model, where the agent partially observes the states. This model is based on the statistical Markov model, where a system being modeled follows the Markov process...

4 minutes read.

Heuristic Functions in Artificial Intelligence

Heuristic Functions in AI: As we have already seen that an informed search make use of heuristic functions in order to reach the goal node in a more prominent way....

3 minutes read.

Natural Language Processing

Natural Language Processing in AI Topics Covered in Language Module Natural Language ProcessingSyntax and SemanticsContext-Free GrammarNLTKN-gramsTokenizationBag of WordsNaïve Bayes In language, we will cover how Artificial Intelligence is used to process human language...

13 minutes read.

5 algorithms that demonstrate artificial intelligence bias

Unfortunately, in the machine learning algorithm, AI bias is the output due to the prejudiced assumption made due to the algorithm development process. AI systems have biases due to the...

3 minutes read.

Classical Planning

Classical Planning is the planning where an agent takes advantage of the problem structure to construct complex plans of an action. The agent performs three tasks in classical planning: Planning: The agent plans after...

4 minutes read.

Supervised Learning in AI

Supervised Learning in AI Learning Supervised LearningClassification TasksNearest Neighbor ClassificationK nearest neighbor AlgorithmPerceptron LearningSupport Vector MachineRegression TasksLoss FunctionOverfittingRegularizationScikit LearnK Nearest Neighbor ImplementationPerceptron Algorithm ImplementationSupport Vector Machine Algorithm ImplementationRegression Implementation Machine Learning In the Artificial...

33 minutes read.

Integration of Blockchain and Artificial Intelligence

A Blockchain is a shared database or ledger where pieces of data are stored in data structures known as blocks. So, we can say that Blockchain is the distribution storage...

6 minutes read.

Intelligent Agents | Agents in AI

What is an Agent? An agent can be viewed as anything that perceives its environment through sensors and acts upon that environment through actuators. For example, human being perceives their surroundings through...

8 minutes read.

Dynamic Routing

Dynamic Routing Dynamic routing is used to update the routing table and find networks on the routers. It is easier than static routing and default routing, but it is more expensive in terms of...

3 minutes read.