Inclusion–exclusion principle and the Königsberg bridges
import /Freeks/5.book
1 Preliminaries: parity
A natural number is even or odd (by induction on \(n\)). An even number is not odd. Doubling, \(2\) times, is an injection.
Lpar𝕄 …
\(n \in \mathbb{M} \Longrightarrow \exists k \in \mathbb{M} . n = 2 \cdot k \mathbin{\rm o\!r} n = 2 \cdot k + 1\) \(\blacktriangleleft\) \(\mathbb{W}.\) ,AxℤLodd …
\(a , b \in \mathbb{M} \Longrightarrow 2 \cdot a \neq 2 \cdot b + 1\) \(\blacktriangleleft\) \(\mathbb{W}.\) ,Axℤ2 #54 The Königsberg bridges forget
The Königsberg bridges: there is no walk that crosses all 7 bridges exactly once each (shown from the degrees of the vertices).
2.1 Euler paths and degrees
Consider a graph with a set \(E\) of edges and an incidence relation \(I\) (\((e, u) \in I\) means "\(u\) is an endpoint of the edge \(e\)") in which every edge has exactly two distinct endpoints.
Suppose there are a sequence of vertices \(v(0), \dots, v(t)\) and a sequence of edges \(w(0), \dots, w(t-1)\) such that \(w(i)\) joins \(v(i)\) and \(v(i+1)\) and every edge appears exactly once (an Euler path). Then every vertex \(x\) other than the two endpoints has even degree (the number of edges having \(x\) as an endpoint).
\(\forall e \in E . \exists y , z \, y \neq z , \forall u \, ( \langle e , u \rangle \in I \Longleftrightarrow u = y \mathbin{\rm o\!r} u = z ) , t \in \mathbb{M} , \forall i \in \mathbb{M} . ( i < t \Longrightarrow {w} ( i ) \in E , \forall u \, ( \langle {w} ( i ) , u \rangle \in I \Longleftrightarrow u = {v} ( i ) \mathbin{\rm o\!r} u = {v} ( i + 1 ) ) ) , \forall e \in E . \exists! i \, i \in \mathbb{M} , i < t , e = {w} ( i ) , x \neq {v} ( 0 ) , x \neq {v} ( t ) , D = \{ e \in E \mid \langle e , x \rangle \in I \} \Longrightarrow \exists h \in \mathbb{M} . \operatorname{\#} D = 2 \cdot h\) \(\blacktriangleleft\) ⋅𝕄:D ,⋅0X ,\(\mathbb{W}.\) ,Axℤ ,ax_s2.2 The Königsberg bridges
The island \(d\) and the land masses \(a, b, c\) are joined by 7 bridges \(0, \dots, 6\) (\(d\)–\(a\) by 0 and 1, \(d\)–\(b\) by 2 and 3, \(d\)–\(c\) by 4, \(a\)–\(c\) by 5, \(b\)–\(c\) by 6). Each of \(a, b, c\) is an endpoint of 3 bridges (odd degree), and some of them is not an end of the path, so no walk crosses all 7 bridges exactly once each.
\(a \neq b , a \neq c , a \neq d , b \neq c , b \neq d , c \neq d , B = 0 \mathinner{\ldotp\ldotp} 6 , \forall e , u \, ( \langle e , u \rangle \in J \Longleftrightarrow ( ( e = 0 \mathbin{\rm o\!r} e = 1 ) , ( u = d \mathbin{\rm o\!r} u = a ) ) \mathbin{\rm o\!r} ( ( e = 2 \mathbin{\rm o\!r} e = 3 ) , ( u = d \mathbin{\rm o\!r} u = b ) ) \mathbin{\rm o\!r} ( e = 4 , ( u = d \mathbin{\rm o\!r} u = c ) ) \mathbin{\rm o\!r} ( e = 5 , ( u = a \mathbin{\rm o\!r} u = c ) ) \mathbin{\rm o\!r} ( e = 6 , ( u = b \mathbin{\rm o\!r} u = c ) ) ) , n \in \mathbb{M} , \forall i \in \mathbb{M} . ( i < n \Longrightarrow {w} ( i ) \in B , \forall u \, ( \langle {w} ( i ) , u \rangle \in J \Longleftrightarrow u = {v} ( i ) \mathbin{\rm o\!r} u = {v} ( i + 1 ) ) ) \Longrightarrow \neg \forall e \in B . \exists! i \, i \in \mathbb{M} , i < n , e = {w} ( i )\) \(\blacktriangleleft\) ⋅𝕄:D ,⋅0X ,\(\mathbb{W}.\) ,Axℤ ,ax_s