Lecture 4 Flashcards
what is predicate logic?
predicate calculus (first-order-logic) - represents objects and relations between object
what are the set of legitimate symbols in predicate calculus
upper and lower case letters, integers, underscore
what are the 5 types of predicate symbols?
truth, constant, variable, function and predicate symbols
give example of predicate variable T and F
variable - starts with capital
t = true, f = false
what is a predicate?
predicates have arity (# of arguments), if 2 arguments have same name but different arity they are distinct, eg smelly(nemo) and likes(john x) - smelly and likes are predicates, arguments are terms (constant, variable or function), all predicates are true or false.
what are functions in predicate calculus?
they evaluate to a single object called the value NOT true or false, take terms (same as predicates), functions are terms so predicates can take them.
what is an atomic sentence?
predicate of arity n with n terms in parenthesis, seperated by commas are atomis sentences. true and false are atomic sentences
functions are NOT!!
predicate calculus sentences in terms of ^ (down arrow, not symbol, 3 equals, -> ∃, ∀)
S1 and S2 are entences, X is avariable, S1 ^ S2, ∃X S1, ∀X S1, put the rest of the symbols between 2 sentences. are all atomic sentences.
express as predicate calculus expressions
-some cars are red -all bikes are blue -not all scooters are silver
∃X(car(X) ^ red(X))
∀X(bicycle(X) -> blue(X))
scooter (not)∀X(scooter(X) -> silver(X)) or
∃X(scooter(X) -> (not)silver(X))
inferance rules in relation to ∃ and ∀
if a is from domain of X, and ∀X p(X) then p(a) is true
∃X p(X), is true if X is replaced by a new term that doesn’t appear in knowledge base (occurred earlier in proof) (∃ X p(X) ^ ∃X Q(X) (cant select same for Q and P))
what is the procedure of a proof?
combination of an inference rule and an algorythm for applying that rule. applied to logical expressions to generate new sentences.
How do we turn logic problem into search problem?
initial state = knowledge base (sentences), operators = applicable inference rules, goal test - sentence to test, REMEMBER, branching factor increases more knowledge base grows, ∀ can have enormous branching factor (BAD)