<< Chapter < Page Chapter >> Page >

Definition (equality of ordered pairs):

Two ordered pairs<a, b>and<c, d>are equal if and only if a = c and b = d. For example, if the ordered pair<a, b>is equal to<1, 2>,   then a = 1, and b = 2.  <1, 2>is not equal to the ordered pair<2, 1>.

Definition (binary relation):

A binary relation from a set A to a set B is a set of ordered pairs<a, b>where a is an element of A and b is an element of B.

When an ordered pair<a, b>is in a relation R, we write a R b, or<a, b>∈R. It means that element a is related to element b in relation R. When A = B, we call a relation from A to B a (binary) relation on A.

Definition (Cartesian product):

The set of all ordered pairs<a, b>, where a is an element of A and b is an element of B, is called the Cartesian product of A and B and is denoted by A × B.

Thus a binary relation from A to B is a subset of Cartesian product A × B.

Examples:

If A = {1, 2, 3} and B = {4, 5}, then {<1, 4>,<2, 5>,<3, 5>}, for example, is a binary relation from A to B.

However, {<1, 1>,<1, 4>,<3, 5>} is not a binary relation from A to B because 1 is not in B.

The parent-child relation is a binary relation on the set of people.<John, John Jr.>, for example, is an element of the parent-child relation if John is the father of John Jr.

Definition of n-ary relation

Here we are going to formally define general n-ary relation using the concept of ordered n-tuple.

Definition (ordered n-tuple): An ordered n-tuple is a set of n objects with an order associated with them. If n objects are represented by x1, x2, ..., xn, then we write the ordered n-tuple as<x1, x2, ..., xn>.

Definition (Cartesian product): Let A1, ..., An be n sets. Then the set of all ordered n-tuples<x1, ..., xn>, where xi ∈Ai for all i, 1 ≤i ≤n , is called the Cartesian product of A1, ..., An, and is denoted by A1 ×... ×An .

Definition (equality of n-tuples): Two ordered n-tuples<x1, ..., xn>and<y1, ..., yn>are equal if and only if xi = yi for all i, 1 ≤i ≤n.

For example the ordered 3-tuple<1, 2, 3>can be equal to only<1, 2, 3>and nothing else. It is not equal to the ordered n-tuple<2, 3, 1>for example.

Definition (n-ary relation): An n-ary relation on sets A1, ..., An is a set of ordered n-tuples<a1, ..., an>where ai is an element of Ai for all i, 1 ≤i ≤n . Thus an n-ary relation on sets A1, ..., An is a subset of Cartesian product A1 ×... ×An .

Example 1: Let A1 be a set of names, A2 a set of addresses, and A3 a set of telephone numbers. Then a set of 3-tuples<name, address, telephone number>such as {<Amy Angels, 35 Mediterranean Ave, 224-1357>,<Barbara Braves, 221 Atlantic Ave, 301-1734>,<Charles Cubs, 312 Baltic Ave, 223-9876>}, is a 3-ary (ternary) relation over A1, A2 and A3.

Example 2: Let A1 be a set of names. Then a set of 1-tuples such as {<Amy>,<Barbara>,<Charles>}, is a 1-ary (unary) relation over A1.

A unary relation represents a property/characteristic, such as tall, rich etc., shared by the members of A1 listed in the relation.

Special relations

The empty set is certainly a set of ordered n-tuples. Therefore it is a relation. It is called the empty relation.

Questions & Answers

1. Discuss the processes involved during exchange of fluids between intra and extracellular space.
Mustapha Reply
what are components of cells
ofosola Reply
twugzfisfjxxkvdsifgfuy7 it
Sami
58214993
Sami
what is a salt
John
the difference between male and female reproduction
John
what is computed
IBRAHIM Reply
what is biology
IBRAHIM
what is the full meaning of biology
IBRAHIM
what is biology
Jeneba
what is cell
Kuot
425844168
Sami
what is biology
Inenevwo
what is sexual reproductive system
James
what is cytoplasm
Emmanuel Reply
structure of an animal cell
Arrey Reply
what happens when the eustachian tube is blocked
Puseletso Reply
what's atoms
Achol Reply
discuss how the following factors such as predation risk, competition and habitat structure influence animal's foraging behavior in essay form
Burnet Reply
cell?
Kuot
location of cervical vertebra
KENNEDY Reply
What are acid
Sheriff Reply
define biology infour way
Happiness Reply
What are types of cell
Nansoh Reply
how can I get this book
Gatyin Reply
what is lump
Chineye Reply
what is cell
Maluak Reply
what is biology
Maluak
what is vertibrate
Jeneba
Got questions? Join the online conversation and get instant answers!
Jobilize.com Reply

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, Discrete structures. OpenStax CNX. Jul 29, 2009 Download for free at http://cnx.org/content/col10768/1.1
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Discrete structures' conversation and receive update notifications?

Ask