0% found this document useful (0 votes)
14 views3 pages

AI Logic Conversion and Inference Tasks

The document outlines an assignment focused on various aspects of Artificial Intelligence, including converting sentences into First Order Logic and Propositional Logic, proving statements using resolution, applying inference rules, and utilizing knowledge-based agents. It also includes tasks related to graph coloring using Constraint Satisfaction Problems (CSP) and alpha-beta pruning in decision trees. The assignment covers both theoretical and practical applications of AI concepts.

Uploaded by

hariharanstu
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views3 pages

AI Logic Conversion and Inference Tasks

The document outlines an assignment focused on various aspects of Artificial Intelligence, including converting sentences into First Order Logic and Propositional Logic, proving statements using resolution, applying inference rules, and utilizing knowledge-based agents. It also includes tasks related to graph coloring using Constraint Satisfaction Problems (CSP) and alpha-beta pruning in decision trees. The assignment covers both theoretical and practical applications of AI concepts.

Uploaded by

hariharanstu
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Assignment-II

Artificial Intelligence

1. Convert the following sentences into First Order Logic (FOL).


(a) Not all cars have carburetors
(b) Some people are either religious or pious
(c) No dogs are intelligent
(d) All babies are illogical
(e) Every number is either negative or has a square root
(f) Some numbers are not real
(g) Every connected and circuit-free graph is a tree
(h) Not every graph is connected
(i) All that glitters is not gold

2. Convert the following sentences into Prepositional Logic


1. If Lion is eating, then Lion is not hungry
2. Liron is eating and not hungry
3. Liron is hungry and eating
4. It is raining if and only if Liron is sick
5. If Liron is sick then it is raining, and vice versa
6. It is raining is equivalent to Liron is sick
7. Liron is hungry but happy
8. Liron either owns a cat or a dog

3.

1. If Mary studies hard, she will either pass the exam or get a scholarship.
2. If Tom works overtime, he will be promoted.
3. There exists someone who is both a student and an athlete.
4. If Sarah attends the meeting, she will present her project.
5. No one will both fail the exam and graduate.

Goal:

1. Convert the above statements into CNF


2. Prove that "Mary will either pass the exam or get a scholarship."
That is, we want to prove (PassExam(Mary) ∨ Scholarship(Mary)) by resolution.
4. Apply inference rules in FOL for the following statements:

1. All students who study hard pass the exam.


2. John is a student.
3. John studies hard.

Using First-Order Logic, represent the above statements, and apply inference rules to
conclude whether John passes the exam. Show all steps clearly.

5. Utilize the First-Order representation for the below sentences.

Statement:

"According to school policy, any student caught cheating in the exam is considered to have
violated academic integrity. David, a student, was caught cheating during the final exam."

Goal:

Determine whether David has violated academic integrity.

Apply the forward and backward chaining to the above sentences.

6. Create a knowledge-based agent for a smart health monitoring system that decides whether
to alert the doctor. Define the knowledge base using propositional and describe how the agent
uses inference to decide its action.

7. Consider the below graph and color it adopting CSP. The constraint is no two adjacent
nodes should have the same color. Also, color the graph using Pink, Yellow and Violet.
Show the steps diagrammatically.
8. Apply alpha beta pruning and identify the nodes which will be pruned.

Common questions

Powered by AI

Translating the statement into CNF involves breaking down the implications and disjunctions. The statement 'If Mary studies hard, she will either pass the exam or get a scholarship' can be represented as StudyHard(Mary) → (PassExam(Mary) ∨ Scholarship(Mary)), which is equivalent to ¬StudyHard(Mary) ∨ (PassExam(Mary) ∨ Scholarship(Mary)). To express this in CNF, we keep it as a disjunction: (¬StudyHard(Mary) ∨ PassExam(Mary) ∨ Scholarship(Mary)). The implication is that if Mary does not study hard, then the result (passing or a scholarship) is not guaranteed, reinforcing the importance of her studying efforts .

