# Linear Representation of Relational Operations Kenneth A. Presting University of North Carolina at Chapel Hill.

## Presentation on theme: "Linear Representation of Relational Operations Kenneth A. Presting University of North Carolina at Chapel Hill."— Presentation transcript:

Linear Representation of Relational Operations Kenneth A. Presting University of North Carolina at Chapel Hill

Relations on a Domain Domain is an arbitrary set, Ω Relations are subsets of Ω n All examples used today take Ω n as ordered tuples of natural numbers, Ω n = {(a i ) 1≤i≤n | a i  N } All definitions and proofs today can extend to arbitrary domains, indexed by ordinals

Graph of a Relation We want to study relations extensionally, so we begin from the relation’s graph The graph is the set of tuples, in the context of the n- dimensional space n-ary relation → set of n-tuples Examples: x 2 + y 2 = p → points on a circle, in a plane z = nx + my + b → points in a plane, in 3-space

Hyperplanes and Lines Take an n-dimensional Cartesian product, Ω n, as an abstract coordinate space. Then an n-1 dimensional subspace, Ω n-1, is an abstract hyperplane in Ω n. For each point (a 1,…,a n-1 ) in the hyperplane Ω n-1, there is an abstract “perpendicular line,” Ω x {(a 1,…,a n-1 )}

Illustration Graph, Hyperplane, Perpendicular Line, and Slice

Slices of the Graph Let F(x 1,…,x n ) be an n-ary relation Let the plain symbol F denote its graph: F = {(x 1,…,x n )| F(x 1,…,x n )} Let a 1,…,a n-1 be n-1 elements of Ω Then for each variable x i there is a set F x i |a1,…,an-1 = { ω  Ω | F(a 1,…,a i-1,ω,a i,…, a n-1 } This set is the xi’s which satisfy F(…xi…) when all the other variables are fixed

The Matrix of Slices Every n-ary relation defines n set-valued functions on n-1 variables: F x i (v 1,…,v n-1 ) = { ω  Ω | F(v 1,…,v i-1,ω,v i,…,v n-1) } The n-tuple of these functions is called the “matrix of slices” of the relation F

Properties of the Matrix Each slice is a subset of the domain Each function F x i (v 1,…,v n-1 ) : Ω n-1 → 2 Ω maps vectors over the domain to subsets of the domain Application to measure theory

Inverse Map: Matrices to Relations Two-stage process, one step at a time Union across columns in each row: Row F (v 1,…,v n-1 ) = n | i<j → a i = v j U {  Ω n | i=j → a i  F x j (v 1,…,v n-1 ) } j=1 | i>j → a i = v j-1 Union of n-tuples from every row: F = U  Ω n-1 Row F (v 1,…,v n-1 )

Properties of the Slicing Maps Map from relations to matrices is injective but not surjective Inverse map from matrices to relations is surjective but not injective Not all matrices in pre-image of a relation follow it homomorphically in operations

Boolean Operations on Matrices Matrices treated as vectors i.e., Direct Product of Boolean algebras –Component-wise conjunction –Component-wise disjunction –Component-wise complementation

Cylindrical Algebra Operations Diagonal Elements –Images of diagonal relations, operate by logical conjunction with operand relation Cylindrifications –Binding a variable with existential quantifier Substitutions –Exchange of variables in relational expression

The Diagonal Relations Matrix images of an identity relation, x i = x j Example. In four dimensions, x 2 = x 3 maps to: IndexValue of x 1 Value of x 2 Value of x 3 Value of x 4 0,0,0Ω{0} Ω 0,0,1Ω{0} Ω 0,0, …Ω{0} Ω 0,1,0Ω{1} Ω 0,1,1Ω{1} Ω …Ω……Ω

Axioms for Diagonals Universal Diagonal –d κκ = 1 Independence –κ  {λ,μ} → c κ d λμ = d λμ Complementation –κ  λ → c κ (d κλ F) c κ (d κλ ~F) = 0

Cylindrical Identity Elements 1 is the matrix with all components Ω, i.e. the image of a universal relation such as x i =x i 0 is the matrix with all components Ø, i.e. the image of the empty relation

Diagonal Operations are Boolean Boolean conjunction of relation matrix with diagonal relation matrix Example

Substitution is not Boolean Substitution of variables permutes the slices – not a component-wise operation Composition of Diagonal with Substitution s κ λ F = c κ ( d κλ F ) If we assume Boolean arithmetic, then standard matrix multiplication suffices

Boolean Matrix Multiplication Take union down rows, of intersections across columns

Substitution Operators Square matrices, indexed by all variables in all relations Substitution operator is the elementary matrix operator for exchange of columns Example: in a four-dimensional CA, s 3 2 = x1x1 x2x2 x3x3 x4x4 x1x1 ΩØØØ x2x2 ØØΩØ x3x3 ØΩØØ x4x4 ØØØΩ

Axioms for Cylindrification Identity –c κ 0 = 0 Order –F + c κ F = c κ F Semi-Distributive –c κ (F + c κ G) = c κ F + c κ G Commutative –c κ c λ F = c λ c κ F

Instantiation Take an n-ary relation, F = F(x 1,…,x n ) Fix x i = a, that is, consider the n-1-ary relation F |x i =a = F(x 1,…,x i-1,a,x i+1,…,x n ) Each column in the matrix of F |x i =a is: F x j |x i =a (v 1,…,v n-2 ) = F(v 1,…,v j-1,x j,v j,…,v i-1,a,v i+1,…,v n )

Cylindrification as Union Cylindrification affects all slices in every non-maximal column Each slice in F |x i is a union of slices from instantiations: F x j |x i (v 1,…,v n-2 ) = U F x j |x i =a (v 1,…,v n-2 ) a  Ω Component-wise operation

Conclusion When cylindrification is defined as union of instantiations - Matrix representations of relations form a cylindrical algebra.

Similar presentations