Skip to main content Accessibility help
×
Hostname: page-component-76fb5796d-2lccl Total loading time: 0 Render date: 2024-04-28T10:12:09.452Z Has data issue: false hasContentIssue false

5 - Mappings

Published online by Cambridge University Press:  05 June 2012

Mike Piff
Affiliation:
University of Sheffield
Get access

Summary

Introduction

In this chapter, we shall investigate the important class of relations known as mappings or functions. These are relations between two sets such that every possible element of the first set appears in one and only one ordered pair. We can regard the relation as a list, with the first column listing the elements in the domain, and the second listing the values of the function. A mapping is usually specified either by giving a rule for which y appears in each pair (x, y), or, for finite sets, by listing the value of the mapping for each value of x.

Example 5.1 The relation R = {(n, n2): n ∈ ℤ} is a mapping, and the ‘rule’ is to form the pair containing n as first component, square n and take the result as second component.

Example 5.2 Consider the Modula-2 declaration

f:ARRAY[l‥n] OF INTEGER.

This produces n integers f[1], f[2], …, f[n]. These can be regarded as the values of a function f(m) which is only defined when 1 ≤ mn, and this function is represented in the computer by a list f of its values. If n is the number of employees in a firm, m is a payroll number, and f(m) is the salary of employee m, this representation of the salary function would be necessary if there were no obvious formula relating m to f(m).

Type
Chapter
Information
Discrete Mathematics
An Introduction for Software Engineers
, pp. 96 - 137
Publisher: Cambridge University Press
Print publication year: 1991

Access options

Get access to the full version of this content by using one of the access options below. (Log in options will check for institutional or personal access. Content may require purchase if you do not have access.)

Save book to Kindle

To save this book to your Kindle, first ensure coreplatform@cambridge.org is added to your Approved Personal Document E-mail List under your Personal Document Settings on the Manage Your Content and Devices page of your Amazon account. Then enter the ‘name’ part of your Kindle email address below. Find out more about saving to your Kindle.

Note you can select to save to either the @free.kindle.com or @kindle.com variations. ‘@free.kindle.com’ emails are free but can only be saved to your device when it is connected to wi-fi. ‘@kindle.com’ emails can be delivered even when you are not connected to wi-fi, but note that service fees apply.

Find out more about the Kindle Personal Document Service.

  • Mappings
  • Mike Piff, University of Sheffield
  • Book: Discrete Mathematics
  • Online publication: 05 June 2012
  • Chapter DOI: https://doi.org/10.1017/CBO9781139172332.006
Available formats
×

Save book to Dropbox

To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Dropbox.

  • Mappings
  • Mike Piff, University of Sheffield
  • Book: Discrete Mathematics
  • Online publication: 05 June 2012
  • Chapter DOI: https://doi.org/10.1017/CBO9781139172332.006
Available formats
×

Save book to Google Drive

To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Google Drive.

  • Mappings
  • Mike Piff, University of Sheffield
  • Book: Discrete Mathematics
  • Online publication: 05 June 2012
  • Chapter DOI: https://doi.org/10.1017/CBO9781139172332.006
Available formats
×