Artificial Intelligence Cont4
Artificial Intelligence Cont4
Formal logic is used for reasoning and knowledge representation.[78] Formal logic comes in two
main forms: propositional logic (which operates on statements that are true or false and uses
logical connectives such as "and", "or", "not" and "implies")[79] and predicate logic (which also
operates on objects, predicates and relations and uses quantifiers such as "Every X is a Y" and
"There are some Xs that are Ys").[80]
Deductive reasoning in logic is the process of proving a new statement (conclusion) from other
statements that are given and assumed to be true (the premises).[81] Proofs can be structured as
proof trees, in which nodes are labelled by sentences, and children nodes are connected to parent
nodes by inference rules.
Given a problem and a set of premises, problem-solving reduces to searching for a proof tree
whose root node is labelled by a solution of the problem and whose leaf nodes are labelled by
premises or axioms. In the case of Horn clauses, problem-solving search can be performed by
reasoning forwards from the premises or backwards from the problem.[82] In the more general
case of the clausal form of first-order logic, resolution is a single, axiom-free rule of inference, in
which a problem is solved by proving a contradiction from premises that include the negation of
the problem to be solved.[83]
Inference in both Horn clause logic and first-order logic is undecidable, and therefore intractable.
However, backward reasoning with Horn clauses, which underpins computation in the logic
programming language Prolog, is Turing complete. Moreover, its efficiency is competitive with
computation in other symbolic programming languages.[84]
Fuzzy logic assigns a "degree of truth" between 0 and 1. It can therefore handle propositions that
are vague and partially true.[85]
Non-monotonic logics, including logic programming with negation as failure, are designed to
handle default reasoning.[28] Other specialized versions of logic have been developed to describe
many complex domains.
https://en.wikipedia.org/wiki/Artificial_intelligence 6/65