Quiz Logic Flashcards
p -> q ==
-p v q
Universal Quantification
“for all”, “for every”, “for each”
upsidedown A
Existential Quantification
backwards E
“for some”, “there exists”, “there is one”
Monotonic
in logic systems means can a truth ever be retracted
Converse (of an implication)
is obtained by reversing the roles of the premise and conclusion. Example p -> q becomes q -> p.
Inverse (of an implication)
is obtain by negating the premise and the conclusion. -p -> -q
Contrapositive of p -> q
-q -> -p
Converse, Inverse and Contrapositive of p -> q. Which are always equal?
Converse = q -> p
Inverse = -p -> -q
Contrapositive = -q -> -p
Contrapositive is equivalent to p -> q
Statements that are always true or false under the same conditions are called?
tautologies. example p->q == -p v q
Associative Law
(p v q) v r = ?
(p ^ q) ^ r = ?
(p v q) v r == p v (q v r) == p v (q v r)
or
(p ^ q) ^ r == p ^ (q ^ r)
Distributive Laws
p v (q ^ r) = ?
p ^ (q v r) = ?
p v (q ^ r) == (p v q) ^ (p v r)
or
p ^ (q v r) == (p ^ q) v (p ^ r)
De Morgan’s Laws
-(p ^ q) == -p v -q
or
-(p v q) == -p ^ - q
p <> q ==
(p -> q) ^ (q -> p)
or
(-p v q) ^ (-q v p)
Resolution and how it works?
method assumes that the premises are true and what we are trying to prove is false, and then try to find a contradiction. If we find a contradiction then the proof is true.
An expression is in clausal form if there is no
implication ( -> )
conjunction ( ^ )
double negation - (-)
Steps to convert to CNF?
- Remove Biconditional a b == (a -> b) ^ (b -> a)
- Remove Implication a -> b == -a v b
- Move Negation Inwards -(a v b) == -a ^ -b
or
-(a ^ b) == -a v -b
or
-(-a) == a - Apply Distribution and/or communitive law
a ^ (b v y) == (a ^ b) v (a ^ y)
or
a v (b ^ y) == (a v b) ^ (a v y)
CNF Step 1
Remove Biconditional
CNF Step 2
Remove Implication
CNF Step 3
Move Negation Inwards
CNF Step 4
Apply Distribution and/or Communitive Law
Forward Chaining
Bottom Up approach. Data driven thru knowledge base to check assertion
Backward Chaining
Top Down approach. Goal driven. Divide Goal into Sub goals. seems to use recursion
closed world assumption
means that the database contains all knowledge there is
monotonic vs non-monotonic
in a monotonic KB the conclusions can never be removed. in non-monotonic kb the assertions to be revooked
resolution with predicate logic
derive a contradiction by finding clauses that resolve to the empty clause
Aspects of a good knowledge base
transparent (easy to understand)
we can detect it (understand how it got to where it is, or what choice it is suggesting… etc.)
it should be easy to relate to the real world entities it represents knowledge of
extentional
explicit and specific 1, 3, 5, 7
intensional
implicit (implied) short compact Natural Odd Numbers < 9
executability vs comprehensibility
program can do it but can we know how?
Types of knowledge representations
graphical sketches graphs conceptual graphs concept maps search trees
logic
production systems
oo
frames
scripts
semantic networks
agents
graphical sketchs
good for humans, suppress data detals
graphs
bridges of Konigsberg and search trees
decision tree
yes no type flow chart
production system
require control system and a database
rule set
What was the first OO Language? What tools does OO offer?
small talk first purely OO language 1969.
Inheritance, Encapsulation, Polymorphism, separation of interface and implementation
frames
objects are the same but differ only in the specific details. Frames give a method to store this. Can be represent as networks of nodes and relations
weakness of frames
world is messy, definitions are important and getting them right first is hard. Cancelling default values is harder than it looks. As changes must percolate through the system
Semantic Networks are often used in
natural language processing and knowledge classification, and can allow capture of arbitrary or complex associations
Concept Maps Smart Books
develop concept map via interviews with subject matter experts.
translate final concept map Hypercard/Toolbox
Implement Working prototype
test with students
Agents
independent programs/systems that specialize in small tasks, that when work together can solve larger problems. Agent acts intelligently (AI) Agents remember what they did and what inputs caused them to do it. Used in P2P Financial Trading
The Major Components Of An AI Production System
Global Database
Rule Set
Control System
Characteristics of expert systems:
High performance
Highly responsive
Reliable
Understandable