ArticleslgStudy

science

Logic of graphs

Logic of graphs is a science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Logic of graphs rather than just read about it. In short: In the mathematical fields of graph theory and finite model theory, the logic of graphs deals with formal specifications of graph properties using sentences of mathematical logic. There are several variations in the types of logical operation that can be used in these sentences.

Logic of graphs — main illustration
Logic of graphs — illustration

Key takeaways

  • Logic of graphs belongs to science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Logic of graphs to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Logic of graphs from memory before moving on to harder problems.

Reference excerpt

In the mathematical fields of graph theory and finite model theory, the logic of graphs deals with formal specifications of graph properties using sentences of mathematical logic. There are several variations in the types of logical operation that can be used in these sentences. The first-order logic of graphs concerns sentences in which the variables and predicates concern individual vertices and edges of a graph, while monadic second-order graph logic allows quantification over sets of vertices or edges. Logics based on least fixed point operators allow more general predicates over tuples of vertices, but these predicates can only be constructed through fixed-point operators, restricting their power. A sentence may be true for some graphs, and false for others; a graph is said to model , written , if is true of the vertices and adjacency relation of . The algorithmic problem of model checking concerns testing whether a given graph models a given sentence. The algorithmic problem of satisfiability concerns testing whether there exists a graph that models a given sentence. Although both model checking and satisfiability are hard in general, several major algorithmic meta-theorems show that properties expressed in this way can be tested efficiently for important classes of graphs. Other topics of research in the logic of graphs include investigations of the probability that a random graph has a property specified within a particular type of logic, and methods for data compression based on finding logical sentences that are modeled by a unique graph.

First order

In the first-order logic of graphs, a graph property is expressed as a quantified logical sentence whose variables represent graph vertices, with predicates for equality and adjacency testing.

Examples For instance, the condition that a graph does not have any isolated vertices may be expressed by the sentence

where the symbol indicates the undirected adjacency relation between two vertices. This sentence can be interpreted as meaning that for every vertex there is another vertex that is adjacent to . The subgraph isomorphism problem for a fixed subgraph asks whether appears as a subgraph of a larger graph . It may be expressed by a sentence that states the existence of vertices (one for each vertex of ) such that, for each edge of , the corresponding pair of variables represent adjacent vertices and such that, for each remaining pair of vertices of , the corresponding pair of variables represent distinct vertices; see the illustration. As a special case, the clique problem (for a fixed clique size) may be expressed by a sentence that states the existence of a number of vertices equal to the clique size, all of which are adjacent.

Axioms For simple undirected graphs, the first-order theory of graphs includes the axioms

Other types of graphs, such as directed graphs, may involve different axioms, and logical formulations of multigraph properties require special handling such as having multiple edge relations or separate variables for vertices and edges.

Zero-one law

Glebskiĭ et al. (1969) and, independently, Fagin (1976) proved a zero–one law for first-order graph logic; Fagin's proof used the compactness theorem. According to this result, every first-order sentence is either almost always true or almost always false for random graphs in the Erdős–Rényi model. That is, let be a fixed first-order sentence, and choose a random -vertex graph uniformly at random among all graphs on a set of labeled vertices. Then in the limit as tends to infinity the probability that models will tend either to zero or to one:

Moreover, there is a specific infinite graph, the Rado graph , such that the sentences modeled by the Rado graph are exactly the ones for which the probability of being modeled by a random finite graph tends to one:

For random graphs in which each edge is included independently of the others with a fixed probability, the same result is true, with the same sentences having probabilities tending to zero or to one. The computational complexity of determining whether a given sentence has probability tending to zero or to one is high: the problem is PSPACE-complete. If a first-order graph property has probability tending to one on random graphs, then it is possible to list all the -vertex graphs that model the property, with polynomial delay (as a function of ) per graph. A similar analysis can be performed for non-uniform random graphs, where the probability of including an edge is a function of the number of vertices, and where the decision to include or exclude an edge is made independently with equal probability for all edges. However, for these graphs the situation is more complicated. In this case, a first-order property may have one or more thresholds, such that when the edge inclusion probability is bounded away from the threshold then the probability of having the given property tends to zero or one. These thresholds can never be an irrational power of , so random graphs where the edge inclusion probability is an irrational power obey a zero-one law analogous to the one for uniformly random graphs. A similar zero-one law holds for very sparse random graphs that have an edge inclusion probability of with , as long as is not a superparticular ratio. If is superparticular, the probability of having a given property may tend to a limit that is not zero or one, but this limit can be calculated efficiently. There exist first-order sentences that have infinitely many thresholds.

… excerpt ends here. Continue reading the full article.

Illustrations

Logic of graphs: The Rado graph, an infinite graph that models exactly the first-order sentences that are almost always true of finite graphs
The Rado graph, an infinite graph that models exactly the first-order sentences that are almost always true of finite graphs
Logic of graphs: Define a vertex 
  
    
      
        x
      
    
    {\displaystyle x}
  
 to be weak (highlighted in red) if, with at most one exception 
  
    
      
        y
      
    
    {\displaystyle y}
  
, each of its neighbors 
  
    
      
        z
      
    
    {\displaystyle z}
  
 is weak, according to the fixed-point formula 
  
    
      
        W
        (
        x
        )
        ←
        ∃
        y
        ∀
        z
        
          
            (
          
        
        x
        ∼
        z
        ⇒
        (
        y
        =
        z
        ∨
        W
        (
        z
        )
        )
        
          
            )
          
        
      
    
    {\displaystyle W(x)\leftarrow \exists y\forall z{\bigl (}x\sim z\Rightarrow (y=z\vee W(z)){\bigr )}}
  
. The remaining blue vertices form the 2-core of the graph.
Define a vertex x {\displaystyle x} to be weak (highlighted in red) if, with at most one exception y {\displaystyle y} , each of its neighbors z {\displaystyle z} is weak, according to the fixed-point formula W ( x ) ← ∃ y ∀ z ( x ∼ z ⇒ ( y = z ∨ W ( z ) ) ) {\displaystyle W(x)\leftarrow \exists y\forall z{\bigl (}x\sim z\Rightarrow (y=z\vee W(z)){\bigr )}} . The remaining blue vertices form the 2-core of the graph.

Worked examples

Example 1 — a first encounter with Logic of graphs

Start with the simplest possible case. Write down what Logic of graphs claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Logic of graphs before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Logic of graphs ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Logic of graphs

In research
Logic of graphs appears in science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Logic of graphs in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Logic of graphs is common in secondary-school and first-year university syllabi. It links to neighbouring topics Finite model theory, Graph theory, so understanding it makes those chapters shorter.
In everyday life
Look for Logic of graphs outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study Logic of graphs in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Logic of graphs means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Logic of graphs out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Logic of graphs in simple terms?

In the mathematical fields of graph theory and finite model theory, the logic of graphs deals with formal specifications of graph properties using sentences of mathematical logic. There are several variations in the types of logical operation that can be used in these sentences.

Why does Logic of graphs matter?

Because it connects several science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Logic of graphs?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Logic of graphs.

Tags

  • Finite model theory
  • Graph theory

Keep exploring