4 Knowledge Representation

Artificial Intelligence · Unit 4 · 14 hrs

Knowledge Representation

Exam-focused notes for Knowledge Representation (Artificial Intelligence, CSC266): what the TU syllabus asks and how it has actually been tested, with 18 solved past questions from this unit.

What this unit covers

  • Definition and importance of Knowledge
  • Issues in Knowledge Representation
  • Knowledge Representation Systems
  • Properties of Knowledge Representation Systems
  • Types of Knowledge Representation Systems: Semantic Nets, Frames, Conceptual Dependencies, Scripts, Rule Based Systems, Propositional Logic, Predicate Logic
  • Propositional Logic(PL): Syntax, Semantics, Formal logic-connectives, truth tables, tautology, validity, well-formed-formula, Inference using Resolution, Backward Chaining and Forward Chaining
  • Predicate Logic: FOPL, Syntax, Semantics, Quantification, Inference with FOPL: By converting into PL (Existential and universal instantiation), Unification and lifting, Inference using resolution
  • Handling Uncertain Knowledge, Radom Variables, Prior and Posterior Probability, Inference using Full Joint Distribution, Bayes' Rule and its use, Bayesian Networks, Reasoning in Belief Networks
  • Fuzzy Logic

Predicate Logic

208110 marks

What is Skolem constant? How is Skolemization done during resolution? Represent the following statements into FOPL. - All movies are not hit. - Sarangi is a movie. - All movies which have good script are hit. - Sarangi has a good script but Sarangi is sentimental. - There is a movie which is comedy.[10]

A Skolem constant is a special constant introduced during the process of Skolemization to eliminate existential quantifiers from a First Order Predicate Logic (FOPL) formula. When an existential quantifier appears in a formula without any enclosing universa...

Full solved answer →
208010 marks

Write the rules to convert statements in predicate logic into CNF form. Convert the following sentences into FOPL. All students of BSC CSIT are intelligent person. All friends of intelligent person are smart. Laxmi is a friend of Rojina. Rojina is smart. All beautiful students are girl. Laxmi is beautiful. Using resolution algorithm infer that 'Laxmi is smart'.[10]

1. Eliminate implications and biconditionals: replace $P \to Q$ with $\neg P \lor Q$, and $P \leftrightarrow Q$ with $(\neg P \lor Q) \land (\neg Q \lor P)$. 2. Move negation inward (De Morgan / quantifier duals): - $\neg(P \lor Q) \equiv \neg P \land \neg ...

Full solved answer →
20795 marks

Convert Following Sentences into Predicate: a) All animal who can bark are dog. b) Someone is firing a gun c) All tigers are not fierce [5]

In First Order Predicate Logic (FOPL), each sentence is broken down into predicates representing relationships between subjects. We use: - Universal Quantifier: ∀x (for all x) - Existential Quantifier: ∃x (there exists some x) - Implication: ⇒ - Negation: ¬...

Full solved answer →
20795 marks

Writes short note of the following(any TWO): a. Pragmatic Analysis b. Unification and lifting c. Turing test [5]

--- Pragmatic Analysis is one of the phases of Natural Language Processing (NLP). It deals with using and understanding sentences in different situations and examines how the interpretation of a sentence is affected by the context in which it is used. - The...

Full solved answer →
207810 marks

Consider following facts: Every traffic chases driver. Every driver who horns is smart. No traffic catches any smart driver. Any traffic who chases some driver but does not catch him frusted. Now configure FoPL knowledge base for above statements. Use resolution algorithm to draw a conclusion that “If all drivers horn, then all traffics are frusted.”[10]

Let us define the predicates: - Traffic(x) : x is a traffic - Driver(x) : x is a driver - Horns(x) : x horns - Smart(x) : x is smart - Chases(x, y) : x chases y - Catches(x, y) : x catches y - Frustrated(x) : x is frustrated --- Natural Language Statement F...

Full solved answer →
207610 marks

How resolution algorithm is used in FOPL to infer conclusion? Consider the facts; Anyone whom Pugu loves is a star. Any hero who does not rehearse does not act. Anmol is a hero. Any hero who does not work does not rehearse. Anyone who does not act is not a star. Convert above into FOPL and use resolution to infer that “If Anmol does not work, then Pugu does not love Anmol”.[10]

Resolution is a refutation-based inference method used in First Order Predicate Logic (FOPL). The steps are: 1. Convert all facts (Knowledge Base) into Conjunctive Normal Form (CNF) 2. Negate the conclusion to be proved 3. Repeatedly apply the resolution ru...

Full solved answer →
2080.110 marks

What do you mean by unification and lifting? Convert following sentences into FOPL: Sushma likes all kinds of practical courses. AI and DBMS are practical courses. Any subject anyone practices is practical course. Ruby practices PHP. Rita practices everything that Ruby practices. Using resolution check whether 'Sushma likes PHP' is inferred or not.[10]