The sentence 'All that glitters is not gold' can be represented in First Order Logic as ∀x (Glitters(x) → ¬Gold(x)). This representation implies that for every object x, if it has the property of glittering, then it is not gold. Here, the universal quantifier ∀x signifies that the statement applies to all objects within the domain. It emphasizes the distinction between appearance (glittering) and true nature (being gold) and suggests that just because something appears attractive, it does not necessarily possess intrinsic value .

Solving graph coloring with CSP involves treating colors as variables and applying constraints that adjacent nodes not share the same color. For three colors (Pink, Yellow, Violet), each node is assigned one color if it does not violate constraints with its adjacent nodes. Utilize approaches like backtracking or forward checking to identify valid configurations, exploring possibilities systematically. Complexities arise in regions with high connectivity or when nearing complete graphs, where the solution space narrows, requiring more sophisticated search strategies to find feasible color assignments .

Stating 'No dogs are intelligent' in First Order Logic involves using universal quantification: ∀x (Dog(x) → ¬Intelligent(x)). This suggests that for any object x within the domain, if x is identified as a dog, it is inferred not to be intelligent. The implication is a restrictive definition of the traits associated with dogs, where intelligence is universally absent, contrasting with cases that might suggest exceptions or varying degrees of intelligence across individuals .

Constructing the statement 'Every connected and circuit-free graph is a tree' in logical form involves defining the properties: 'connected' and 'circuit-free' as predicates. In First Order Logic: ∀g (Connected(g) ∧ CircuitFree(g) → Tree(g)). It's crucial as it defines a tree's fundamental properties and distinguishes from other graph types. This logic-based representation aids mathematical proofs and algorithm design that rely on these graph characteristics for effective data structure manipulation and problem-solving .

To demonstrate 'John passes the exam' using inference, the provided statements are: 1) All students who study hard pass the exam, 2) John is a student, 3) John studies hard. These can be represented in FOL as: (i) ∀x (Student(x) ∧ StudyHard(x) → PassExam(x)), (ii) Student(John), (iii) StudyHard(John). Applying Modus Ponens and Universal Instantiation, we derive PassExam(John) as follows: From (i), instantiate for John, yielding Student(John) ∧ StudyHard(John) → PassExam(John). Since both Student(John) and StudyHard(John) hold from (ii) and (iii), by Modus Ponens, we conclude PassExam(John).

The statement 'If Lion is eating, then Lion is not hungry' is translated in propositional logic as Eat(Lion) → ¬Hungry(Lion). This indicates a dependency where the state of being not hungry is contingent on the action of eating. It functions as a conditional statement, demonstrating that eating implies the elimination of hunger, and can be used to infer the Lion's state given either the truth or falsity of eating .

Alpha-beta pruning challenges include identifying optimal nodes for pruning without affecting the final minimax decision, ensuring that all pruned branches are guaranteed not to influence the outcome. It enhances efficiency by eliminating branches that cannot affect the final decision, avoiding unnecessary calculations. The method reduces the number of nodes evaluated, thus lowering time and space complexity, typically to O(b^(d/2)), where b is the branching factor and d the depth of the tree, allowing deeper lookahead in gameplay scenarios .

A smart health monitoring system employs a knowledge-based agent defined with a propositional logic knowledge base consisting of rules concerning patient vitals like heart rate, temperature, and blood pressure. For example, conditions could be represented as Alert = HighHeartRate ∨ HighTemperature. The agent uses inference, such as Modus Ponens, to decide actions. If the system detects HighHeartRate is true and the knowledge base contains HighHeartRate → Alert, inference will trigger the alert action. The agent continuously updates its knowledge base with new data and deduces if alert conditions are met to decide to notify a doctor .

To determine if David violated academic integrity, forward chaining starts from known facts: David was caught cheating; school policy states caught cheating leads to integrity violation. In FOL, represent as Cheat(David) → ViolatedIntegrity(David). Forward chaining applies modus ponens iteratively starting from facts (Cheat(David)) to derive ViolatedIntegrity(David). For backward chaining, start with query ViolatedIntegrity(David) and work backwards using antecedents in rules. If attempt shows Cheat(David) is true under policy, we conclude ViolatedIntegrity(David). Each method effectively links David's actions with policy to verify integrity status .

You might also like