Docsity

Discrete Structures Lecture 7: Logic 3, Study notes of Discrete Structures and Graph Theory

Partial preview of the text

Download Discrete Structures Lecture 7: Logic 3 and more Study notes Discrete Structures and Graph Theory in PDF only on Docsity!

Discrete Structures

 - 9/13/ 
  • CSci
    • Lecture
      • Logic

9/13/

Outline^ • More Practice Problems• Negation• Phone Book Revisited

9/13/

4

Abstraction Practice (cont)^ •

A

p

:Person 1

(P(p

) 1 ¶

Q(p

) 1 f E

p

:Person 2

R(p

,p 1

)) 2

  • Wait a minute! What if p

=p 1

•^
A

p

:Person 1

(P(p

Q(p

f E

p

:Person | p 2

Î 1

p

2

•^

R(p

,p 1

  • “If someone is female and a parent, then this

person is someone

else’s mother”

9/13/

Quick Question^ • “Everyone has a best friend”

9/13/

Quick Question^ • “All students in class have taken calculus”• Negate the formal expression, then untranslate

9/13/

Negation Fun^ •

(A

i^

A

j ((i

2 =j

f

((-i)

2 =j

•^
E

i^

(A

j ((i

2 =j

f

((-i)

2 =j

•^
E

i^

E

j^

((i

2 =j

f

((-i)

2 =j

•^
E

i^

E

j^

(i

2 =j

v

((-i)

2 =j

(convert first)

•^
E

i^

E

j ((i

2 =j

((-i)

2 =j

•^
E

i^

E

j ((i

2 =j

((-i)

2 Î

(^2) j

9/13/ And Now For Something CompletelyDifferent…

9/13/

11

The Z Language^ • Given type: [

TypeName]

  • Relation:

j

,^

Function:

f

,^

Partial function:

ß

  • Schema:

SchemaName

____
Æ

State Components

«___Æ

Constraints

–____________
  • Enum:

Boolean ::= True | False

  • Quantification:
A

x:

Z

| x < 1

x