Skip to main content Accessibility help
×
Hostname: page-component-84b7d79bbc-2l2gl Total loading time: 0 Render date: 2024-07-27T11:30:22.652Z Has data issue: false hasContentIssue false

4 - Relations

Published online by Cambridge University Press:  05 June 2012

Mike Piff
Affiliation:
University of Sheffield
Get access

Summary

Introduction

This chapter will introduce a far-reaching generalization of the concept of a function. Its definition will reflect the fact that it could be implemented on a computer by a list with two columns, one column with entries from one set, and the other column with entries from a second set. This is a simple example of a relational database.

The idea of a cartesian product of two sets introduced in Chapter 3 is a very powerful one, and will enable us to considerably extend the range of applications we can model.

Example 4.1 In a Modula-2 program, several procedures Proc_1, Proc_2, Proc_3, …, are defined. In the definition of Proc_1, there are calls to both Proc_2 and Proc_1 itself. In Proc_2, there are calls to Proc_1 and Proc_3. In Proc_3, there are calls to Proc_2, and Proc_5, and so on. It is required to find the exact dependency of each procedure on any others, both directly and indirectly.

If we can tabulate the direct dependencies, then we can find all of the indirect ones too, by chasing through chains of direct calls. To find the effect of a call of any procedure, we merely need to create a list or database of pairs of procedure names, listing (Proc_i, Proc_j) whenever Proc_i calls Proc_j. The list is as in Figure 4.1.

Type
Chapter
Information
Discrete Mathematics
An Introduction for Software Engineers
, pp. 64 - 95
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.

  • Relations
  • Mike Piff, University of Sheffield
  • Book: Discrete Mathematics
  • Online publication: 05 June 2012
  • Chapter DOI: https://doi.org/10.1017/CBO9781139172332.005
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.

  • Relations
  • Mike Piff, University of Sheffield
  • Book: Discrete Mathematics
  • Online publication: 05 June 2012
  • Chapter DOI: https://doi.org/10.1017/CBO9781139172332.005
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.

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