Gca24 1
Gca24 1
Fundamentals
Real RAM Model. RAM stands for random access machine, that is a machine whose
memory cells are indexed by integers, and any specified cell can be accessed in constant
time. “Real” means that each cell can store a real number. Any single arithmetic opera-
tion (addition, subtraction, multiplication, division, and k-th root, for small constant k)
or comparison can be computed in constant time. 1
This is a quite powerful model of computation, as a single real number in principle can
encode an arbitrary amount of information. On the positive side, it allows to abstract
1
In addition, sometimes also logarithms, other analytic functions, indirect addressing (integral), or floor
and ceiling are used. As adding some of these operations makes the model more powerful, it is usually
specified and emphasized explicitly when an algorithm uses them.
9
Chapter 1. Fundamentals Geometry: C&A 2024
from the lowlands of numeric and algebraic computation and to concentrate on the
algorithmic core from a combinatorial point of view.
But there are also downsides. First, the model is somewhat unrealistic, and it poses
a challenge to efficiently implement an algorithm designed for it on an actual computer.
With bounded memory there is no way to represent general real numbers explicitly,
and operations using a symbolic representation can hardly be considered constant time.
Therefore we have to ensure that we do not abuse the power of this model. For instance,
we may want to restrict the numbers that are manipulated by any single arithmetic
operation to be some fixed polynomial in the numbers that appear in the input.
Second, it is difficult if not impossible to derive reasonable lower bounds in the real
RAM model. So when interested in lower bounds, it is convenient to use a different, less
powerful model of computation. One such model is the computation tree model, which
encompasses and explicitly represents all possible execution paths of an algorithm.
Algebraic Computation Trees (Ben-Or [1]). A model is as a rooted binary tree, where each
node has at most two children. The computation starts at the root and proceeds down
to leaves.
• Every node v with one child has an associated operation
√ a−b
in +, −, ∗, /, , . . .. The operands of this operation are
constant input values, or among v’s ancestors in the tree.
≤0
• Every node v with two children is associated with a
branching of the form > 0, ⩾ 0, or = 0. The branch
is with respect to the result of v’s parent node. If the a−c b−c
expression yields true, the computation continues with
the left child of v; otherwise, it continues with the right ≤0 ≤0
child of v.
The term decision tree is used if all of the final results (leaves) are either true or
false. If every branch is based on a linear function in the input values, we face a linear
decision tree. Analogously one can define, say, quadratic decision trees.
The complexity of a computation or decision tree is the maximum number of nodes
among all root-to-leaf paths. It is well known that Ω(n log n) comparisons are required
to sort n numbers. But also for some problems that appear easier than sorting at first
glance, the same lower bound holds. Consider, for instance, the following problem.
Element Uniqueness
Input: {x1 , . . . , xn } ⊂ R, n ∈ N.
Output: Is xi = xj , for some i, j ∈ {1, . . . , n} with i ̸= j?
Ben-Or [1] has shown that any algebraic decision tree to solve Element Uniqueness
for n elements has complexity Ω(n log n).
10
Geometry: C&A 2024 1.2. Basic Geometric Objects
We will mostly be concerned with the d-dimensional Euclidean space Rd for small d ∈ N;
typically d = 2 or d = 3. The basic objects of interest in Rd are the following.
What is the difference between a point and a vector? Mathematically they are both
elements of Euclidean space Rd , hence they are the same. The different terms are used
to indicate how we think of such an element in a given context. We think of a point
as a location in space (a “dot”), while we think of a vector as a translation in space (an
“arrow” starting from the origin). The point view is dominant in geometry. But since
every point can be understood as a vector (the arrow from the origin to the dot), we can
seamlessly apply vector space operations (addition, scalar multiplication) to points; and
the resulting vector can be cast as a point again (the dot at the arrowhead). There are a
number of sources that insist differentiating points and vectors, and they are right when
it comes to how we interpret them. But when it comes to what they actually are, there
is no need to make a difference.
While any pair of distinct points defines a unique line, a line in R2 contains infinitely
many points and so it may happen that a collection of three or more points lie on a line.
Such a collection of points is termed collinear 2 .
2
Not colinear, which refers to a notion in the theory of coalgebras.
11
Chapter 1. Fundamentals Geometry: C&A 2024
to be nonzero. Otherwise, the equation is satisfied by either all points (if hd+1 = 0) or
no point (if hd+1 ̸= 0), which we call a degenerate hyperplane. Degeneracy is useful in
some contexts, and we will explicitly say so where we allow them. If we change “=” in
the definition to “⩾”, the obtained object is called a halfspace (or halfplane in R2 ).
Spheres and balls. A sphere is the set of all points that are equidistant to a fixed point.
It can be described by its center c ∈ Rd and radius r ∈ R as the point set {x ∈ Rd :
∥x−c∥ = r}. Likewise, the ball of radius r around c is the point set {x ∈ Rd : ∥x−c∥ ⩽ r}.
In R2 , spheres and balls are called circles and disks, respectively.
1.3 Topology
In this section we review some basic concepts and notation from set-theoretic topology,
on a level of what you also encounter in courses on real analysis typically. These concepts
arise here and there, for instance, when we formalize intuitive objects such as “curves”
and “polygons”. They are also indispensible when we study certain abstract objects such
as convex sets.
A set P ⊆ Rd is bounded, if it is contained in some ball Br := {x ∈ Rd : ∥x∥ ⩽ r} of
radius r > 0 around the origin.
A point p ∈ Rd is interior to P ⊆ Rd , if for some ε > 0, there exists a ball
Bε (p) = {x ∈ Rd : ∥x − p∥ ⩽ ε} around it that is completely contained in P. A set is
open if all of its points are interior; and it is closed if its complement is open. Beware
that a set can be both open and closed (e.g. Rd ), or neither open nor closed (e.g. the
interval (0, 1] in one-dimension).
Finally, a set is compact if it is both bounded and closed. An important fact from
analysis states that every continuous function from a compact set P ⊆ Rd to R attains
its minimum/maximum at some point p ∈ P.
Exercise 1.1. Determine for each of the following sets whether they are open or closed
in R2 . a) B1 (0) b) {(1, 0)} c) R2 d) R2 \Z2 e) R2 \Q2 f ) {(x, y) : x ∈ R, y ⩾ 0}
12
Geometry: C&A 2024 1.4. Graphs
Exercise 1.2. Show that the union of countably many open sets in Rd is open. Show
that the union of a finite number of closed sets in Rd is closed. (For the curious
reader: These are two of the axioms of an abstract topology. So here we show
that the Euclidean space is a topology.) What follows for intersections of open and
closed sets? Finally, show that the union of countably many closed sets in Rd is
not necessarily closed.
Exercise 1.3. Show that for any P ⊆ Rd the interior P◦ is open, and the closure P is
closed. (Why is there something to show to begin with?)
1.4 Graphs
Next we review some basic definitions and properties of graphs. For more details and
proofs, refer to any standard textbook on graph theory [2, 3, 5].
A (simple undirected) graph G = (V, E) is defined on a set V of vertices whose
pairwise relations are captured by the set E ⊆ V2 of edges. Unless stated otherwise, V
is always finite. Two vertices u, v are adjacent if {u, v} ∈ E, in which case both vertices
are incident to the edge {u, v}. To avoid clutter we often omit brackets and write uv for
edge {u, v}.
For a vertex v ∈ V, its neighborhood in G, denoted NG (v), consists of all vertices from
G that are adjacent to v. Similarly, for a set W ⊂ V of vertices its neighborhood NG (W)
is defined as w∈W NG (w). The degree degG (v) of a vertex v ∈ V is the size of its
S
13
Chapter 1. Fundamentals Geometry: C&A 2024
neighborhood, that is, the number of edges from E incident to v. The subscript is often
omitted if the graph under consideration is clear from the context.
Lemma 1.4 (Handshaking Lemma). In any graph G = (V, E) we have
X
deg(v) = 2|E|.
v∈V
14
Geometry: C&A 2024 1.4. Graphs
Theorem 1.5 (Menger [4]). For any two nonadjacent vertices u, v of a graph G = (V, E),
the minimum size of a cut-set that disconnects u and v is the same as the maximum
number of pairwise internally vertex-disjoint paths between u and v.
Specific families of graphs. A graph with all potential edges present, that is (V, V2 ), is
15
Chapter 1. Fundamentals Geometry: C&A 2024
Directed graphs. In a directed graph or, short, digraph D = (V, E) the set E consists of
ordered pairs of vertices, that is, E ⊆ V 2 . The elements of E are referred to as arcs. To
avoid clutter we often omit brackets and write uv for an arc (u, v). An arc uv ∈ E is said
to be directed from its source u to its target v. For uv ∈ E we also say “there is an arc
from u to v in D”. Usually, we consider loop-free graphs, that is, arcs of the type vv, for
some v ∈ V, are not allowed.
The in-degree deg−D (v) := |{(u, v)|uv ∈ E}| of a vertex v ∈ V is the number of incoming
arcs at v. Similarly, the out-degree deg+ D (v) := |{(v, u) | vu ∈ E}| of a vertex v ∈ V is
the number of outgoing arcs at v. Again the subscript is often omitted when the graph
under consideration is clear from the context.
From any undirected graph G one can obtain a digraph on the same vertex set by
specifying a direction for each edge of G. Each of these 2|E(G)| different digraphs is called
an orientation of G. Similarly every digraph D = (V, E) has an underlying undirected
graph G = (V, { {u, v} | (u, v) ∈ E or (v, u) ∈ E}). Hence most of the terminology for
undirected graphs carries over to digraphs.
A directed walk in a digraph D is a sequence W = (v1 , . . . , vk ), for some k ∈ N, of
vertices such that there is an arc from vi to vi+1 in D, for all 1 ⩽ i < k. In the same
way we define directed trails, directed tours, directed paths, and directed cycles.
Multigraphs. Sometimes we also consider multigraphs, where each edge may have mul-
tiple copies. Unless forbidden explictly, a multigraph may contain loops. Just as simple
graphs/digraphs, multigraphs may be undirected or directed, and also most of the other
basic notions for graphs discussed above naturally generalize to multigraphs.
References
[1] Michael Ben-Or, Lower bounds for algebraic computation trees. In Proc. 15th Annu.
ACM Sympos. Theory Comput., pp. 80–86, 1983.
[2] John Adrian Bondy and U. S. R. Murty, Graph Theory, vol. 244 of Graduate texts
in Mathematics, Springer, London, 2008.
[3] Reinhard Diestel, Graph Theory, vol. 173 of Graduate texts in Mathematics,
Springer, Heidelberg, 5th edn., 2016.
[4] Karl Menger, Zur allgemeinen Kurventheorie. Fund. Math., 10/1, (1927), 96–115.
[5] Douglas B. West, Introduction to Graph Theory, Prentice Hall, Upper Saddle River,
NJ, 2nd edn., 2001.
16