Unification is the process of finding a substitution (a unifier) that makes two or more logical expressions identical. - A substitution $\theta$ is a set of bindings $\{x/term, \dots\}$. - Applying $\theta$ to an expression $P$ gives $\text{SUBST}(\theta, P...

Full solved answer →

Types of Knowledge Representation Systems

20815 marks

How can you represent knowledge using scripts? Create a knowlege base using script based on your own assumption. [5]

A script is a structured knowledge representation technique used in AI to represent stereotyped sequences of events in a particular context. It was introduced by Roger Schank and Robert Abelson (1977). A script describes a typical sequence of events that oc...

Full solved answer →
20805 marks

How knowledge is represented using frames? Represent following knowledge using frames. Ram is name of an employee. His age is 27. He is male. He belongs to the department HR, where the number of employees is 110 and the average salary of the department is Rs. 45000. All departments are under Tribhuvan University. The organization type of Tribhuvan University is Educational. [5]

A frame is a data structure used to represent stereotyped situations or objects. Each frame consists of: - Frame Name: The name of the object or concept being represented - Slots: Attributes or properties of the object - Fillers: Values assigned to those sl...

Full solved answer →
20785 marks

Construct semantic network for following facts: Ram is person. Persons are humans. All human have nose. Humans are instances of mammals. Ram has weight of 60 kg. Weight of Ram is less than weight of Sita. [5]

A semantic network represents knowledge as a graph where: - Nodes represent objects, concepts, or classes - Arcs (links) represent relationships between them - Common relationships: is-a (subclass), instance-of (element of class), and property links --- 1. ...

Full solved answer →
20765 marks

Define frame. How knowledge is encoded in a frame? Justify with an example. [5]

A frame is a data structure used to represent stereotyped situations or objects in Artificial Intelligence. It is a collection of slots (attributes) and slot values (fillers) that together describe an entity, concept, or situation. Frames organize related k...

Full solved answer →
2080.15 marks

What is semantic network? Given following knowledge base, represent it using semantic network. Subash is a student. All students are person. Person has hair. Ram is a player. All player play game. Game is a physical action. Height of all players is larger than the height of all student. Physical action starts from 7:00 AM and ends at 9:00 AM. [5]

A semantic network (or semantic net) is a knowledge representation technique that stores knowledge in the form of a graph, where: - Nodes represent objects, concepts, or situations (physical or abstract) - Arcs (links) represent the relationships between th...

Full solved answer →

Fuzzy Logic

20815 marks

Define fuzzy logic. Construct a fuzzy rule base expert system with your own considerations of fuzzy set. [5]

Fuzzy logic is a form of multi-valued logic derived from fuzzy set theory that deals with approximate reasoning rather than precise (crisp) reasoning. Unlike classical binary logic where variables take only values of 0 (false) or 1 (true), fuzzy logic allow...

Full solved answer →
20795 marks

What is fuzzy logic? Discuss the different operators used in genetic algorithm. [5]

--- Fuzzy Logic is a form of multi-valued logic that deals with approximate reasoning rather than fixed and exact reasoning. Unlike classical (Boolean) logic where variables take only two values (0 or 1, True or False), fuzzy logic allows variables to take ...

Full solved answer →
20765 marks

What do you mean by membership of an element in a fuzzy set? Given a domain of discourse X={10, 20, 30, 40, 50, 60, 70}, construct a fuzzy set from X. Use your own assumptions for defining membership. [5]

The membership of an element in a fuzzy set refers to the degree to which an element belongs to a fuzzy set. Unlike classical (crisp) sets where membership is either 0 or 1, in a fuzzy set, each element is assigned a grade of membership in the range [0, 1]....

Full solved answer →

Propositional Logic

20795 marks

What is forward chaining? Explain with appropriate example. [5]

Forward chaining is a data-driven inference technique used in rule-based systems and knowledge bases. It starts from the known facts (data) and applies inference rules in a forward direction to derive new facts, continuing this process until the goal is rea...

Full solved answer →

Handling Uncertain Knowledge, Radom Variables, Prior and Posterior Probability, Inference using Full Joint Distribution, Bayes' Rule and its use, Bayesian Networks, Reasoning in Belief Networks

20785 marks

What is prosteroir probability? Consider a scenario that a patient have liver disease is 15% probability. A test says that 5% of patients are alcholic. Among those patients diagnosed with liver disease, 7% are alcoholic. Now computer the chance of having liver disease, if the patient is alcoholic. [5]

Symbol Meaning Value ------------------------ $P(L)$ Probability a patient has liver disease $0.15$ $P(A)$ Probability a patient is alcoholic $0.05$ $P(A\mid L)$ Probability a patient is alcoholic given they have liver disease $0.07$ Required: $P(L\mid A)$ ...

Full solved answer →
20765 marks

How uncertain knowledge is represented? Given following full joint probability distribution representing probabilities of having different sizes of CD, find the probability that a CD cover has a length of 130mm given the width is 15mm.

$$\begin{array}{|c|c|c|c|c|}\hline \text{y=Width} & \text{x=Length} & 129 & 130 & 131 \ \hline 15 & & 0.12 & 0.42 & 0.06 \ 16 & & 0.08 & 0.28 & 0.04 \ \hline \end{array}$$

[5]

Full joint probability distribution: y = Width x = 129 x = 130 x = 131 -------------------------------------- 15 0.12 0.42 0.06 16 0.08 0.28 0.04 Check total: $0.12+0.42+0.06+0.08+0.28+0.04 = 1.00$ ✓ Required: $P(\text{Length}=130 \mid \text{Width}=15)$ ---...

Full solved answer →