matrix representation of relation composition

matrix representation of relation composition

\PMlinkescapephrase

composition

\PMlinkescapephrase

Composition

\PMlinkescapephrase

order

\PMlinkescapephrase

Order

\PMlinkescapephrase

reflect

\PMlinkescapephrase

Reflect

\PMlinkescapephrase

relation

\PMlinkescapephrase

Relation

\PMlinkescapephrase

relational composition

\PMlinkescapephrase

Relational composition

\PMlinkescapephrase

representation

\PMlinkescapephrase

Representation

\PMlinkescapephrase

simple

\PMlinkescapephrase

Simple

We have it within our reach to pick up another way of representing 2-adic relations (

http://planetmath.org/RelationTheory

), namely, the representation as

logical matrices

, and also to grasp the

analogy

between relational composition (

http://planetmath.org/RelationComposition2

) and ordinary

matrix multiplication

as it appears in

linear algebra

.

First of all, while we still have the data of a very simple concrete case in mind, let us reflect on what we did in our last Example in order to find the composition

G

∘

H

of the 2-adic relations

G

and

H

.

Here is the setup that we had before:

X

=

Y

=

Z

=

{

1

,

2

,

3

,

4

,

5

,

6

,

7

}

G

=

4

:

3

+

4

:

4

+

4

:

5

⊆

X

×

Y

=

X

×

X

H

=

3

:

4

+

4

:

4

+

5

:

4

⊆

Y

×

Z

=

X

×

X

Let us recall the rule for finding the relational composition of a pair of 2-adic relations. Given the 2-adic relations

P

⊆

X

×

Y

and

Q

⊆

Y

×

Z

, the relational composition of

P

and

Q

, in that order, is written as

P

∘

Q

, or more simply as

P

⁢

Q

, and obtained as follows:

To compute

P

⁢

Q

, in general, where

P

and

Q

are 2-adic relations, simply multiply out the two sums in the ordinary

distributive

algebraic way, but subject to the following rule for finding the

product

of two

elementary

relations of shapes

a

:

b

and

c

:

d

.

(

a

:

b

)

(

c

:

d

)

=

(

a

:

d

)

if

⁢

b

=

c

(

a

:

b

)

(

c

:

d

)

=

0

otherwise

To find the relational composition

G

∘

H

, one may begin by writing it as a quasi-algebraic product:

G

∘

H

=

(

4

:

3

+

4

:

4

+

4

:

5

)

(

3

:

4

+

4

:

4

+

5

:

4

)

Multiplying this out in accord with the applicable form of distributive law one obtains the following expansion:

G

∘

H

=

(

4

:

3

)

(

3

:

4

)

+

(

4

:

3

)

(

4

:

4

)

+

(

4

:

3

)

(

5

:

4

)

+

(

4

:

4

)

(

3

:

4

)

+

(

4

:

4

)

(

4

:

4

)

+

(

4

:

4

)

(

5

:

4

)

+

(

4

:

5

)

(

3

:

4

)

+

(

4

:

5

)

(

4

:

4

)

+

(

4

:

5

)

(

5

:

4

)

Applying the rule that determines the product of elementary relations produces the following array:

G

∘

H

=

(

4

:

4

)

+

0

+

0

+

0

+

(

4

:

4

)

+

0

+

0

+

0

+

(

4

:

4

)

Since the plus sign in this

context

represents an

operation

of logical disjunction or set-theoretic aggregation, all of the

positive

multiplicities

count as one, and this gives the ultimate result:

G

∘

H

=

(

4

:

4

)

With an eye toward extracting a general

formula

for relation composition, viewed here on analogy with algebraic multiplication, let us examine what we did in multiplying the 2-adic relations

G

and

H

together to obtain their relational composite

G

∘

H

.

1

Arrangement

Given the space

X

=

{

1

,

2

,

3

,

4

,

5

,

6

,

7

}

, whose

cardinality

|

X

|

is

7

, there are

|

X

×

X

|

=

|

X

|

⋅

|

X

|

=

7

⋅

7

=

49

elementary relations of the form

i

:

j

, where

i

and

j

range over the space

X

. Although they might be organized in many different ways, it is convenient to regard the

collection

of elementary relations as being arranged in a lexicographic block of the following form:

1

:

1

1

:

2

1

:

3

1

:

4

1

:

5

1

:

6

1

:

7

2

:

1

2

:

2

2

:

3

2

:

4

2

:

5

2

:

6

2

:

7

3

:

1

3

:

2

3

:

3

3

:

4

3

:

5

3

:

6

3

:

7

4

:

1

4

:

2

4

:

3

4

:

4

4

:

5

4

:

6

4

:

7

5

:

1

5

:

2

5

:

3

5

:

4

5

:

5

5

:

6

5

:

7

6

:

1

6

:

2

6

:

3

6

:

4

6

:

5

6

:

6

6

:

7

7

:

1

7

:

2

7

:

3

7

:

4

7

:

5

7

:

6

7

:

7

2

Expansion

The relations

G

