15+Slides--Closures%2C+Functions

15+Slides--Closures%2C+Functions - CS103 HO#15...

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: CS103 HO#15 Slides--Closures, Functions 4/13/11 1 Composition of Relations R A B Suppose R is a relation on A x B Composition of Relations S R A B C Suppose R is a relation on A x B and S is a relation on B x C . Composition of Relations S R A B C Suppose R is a relation on A x B and S is a relation on B x C . The composition of R and S , denoted S o R , is a relation on A x C given by: S o R = {( a , c ) A x C | b B (( a, b ) R ( b , c ) S) } c a b Composition of Relations S R A B C Suppose R is a relation on A x B and S is a relation on B x C . The composition of R and S , denoted S o R , is a relation on A x C given by: S o R = {( a , c ) A x C | b B (( a, b ) R ( b , c ) S) } c a b Composition of Relations S R A B C A C S o R Suppose R is a relation on A x B and S is a relation on B x C . The composition of R and S , denoted S o R , is a relation on A x C given by: S o R = {( a , c ) A x C | b B (( a, b ) R (b, c ) S) } Cronus Zeus Poseidon Apollo Asclepius Zeus Poseidon Cronus Apollo Asclepius R R Composition of a Relation with Itself CS103 HO#15 Slides--Closures, Functions 4/13/11 2 Composition of a Relation with Itself Cronus Zeus Poseidon Apollo Asclepius Zeus Poseidon Cronus Apollo Asclepius R R R o R R 2 Composition of a Relation with Itself Cronus Zeus Poseidon Apollo Asclepius Zeus Poseidon Cronus Apollo Asclepius R R R o R R 2 Composition of a Relation with Itself Cronus Zeus Poseidon Apollo Asclepius Zeus Poseidon Cronus Apollo Asclepius R R R o R R 2 R o R 2 R 3 R o ( R o R ) Composition of a Relation with Itself Cronus Zeus Poseidon Apollo Asclepius Zeus Poseidon Cronus Apollo Asclepius R R R o R R 2 R o R 2 R 3 R o ( R o R ) Composition of a Relation with Itself Cronus Zeus Poseidon Apollo Asclepius Zeus Poseidon Cronus Apollo Asclepius R R R o R R 2 Father Grandfather Great-Grandfather R o R 2 R 3 R o ( R o R ) Composition of a Relation with Itself Cronus Zeus Poseidon Apollo Asclepius 5 4 3 1 2 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 1 0 0 Boolean Matrix Multiplication "and" instead of multiplication "or" instead of addition- - - -- - - - -- - - - -- - - - -- - - - - = CS103 HO#15 Slides--Closures, Functions 4/13/11 3 Composition of a Relation with Itself Cronus Zeus Poseidon Apollo Asclepius 5 4 3 1 2 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 1 0 0 Boolean Matrix Multiplication "and" instead of multiplication "or" instead of addition 0 - - - -- 0 - - -- - 0 - -- - - 0 -- - - - 0 = Composition of a Relation with Itself Cronus Zeus Poseidon Apollo Asclepius 5 4 3 1 2 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0...
View Full Document

This note was uploaded on 06/01/2011 for the course EE 103 taught by Professor Plummer during the Spring '11 term at Stanford.

Page1 / 8

15+Slides--Closures%2C+Functions - CS103 HO#15...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online