# 0-1 Laws and decision problems for fragments of second-order logic

## Abstract

The probability of a property on the collection of all finite relational structures is the limit as n → ∞ of the fraction of structures with n elements satisfying the property, provided the limit exists. It is known that a 0-1 law holds for any property expressible in first-order logic; i.e., the probability of any such property exists and is either 0 or 1. Moreover, the associated decision problem for the probabilities in PSPACE-complete We investigate here fragments of existential second-order logic in which we restric the patterns of first-order quantifiers. We focus on the class Σ11 (Ackermann) of existential second-order sentences in which the first-order part belongs to the Ackermann class; i.e., it contains at most one universal first-order quantifier. All properties expressible by Σ11 (Ackermann) sentences are NP-computable and there are natural NP-complete properties, such as SATISFIABILITY, that are expressible by such sentences. We establish that the 0-1 law holds for the class Σ11 (Ackermann) and identify the complexity of the associated decision problem. We also show that the 0-1 law fails for other fragments of existential second-order logic in which the first-order part belongs to certain prefix classes with an unsolvable decision problem. Thus, the emerging picture is that the classifications of prefix classes according to the solvability of the satisfiability problem and according to the 0-1 law for the corresponding Σ11 fragment are identical. © 1990.