and

H

may then be regarded as logical sums of the following forms:

G

=

∑

i

⁢

j

G

i

⁢

j

(

i

:

j

)

H

=

∑

i

⁢

j

H

i

⁢

j

(

i

:

j

)

The notation

∑

i

⁢

j

indicates a logical sum over the collection of elementary relations

i

:

j

, while the factors

G

i

⁢

j

and

H

i

⁢

j

are values in the

boolean domain

𝔹

=

{

0

,

1

}

that are known as the

coefficients

of the relations

G

and

H

, respectively, with regard to the corresponding elementary relations

i

:

j

.

In general, for a 2-adic relation

L

, the coefficient

L

i

⁢

j

of the elementary relation

i

:

j

in the relation

L

will be 0 or 1, respectively, as

i

:

j

is excluded from or included in

L

.

With these conventions in place, the expansions of

G

and

H

may be written out as follows:

G

=

4

:

3

+

4

:

4

+

4

:

5

=

0

(

1

:

1

)

+

0

(

1

:

2

)

+

0

(

1

:

3

)

+

0

(

1

:

4

)

+

0

(

1

:

5

)

+

0

(

1

:

6

)

+

0

(

1

:

7

)

+

0

(

2

:

1

)

+

0

(

2

:

2

)

+

0

(

2

:

3

)

+

0

(

2

:

4

)

+

0

(

2

:

5

)

+

0

(

2

:

6

)

+

0

(

2

:

7

)

+

0

(

3

:

1

)

+

0

(

3

:

2

)

+

0

(

3

:

3

)

+

0

(

3

:

4

)

+

0

(

3

:

5

)

+

0

(

3

:

6

)

+

0

(

3

:

7

)

+

0

(

4

:

1

)

+

0

(

4

:

2

)

+

1

(

4

:

3

)

+

1

(

4

:

4

)

+

1

(

4

:

5

)

+

0

(

4

:

6

)

+

0

(

4

:

7

)

+

0

(

5

:

1

)

+

0

(

5

:

2

)

+

0

(

5

:

3

)

+

0

(

5

:

4

)

+

0

(

5

:

5

)

+

0

(

5

:

6

)

+

0

(

5

:

7

)

+

0

(

6

:

1

)

+

0

(

6

:

2

)

+

0

(

6

:

3

)

+

0

(

6

:

4

)

+

0

(

6

:

5

)

+

0

(

6

:

6

)

+

0

(

6

:

7

)

+

0

(

7

:

1

)

+

0

(

7

:

2

)

+

0

(

7

:

3

)

+

0

(

7

:

4

)

+

0

(

7

:

5

)

+

0

(

7

:

6

)

+

0

(

7

:

7

)

H

=

3

:

4

+

4

:

4

+

5

:

4

=

0

(

1

:

1

)

+

0

(

1

:

2

)

+

0

(

1

:

3

)

+

0

(

1

:

4

)

+

0

(

1

:

5

)

+

0

(

1

:

6

)

+

0

(

1

:

7

)

+

0

(

2

:

1

)

+

0

(

2

:

2

)

+

0

(

2

:

3

)

+

0

(

2

:

4

)

+

0

(

2

:

5

)

+

0

(

2

:

6

)

+

0

(

2

:

7

)

+

0

(

3

:

1

)

+

0

(

3

:

2

)

+

0

(

3

:

3

)

+

1

(

3

:

4

)

+

0

(

3

:

5

)

+

0

(

3

:

6

)

+

0

(

3

:

7

)

+

0

(

4

:

1

)

+

0

(

4

:

2

)

+

0

(

4

:

3

)

+

1

(

4

:

4

)

+

0

(

4

:

5

)

+

0

(

4

:

6

)

+

0

(

4

:

7

)

+

0

(

5

:

1

)

+

0

(

5

:

2

)

+

0

(

5

:

3

)

+

1

(

5

:

4

)

+

0

(

5

:

5

)

+

0

(

5

:

6

)

+

0

(

5

:

7

)

+

0

(

6

:

1

)

+

0

(

6

:

2

)

+

0

(

6

:

3

)

+

0

(

6

:

4

)

+

0

(

6

:

5

)

+

0

(

6

:

6

)

+

0

(

6

:

7

)

+

0

(

7

:

1

)

+

0

(

7

:

2

)

+

0

(

7

:

3

)

+

0

(

7

:

4

)

+

0

(

7

:

5

)

+

0

(

7

:

6

)

+

0

(

7

:

7

)

3

Extraction

Stripping down to the bare essentials, one obtains the following matrices of coefficients for the relations

G

and

H

.

G

=

[

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

1

1

1

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

]

H

=

[

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

1

0

0

0

0

0

0

1

0

0

0

0

0

0

1

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

]

These are the logical matrix representations of the 2-adic relations

G

and

H

.

If the 2-adic relations

G

and

H

are viewed as logical sums, then their relational composition

G

∘

H

can be regarded as a product of sums, a fact that can be indicated as follows:

G

∘

H

=

