Sets, Relations and Functions

  • Gerard O’ReganEmail author
Part of the Undergraduate Topics in Computer Science book series (UTICS)


This chapter provides an introduction to fundamental building blocks in mathematics such as sets, relations and functions. Sets are collections of well-defined objects; relations indicate relationships between members of two sets A and B; and functions are a special type of relation where there is exactly (or at most) one relationship for each element a ϵ A with an element in B. A set is a collection of well-defined objects that contains no duplicates. A binary relation R (A, B) where A and B are sets is a subset of the Cartesian product (A × B) of A and B. A total function f: AB is a special relation such that for each element a ϵ A there is exactly one element b ϵ B. This is written as f(a) = b. A partial function differs from a total function in that the function may be undefined for one or more values of A.


  1. 1.
    D. Hoffman, D.L. Parnas, in Software Fundamentals, ed. by D. Weiss. Collected Papers by D.L. Parnas (Addison Wesley, Reading, 21)Google Scholar
  2. 2.
    E.F. Codd, A relational model of data for large shared data banks. Commun. ACM 13(6), 377–387 (1970)Google Scholar
  3. 3.
    C.J. Date, in An Introduction to Database Systems. 3rd edn. The Systems Programming Series (1981)Google Scholar
  4. 4.
    G. O’ Regan, Introduction to the History of Computing (Springer, Switzerland, 2016a)Google Scholar
  5. 5.
    G. O’ Regan, Guide to Discrete Mathematics (Springer, Switzerland, 2016b)Google Scholar
  6. 6.
    D. Turner, Miranda, in Proceedings IFIP Conference, Nancy France, Springer LNCS (201) (September 1985)Google Scholar

Copyright information

© Springer International Publishing AG 2017

Authors and Affiliations

  1. 1.SQC ConsultingMallow, County CorkIreland

Personalised recommendations