Editing PEGWiki:Notational conventions

Jump to: navigation, search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 46: Line 46:
  
 
===Graph theory===
 
===Graph theory===
* Vertices in graphs should be given either non-negative integers or letters as labels; letters however must be italicized except when in code blocks. Subscripts on letters are okay: we might for example label the vertices of a bipartite graph as <math>A_1,A_2,A_3,A_4,\ldots,B_1,B_2,B_3,B_4,\ldots</math>, in which edges exist only between <math>A</math>s and <math>B</math>s. Subscripts on numbers, however, are not.
+
* Vertices in graphs should be given either non-negative integers or uppercase letters as labels. The only exception is that the source and sink in flow networks may be denoted with the lowercase letters <math>s</math> and <math>t</math>. When letters are used outside of a code block, they should be wrapped in math tags so they will be italicized. Also, subscripts on letters are okay: we might for example label the vertices of a bipartite graph as <math>A_1,A_2,A_3,A_4,\ldots,B_1,B_2,B_3,B_4,\ldots</math>, in which edges exist only between <math>A</math>s and <math>B</math>s.
 
* An edge in a directed graph is an ordered pair of vertices. For example, if a graph has an edge from <math>A</math> to <math>B</math>, then this can be described as <math>(A,B)</math>. An edge in an undirected graph is an unordered pair, or a set containing two vertices: for example, <math>\{A,B\}</math>. (If self-loops are allowed, then it's actually a multiset.)
 
* An edge in a directed graph is an ordered pair of vertices. For example, if a graph has an edge from <math>A</math> to <math>B</math>, then this can be described as <math>(A,B)</math>. An edge in an undirected graph is an unordered pair, or a set containing two vertices: for example, <math>\{A,B\}</math>. (If self-loops are allowed, then it's actually a multiset.)
 
* A graph is an ordered pair of two sets: <math>V</math> and <math>E</math>. The former is the set of vertices, and the latter the set of edges. We can write <math>G = (V,E)</math> to indicate that the graph <math>G</math> has vertex set <math>V</math> and edge set <math>E</math>. Also, given some graph <math>G</math>, <math>V(G)</math> is the vertex set of <math>G</math>, and <math>E(G)</math> is the edge set of <math>G</math>. An example of a graph is then <math>(\{A,B,C\},\{(A,B),(B,C),(A,C)\})</math>, for which <math>V=\{A,B,C\}</math> and <math>E=\{(A,B),(B,C),(A,C)\}</math>. This graph has vertices <math>A</math>, <math>B</math>, and <math>C</math>, an edge from <math>A</math> to <math>B</math>, an edge from <math>B</math> to <math>C</math>, and an edge from <math>A</math> to <math>C</math>. Note: we can write <math>(A,B) \in E(G)</math> to indicate that there exists an edge from <math>A</math> to <math>B</math>. However, the notation <math>(A,B) \in G</math> is incorrect.
 
* A graph is an ordered pair of two sets: <math>V</math> and <math>E</math>. The former is the set of vertices, and the latter the set of edges. We can write <math>G = (V,E)</math> to indicate that the graph <math>G</math> has vertex set <math>V</math> and edge set <math>E</math>. Also, given some graph <math>G</math>, <math>V(G)</math> is the vertex set of <math>G</math>, and <math>E(G)</math> is the edge set of <math>G</math>. An example of a graph is then <math>(\{A,B,C\},\{(A,B),(B,C),(A,C)\})</math>, for which <math>V=\{A,B,C\}</math> and <math>E=\{(A,B),(B,C),(A,C)\}</math>. This graph has vertices <math>A</math>, <math>B</math>, and <math>C</math>, an edge from <math>A</math> to <math>B</math>, an edge from <math>B</math> to <math>C</math>, and an edge from <math>A</math> to <math>C</math>. Note: we can write <math>(A,B) \in E(G)</math> to indicate that there exists an edge from <math>A</math> to <math>B</math>. However, the notation <math>(A,B) \in G</math> is incorrect.

Please note that all contributions to PEGWiki are considered to be released under the Attribution 3.0 Unported (see PEGWiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

Cancel | Editing help (opens in new window)