(

∑

i

⁢

j

G

i

⁢

j

(

i

:

j

)

)

(

∑

i

⁢

j

H

i

⁢

j

(

i

:

j

)

)

.

The composite relation

G

∘

H

is itself a 2-adic relation over the same space

X

, in other words,

G

∘

H

⊆

X

×

X

, and this means that

G

∘

H

must be amenable to being written as a logical sum of the following form:

G

∘

H

=

∑

i

⁢

j

(

G

∘

H

)

i

⁢

j

(

i

:

j

)

.

In this formula,

(

G

∘

H

)

i

⁢

j

is the coefficient of

G

∘

H

with respect to the elementary relation

i

:

j

.

One of the best ways to reason out what

G

∘

H

should be is to ask oneself what its coefficient

(

G

∘

H

)

i

⁢

j

should be for each of the elementary relations

i

:

j

in turn.

So let us pose the question:

(

G

∘

H

)

i

⁢

j

=

What

⁡

?

In order to answer this question, it helps to realize that the indicated product given above can be written in the following

equivalent

form:

G

∘

H

=

(

∑

i

⁢

k

G

i

⁢

k

(

i

:

k

)

)

(

∑

k

⁢

j

H

k

⁢

j

(

k

:

j

)

)

.

A moment’s thought will tell us that

(

G

∘

H

)

i

⁢

j

=

1

if and only if there is an

element

k

in

X

such that

G

i

⁢

k

=

1

and

H

k

⁢

j

=

1

.

Consequently, we have the result:

(

G

∘

H

)

i

⁢

j

=

∑

k

G

i

⁢

k

⁢

H

k

⁢

j

.

This follows from the properties of logical products and sums, specifically, from the fact that the product

G

i

⁢

k

⁢

H

k

⁢

j

is 1 if and only if both

G

i

⁢

k

and

H

k

⁢

j

are 1, and from the fact that

∑

k

F

k

is equal to 1 just in case some

F

k

is 1.

All that remains in order to obtain a computational formula for the relational composite

G

∘

H

of the 2-adic relations

G

and

H

is to collect the coefficients

(

G

∘

H

)

i

⁢

j

over the appropriate basis of elementary relations

i

:

j

, as

i

and

j

range through

X

.

G

∘

H

=

∑

i

⁢

j

(

G

∘

H

)

i

⁢

j

(

i

:

j

)

=

∑

i

⁢

j

(

∑

k

G

i

⁢

k

H

k

⁢

j

)

(

i

:

j

)

.

This is the logical analogue of matrix multiplication in linear algebra, the

difference

in the logical setting being that all of the operations performed on coefficients take place in a system of logical

arithmetic

where summation corresponds to logical disjunction and multiplication corresponds to logical conjunction.

By way of disentangling this formula, one may notice that the form

∑

k

G

i

⁢

k

⁢

H

k

⁢

j

is what is usually called a

scalar product

. In this case it is the scalar product of the

i

th

row of

G

with the

j

th

column of

H

.

To make this statement more concrete, let us go back to the particular examples of

G

and

H

that we came in with:

G

=

[

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

1

1

1

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

]

H

=

[

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

1

0

0

0

0

0

0

1

0

0

0

0

0

0

1

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

]

The formula for computing

G

∘

H

says the following:

(

G

∘

H

)

i

⁢

j

=

the

⁢

i

⁢

j

th

⁢

entry in the matrix representation for

⁢

G

∘

H

=

the entry in the

⁢

i

th

⁢

row and the

⁢

j

th

⁢

column of

⁢

G

∘

H

=

the scalar product of the

⁢

i

th

⁢

row of

⁢

G

⁢

with the

⁢

j

th

⁢

column of

⁢

H

=

∑

k

G

i

⁢

k

⁢

H

k

⁢

j

As it happens, it is possible to make exceedingly light work of this example, since there is only one row of

G

and one column of

H

that are not all zeroes. Taking the scalar product, in a logical way, of the fourth row of

G

with the fourth column of

H

produces the sole non-zero entry for the matrix of

G

∘

H

.

G

∘

H

=

[

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

1

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

]

Title

matrix representation of relation composition

Canonical name

MatrixRepresentationOfRelationComposition

Date of creation

2013-03-22 17:50:28

Last modified on

2013-03-22 17:50:28

Owner

Jon Awbrey (15246)

Last modified by

Jon Awbrey (15246)

Numerical id

21

Author

Jon Awbrey (15246)

Entry type

Example

Classification

msc 68R01

Classification

msc 68P15

Classification

msc 08A02

Classification

msc 05C65

Classification

msc 05B30

Classification

msc 05B20

Classification

msc 03E20

Classification

msc 03B10

Related topic

RelationTheory

Related topic

AlgebraicRepresentationOfRelationComposition

Related topic

GeometricRepresentationOfRelationComposition

Related topic

GraphTheoreticRepresentationOfRelationComposition

Related topic

LogicalMatrix

Generated on Sat Feb 10 12:50:02 2018 by

LaTeXML