{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Global+Optimization+Algorithms+Theory+and+Application_Part24

Global+Optimization+Algorithms+Theory+and+Application_Part24...

Info icon This preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
27.7 Binary Relations 461 searchItem as ( s,S ) = i : S [ i ] = s if s S ( i 1) : ( j 0 ,j<i S [ j ] s ) ( j< len( S ) ,j i S [ j ] >s ) otherwise (27.46) searchItem ds ( s,S ) = i : S [ i ] = s if s S ( i 1) : ( j 0 ,j<i S [ j ] s ) ( j< len( S ) ,j i S [ j ] <s ) otherwise (27.47) Definition 27.25 ( removeListItem ). The function removeListItem( l,q ) finds one occur- rence of an element q in a list l by using the appropriate search algorithm and deletes it (returning a new list m ). m = removeListItem( l,q ) braceleftbigg l if searchItem( q,l ) < 0 deleteListItem( l, searchItem( q,l )) otherwise (27.48) We can further define transformations between sets and lists which will implicitly be used when needed in this book. It should be noted that “setToList” is not the inverse function of listToSet. B = setToList( set A ) ⇒ ∀ a A i : B [ i ] = a i [0 , len( B ) 1] B [ i ] A len(setToList( A )) = | A | (27.49) A = listToSet( list B ) ⇒ ∀ i [0 , len( B ) 1] B [ i ] A a A i [0 .. len( B ) 1] : B [ i ] = a | listToSet( B ) |≤ len( B ) (27.50) 27.7 Binary Relations Definition 27.26 (Binary Relation). A binary 19 relation 20 R is defined as an ordered triple ( A,B,P ) where A and B are arbitrary sets, and P is a subset of the Cartesian product A × B (see Equation 27.25 ). The sets A and B are called the domain and codomain of the relation and P is called its graph. The statement ( a,b ) P : a A b B is read “ a is R -related to b ” and is written as R ( a,b ). The order of the elements in each pair of P is important: If a negationslash = b , then R ( a,b ) and R ( b,a ) both can be true or false independently of each other. Some types and possible properties of binary relations are listed below and illustrated in Figure 27.2 . A binary relation can be [673]: 1. Left-total if a A b B : R ( a,b ) (27.51) 2. Surjective 21 or right-total if b B a A : R ( a,b ) (27.52) 19 http://en.wikipedia.org/wiki/Binary_relation [accessed 2007-07-03] 20 http://en.wikipedia.org/wiki/Relation_%28mathematics%29 [accessed 2007-07-03] 21 http://en.wikipedia.org/wiki/Surjective [accessed 2007-07-03]
Image of page 1

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

View Full Document Right Arrow Icon
462 27 Set Theory left-total surjective non-injective functional non-bijective A B left-total surjective injective functional bijective A B left-total surjective injective non-functional non-bijective A B left-total non-surjective injective functional non-bijective A B not left-total non-surjective injective functional non-bijective A B left-total non-surjective non-injective functional non-bijective A B not left-total non-surjective non-injective non-functional non-bijective A B Figure 27.2: Properties of a binary relation R with domain A and codomain B . 3. Injective 22 if a 1 ,a 2 A,b B : R ( a 1 ,b ) R ( a 2 ,b ) a 1 = a 2 (27.53) 4. Functional if a A,b 1 ,b 2 B : R ( a,b 1 ) R ( a,b 2 ) b 1 = b 2 (27.54) 5. Bijective 23 if it is left-total, right-total and functional.
Image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern