Logics for Data and Knowledge Representation Introduction to Algebra Chiara Ghidini, Luciano Serafini, Fausto Giunchiglia and Vincenzo Maltese.

Slides:



Advertisements
Similar presentations
Equivalence Relations
Advertisements

Discrete Mathematics Lecture 5 Alexander Bukharovich New York University.
Basic Structures: Sets, Functions, Sequences, Sums, and Matrices
Instructor: Hayk Melikya
(CSC 102) Discrete Structures Lecture 14.
Basic Structures: Sets, Functions, Sequences, Sums, and Matrices
The Engineering Design of Systems: Models and Methods
Relations.
Relations & Their Properties. Copyright © Peter Cappello2 Introduction Let A & B be sets. A binary relation from A to B is a subset of A x B. Let R be.
Denoting the beginning
Sets Definition of a Set: NAME = {list of elements or description of elements} i.e. B = {1,2,3} or C = {x  Z + | -4 < x < 4} Axiom of Extension: A set.
Discrete Structures Chapter 3 Set Theory Nurul Amelina Nasharuddin Multimedia Department.
Lecture 3 Set Operations & Set Functions. Recap Set: unordered collection of objects Equal sets have the same elements Subset: elements in A are also.
Sets, Relation and Functions A set is a collection of objects (elements) or a container of objects. Defining sets –Empty set (Ø): no elements –Universal.
Sets 1.
Sets 1.
modified from UCI ICS/Math 6D, Fall Sets+Functions-1 Sets “Set”=Unordered collection of Objects “Set Elements”
CS104 : Discrete Structures Chapter II Fundamental Structures.
1 Set Theory. 2 Set Properties Commutative Laws: Associative Laws: Distributive Laws:
1 Set Theory. Notation S={a, b, c} refers to the set whose elements are a, b and c. a  S means “a is an element of set S”. d  S means “d is not an element.
Mathematics.
Relations Chapter 9.
Sets, POSets, and Lattice © Marcelo d’Amorim 2010.
Basic Structures: Sets, Functions, Sequences, Sums, and Matrices
Sets Set Operations Functions. 1. Sets 1.1 Introduction and Notation 1.2 Cardinality 1.3 Power Set 1.4 Cartesian Products.
Week 15 - Wednesday.  What did we talk about last time?  Review first third of course.
R. Johnsonbaugh, Discrete Mathematics 5 th edition, 2001 Chapter 2 The Language of Mathematics.
CS 103 Discrete Structures Lecture 10 Basic Structures: Sets (1)
Discrete Mathematics and Its Applications Sixth Edition By Kenneth Rosen Copyright  The McGraw-Hill Companies, Inc. Permission required for reproduction.
Relations, Functions, and Matrices Mathematical Structures for Computer Science Chapter 4 Copyright © 2006 W.H. Freeman & Co.MSCS Slides Relations, Functions.
1.4 Sets Definition 1. A set is a group of objects . The objects in a set are called the elements, or members, of the set. Example 2 The set of positive.
Sets Define sets in 2 ways  Enumeration  Set comprehension (predicate on membership), e.g., {n | n  N   k  k  N  n = 10  k  0  n  50} the set.
Agenda Week 10 Lecture coverage: –Functions –Types of Function –Composite function –Inverse of a function.
Language: Set of Strings
CompSci 102 Discrete Math for Computer Science
Software testing techniques Spring 2009 Csci565: Theory and Practice of Software Testing1.
Sets, Relations, and Lattices
CHAPTER 3 FUZZY RELATION and COMPOSITION. 3.1 Crisp relation Product set Definition (Product set) Let A and B be two non-empty sets, the product.
Relations, Functions, and Matrices Mathematical Structures for Computer Science Chapter 4 Copyright © 2006 W.H. Freeman & Co.MSCS Slides Relations, Functions.
1 Introduction to Abstract Mathematics Sets Section 2.1 Basic Notions of Sets Section 2.2 Operations with sets Section 2.3 Indexed Sets Instructor: Hayk.
Mathematical Preliminaries
Sets and Subsets Set A set is a collection of well-defined objects (elements/members). The elements of the set are said to belong to (or be contained in)
Chapter 2 With Question/Answer Animations. Section 2.1.
Basic Structures: Sets, Functions, Sequences, and Sums.
Sets Definition: A set is an unordered collection of objects, called elements or members of the set. A set is said to contain its elements. We write a.
Discrete Mathematics CS 2610 January 27, part 2.
Discrete Mathematics Set.
Set Theory Concepts Set – A collection of “elements” (objects, members) denoted by upper case letters A, B, etc. elements are lower case brackets are used.
1 Equivalence relations Binary relations: –Let S1 and S2 be two sets, and R be a (binary relation) from S1 to S2 –Not every x in S1 and y in S2 have such.
Relations and Functions ORDERED PAIRS AND CARTESIAN PRODUCT An ordered pair consists of two elements, say a and b, in which one of them, say a is designated.
Module #3 - Sets 3/2/2016(c) , Michael P. Frank 2. Sets and Set Operations.
Set Operations Section 2.2.
Advanced Digital Designs Jung H. Kim. Chapter 1. Sets, Relations, and Lattices.
Week 15 - Wednesday.  What did we talk about last time?  Review first third of course.
Chapter 2 1. Chapter Summary Sets (This Slide) The Language of Sets - Sec 2.1 – Lecture 8 Set Operations and Set Identities - Sec 2.2 – Lecture 9 Functions.
Week 8 - Wednesday.  What did we talk about last time?  Relations  Properties of relations  Reflexive  Symmetric  Transitive.
“It is impossible to define every concept.” For example a “set” can not be defined. But Here are a list of things we shall simply assume about sets. A.
Section 6.1 Set and Set Operations. Set: A set is a collection of objects/elements. Ex. A = {w, a, r, d} Sets are often named with capital letters. Order.
Relations Chapter 9 Copyright © McGraw-Hill Education. All rights reserved. No reproduction or distribution without the prior written consent of McGraw-Hill.
Relations and Their Properties
Citra Noviyasari, S.Si, MT
Chapter 5 Relations and Operations
Sets Section 2.1.
Cartesian product Given two sets A, B we define their Cartesian product is the set of all the pairs whose first element is in A and second in B. Note that.
CS201: Data Structures and Discrete Mathematics I
Session – 2 SETS & Operations of SETS
MCS680: Foundations Of Computer Science
Equivalence relations
REVISION Relation. REVISION Relation Introduction to Relations and Functions.
Foundations of Discrete Mathematics
Presentation transcript:

Logics for Data and Knowledge Representation Introduction to Algebra Chiara Ghidini, Luciano Serafini, Fausto Giunchiglia and Vincenzo Maltese

Roadmap  Set theory  Basic notions  Operations  Properties  Relations  Functions 2

Describing the world 3 KimbaSimba Cita Hunts Eats Monkey Lion Near individuals sets relations

Sets  A set is a collection of elements  The description of a set must be unambiguous and unique: it must be possible to decide whether an element belongs to the set or not The set of odd numbers < 10 The set of students in this room The set of lions in a certain zoo SETS :: RELATIONS :: FUNCTIONS

Describing sets  Listing: the set is described by listing all its elements  Abstraction: the set is described through a common property of its elements  Venn Diagrams: graphical representation that supports the formal description A = {1, 3, 5, 7, 9} A = { x | x is an odd number < 10} A SETS :: RELATIONS :: FUNCTIONS

Basic notions on sets  Empty Set: the set with no elements; A = { } A =   Membership: element a belongs to the set A; A = {a, b, c} a  A  Non membership: element a doesn't belong to the set A A = {b, c} a  A  Equality: the sets A and B contain the same elements; A = {b, c}; B = {b, c}A = B 6 SETS :: RELATIONS :: FUNCTIONS

Basic notions on sets (cont.)  Inequality: the sets A and B contain the same elements; A = {c}; B = {b, c}A ≠ B  Subset: all elements of A belong to B; A = {c}; B = {b, c}A  B  Proper subset: all elements of A belong to B and they are not the same A  B and A ≠ B then A  B  Power set: the set of all the subsets of A A = {a, b} P(A) = { , {a}, {b}, {a, b}} |A| = nthen |P(A)| = 2 n 7 SETS :: RELATIONS :: FUNCTIONS

Operations on sets  Union: the set containing the the members of A or B  Intersection: the set containing the members of both A and B 8 AB a b c d AB a b c d A  B A  B SETS :: RELATIONS :: FUNCTIONS

Operations on sets (cont.)  Difference: the set containing the members of A and not of B  Complement: given a universal set U, the complement of A is the set whose members are the members of U - A. 9 AB a b d A - B c A _A_A U SETS :: RELATIONS :: FUNCTIONS

