Lecture16Sets

# Lecture16Sets - CS2603 Applied Logic for Hardware and Software Rex Page – University of Oklahoma 1 Lecture 16 — CS 2603 Applied Logic for

This preview shows pages 1–6. Sign up to view the full content.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: CS2603 Applied Logic for Hardware and Software Rex Page – University of Oklahoma 1 Lecture 16 — CS 2603 Applied Logic for Hardware and Software A Little Bit of Set Theory CS2603 Applied Logic for Hardware and Software Rex Page – University of Oklahoma 2 What Is a Set? ¡ Axiomatic approach ¢ Postulate the existence of 9 Empty set — a set with no elements 9 Infinite set — a set with an infinite number of elements ¢ Define some set operations ¢ Build all other sets from this starting point ¡ Naïve approach ¢ A set is a collection of elements ¢ There is some way to determine whether or not an element resides in a set ¢ Avoid contradictions by being specific about the universe of discourse path we’ll follow CS2603 Applied Logic for Hardware and Software Rex Page – University of Oklahoma 3 Notation for Sets — Explicit Enumeration ¡ {2, 3, 5, 7, 11} ¢ 2 ∈ {2, 3, 5, 7, 11} — stylized epsilon denotes “element of” ¢ 5 ∈ {2, 3, 5, 7, 11} ¢ 1 ∉ {2, 3, 5, 7, 11} — x ∉ A ↔ ¬ (x ∈ A) ¢ “Long Tall Sally” ∉ {2, 3, 5, 7, 11} ¡ {{“Wha’d I Say”, “Nadine”}, {“Peer Gynt”, “Moonlight Sonata”, “Finlandia”}} = A ¢ {“Wha’d I Say”, “Nadine”} ∈ A ¢ “Moonlight Sonata” ∉ A ¡ { } — the empty set, which has no elements none … nada … the number of elements in { } is zero ¢ 3 ∉ { } ¢ x ∉ { } — no matter what x stands for ¢ ∅ ≡ { } — stylized Greek letter phi denotes empty set ¢ ( ∅ ∈ { }) = True, or ( ∅ ∈ { }) = False ? False There is NOTHING in { } CS2603 Applied Logic for Hardware and Software Rex Page – University of Oklahoma 4 Notation for Sets — Set Comprehension ¡ { x | x ∈ {2, 3, 5, 7, 11} ∧ x ≥ 4} ¢ {5, 7, 11} ¡ { x + x | x ∈ {2, 3, 5, 7, 11} ∧ x ≥ 3 ∧ x < 11} ¢ {6, 10, 14} ¡ {f x | x ∈ A, p x} ¢ Denotes set whose elements have the form (f x), where x comes from A and (p x) has the value True ¡ To avoid contradictions ¢ Predicate (or context) specifies universe of discourse ¢ Examples of invalid set comprehensions 9 {X | X is a set} 9 {X | X ∉ X} 9 Universe of discourse is missing in these examples CS2603 Applied Logic for Hardware and Software Rex Page – University of Oklahoma...
View Full Document

## This note was uploaded on 04/08/2008 for the course CS 2603 taught by Professor Rexpage during the Spring '08 term at The University of Oklahoma.

### Page1 / 15

Lecture16Sets - CS2603 Applied Logic for Hardware and Software Rex Page – University of Oklahoma 1 Lecture 16 — CS 2603 Applied Logic for

This preview shows document pages 1 - 6. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online