Everything2
Near Matches
Ignore Exact
Full Text
Everything2

Connectivity is not expressible in first-order logic

created by ariels

(thing) by ariels (6.1 d) (print)   ?   I like it! Wed Feb 01 2006 at 8:06:51

(Mathematical logic, graph theory)

What follows is a description of how to use the compactness theorem from first-order logic to derive a somewhat surprising result. If you're a computer geek and don't care about first-order logic, note that SQL queries are just first-order logic (written in a too-complicated manner). So a database holding links (say, flights between airports) cannot determine accessibility (say, a route -- not even the shortest route!) between two sites without writing procedures. Allowing a stored procedure to run in this case would also be insane -- DFS and BFS are hard! To solve such problems, you'd need a highly denormalized DB.

What is graph theory, first-order logically speaking? The language of graph theory is has the single dyadic (2 place) predicate x~y, that we interpret as "x is adjacent to y". The world of a model of graph theory is the set of nodes of the graph; the predicate "~" gives the edges. A graph is any model G of the 2 axioms

  1. ∀x.∀y.x~y→y~x ("if x is adjacent to y, then y is adjacent to x")
  2. ∀x.!(x~x) ("no x is adjacent to itself")

We can express many properties of a graph in the language of first-order logic.

For instance, the property "G contains a triangle" is just the proposition
∃x.∃y.∃z.x~y&y~z&z~x
Similarly, we can translate into first-order logic many nice properties such as "G has girth k" (for any given value of k, there exists a proposition Pk which is true of G iff G has girth k), "G has chromatic number k", and the like.

Are there any properties we cannot express in this way? Graph connectivity is a nice example. Using the compactness theorem we can show that this property cannot be expressed as a proposition of first-order logic.

Proof.

Suppose the proposition C expressed "G is a connected graph". We will consider graph theory with 2 named points. Add constants s and t to the language ("source" and "sink"). Then C also expressed "G is connected" in the theory of graphs with 2 names points.

For any k, let Lk be the proposition "there is no path of length k between s and t". For instance, proposition L3 is just

!(∃a.∃b. s~a & a~b & b~t)

Now consider the set of propositions Φ = {axiom (i), axiom (ii), C, L1, L2, ...}. Φ is finitely satisfiable: there do exist connected graphs with 2 points (labelled s and t), that are connected by an arbitrarily long path. Since any finite subset F⊂Φ must have bounded k's, such a graph satisifes F.

By the compactness theorem, Φ itself would have to be satisfiable. What does this mean? By Godel's completeness theorem, it means that there exists some model G of all propositions Φ. This model has to be a graph (it satisfies axioms (i) and (ii)); it has to be connected (it satisfies C); and it has 2 nodes s and t, that cannot be connected by a path of length k, for any k (it satisfies all propositions Lk).

This is clearly wrong. In a connected graph, any 2 nodes are connected by a path of finite length! We've just contradicted the possibility of expressing connectivity by a first-order proposition of graph theory.


printable version
chaos

compactness theorem I have no idea what you're talking about, so here's a picture of a bunny with a pancake on its head. Your ideas are intriguing to me and I wish to subscribe to your newsletter Chromatic number
latent edge numbers Mathematical Logic Blackmore's Night finitely satisfiable
girth Predicate first-order logic Dfs
BFS Inheritance in relational databases SQL Satisfiable
path sink source graph theory
graph database abundant number
Y'know, if you log in, you can write something here, or contact authors directly on the site. Create a New User if you don't already have an account.
  Epicenter
Login
Password

password reminder
register

Everything2 Help

Cool Staff Picks
Look at this mess the Death Borg made!
Unilluminable
Crash
Health dangers of leaded gasoline
Prayer Changes Things
How to be an asshole
How to convert a Super Nintendo controller to work on the PC
The Jazz Singer
Bob Jones University
Karl Marx
pile of kittens
The Road to Wigan Pier
Chronic fatigue syndrome
Again, dammit!
New Writeups
badme
Basque(personal)
niruena
George Chapman(person)
Whiskeydaemon
Why I love Everything2(log)
Junkill
Saci(idea)
Scientist
futureme.org(thing)
cryforhelp
Why I love Everything2(idea)
Jet-Poop
Uncle Sam(person)
nailbiter
direct marketing(thing)
Ouzo
Existential Dilemmas(personal)
shaogo
Robert Mondavi(person)
Ouzo
Goodwill Hunting, Thrift Store(ies)(log)
Pandeism Fish
How conatus compels divine ketosis through a radical kenosis(essay)
cryforhelp
Major dictionaries of the world(review)
Glowing Fish
The Uncanny X-Men and the New Teen Titans(thing)
WolfKeeper
Launch loop(idea)
E2 is a by-product of the existence of The Everything Development Company