6 views

Uploaded by Nurain Ali

Relationnn

- Spring 2008 Mth301 3 Solution
- Maths 1 (XII)
- Functions as equations
- 2013 Assign 2
- Observability of Systems Involving Flow Circulation_1996_IJMP_ragot
- Relationjjs.ppt
- 2. Function
- 2-1 Relations and Functions_2
- Ques. Chp. 01-Sets and Relations
- s3sol
- Lecture 2 Caculus
- Construction of r
- sra ed 337
- Rusev P.-classical Orthogonal Polynomials and Their Associated Functions in Complex Domain-Sofia (2005)
- Integration With Delta
- Analysis of Constuction of Linear Ldpc
- pp9
- Lecture 6 Notes
- Polynomial Functions Math
- Exponential Functions

You are on page 1of 25

CS 202

Aaron Bloomfield

What is a relation

Let A and B be sets. A binary relation R is a subset of

AB

Example

Let A be the students in a the CS major

A = {Alice, Bob, Claire, Dan}

B = {CS101, CS201, CS202}

A enrolled in class b B

R = { (Alice, CS101), (Bob, CS201), (Bob, CS202),

(Dan, CS201), (Dan, CS202) }

Another relation example:

Let B be the states in the US

We define R to mean a is a city in state b

Thus, the following are in our relation:

(Cville, VA)

(Philadelphia, PA)

(Portland, MA)

(Portland, OR)

etc

integers

Representing relations

We can represent

relations graphically:

We can represent

relations in a table:

CS101

CS201

CS202

Alice

CS101

Bob

Alice

Bob

CS201

Claire

CS202

Claire

Dan

Dan

Not valid functions!

Not all relations are functions

But consider the following function:

a

A function is used when you need to obtain a

SINGLE result for any element in the domain

Example: sin, cos, tan

between the domain and the co-domain

Example: students enrolled in multiple courses

Relations on a set

A relation on the set A is a relation from A to A

In other words, the domain and co-domain are the

same set

We will generally be studying relations of this type

Relations on a set

Let A be the set { 1, 2, 3, 4 }

Which ordered pairs are in the relation R = { (a,b) | a divides b }

R = { (1,1), (1,2), (1,3), (1,4), (2,2), (2,4), (3,3), (4,4) }

1

2

X X X X

4

4

2

3

X

X

X

8

More examples

Consider some relations on the set Z

Are the following ordered pairs in the relation?

(1,1) (1,2) (2,1) (1,-1) (2,2)

R1 = { (a,b) | ab }

R2 = { (a,b) | a>b }

R3 = { (a,b) | a=|b| }

R4 = { (a,b) | a=b }

R5 = { (a,b) | a=b+1 }

R6 = { (a,b) | a+b3 }

X

X

X

X

X

X

X

X

X

9

Relation properties

Six properties of relations we will study:

Reflexive

Irreflexive

Symmetric

Asymmetric

Antisymmetric

Transitive

10

Reflexivity

A relation is reflexive if every element is related

to itself

Or, (a,a)R

=, ,

<, >

11

Irreflexivity

A relation is irreflexive if every element is not related to

itself

Or, (a,a)R

Irreflexivity is the opposite of reflexivity

<, >

=, ,

12

A relation can be neither reflexive nor irreflexive

Some elements are related to themselves, others are

not

13

Symmetry

A relation is symmetric if, for every (a,b)R, then

(b,a)R

Examples of symmetric relations:

=, isTwinOf()

<, >, ,

14

Asymmetry

A relation is asymmetric if, for every (a,b)R,

then (b,a)R

Asymmetry is the opposite of symmetry

Examples of asymmetric relations:

<, >

=, isTwinOf(), ,

15

Antisymmetry

A relation is antisymmetric if, for every (a,b)R,

then (b,a)R is true only when a=b

Antisymmetry is not the opposite of symmetry

Examples of antisymmetric relations:

=, ,

<, >, isTwinOf()

16

A relation can

asymmetric

be

neither

symmetric

or

R = { (a,b) | a=|b| }

This is not symmetric

-4 is not related to itself

4 is related to itself

17

Transitivity

A relation is transitive if, for every (a,b)R and

(b,c)R, then (a,c)R

If a < b and b < c, then a < c

Thus, < is transitive

If a = b and b = c, then a = c

Thus, = is transitive

18

Transitivity examples

Consider isAncestorOf()

Let Alice be Bobs parent, and Bob be Claires parent

Thus, Alice is an ancestor of Bob, and Bob is an ancestor of

Claire

Thus, Alice is an ancestor of Claire

Thus, isAncestorOf() is a transitive relation

Consider isParentOf()

Thus, Alice is a parent of Bob, and Bob is a parent of Claire

However, Alice is not a parent of Claire

Thus, isParentOf() is not a transitive relation

19

=

Reflexive

>

Irreflexive

Symmetric

<

Asymmetric

Antisymmetric

Transitive

20

Combining relations

There are two ways to combine relations R1 and

R2

Via Boolean operators

Via relation composition

21

operators

Consider two relations R and R

We can combine them as follows:

R U R = all numbers OR

Thats all the numbers

Thats all numbers equal to

Thats all numbers not equal to

Thats all numbers strictly greater than

Thats all numbers strictly less than

22

composition

Let R be a relation from A to B, and S be a

relation from B to C

Let a A, b B, and c C

Let (a,b) R, and (b,c) S

