Course Test · University: upper level

Topology: RatMath answers

The same twenty exercises, answered with RatMath Core and the Shelf libraries only. The code below was run when this page was built; its output is shown as printed, and compared with the independent answer.

Agrees 17 Partly 1 Can't yet 2

Libraries used here: core, analytic, structures, complex, discrete, chaos, geo. In this code each library is in scope under its own name (linalg.det, stats.tTest), and Core's names (R, Rational, …) are in scope directly.

  1. 1.Finite topologiesAgrees
    How many topologies are there on a three-point set?
    Independent answer
    Topologies on a finite set correspond to preorders (reflexive, transitive relations), via x≤yx \le y iff every open set containing xx contains yy. On 3 points there are 29.
    RatMath code
    [geo.countTopologies(3), geo.countTopologies(3, { t0: true })]
    Output
    [29, 19]
    countTopologies counts the preorders on 3 points (the open sets of a finite space are the up-sets of its specialisation preorder); 19 of the 29 are T₀. finiteSpace also checks the axioms, closure, bases and continuity directly.
    Fix: ratmath/geo#11, measurement helpers, 3D vector and plane, conicProperties; topology: surface, simplicialComplex, finite spaces
  2. 2.MetricsAgrees
    Describe the unit ball of the taxicab metric d(p,q)=∣p1−q1∣+∣p2−q2∣d(p, q) = |p_1 - q_1| + |p_2 - q_2| in the plane. What is its "π\pi" (half the perimeter of the unit circle, measured in the same metric)?
    Independent answer
    The square with vertices (±1,0)(\pm1, 0), (0,±1)(0, \pm1). Each side has taxicab length 2, so the perimeter is 8 and πtaxi=4\pi_{taxi} = 4.
    RatMath code
    const m = geo.metric("taxicab");
    [String(m.circle([0, 0], 1)), m.pi]
    Output
    ["(1, 0),(0, 1),(-1, 0),(0, -1)", 4]
  3. 3.A bounded metricCan't yet
    Show d′(x,y)=∣x−y∣1+∣x−y∣d'(x, y) = \dfrac{|x - y|}{1 + |x - y|} is a metric on R\mathbb R giving the same topology.
    Independent answer
    t↦t/(1+t)t \mapsto t/(1 + t) is increasing, subadditive and zero only at 0, so the triangle inequality passes from ∣x−y∣|x - y| to d′d'. Small balls of the two metrics nest inside each other, so the open sets agree.
    RatMath code
    // No proof tool. A spot check of the triangle inequality on rationals:
    const d = (x, y) => { const a = x.subtract(y).abs(); return a.divide(a.add(R`1`)); };
    const xs = ["-3", "-1/2", "0", "2/3", "5"].map((s) => R`${s}`);
    xs.every((x) => xs.every((y) => xs.every((z) => !d(x, z).greaterThan(d(x, y).add(d(y, z))))))
    Output
    true
    Independent answer, in RatMath's notation
    a proof
    Proofs are out of reach; the code only spot-checks the triangle inequality on a few rationals (it holds).
  4. 4.Connectedness and compactnessCan't yet
    Is [0,1][0, 1] compact? Is (0,1)(0, 1)? Is Q\mathbb Q connected?
    Independent answer
    [0,1][0, 1] is compact (Heine–Borel); (0,1)(0, 1) is not (the cover (1/n,1)(1/n, 1) has no finite subcover). Q\mathbb Q is not connected: (−∞,2)∩Q(-\infty, \sqrt2) \cap \mathbb Q and (2,∞)∩Q(\sqrt2, \infty) \cap \mathbb Q separate it. It is even totally disconnected: between any two distinct rationals p<qp < q lies an irrational ss (such as p+(q−p)/2p + (q - p)/\sqrt2), and the same cut at ss puts pp and qq in different pieces, so no connected subset has two points.
    RatMath code
    "no computation"
    Output
    no computation
    Independent answer, in RatMath's notation
    proofs
    These are statements about all open covers and all separations; nothing in RatMath decides them.
  5. 5.Winding numbersAgrees
    Find the winding number about 0 of the closed polygon 1→i→−1→−i→11 \to i \to -1 \to -i \to 1, of the same path traversed twice, and of the triangle 3→3+i→2+i→33 \to 3 + i \to 2 + i \to 3.
    Independent answer
    Once round counter-clockwise: 1. Twice: 2. The triangle does not surround 0: 0.
    RatMath code
    const W = complex.winding;
    [W(["1", "i", "-1", "-i", "1"]), W(["1", "i", "-1", "-i", "1", "i", "-1", "-i", "1"]), W(["3", "3+i", "2+i", "3"])]
    Output
    [1, 2, 0]
  6. 6.Degree of a mapAgrees
    What is the degree of z↦z3z \mapsto z^3 on the unit circle (how many times does the image wind round 0)?
    Independent answer
    eiθ↦e3iθe^{i\theta} \mapsto e^{3i\theta} winds three times: degree 3, equal to the number of zeros inside (argument principle).
    RatMath code
    complex.argumentPrinciple("z^3", complex.Contour.circle(0, 1))
    Output
    3
  7. 7.Fixed point theoremPartly
    Show every continuous f:[0,1]→[0,1]f: [0, 1] \to [0, 1] has a fixed point, and find the fixed point of cos⁡\cos on [0,1][0, 1].
    Independent answer
    g(x)=f(x)−xg(x) = f(x) - x has g(0)≥0≥g(1)g(0) \ge 0 \ge g(1), so gg vanishes by the intermediate value theorem. For cos⁡\cos: x≈0.7390851x \approx 0.7390851.
    RatMath code
    analytic.fixedPoint("cos(x)", "1/2").root
    Output
    0.7390851332151606416[5:6]
    The certified fixed point of cos⁡\cos is found (since the analytic fix the exact start "1/2" works). The general statement is a proof by the intermediate value theorem, given in the answer; RatMath does not check proofs, so this counts as partial.
    Fix: ratmath/analytic#18, exact starting values, pointwise limits, sec/csc/cot, integrating factors with 1/∣x∣1/|x|, ODESolution exported
  8. 8.Euler characteristic of polyhedraAgrees
    Compute V−E+FV - E + F for the tetrahedron, cube and icosahedron.
    Independent answer
    4−6+44 - 6 + 4, 8−12+68 - 12 + 6, 12−30+2012 - 30 + 20: all 2, the Euler characteristic of the sphere.
    RatMath code
    ["tetrahedron", "cube", "icosahedron"].map((n) => geo.solids[n]().euler)
    Output
    [2, 2, 2]
  9. 9.Euler characteristic of a graphAgrees
    For the Petersen graph as a 1-dimensional complex, find χ\chi and the rank of H1H_1.
    Independent answer
    χ=V−E=10−15=−5\chi = V - E = 10 - 15 = -5. It is connected, so b0=1b_0 = 1 and b1=1−χ=6b_1 = 1 - \chi = 6 independent cycles.
    RatMath code
    const P = geo.simplicial.fromGraph(discrete.petersen());
    [P.eulerCharacteristic, P.betti()[1]]
    Output
    [-5, 6]
    The graph as a 1-dimensional simplicial complex; b1b_1 comes from its homology, not from the formula.
    Fix: ratmath/geo#11, measurement helpers, 3D vector and plane, conicProperties; topology: surface, simplicialComplex, finite spaces
  10. 10.Homology of the torusAgrees
    The torus has a cell structure with one 0-cell, two 1-cells a,ba, b and one 2-cell attached along aba−1b−1aba^{-1}b^{-1}. Find H1H_1.
    Independent answer
    ∂2=a+b−a−b=0\partial_2 = a + b - a - b = 0 and ∂1=0\partial_1 = 0, so H1=Z2/0=Z2H_1 = \mathbb Z^2/0 = \mathbb Z^2.
    RatMath code
    String(geo.surface("a b a^-1 b^-1").homology(1))
    Output
    Z^2
    surface reads the cell structure from the edge word (one vertex, two edges, one face) and structures' chainComplex computes the homology.
    Fix: ratmath/geo#11, measurement helpers, 3D vector and plane, conicProperties; topology: surface, simplicialComplex, finite spaces
  11. 11.Homology of the projective planeAgrees
    RP2\mathbb{RP}^2 has one cell in each dimension 0, 1, 2, the 2-cell attached along aaaa. Find H1H_1.
    Independent answer
    ∂2=2a\partial_2 = 2a, ∂1=0\partial_1 = 0: H1=Z/2H_1 = \mathbb Z/2.
    RatMath code
    String(geo.surface("a a").homology(1))
    Output
    Z/2
    ∂2=2a\partial_2 = 2a is read from the word a a.
    Fix: ratmath/geo#11, measurement helpers, 3D vector and plane, conicProperties; topology: surface, simplicialComplex, finite spaces
  12. 12.Homology of the Klein bottleAgrees
    The Klein bottle is one 0-cell, 1-cells a,ba, b, and a 2-cell attached along aba−1baba^{-1}b. Find H1H_1.
    Independent answer
    ∂2=a+b−a+b=2b\partial_2 = a + b - a + b = 2b: H1=Z2/⟨2b⟩=Z⊕Z/2H_1 = \mathbb Z^2/\langle 2b\rangle = \mathbb Z \oplus \mathbb Z/2.
    RatMath code
    String(geo.surface("a b a^-1 b").homology(1))
    Output
    Z/2 × Z
    From the word: ∂2=a+b−a+b=2b\partial_2 = a + b - a + b = 2b.
    Fix: ratmath/geo#11, measurement helpers, 3D vector and plane, conicProperties; topology: surface, simplicialComplex, finite spaces
  13. 13.Smith normal form and torsionAgrees
    A cell complex has ∂2=(2468)\partial_2 = \begin{pmatrix}2&4\\6&8\end{pmatrix} (in bases of 2-cells and 1-cells) and ∂1=0\partial_1 = 0. Find H1H_1.
    Independent answer
    The Smith form of (2468)\begin{pmatrix}2&4\\6&8\end{pmatrix} is diag⁡(2,4)\operatorname{diag}(2, 4) (gcd of entries 2, ∣det⁡∣=8|\det| = 8). H1=Z/2⊕Z/4H_1 = \mathbb Z/2 \oplus \mathbb Z/4.
    RatMath code
    [structures.smithForm([[2, 4], [6, 8]]).diagonal, String(structures.integerModule([[2, 4], [6, 8]], 2))]
    Output
    [[2n, 4n], "Z/2 × Z/4"]
  14. 14.Classification of surfacesAgrees
    A closed orientable surface has a triangulation with 10 vertices, 36 edges and 24 triangles. Check that these counts are possible, and say which surface it is.
    Independent answer
    In a closed triangulated surface every triangle has 3 edges and every edge lies on exactly 2 triangles, so 3F=2E3F = 2E: 72=7272 = 72. Then χ=10−36+24=−2=2−2g\chi = 10 - 36 + 24 = -2 = 2 - 2g: genus 2, the double torus. (This is the f-vector of a minimal genus-2 triangulation.)
    RatMath code
    const [V, E, F] = [10, 36, 24];
    const s = geo.classifySurface({ euler: V - E + F, orientable: true });
    [3 * F === 2 * E, s.eulerCharacteristic, s.genus]
    Output
    [true, -2, 2]
    The incidence count 3F=2E3F = 2E is checked first (the earlier version of this exercise used 8, 24, 14, for which 3F=42≠48=2E3F = 42 \ne 48 = 2E: no such triangulation exists). classifySurface then applies the classification theorem: orientable with χ=−2\chi = -2 is the connected sum of 2 tori.
    Fix: ratmath/geo#11, measurement helpers, 3D vector and plane, conicProperties; topology: surface, simplicialComplex, finite spaces
  15. 15.Genus of a graphAgrees
    What is the genus of K5K_5 (the least genus of a surface it embeds in)?
    Independent answer
    It is not planar, and it embeds in the torus: genus 1. (⌈(n−3)(n−4)/12⌉=1\lceil (n-3)(n-4)/12 \rceil = 1.)
    RatMath code
    const t = discrete.genus(discrete.complete(5));
    [discrete.isPlanar(discrete.complete(5)), t.genus, t.proven, discrete.embeddingGenus(discrete.complete(5), t.blocks[0].rotation).faces.length]
    Output
    [false, 1, true, 5]
    genus searches rotation systems: it returns an embedding of K5K_5 with 5 faces, so V−E+F=5−10+5=0V - E + F = 5 - 10 + 5 = 0 and the surface is a torus; not planar gives the lower bound.
    Fix: ratmath/discrete#8, genus of a graph by rotation systems
  16. 16.The Cantor setAgrees
    What is the total length of the nnth stage of the Cantor construction? What is the measure of the Cantor set?
    Independent answer
    2n2^n intervals of length 3−n3^{-n}: (2/3)n(2/3)^n, e.g. 827\tfrac8{27} at stage 3. The limit is 0, yet the set is uncountable.
    RatMath code
    [chaos.cantor().measure(3), chaos.cantor().stage(2).length]
    Output
    [8/27, 4]
  17. 17.Fractal dimensionAgrees
    Find the similarity dimension of the Sierpinski carpet.
    Independent answer
    8 copies at scale 13\tfrac13: log⁡38≈1.8928\log_3 8 \approx 1.8928.
    RatMath code
    const d = chaos.attractors.carpet().similarityDimension();
    [d.formula, d.interval[0]]
    Output
    ["log(8)/log(3)", 136389840147905979/72057594037927936]
  18. 18.Fundamental groupsAgrees
    What are the fundamental groups of the circle, the torus and RP2\mathbb{RP}^2?
    Independent answer
    Z\mathbb Z, Z2\mathbb Z^2, Z/2\mathbb Z/2.
    RatMath code
    [geo.simplicial.sphere(1), geo.surface("a b a^-1 b^-1"), geo.surface("a a")].map((X) => String(X.fundamentalGroup()))
    Output
    ["⟨e3 | ⟩", "⟨a, b | aba⁻¹b⁻¹⟩", "⟨a | a²⟩"]
    fundamentalGroup() contracts a spanning tree and reads one relator per face (van Kampen), returning a presentation: free on one generator for the circle, Z2\mathbb Z^2 for the torus, Z/2\mathbb Z/2 for RP2\mathbb{RP}^2 (structures confirms the orders and abelianisations).
    Fix: ratmath/geo#11, measurement helpers, 3D vector and plane, conicProperties; topology: surface, simplicialComplex, finite spaces
  19. 19.Stereographic projectionAgrees
    Under stereographic projection from the north pole of the unit sphere, where does the point (35,0,45)(\tfrac35, 0, \tfrac45) go?
    Independent answer
    (x,y,z)↦(x1−z,y1−z)=(3,0)(x, y, z) \mapsto \left(\dfrac{x}{1 - z}, \dfrac{y}{1 - z}\right) = (3, 0). The sphere minus a point is homeomorphic to the plane.
    RatMath code
    String(geo.spoint("3/5", 0, "4/5").stereographic)
    Output
    (3, 0)
  20. 20.A triangulated torusAgrees
    Möbius and Császár's minimal triangulation of the torus has 7 vertices, 21 edges and 14 triangles. Check its Euler characteristic.
    Independent answer
    7−21+14=0=2−2⋅17 - 21 + 14 = 0 = 2 - 2\cdot1, as it must be for a torus. (Every pair of the 7 vertices is an edge: (72)=21\binom72 = 21.)
    RatMath code
    const T = geo.simplicial.torus();
    [T.fVector, T.eulerCharacteristic, String(T.homology(1)), T.classify().name]
    Output
    [[7, 21, 14], 0, "Z^2", "torus"]
    The triangulation itself is built from its 14 triangles; the f-vector, χ, homology and the surface recognition all come from it.
    Fix: ratmath/geo#11, measurement helpers, 3D vector and plane, conicProperties; topology: surface, simplicialComplex, finite spaces