Symmetric Relations and Cardinality-Bounded Multisets in Database Systems

Total Page:16

File Type:pdf, Size:1020Kb

Symmetric Relations and Cardinality-Bounded Multisets in Database Systems Symmetric Relations and Cardinality-Bounded Multisets in Database Systems Kenneth A. Ross Julia Stoyanovich Columbia University¤ [email protected], [email protected] Abstract 1 Introduction A relation R is symmetric in its ¯rst two attributes if R(x ; x ; : : : ; x ) holds if and only if R(x ; x ; : : : ; x ) In a binary symmetric relationship, A is re- 1 2 n 2 1 n holds. We call R(x ; x ; : : : ; x ) the symmetric com- lated to B if and only if B is related to A. 2 1 n plement of R(x ; x ; : : : ; x ). Symmetric relations Symmetric relationships between k participat- 1 2 n come up naturally in several contexts when the real- ing entities can be represented as multisets world relationship being modeled is itself symmetric. of cardinality k. Cardinality-bounded mul- tisets are natural in several real-world appli- Example 1.1 In a law-enforcement database record- cations. Conventional representations in re- ing meetings between pairs of individuals under inves- lational databases su®er from several consis- tigation, the \meets" relationship is symmetric. 2 tency and performance problems. We argue that the database system itself should pro- Example 1.2 Consider a database of web pages. The vide native support for cardinality-bounded relationship \X is linked to Y " (by either a forward or multisets. We provide techniques to be im- backward link) between pairs of web pages is symmet- plemented by the database engine that avoid ric. This relationship is neither reflexive nor antire- the drawbacks, and allow a schema designer to flexive, i.e., \X is linked to X" is neither universally simply declare a table to be symmetric in cer- true nor universally false. While an underlying rela- tain attributes. We describe a compact data tion representing the direction of the links would nor- structure, and update methods for the struc- mally be maintained, a view de¯ning the \is linked to" ture. We describe an algebraic symmetric clo- relation would be useful, allowing the succinct speci- sure operator, and show how it can be moved ¯cation of queries involving a sequence of undirected around in a query plan during query optimiza- links. 2 tion in order to improve performance. We de- scribe indexing methods that allow e±cient Example 1.3 Views that relate entities sharing a lookups on the symmetric columns. We show common property, such as pairs of people living in the how to perform database normalization in the same city, will generally de¯ne a symmetric relation presence of symmetric relations. We provide between those entities. 2 techniques for inferring that a view is sym- metric. We also describe a syntactic SQL ex- Example 1.4 Example 1.1 can be generalized to al- tension that allows the succinct formulation of low meetings of up to k people. The k-ary meeting queries over symmetric relations. relationship would be symmetric in the sense that if P = (p1; : : : ; pk) is in the relationship, then so is any column-permutation of P . 2 This¤ research was supported by NSF grants IIS-0120939 and IIS-0121239. Example 1.5 Consider a database recording what Permission to copy without fee all or part of this material is television channel various viewers watch most dur- granted provided that the copies are not made or distributed for ing the 24 hourly timeslots of the day.1 For direct commercial advantage, the VLDB copyright notice and 2 the title of the publication and its date appear, and notice is performance reasons, the database uses a table given that copying is by permission of the Very Large Data Base 1This example is based on a real-world application developed Endowment. To copy otherwise, or to republish, requires a fee by one of the authors, in which there were actually 96 ¯fteen- and/or special permission from the Endowment. minute slots. Proceedings of the 30th VLDB Conference, 2A conventional representation as a set of slots would require Toronto, Canada, 2004 a 24-way join to reconstruct V . 912 V (ID; V iewDate; C1; : : : ; C24) to record the viewer For both of the above proposals, indexed access to (identi¯ed by ID), the date, and the twenty-four chan- an underlying symmetric relationship would require nels most watched, one channel for each hour of the multiple index lookups, one for each symmetric col- day. This table V is not symmetric, because Ci is not umn. interchangeable with Cj: Ci reflects what the viewer A third alternative is to model a symmetric re- was watching at timeslot number i. Nevertheless, there lation as a set [3] or multiset. Instead of record- are interesting queries that could be posed for which ing both R(a; b; c; d; e) and R(b; a; c; d; e), one could this semantic di®erence is unimportant. An example record R0(q; c; d; e), S(a; q), and S(b; q), where q is a might be \Find viewers who have watched channels 2 new surrogate identi¯er, and R0 and S are new ta- and 4, but not channel 5." For these queries, it could bles. The intuition here is that q represents a multi- be bene¯cial to treat V as a symmetric relation in or- set, of which a and b are members according to table der to have access to query plans that are specialized S. Distinct members of the multiset can be substi- to symmetric relations. 2 tuted for the ¯rst two arguments of R. To represent tuples that are their own symmetric complement, such There is a natural isomorphism between symmetric as R(a; a; c; d; e), one inserts S(a; q) twice. This rep- relationships among k entities, and k-element multi- 3 resentation uses slightly more space than the previous sets. We phrase our results in terms of \symmetric proposal, while not resolving the issue of keeping the relations" to emphasize the column-oriented nature of representation consistent under updates. Further, re- the data representation in which columns are inter- constructing the original symmetric relation requires changeable. Nevertheless, our results are equally valid joins. if expressed in terms of \bounded-cardinality multi- We argue that none of these solutions is ideal, and sets". that the database system should be responsible for pro- Sets and multisets have a wide range of uses for viding a \symmetric" table type. There are numerous representing information in databases. Bounded car- advantages to such a scheme: dinality multisets would be useful for applications in which there is a natural limit to the size of multisets. 1. The database system could choose a compact rep- This limit could be implicit in the application (e.g., resentation (such as storing one member of each the number of players in a baseball team), or de¯ned pair of symmetric tuples) and take advantage of as a conservative bound (e.g., the number of children this compactness in reducing the amount of I/O belonging to a parent). We will demonstrate perfor- required. This representation can be used both mance advantages for bounded-element multisets com- for base tables that are identi¯ed as symmetric, pared with conventional relational representations of and for materialized views that can be proven to (unbounded) multisets. be symmetric. Storing a symmetric relation in a conventional database system can be done in a number of possi- 2. The database system could go even further, and ble ways. Storing the full symmetric relation induces add a symmetric-closure operator to the query al- some redundancy in the database: more space is re- gebra. A query plan over a symmetric relation quired (up to a factor of k! for k-ary relationships), and could then be manipulated using algebraic iden- integrity constraints need to be enforced to ensure con- tities so that the symmetric closure is applied as sistency of updates. Updates need to be aware of the late as possible. That way, intermediate results symmetry of the table, and to add the various column will be smaller, and queries will be processed more permutations to all insertions and deletions. Queries e±ciently. need to perform I/O for tuples and their permutations, increasing the time needed for query processing. 3. Integrity would be checked by the database sys- Alternatively, a database schema designer could tem. Single-row updates would be automatically recognize that the relation was symmetric and code propagated to the other column permutations if database procedures to store only one representative necessary. Inconsistencies would be avoided, and tuple for each group of permuted tuples. A view can schema designers would not have to re-implement then be de¯ned to present the symmetric closure of special functionality for each symmetric table in the stored relation for query processing. The update the database. problem remains, because updates through this view 4. The database system could index the multiple would be ambiguous. Updates to the underlying table columns of a symmetric relation in a single index would need to be aware of the symmetry, to avoid stor- structure. As a result, only one index traversal is ing multiple permutations of a tuple, and to perform necessary to locate tuples with a given value for a deletion correctly. For symmetric relations over k some symmetric column. columns, just de¯ning the view (using standard SQL) requires a query of length proportional to k(k!). In this paper, we propose techniques to enable such 3A multiset is a set except that duplicates are allowed. a \symmetric relation" table type. We provide: 913 ² An underlying abstract data type to store the The expressive power of cardinality-bounded sets kernel of a symmetric relation, i.e., a particular has been previously studied in the context of an object- nonredundant subset of the relation.
Recommended publications
  • Principle of Inclusion-Exclusion
    Inclusion / Exclusion — §3.1 67 Principle of Inclusion-Exclusion Example. Suppose that in this class, 14 students play soccer and 11 students play basketball. How many students play a sport? Solution. Let S be the set of students who play soccer and B be the set of students who play basketball. Then, |S ∪ B| = |S| + |B| . Inclusion / Exclusion — §3.1 68 Principle of Inclusion-Exclusion When A = A1 ∪···∪Ak ⊂U (U for universe) and the sets Ai are pairwise disjoint,wehave|A| = |A1| + ···+ |Ak |. When A = A1 ∪···∪Ak ⊂U and the Ai are not pairwise disjoint, we must apply the principle of inclusion-exclusion to determine |A|: |A1 ∪ A2| = |A1| + |A2|−|A1 ∩ A2| |A1 ∪ A2 ∪ A3| = |A1| + |A2| + |A3|−|A1 ∩ A2|−|A1 ∩ A3| −|A2 ∩ A3| + |A1 ∩ A2 ∩ A3| |A1 ∪···∪Am| = |Ai |− |Ai ∩ Aj | + Ai ∩ Aj ∩ Ak ··· ! ! ! " " " " It may be more convenient to apply inclusion/exclusion where the Ai are forbidden subsets of U,inwhichcase . Inclusion / Exclusion — §3.1 69 mmm...PIE The key to using the principle of inclusion-exclusion is determining the right choice of Ai .TheAi and their intersections should be easy to count and easy to characterize. Notation: π = p1p2 ···pn is the one-line notation for a permutation of [n] whose first element is p1,secondelementisp2,etc. Example. How many permutations p = p1p2 ···pn are there in which at least one of p1 and p2 are even? Solution. Let U be the set of n-permutations. Let A1 be the set of permutations where p1 is even. Let A2 be the set of permutations where p2 is even.
    [Show full text]
  • MTH 102A - Part 1 Linear Algebra 2019-20-II Semester
    MTH 102A - Part 1 Linear Algebra 2019-20-II Semester Arbind Kumar Lal1 February 3, 2020 1Indian Institute of Technology Kanpur 1 2 • Matrix A = behaves like the scalar 3 when multiplied with 2 1 1 1 2 1 1 x = . That is, = 3 . 1 2 1 1 1 • Physically: The Linear function f (x) = Ax magnifies the nonzero 1 2 vector ∈ C three (3) times. 1 1 1 • Similarly, A = −1 . So, behaves by changing the −1 −1 1 direction of the vector −1 1 2 2 • Take A = . Do I have a nonzero x ∈ C which gets 1 3 magnified by A? • So I am looking for x 6= 0 and α s.t. Ax = αx. Using x 6= 0, we have Ax = αx if and only if [αI − A]x = 0 if and only if det[αI − A] = 0. √ α − 1 −2 2 • det[αI − A] = det = α − 4α + 1. So α = 2 ± 3. −1 α − 3 √ √ 1 + 3 −2 • Take α = 2 + 3. To find x, solve √ x = 0: −1 3 − 1 √ 3 − 1 using GJE, for instance. We get x = . Moreover 1 √ √ √ 1 2 3 − 1 3 + 1 √ 3 − 1 Ax = = √ = (2 + 3) . 1 3 1 2 + 3 1 n • We call λ ∈ C an eigenvalue of An×n if there exists x ∈ C , x 6= 0 s.t. Ax = λx. We call x an eigenvector of A for the eigenvalue λ. We call (λ, x) an eigenpair. • If (λ, x) is an eigenpair of A, then so is (λ, cx), for each c 6= 0, c ∈ C.
    [Show full text]
  • Inclusion‒Exclusion Principle
    Inclusionexclusion principle 1 Inclusion–exclusion principle In combinatorics, the inclusion–exclusion principle (also known as the sieve principle) is an equation relating the sizes of two sets and their union. It states that if A and B are two (finite) sets, then The meaning of the statement is that the number of elements in the union of the two sets is the sum of the elements in each set, respectively, minus the number of elements that are in both. Similarly, for three sets A, B and C, This can be seen by counting how many times each region in the figure to the right is included in the right hand side. More generally, for finite sets A , ..., A , one has the identity 1 n This can be compactly written as The name comes from the idea that the principle is based on over-generous inclusion, followed by compensating exclusion. When n > 2 the exclusion of the pairwise intersections is (possibly) too severe, and the correct formula is as shown with alternating signs. This formula is attributed to Abraham de Moivre; it is sometimes also named for Daniel da Silva, Joseph Sylvester or Henri Poincaré. Inclusion–exclusion illustrated for three sets For the case of three sets A, B, C the inclusion–exclusion principle is illustrated in the graphic on the right. Proof Let A denote the union of the sets A , ..., A . To prove the 1 n Each term of the inclusion-exclusion formula inclusion–exclusion principle in general, we first have to verify the gradually corrects the count until finally each identity portion of the Venn Diagram is counted exactly once.
    [Show full text]
  • Multipermutations 1.1. Generating Functions
    CORE Metadata, citation and similar papers at core.ac.uk Provided by Elsevier - Publisher Connector JOURNALOF COMBINATORIALTHEORY, Series A 67, 44-71 (1994) The r- Multipermutations SEUNGKYUNG PARK Department of Mathematics, Yonsei University, Seoul 120-749, Korea Communicated by Gian-Carlo Rota Received October 1, 1992 In this paper we study permutations of the multiset {lr, 2r,...,nr}, which generalizes Gesse| and Stanley's work (J. Combin. Theory Ser. A 24 (1978), 24-33) on certain permutations on the multiset {12, 22..... n2}. Various formulas counting the permutations by inversions, descents, left-right minima, and major index are derived. © 1994 AcademicPress, Inc. 1. THE r-MULTIPERMUTATIONS 1.1. Generating Functions A multiset is defined as an ordered pair (S, f) where S is a set and f is a function from S to the set of nonnegative integers. If S = {ml ..... mr}, we write {m f(mD, .... m f(mr)r } for (S, f). Intuitively, a multiset is a set with possibly repeated elements. Let us begin by considering permutations of multisets (S, f), which are words in which each letter belongs to the set S and for each m e S the total number of appearances of m in the word is f(m). Thus 1223231 is a permutation of the multiset {12, 2 3, 32}. In this paper we consider a special set of permutations of the multiset [n](r) = {1 r, ..., nr}, which is defined as follows. DEFINITION 1.1. An r-multipermutation of the set {ml ..... ran} is a permutation al ""am of the multiset {m~ ....
    [Show full text]
  • Basic Operations for Fuzzy Multisets
    Basic operations for fuzzy multisets A. Riesgoa, P. Alonsoa, I. D´ıazb, S. Montesc aDepartment of Mathematics, University of Oviedo, Spain bDepartment of Informatics, University of Oviedo, Spain cDepartment of Statistics and O.R., University of Oviedo, Spain Abstract In their original and ordinary formulation, fuzzy sets associate each element in a reference set with one number, the membership value, in the real unit interval [0; 1]. Among the various existing generalisations of the concept, we find fuzzy multisets. In this case, membership values are multisets in [0; 1] rather than single values. Mathematically, they can be also seen as a generalisation of the hesitant fuzzy sets, but in this general environment, the information about repetition is not lost, so that, the opinions given by the experts are better managed. Thus, we focus our study on fuzzy multisets and their basic operations: complement, union and intersection. Moreover, we show how the hesitant operations can be worked out from an extension of the fuzzy multiset operations and investigate the important role that the concepts of order and sorting sequences play in the basic difference between these two related approaches. Keywords: Fuzzy multiset; Hesitant fuzzy set; Complement; Aggregate union; Aggregate intersection. 1. Introduction The concept of a fuzzy set was originally introduced by Lotfi A. Zadeh as an extension of classical set theory [15]. Fuzzy sets aim to account for real-life situations where there is either limited knowledge or some sort of implicit ambiguity about whether an element should be considered a member of a set. This extension from the classical (or crisp) sets to the fuzzy ones is accomplished by replacing the Boolean characteristic function of a set, which maps each element of the universal set to either 0 (non-member) or 1 (member), with a more sophisticated membership function that maps elements into the real interval [0; 1].
    [Show full text]
  • Finding Direct Partition Bijections by Two-Directional Rewriting Techniques
    View metadata, citation and similar papers at core.ac.uk brought to you by CORE provided by Elsevier - Publisher Connector Discrete Mathematics 285 (2004) 151–166 www.elsevier.com/locate/disc Finding direct partition bijections by two-directional rewriting techniques Max Kanovich Department of Computer and Information Science, University of Pennsylvania, 3330 Walnut Street, Philadelphia, PA 19104, USA Received 7 May 2003; received in revised form 27 October 2003; accepted 21 January 2004 Abstract One basic activity in combinatorics is to establish combinatorial identities by so-called ‘bijective proofs,’ which consists in constructing explicit bijections between two types of the combinatorial objects under consideration. We show how such bijective proofs can be established in a systematic way from the ‘lattice properties’ of partition ideals, and how the desired bijections are computed by means of multiset rewriting, for a variety of combinatorial problems involving partitions. In particular, we fully characterizes all equinumerous partition ideals with ‘disjointly supported’ complements. This geometrical characterization is proved to automatically provide the desired bijection between partition ideals but in terms of the minimal elements of the order ÿlters, their complements. As a corollary, a new transparent proof, the ‘bijective’ one, is given for all equinumerous classes of the partition ideals of order 1 from the classical book “The Theory of Partitions” by G.Andrews. Establishing the required bijections involves two-directional reductions technique novel in the sense that forward and backward application of rewrite rules heads, respectively, for two di?erent normal forms (representing the two combinatorial types). It is well-known that non-overlapping multiset rules are con@uent.
    [Show full text]
  • On Effective Representations of Well Quasi-Orderings Simon Halfon
    On Effective Representations of Well Quasi-Orderings Simon Halfon To cite this version: Simon Halfon. On Effective Representations of Well Quasi-Orderings. Other [cs.OH]. Université Paris-Saclay, 2018. English. NNT : 2018SACLN021. tel-01945232 HAL Id: tel-01945232 https://tel.archives-ouvertes.fr/tel-01945232 Submitted on 5 Dec 2018 HAL is a multi-disciplinary open access L’archive ouverte pluridisciplinaire HAL, est archive for the deposit and dissemination of sci- destinée au dépôt et à la diffusion de documents entific research documents, whether they are pub- scientifiques de niveau recherche, publiés ou non, lished or not. The documents may come from émanant des établissements d’enseignement et de teaching and research institutions in France or recherche français ou étrangers, des laboratoires abroad, or from public or private research centers. publics ou privés. On Eective Representations of Well asi-Orderings ese` de doctorat de l’Universite´ Paris-Saclay prepar´ ee´ a` l’Ecole´ Normale Superieure´ de Cachan au sein du Laboratoire Specication´ & Verication´ Present´ ee´ et soutenue a` Cachan, le 29 juin 2018, par Simon Halfon Composition du jury : Dietrich Kuske Rapporteur Professeur, Technische Universitat¨ Ilmenau Peter Habermehl Rapporteur Maˆıtre de Conferences,´ Universite´ Paris-Diderot Mirna Dzamonja Examinatrice Professeure, University of East Anglia Gilles Geeraerts Examinateur Associate Professor, Universite´ Libre de Bruxelles Sylvain Conchon President´ du Jury Professeur, Universite´ Paris-Sud Philippe Schnoebelen Directeur de these` Directeur de Recherche, CNRS Sylvain Schmitz Co-encadrant de these` Maˆıtre de Conferences,´ ENS Paris-Saclay ` ese de doctorat ED STIC, NNT 2018SACLN021 Acknowledgements I would like to thank the reviewers of this thesis for their careful proofreading and pre- cious comment.
    [Show full text]
  • Math 475 Homework #3 March 1, 2010 Section 4.6
    Student: Yu Cheng (Jade) Math 475 Homework #3 March 1, 2010 Section 4.6 Exercise 36-a Let ͒ be a set of ͢ elements. How many different relations on ͒ are there? Answer: On set ͒ with ͢ elements, we have the following facts. ) Number of two different element pairs ƳͦƷ Number of relations on two different elements ) ʚ͕, ͖ʛ ∈ ͌, ʚ͖, ͕ʛ ∈ ͌ 2 Ɛ ƳͦƷ Number of relations including the reflexive ones ) ʚ͕, ͕ʛ ∈ ͌ 2 Ɛ ƳͦƷ ƍ ͢ ġ Number of ways to select these relations to form a relation on ͒ 2ͦƐƳvƷͮ) ͦƐ)! ġ ͮ) ʚ ʛ v 2ͦƐƳvƷͮ) Ɣ 2ʚ)ͯͦʛ!Ɛͦ Ɣ 2) )ͯͥ ͮ) Ɣ 2) . b. How many of these relations are reflexive? Answer: We still have ) number of relations on element pairs to choose from, but we have to 2 Ɛ ƳͦƷ ƍ ͢ include the reflexive one, ʚ͕, ͕ʛ ∈ ͌. There are ͢ relations of this kind. Therefore there are ͦƐ)! ġ ġ ʚ ʛ 2ƳͦƐƳvƷͮ)Ʒͯ) Ɣ 2ͦƐƳvƷ Ɣ 2ʚ)ͯͦʛ!Ɛͦ Ɣ 2) )ͯͥ . c. How many of these relations are symmetric? Answer: To select only the symmetric relations on set ͒ with ͢ elements, we have the following facts. ) Number of symmetric relation pairs between two elements ƳͦƷ Number of relations including the reflexive ones ) ʚ͕, ͕ʛ ∈ ͌ ƳͦƷ ƍ ͢ ġ Number of ways to select these relations to form a relation on ͒ 2ƳvƷͮ) )! )ʚ)ͯͥʛ )ʚ)ͮͥʛ ġ ͮ) ͮ) 2ƳvƷͮ) Ɣ 2ʚ)ͯͦʛ!Ɛͦ Ɣ 2 ͦ Ɣ 2 ͦ . d.
    [Show full text]
  • PROBLEM SET THREE: RELATIONS and FUNCTIONS Problem 1
    PROBLEM SET THREE: RELATIONS AND FUNCTIONS Problem 1 a. Prove that the composition of two bijections is a bijection. b. Prove that the inverse of a bijection is a bijection. c. Let U be a set and R the binary relation on ℘(U) such that, for any two subsets of U, A and B, ARB iff there is a bijection from A to B. Prove that R is an equivalence relation. Problem 2 Let A be a fixed set. In this question “relation” means “binary relation on A.” Prove that: a. The intersection of two transitive relations is a transitive relation. b. The intersection of two symmetric relations is a symmetric relation, c. The intersection of two reflexive relations is a reflexive relation. d. The intersection of two equivalence relations is an equivalence relation. Problem 3 Background. For any binary relation R on a set A, the symmetric interior of R, written Sym(R), is defined to be the relation R ∩ R−1. For example, if R is the relation that holds between a pair of people when the first respects the other, then Sym(R) is the relation of mutual respect. Another example: if R is the entailment relation on propositions (the meanings expressed by utterances of declarative sentences), then the symmetric interior is truth- conditional equivalence. Prove that the symmetric interior of a preorder is an equivalence relation. Problem 4 Background. If v is a preorder, then Sym(v) is called the equivalence rela- tion induced by v and written ≡v, or just ≡ if it’s clear from the context which preorder is under discussion.
    [Show full text]
  • SNAC: an Unbiased Metric Evaluating Topology Recognize Ability of Network Alignment
    SNAC: An Unbiased Metric Evaluating Topology Recognize Ability of Network Alignment Hailong Li, Naiyue Chen* School of Computer and Information Technology, Beijing Jiaotong University, Beijing 100044, China [email protected], [email protected] ABSTRACT Network alignment is a problem of finding the node mapping between similar networks. It links the data from separate sources and is widely studied in bioinformation and social network fields. The critical difference between network alignment and exact graph matching is that the network alignment considers node mapping in non-isomorphic graphs with error tolerance. Researchers usually utilize AC (accuracy) to measure the performance of network alignments which comparing each output element with the benchmark directly. However, this metric neglects that some nodes are naturally indistinguishable even in single graphs (e.g., nodes have the same neighbors) and no need to distinguish across graphs. Such neglect leads to the underestimation of models. We propose an unbiased metric for network alignment that takes indistinguishable nodes into consideration to address this problem. Our detailed experiments with different scales on both synthetic and real-world datasets demonstrate that the proposed metric correctly reflects the deviation of result mapping from benchmark mapping as standard metric AC does. Comparing with the AC, the proposed metric effectively blocks the effect of indistinguishable nodes and retains stability under increasing indistinguishable nodes. Keywords: metric; network alignment; graph automorphism; symmetric nodes. * Corresponding author 1. INTRODUCTION Network, or graph1, can represent complex relationships of objects (e.g., article reference relationship, protein-protein interaction) because of its flexibility. However, flexibility sometimes exhibits an irregular side, leading to some problems related to graph challenges.
    [Show full text]
  • Relations II
    CS 441 Discrete Mathematics for CS Lecture 22 Relations II Milos Hauskrecht [email protected] 5329 Sennott Square CS 441 Discrete mathematics for CS M. Hauskrecht Cartesian product (review) •Let A={a1, a2, ..ak} and B={b1,b2,..bm}. • The Cartesian product A x B is defined by a set of pairs {(a1 b1), (a1, b2), … (a1, bm), …, (ak,bm)}. Example: Let A={a,b,c} and B={1 2 3}. What is AxB? AxB = {(a,1),(a,2),(a,3),(b,1),(b,2),(b,3)} CS 441 Discrete mathematics for CS M. Hauskrecht 1 Binary relation Definition: Let A and B be sets. A binary relation from A to B is a subset of a Cartesian product A x B. Example: Let A={a,b,c} and B={1,2,3}. • R={(a,1),(b,2),(c,2)} is an example of a relation from A to B. CS 441 Discrete mathematics for CS M. Hauskrecht Representing binary relations • We can graphically represent a binary relation R as follows: •if a R b then draw an arrow from a to b. a b Example: • Let A = {0, 1, 2}, B = {u,v} and R = { (0,u), (0,v), (1,v), (2,u) } •Note: R A x B. • Graph: 2 0 u v 1 CS 441 Discrete mathematics for CS M. Hauskrecht 2 Representing binary relations • We can represent a binary relation R by a table showing (marking) the ordered pairs of R. Example: • Let A = {0, 1, 2}, B = {u,v} and R = { (0,u), (0,v), (1,v), (2,u) } • Table: R | u v or R | u v 0 | x x 0 | 1 1 1 | x 1 | 0 1 2 | x 2 | 1 0 CS 441 Discrete mathematics for CS M.
    [Show full text]
  • Binary Relations and Preference Modeling
    Chapter 2 Binary Relations and Preference Modeling 2.1. Introduction This volume is dedicated to concepts, results, procedures and software aiming at helping people make a decision. It is then natural to investigate how the various courses of action that are involved in this decision compare in terms of preference. The aim of this chapter is to propose a brief survey of the main tools and results that can be useful to do so. The literature on preference modeling is vast. This can first be explained by the fact that the question of modeling preferences occurs in several disciplines, e.g. – in Economics, where one tries to model the preferences of a ‘rational consumer’ [e.g. DEB 59]; – in Psychology in which the study of preference judgments collected in experi- ments is quite common [KAH 79, KAH 81]; – in Political Sciences in which the question of defining a collective preference on the basis of the opinion of several voters is central [SEN 86]; – in Operational Research in which optimizing an objective function implies the definition of a direction of preference [ROY 85]; and – in Artificial Intelligence in which the creation of autonomous agents able to take decisions implies the modeling of their vision of what is desirable and what is less so [DOY 92]. Chapter written by Denis BOUYSSOU and Philippe VINCKE. 49 50 Decision Making Moreover, the question of preference modeling can be studied from a variety of perspectives [BEL 88], including: –a normative perspective, where one investigates preference models that are likely to lead to a ‘rational behavior’; –a descriptive perspective, in which adequate models to capture judgements ob- tained in experiments are sought; or –a prescriptive perspective, in which one tries to build a preference model that is able to lead to an adequate recommendation.
    [Show full text]