Then the composite of R and S consists of the

ordered pairs (a,c)

We denote the relation by S R

Note that S comes first when writing the composition!

23

composition

Let M be the relation is mother of

Let F be the relation is father of

What is M F?

If (b,c) M, then b is the mother of c

Thus, M F denotes the relation maternal grandfather

What is F M?

If (b,c) F, then b is the father of c

Thus, F M denotes the relation paternal grandmother

What is M M?

If (b,c) M, then b is the mother of c

Thus, M M denotes the relation maternal grandmother

24

composition

Given relation R

R R can be denoted by R2

R2 R = (R R) R = R3

Example: M3 is your mothers mothers mother

25

- Spring 2008 Mth301 3 SolutionUploaded bycs619finalproject.com
- Maths 1 (XII)Uploaded byRavi Chaurasia
- Functions as equationsUploaded byNilam Doctor
- 2013 Assign 2Uploaded byAshwini Kumar
- Observability of Systems Involving Flow Circulation_1996_IJMP_ragotUploaded byYaqoob Ali
- Relationjjs.pptUploaded byMahmoud Qousi
- 2. FunctionUploaded byAnurag Kumar
- 2-1 Relations and Functions_2Uploaded byJohnry Dayupay
- Ques. Chp. 01-Sets and RelationsUploaded byRupesh
- s3solUploaded byEric Parker
- Lecture 2 CaculusUploaded byJuan Mercado
- Construction of rUploaded bydeviiser
- sra ed 337Uploaded byapi-248778922
- Rusev P.-classical Orthogonal Polynomials and Their Associated Functions in Complex Domain-Sofia (2005)Uploaded byJuan Diego Cutipa Loayza
- Integration With DeltaUploaded byGovind Gopal
- Analysis of Constuction of Linear LdpcUploaded byNandan_S
- pp9Uploaded byTushaarKumar
- Lecture 6 NotesUploaded bydskingtx
- Polynomial Functions MathUploaded byToni Chinita
- Exponential FunctionsUploaded byReynand F. Maitem
- Growing Scale-Free Networks With Small World BehaviorUploaded byprem
- pastpaper_2013_LQ2.pdfUploaded byJeff Siu
- Beta and Gamma Function Ut-2Uploaded byajay

- 00230513022011Uploaded byNurain Ali
- Earned Value Tutorial ForBPMUploaded byNurain Ali
- Case Study of AirAsiaUploaded bytan_san_8
- Air AsiaUploaded byNurain Ali
- Exercises Final Exam Part1Uploaded byNurain Ali
- Proposal Chapter 2 1Uploaded byNurain Ali
- Stack Data Structure v10Uploaded byNurain Ali
- 12 ReviewUploaded byNurain Ali
- m8-folUploaded byNurain Ali
- Cps270 First Order LogicUploaded byNurain Ali
- ds6Uploaded byNurain Ali
- OSHA Assesment FormUploaded byNurain Ali
- 210ch3part1Uploaded byNurain Ali
- 35-DijkstrasAlgUploaded byNurain Ali
- MCUploaded byNurain Ali
- Discussion Questions Case Study IIUploaded byNurain Ali
- q&a-ch4Uploaded byNurain Ali
- Approval to visit factoryUploaded byNurain Ali
- week10Uploaded byNurain Ali
- Traffic&PedestriansurveysUploaded byNurain Ali

- Digital Image Processing Seminar PPTUploaded bysurz_emperor
- ghugareUploaded bygouthamsai
- Dnvgl Rp f118Uploaded byarockia1977
- C11Uploaded byvijay
- pv simUploaded byserban_el
- Micropile bearing plates.pdfUploaded byrowaters
- Mechanics of Fluids Question Bank.pdfUploaded bySuresh Raju
- fisika_statistik.pdfUploaded byDina Yoona ELiana
- unit 1Uploaded byAlejandra Ortega Ruiz
- the Rcmdr GuideUploaded byJavier Guerrero
- DIMENSIONAL FORMULA.pdfUploaded byHari
- 367345786 Netbeans Regula FalsiUploaded byArima Kousei
- Info on EMI CalculationUploaded byGirinath
- 17-H-Swarupa Vishnusai -Image Fusion Based on Spatial Weightage in NonsubsampledUploaded byAnand Kumar
- ADAM-6022 Manual.pdfUploaded bybrctln
- 10histogramprocessing-120321054215-phpapp01Uploaded byPraveen Pallav
- Oligopoly1 (1)Uploaded byHimanshu Agrawal
- Non Linear Buckling Analysis of RC-SIFCON Column Subjected to Lateral and Axial LoadingUploaded byIRJET Journal
- Computer+Science+2014Uploaded bypavankumar5644
- LTE eRAN7.0 ICIC FeatureUploaded byPham Duy Nhat
- Distribution 3Uploaded byyaswanth
- 10th Sa-1 Mathematics Sample Paper 2012-11Uploaded byTapas Banerjee
- Firm 1Uploaded byPeter G. Mwangi
- Exponential CiphersUploaded byJohn Albert Reyes
- EXAMPLES_2.pdfUploaded bySyed Imtiaz Ali Shah
- ammcUploaded bySrikanth Reddy
- Geo CalcUploaded bykamal
- Java ProgrammingUploaded bySatha Swapna
- Harmonic FunctionsUploaded byacroxmass
- pmp quality management questions.docxUploaded byselinasimpson1901