Abstract
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: A → B 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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
Notes
- 1.
We distinguish between total and partial functions. A total function f :A → B is defined for every element in A, whereas a partial function may be undefined for one or more values in A.
- 2.
There are mathematical objects known as multi-sets or bags that allow duplication of elements. For example, a bag of marbles may contain three green marbles, two blue and one red marble.
- 3.
The British logician, John Venn, invented the Venn diagram. It provides a visual representation of a set and the various set theoretical operations. Their use is limited to the representation of two or three sets as they become cumbersome with a larger number of sets.
- 4.
The natural numbers, integers and rational numbers are countable sets, whereas the real and complex numbers are uncountable sets.
- 5.
Cartesian product is named after René Descartes who was a famous seventeenth French mathematician and philosopher. He invented the Cartesian coordinates system that links geometry and algebra, and allows geometric shapes to be defined by algebraic equations.
- 6.
We discuss permutations and combinations in Chap. 5.
- 7.
Parnas made important contributions to software engineering in the 1970s. He invented information hiding which is used in object-oriented design.
- 8.
We distinguish between total and partial functions. A total function is defined for all elements in the domain, whereas a partial function may be undefined for one or more elements in the domain.
- 9.
Higher-order functions are functions that take functions as arguments or return a function as a result. They are known as operators (or functionals) in mathematics, and one example is the derivative function dy/dx that takes a function as an argument and returns a function as a result.
- 10.
Monads are used in functional programming to express input and output operations without introducing side effects. The Haskell functional programming language makes use of this feature.
- 11.
This is the most common algorithm used to perform type inference. Type inference is concerned with determining the type of the value derived from the eventual evaluation of an expression.
- 12.
Lisp is a multi-paradigm language rather than a functional programming language.
- 13.
Iverson received the Turing Award in 1979 for his contributions to programming language and mathematical notation. The title of his Turing Award paper was “Notation as a tool of thought”.
References
D. Hoffman, D.L. Parnas, in Software Fundamentals, ed. by D. Weiss. Collected Papers by D.L. Parnas (Addison Wesley, Reading, 21)
E.F. Codd, A relational model of data for large shared data banks. Commun. ACM 13(6), 377–387 (1970)
C.J. Date, in An Introduction to Database Systems. 3rd edn. The Systems Programming Series (1981)
G. O’ Regan, Introduction to the History of Computing (Springer, Switzerland, 2016a)
G. O’ Regan, Guide to Discrete Mathematics (Springer, Switzerland, 2016b)
D. Turner, Miranda, in Proceedings IFIP Conference, Nancy France, Springer LNCS (201) (September 1985)
Author information
Authors and Affiliations
Corresponding author
Rights and permissions
Copyright information
© 2017 Springer International Publishing AG
About this chapter
Cite this chapter
O’Regan, G. (2017). Sets, Relations and Functions. In: Concise Guide to Formal Methods. Undergraduate Topics in Computer Science. Springer, Cham. https://doi.org/10.1007/978-3-319-64021-1_4
Download citation
DOI: https://doi.org/10.1007/978-3-319-64021-1_4
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-64020-4
Online ISBN: 978-3-319-64021-1
eBook Packages: Computer ScienceComputer Science (R0)