Exercises  Given A = {t, z} and B = {v, z, t}, say whether the following statements are true or false:  A  B  A  B  z  A  B  v  B  {v}  B  v  A - B  Given A = {a, b, c, d} and B = {c, d, f}  Find a set X such that A  B = B  X. Is this set unique?  Is there any set Y such that A  Y = B ? 10 SETS :: RELATIONS :: FUNCTIONS

Properties of sets  A  A = AA  A = A  A   =  A   = A  A  B = B  AA  B = B  A(commutative)  (A  B)  C = A  (B  C) (A  B)  C = A  (B  C) (associative)  A  (B  C) = (A  B)  (A  C) A  (B  C) = (A  B)  (A  C) (distributive) _____ _ _  A  B = A  B _____ _ _ A  B = A  B (De Morgan laws) 11 SETS :: RELATIONS :: FUNCTIONS

Cartesian product  Cartesian product of A and B: the set of ordered couples (a, b) where a is a member of A and b a member of B A x B = {(a, b) : a  A and b  B}  Notice that A x B ≠ B x A  Example: A = {a, b, c}, B = {s, t} A x B = {(a, s), (a, t), (b, s), (b, t), (c, s), (c, t)} 12 SETS :: RELATIONS :: FUNCTIONS

Relations  A (binary) relation R from set A to set B is a subset of A x B R  A x BxRy indicates that (x, y)  R  The domain of R is the set Dom(R) = {a  A | ∃ b  B s.t. aRb}  The co-domain of R is the set Cod(R) = {b  B | ∃ a  A s.t. aRb} 13 b B a (a,b) ∈ R A SETS :: RELATIONS :: FUNCTIONS

Relations (cont.)  An n-ary relation R n is a subset of A 1 x … x A n n is the arity of the relation  The inverse relation of R  A x B is the relation R -1  B x A where: R -1 = {(b, a) | (a, b)  R} 14 b B a (b, a) ∈ R -1 A SETS :: RELATIONS :: FUNCTIONS

Properties of relations Let R be a binary relation on A, i.e. R  A x A. R is said to be:  reflexive iff aRa ∀ a  A;  symmetric iff aRb implies bRa ∀ a, b  A;  transitive iff aRb and bRc imply aRc ∀ a, b, c  A;  anti-symmetric iff aRb and bRa imply a = b ∀ a, b  A; 15 SETS :: RELATIONS :: FUNCTIONS

Equivalence relations  Given R  A x A, R is an equivalence relation iff it is reflexive, symmetric and transitive.  A partition of a set A is a family F of non-empty subsets of A s.t.:  the subsets are pairwise disjoint  the union of all the subsets is the set A Notice that each element of A belongs to exactly one subset in F.  Given ≡ equivalence relation on A and a  A, the equivalence class of a is the set [a] = {x | a ≡ x} Notice that if x  [a] then [x] = [a]  The quotient set of A w.r.t. ≡ is the set {[x] | x  A} which defines a partition of A. 16 SETS :: RELATIONS :: FUNCTIONS

Order relations  Given R  A x A, R is a (partial) order relation iff it is reflexive, anti-symmetric and transitive.  If the relation holds ∀ a, b  A then it is a total order  If ∀ a, b  A either aRb or bRa or a = b then it is a strict order 17 SETS :: RELATIONS :: FUNCTIONS

Functions  A function f from A to B is a binary relation that associates to each element a in A exactly one element b in B. f : A  B  The image of an element a  A is denoted with f(a)  B Notice that it can be the case that the same element in B is the image of several elements in A. 18 SETS :: RELATIONS :: FUNCTIONS

Functions (cont.)  f: A  B is injective if for distinct elements in A there is a distinct element in B: ∀ a, b  A and a ≠ b then f(a) ≠ f(b)  f: A  B is surjective if for each element in B there is at least one element in A: ∀ b  B ∃ a  A s.t. f(a) = b  f: A  B is bijective if it is injective and surjective. 19 SETS :: RELATIONS :: FUNCTIONS

Functions (cont.)  If f: A  B is bijective we can define its inverse function f -1 : B  A  Given two functions f: A  B and g: B  C, the composition of f and g is the function g ○ f :  C such that: g ○ f = {(a, g(f(a)) | a  A} 20 SETS :: RELATIONS :: FUNCTIONS