• Tidak ada hasil yang ditemukan

Discrrete mathematics for Computer Science 08QLogic

N/A
N/A
Protected

Academic year: 2019

Membagikan "Discrrete mathematics for Computer Science 08QLogic"

Copied!
9
0
0

Teks penuh

(1)

Logic with quantifiers

aka

First-Order Logic

Predicate Logic

Quantificational Logic

(2)

Predicates

A

predicate

is a proposition with

variables

For example: P(x,y) := “x+y=0”

(For today, universe is Z = all integers)

P(-4,3) is

(3)

Predicates

A

predicate

is a proposition with

variables

For example: P(x,y) := “x+y=0”

P(-4,3) is False

P(5,-5) is

(4)

Predicates

A

predicate

is a proposition with

variables

For example: P(x,y) := “x+y=0”

P(-4,3) is False

P(5,-5) is True

P(6,-6) ¬P(1,2) is

(5)

Predicates

A

predicate

is a proposition with

variables

For example: P(x,y) := “x+y=0”

P(-4,3) is False

P(5,-5) is True

P(6,-6) ¬P(1,2) is True

(6)

Quantifiers

x Q(x) := “for all x, Q(x)”

That is, Q(x) holds for each and every value of x

x Q(x) := “for some x, Q(x)”

(7)

Quantifiers

is AND-like and is OR-like

If the universe is {Alice, Bob, Carol}

then

x Q(x) is the same as

Q(Alice) Q(Bob) Q(Carol)

x Q(x) is the same as

Q(Alice) Q(Bob) Q(Carol)

In general the universe is infinite …

(8)

Rhetoric and Quantifiers

Let Loves(x,y) := “x loves y”

“Everybody loves Oprah”: x Loves(x, Oprah)

What does “Everybody loves somebody” mean?

x y Loves(x,y)?

y x Loves(x,y)?

“All that glitters is not gold”

x (Glitters(x)

Gold(x)) ?

¬∀

x (Glitters(x) Gold(x)) ?

(9)

Negation and Quantifiers

¬∀

x P(x) x

≡ ∃

P(x)

¬∃

x P(x) x

≡ ∀

P(x)

So negation signs can be pushed in to the

predicates but the quantifiers flip

¬∀

x (Glitters(x) Gold(x))

⤳ ∃

x

(Glitters(x) Gold(x))

⤳ ∃

x

(

Glitters(x) Gold(x)) rewriting “ ”

⤳ ∃

x (Glitters(x)

Gold(x)) by DeMorgan and

double negation

“There is something that glitters and is not gold”

Referensi

Dokumen terkait

The main aim of this paper is to find a tight polygon, with a small number of vertices, to cover E such that the smallest area ellipse which contains the vertices of the polygon is

The edge connectivity of a graph is never more than the minimum degree of the vertices of the graph, since removing all the edges incident on a vertex would disconnect that vertex

Figure 8 – The boundary conditions in the issue on the liquid stream via the barrage with the defected basins The boundary elements disposition drawing for the soil unit at the stream

1 | 2020 23 The 5th South African Nanoscience and Nano- technology Summer School, held in Stellenbosch on 25–29 November 2019, brought together 120 local and international industry

1 | 2020 23 The 5th South African Nanoscience and Nano- technology Summer School, held in Stellenbosch on 25–29 November 2019, brought together 120 local and international industry

2.2 Convert among equivalently powerful notations for a language, including DFAs, NFAs, and context free grammars Lectures, Individual presentations & Brainstorming exercises Quiz ,

©Daffodil International University 15 CHAPTER 03 Background 3.1 Introduction eSchool For Primary Education is an online platform to make students familiar with computers.. This

Some Popular Boolean Operators Formal Name Nickname Arity Symbol Negation operator NOT Unary ¬ Conjunction operator AND Binary  Disjunction operator OR Binary  Exclusive-OR