Skip to main content Accessibility help
×
Hostname: page-component-77c89778f8-sh8wx Total loading time: 0 Render date: 2024-07-25T02:16:25.430Z Has data issue: false hasContentIssue false

3 - Graphs

Published online by Cambridge University Press:  10 November 2016

Shmuel Tomi Klein
Affiliation:
Bar-Ilan University, Israel
Get access

Summary

Extending the Relationships between Records

In a generalization of the linear lists of the previous chapter, we may allow the connection between any two elements, without insisting on some specific order. The resulting structure is known as a graph. This models quite naturally several real life situations, like networks of communicating computers, or road systems connecting the various locations of some neighborhood.We shall, however, see that a graph may be a useful tool for many other applications, some of which seeming a priori completely unconnected to a graph structure.

Mathematically, a graph G is defined as a pair of sets G = (V, E). There is no restriction on the set V, called the vertices of the graph, and its elements are usually denoted, or simply. The set of edges E satisfies and actually describes whether some binary relation exists between certain pairs of vertices.Wemay have or, in which cases the graph is called empty or full, respectively. Note that this refers only to the number of edges, so a graph may be empty and yet have many vertices. The complexities of algorithms involving graphs are often given as a function of the sizes of V and E, for example, but it has become common practice to simplify this notation to when no confusion can arise.

It is customary, and often very helpful as a visual aid, to represent a graph by a drawing in which the vertices appear as dots or circles, and an edge (a, b) as an arrow from the circle corresponding to a to that of b. Figure 3.1 is such a drawing for a graph with and, and will serve as a running example in this chapter. It should be emphasized that this drawing is not the graph G itself, but rather one of its infinitely many possible representations. Indeed, there are almost no restrictions on the layout of the drawing: the circles representing the vertices are generally scattered in any visually appealing way, the edges may be straight lines or arcs or have any other form, they may cross each other, etc.

Type
Chapter
Information
Publisher: Cambridge University Press
Print publication year: 2016

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.

  • Graphs
  • Shmuel Tomi Klein, Bar-Ilan University, Israel
  • Book: Basic Concepts in Data Structures
  • Online publication: 10 November 2016
  • Chapter DOI: https://doi.org/10.1017/CBO9781316676226.004
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.

  • Graphs
  • Shmuel Tomi Klein, Bar-Ilan University, Israel
  • Book: Basic Concepts in Data Structures
  • Online publication: 10 November 2016
  • Chapter DOI: https://doi.org/10.1017/CBO9781316676226.004
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.

  • Graphs
  • Shmuel Tomi Klein, Bar-Ilan University, Israel
  • Book: Basic Concepts in Data Structures
  • Online publication: 10 November 2016
  • Chapter DOI: https://doi.org/10.1017/CBO9781316676226.004
Available formats
×