Case Representation Cont’d Sources: –Chapter 3 –www.iiia.csic.es/People/enric/AICom.html –www.ai-cbr.org.

Slides:



Advertisements
Similar presentations
Recursive Definitions and Structural Induction
Advertisements

Knowledge Representation
1 NP-completeness Lecture 2: Jan P The class of problems that can be solved in polynomial time. e.g. gcd, shortest path, prime, etc. There are many.
NP-Completeness: Reductions
An NP-completeness Example. The graph CLIQUE problem Undirected Graph G = (V, E) –a clique is a complete subgraph of G Subset V’ of vertices that are.
Department of Computer Science & Engineering
NP-complete and NP-hard problems Transitivity of polynomial-time many-one reductions Concept of Completeness and hardness for a complexity class Definition.
Class Presentations Guidelines:  You should go beyond the assigned material  Prepare for a full class presentation (50 minutes)  to me a draft.
© The McGraw-Hill Companies, Inc., Chapter 8 The Theory of NP-Completeness.
CSC5160 Topics in Algorithms Tutorial 2 Introduction to NP-Complete Problems Feb Jerry Le
Complexity 11-1 Complexity Andrei Bulatov NP-Completeness.
Computability and Complexity 23-1 Computability and Complexity Andrei Bulatov Search and Optimization.
Complexity Theory CSE 331 Section 2 James Daly. Reminders Project 4 is out Due Friday Dynamic programming project Homework 6 is out Due next week (on.
February 23, 2015CS21 Lecture 201 CS21 Decidability and Tractability Lecture 20 February 23, 2015.
Computability and Complexity 15-1 Computability and Complexity Andrei Bulatov NP-Completeness.
NP-complete and NP-hard problems Transitivity of polynomial-time many-one reductions Definition of complexity class NP –Nondeterministic computation –Problems.
NP-Complete Problems Reading Material: Chapter 10 Sections 1, 2, 3, and 4 only.
NP-Complete Problems Problems in Computer Science are classified into
NP-complete and NP-hard problems
1 CSE 417: Algorithms and Computational Complexity Winter 2001 Lecture 23 Instructor: Paul Beame.
NP-Completeness (2) NP-Completeness Graphs 4/17/2017 6:25 AM x x x x x
CSE 421 Algorithms Richard Anderson Lecture 27 NP Completeness.
Clique Cover Cook’s Theorem 3SAT and Independent Set
Hardness Results for Problems
Mgt 20600: IT Management & Applications Databases Tuesday April 4, 2006.
Themes of Presentations Rule-based systems/expert systems (Catie; October 13) Software Engineering () Fuzzy Logic (Mark; Dec. 1) Configuration Systems.
Themes of Presentations Rule-based systems/expert systems (Catie) Software Engineering (Khansiri) Fuzzy Logic (Mark) Configuration Systems (Sudhan) *
The Theory of NP-Completeness 1. Nondeterministic algorithms A nondeterminstic algorithm consists of phase 1: guessing phase 2: checking If the checking.
MCS312: NP-completeness and Approximation Algorithms
1 The Theory of NP-Completeness 2012/11/6 P: the class of problems which can be solved by a deterministic polynomial algorithm. NP : the class of decision.
Nattee Niparnan. Easy & Hard Problem What is “difficulty” of problem? Difficult for computer scientist to derive algorithm for the problem? Difficult.
11 Table 2.1 defines a correspondence between a set of percent scores and a set of letter grades. For each score from 0 to 100, there corresponds only.
Lecture 22 More NPC problems
INHERENT LIMITATIONS OF COMPUTER PROGRAMS CSci 4011.
NP-complete Problems SAT 3SAT Independent Set Hamiltonian Cycle
NP Complexity By Mussie Araya. What is NP Complexity? Formal Definition: NP is the set of decision problems solvable in polynomial time by a non- deterministic.
Prabhas Chongstitvatana1 NP-complete proofs The circuit satisfiability proof of NP- completeness relies on a direct proof that L  p CIRCUIT-SAT for every.
Intelligent Decision Support Systems: A Summary. Case-Based Reasoning Example: Slide Creation Repository of Presentations: -5/9/00: ONR review -8/20/00:
Source for Information Gain Formula Artificial Intelligence: A Modern Approach by Stuart Russell and Peter Norvig Chapter 18: Learning from Observations.
Similarity in CBR (Cont’d) Sources: –Chapter 4 – –
Week 10Complexity of Algorithms1 Hard Computational Problems Some computational problems are hard Despite a numerous attempts we do not know any efficient.
CSE 024: Design & Analysis of Algorithms Chapter 9: NP Completeness Sedgewick Chp:40 David Luebke’s Course Notes / University of Virginia, Computer Science.
EMIS 8373: Integer Programming NP-Complete Problems updated 21 April 2009.
Unit 9: Coping with NP-Completeness
NP-Complete Problems. Running Time v.s. Input Size Concern with problems whose complexity may be described by exponential functions. Tractable problems.
1 Chapter 34: NP-Completeness. 2 About this Tutorial What is NP ? How to check if a problem is in NP ? Cook-Levin Theorem Showing one of the most difficult.
Complete Graphs A complete graph is one where there is an edge between every two nodes A C B G.
1.1 Chapter 3: Proving NP-completeness Results Six Basic NP-Complete Problems Some Techniques for Proving NP-Completeness Some Suggested Exercises.
NP-Completeness (Nondeterministic Polynomial Completeness) Sushanth Sivaram Vallath & Z. Joseph.
Similarity in CBR (Cont’d) Sources: –Chapter 4 – –
CSE 589 Part V One of the symptoms of an approaching nervous breakdown is the belief that one’s work is terribly important. Bertrand Russell.
Chapter 7 Complex Similarity Topix. About this chapter Extends previous discussed methods The reader can choose to read about only specific methods, depending.
Strings Basic data type in computational biology A string is an ordered succession of characters or symbols from a finite set called an alphabet Sequence.
28.
Chapter 11 Introduction to Computational Complexity Copyright © 2011 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1.
NP Completeness Piyush Kumar. Today Reductions Proving Lower Bounds revisited Decision and Optimization Problems SAT and 3-SAT P Vs NP Dealing with NP-Complete.
CSC 413/513: Intro to Algorithms
Lecture 5 Frames. Associative networks, rules or logic do not provide the ability to group facts into associated clusters or to associate relevant procedural.
CSE 421 Algorithms Richard Anderson Lecture 27 NP-Completeness Proofs.
Introduction to NP Instructor: Neelima Gupta 1.
COSC 3101A - Design and Analysis of Algorithms 14 NP-Completeness.
TU/e Algorithms (2IL15) – Lecture 10 1 NP-Completeness, II.
ICS 353: Design and Analysis of Algorithms NP-Complete Problems King Fahd University of Petroleum & Minerals Information & Computer Science Department.
The Theory of NP-Completeness
P & NP.
Knowledge Representation Techniques
Richard Anderson Lecture 26 NP-Completeness
NP-Completeness Yin Tat Lee
NP-Completeness Yin Tat Lee
CSE 6408 Advanced Algorithms.
Presentation transcript:

Case Representation Cont’d Sources: –Chapter 3 – –

Attribute-Value Case Representation Case: a collection of attribute-value pairs Example: Each row in the wait-restaurant table is a case Examples in the IDT context correspond to cases Each attribute is from a certain type. For example:  Integer: all integers or an interval  Real: all numbers or an interval  Symbol: finite set of alternatives (e.g., Thai, Italian,…)  Hypertext: HTML Attributes can be the same for all cases or vary from case to case

Formalization Attributes: A 1, A 2,.., A n Types: T 1, T 2, …, T n Values a 1 in T 1, a 2 in T 2, …, a n in T n A case is defined as follows:  If all cases have the same number of attributes, a case is a vector: (a 1, …, a n ) in T 1  {unknown}  …  T n  {unknown}  If cases have a varying number of attributes, a case is a set: {A p = a p, …, A k = a k } (attributes that are not in the set are considered unknown) Unknown values is the main difference between a case and an example in the sense of IDT

Selection of Attributes Situation description:  Independence: Attributes should represent independent features whenever possible  Completeness: the attributes should be sufficient to determine if the case can be reused in a new situation  Minimalist: The only attributes that should be included in a case are those used in to compute similarity (ex: type of restaurant versus week day) (not always possible: patrons and day of the week are related) (ex: Not including Patrons may make it impossible to learn a hypothesis function) (ex: name of the waitress is not a relevant attribute)

Selection of the Types Selection of the types is defined by the elements needed to compute similarity Symbols:  Ideal for a small number of alternatives (e.g., type of restaurant) Integer/Real  Ideal for measures and other numeric values  Computation of similarity Text:  Ideal for unstructured information  Computation of similarity can be very difficult

Example Case 1 Front-light = doesn’t work Car-type = Golf II, 1.6 Year = 1993 Batteries = 13.6V … Symptoms: Solution: Diagnosis: Front-lights-safeguard = broken Help measures: “Replace front lights safeguard” Symbol: work,doesn’t work Symbol: Golf, Mercedes,… Symbol: 1960, …, 2002 Real: 1V … 30V Text Symbol: ok, broken

Assignment (I): Monday, October 9 th 1.Select a machine that you feel particularly familiar with it (e.g., your PC, the graphic card of your pc). Obtain at least 10 attributes and their types that you feel are relevant to make a diagnosis of a failure for that machine 2.Proof that Vertex-cover is NP-complete (formulate decision problem; proof that is in NP; reduce Clique into Vertex-Cover) (CSE 435) (CSE 335/435)

Vertex-Cover A C B D F G E H Given a graph G, a vertex cover V is a collection of nodes in G such that for every arc (w,v) either w is in V or v is in V or both Vertex-Cover Problem: Given a graph, find the vertex- cover containing the minimum number of nodes

Contents of a Case Generally a case contains specific knowledge about a previous problem solving experience Typically a case contains the following information:  Problem/Situation  Solution  Adequacy Scope of the information:  Complete solution/partial solution  Detail or abstracted solution Representation formalism:  Attribute-value pairs  Structured representation: objects, trees  High-order: predicate logic, plans (example: help-desk systems) (example: planning) Annotations about situations where reusing the case didn’t help or was very helpful

Object-Oriented Representation Objects are described as a fixed collection of attributes A case consists of a collection of objects There are relations between objects in a case  Each object belongs to a class of objects Classes of objects are ordered in a inheritance hierarchy  Subclasses inherit properties of the superclass (example in OOP: instance vs classes) (example in OOP: “this” or “self” and “super”)

Tree Representation Structured representations are needed when there are multiple relations between elements of the problem

Objects and Classes An object class describes the structure of an object through a (finite) collection of attributes and their types An instance (or an object) of an object class assigns values of the corresponding type for each attribute in the class

Example (Objects and Classes) Front-light = doesn’t work Car-type = Golf II, 1.6 Year = 1993 Batteries = 13.6V … Front-light = doesn’t work Car-type = Golf II, 1.6 Year = 1993 Batteries = 13.6V … Instance: Entry # 314 Front-light: symbol Car-type : symbol Year: Symbol Batteries: Real … Front-light: symbol Car-type : symbol Year: Symbol Batteries: Real … Class: Symptoms

Relations Between Objects Relations between objects are important Typical kinds of relations:  Taxonomical relations: “is-a-kind-of” indicates abstraction/refinement relations between objects  Compositional relations: “is-a-part-of” indicates that objects are parts of other objects (example: car is a kind of transportation means) (example: motor is a part of a car)

Compositional Relations Car Fuel systemMotorElectrical system Carburator Exhaust … Compositional relations are described through relational attributes Relational Attributes are attributes whose values are objects

Example (Compositional Relation) Model: symbol Make : symbol Year: Symbol Motor: MotorC … Model: symbol Make : symbol Year: Symbol Motor: MotorC … Class: CarC SerialN: int Liter : real Carburator: CarbC … SerialN: int Liter : real Carburator: CarbC … Class: MotorC Model: Tercel Make : Toyota Year: 1991 Motor: … Model: Tercel Make : Toyota Year: 1991 Motor: … Instance: Toyota Tercel SerialN: Liter : 1.5 Carburator: … … SerialN: Liter : 1.5 Carburator: … … Instance: …

Taxonomical Relations Transportation Means Air trans.Land trans.Sea trans car Sport utility … Taxonomical relations are explicitly represented The subclass inherits all the attributes of the superclass

Example (Taxonomical Relation) Model: symbol Make : symbol Year: Symbol Price: int … Model: symbol Make : symbol Year: Symbol Price: int … Class: CarC Max speed: int horseP: int … Max speed: int horseP: int … Class: Land Transport Max speed: 100 mph horseP: … … Model: Tercel Make : Toyota Year: 1991 Price: $2000 … Max speed: 100 mph horseP: … … Model: Tercel Make : Toyota Year: 1991 Price: $2000 … instance: ToyotaTercel

Analysis of Object-Oriented Case Representations Advantages:  Structured and natural in many domains  Relations between objects are explicitly represented  More compact storage as with attribute-values  Structured relations can be used to define similarity  Disadvantages:  Similarity computation and retrieval can be time costly  Time order cannot be represented  Example domain: design and configuration Example domain: planning

Predicate Logic Representation Problem/Solution from a case can be represented through predicates: Front-light = doesn’t work Car-type = Golf II, 1.6 Year = 1993 Batteries = 13.6V … Symptoms: Solution: Diagnosis: Front-lights-safeguard = broken Help measures: “Replace front lights safeguard” Case( symptoms(frontLight(dw), carType(GolfII_1.6), year(1993), batteries(13.6),…), diagnosis(broken(fls), measures(rfls))) Case: term predicate

Predicate Logic Representation (cont’d) Attribute-value pairs representation of cases can be represented as predicates (each attribute is represented as a term and a predicate “encapsulates” all terms)  Tree can also be represented as predicates (each node is a predicate and the links are terms)  Object representations can also be represented as predicates (terms represent the hierarchical relations)

Predicate Logic Representation (cont’d) Advantages:  As flexible as it gets (I am exaggerating)  Complex structural relations can be represented  Can take advantage of inference mechanism (i.e., prolog) Disadvantages:  Computing similarity can be very complicated  Inference procedures are frequently very time costly  CNF-SAT is NP-complete, thus, SAT is NP-complete. (CSE 435 Homework – Attention: Due on Friday October 8!)

Formulas (SAT): Definition Definition. A Boolean formula is defined recursively as follows: A Boolean variable is a Boolean formula If  1 and  2, are Boolean formulas then:  (  1   2 )  (  1   2 )  (  1   2 ) are also Boolean formulas If  is a Boolean formula then ¬(  ) is a Boolean formula Assume that there are no redundancies in parenthesis Definition. (SAT) Given a Boolean formula , is there an assignment of the variables in  that makes the formula true? Example: ((x  y)  ¬x)  y

Graph Representation Graph representations are useful in many domains: Data flow Planning Query answer Mount Piece on the Lathe machine at position X, Y Rotate machine at Z speed Select drilling tool with M cm head diameter Select trajectory for the tool Can’t be represented as a tree

Analysis of Graph Representations Advantages:  Structured and natural in many domains  Relations between objects are explicitly represented  Structured relations can be used to define similarity Disadvantages:  Similarity computation and retrieval can be time costly  Graph-Subgraph Isomorphism is NP-complete!

Graphs: Definition G = (V, E) Vertices (nodes) Edges (arcs) Edges are a subset of V  V {(v,v’) : v and v’ are in V} We also write v  v’ instead of (v.v’)

Subgraphs Given a graph G = (V, E) and a graph G’ = (V’, E’), G is a subgraph of G’ if: V  V’ E  E’ Every element in the left set is an element in the right set

Graph-Subgraph Isomorphism Two graphs G1 = (V1,E1) and G2 = (V2,E2) are isomorphic if a bijective function f: V1  V2 exists such that: –If (u,v) is in E1 then (f(u),f(v)) is in E2 –If (u’,v’) is in E2 then (f(u’),f(v’)) is in E1 Graph-Subgraph Isomorphism problem SAT: Given two graphs G1 and G2 is G1 isomorphic to a subgraph of G2? Example of 2 isomorphic graphs:

CNF-SAT Circuit-SAT CLIQUE SAT (*) Homework: (*) Show that SAT is NP-complete (See Slide 23) Find the isomorphism between the 2 graphs in Page 28 (Yes this is part of the homework – I had indicated in class mistakenly that shouldn't be done) Show that the Graph Isomorphism problem is in NP (**) Show that Graph-Subgraph Isomorphism is NP-hard Assignment (CSE 435 – Attention: Due on Friday October 8!) Graph-Subgraph SAT (**)