In mathematics and computer science, the BIT predicate, sometimes is a predicate that tests whether the bit of the (starting from the least significant digit) when
i
The BIT predicate was first introduced in 1937 by Wilhelm Ackermann to define the Ackermann coding, which encodes hereditarily finite sets as The BIT predicate can be used to perform membership tests for the encoded sets:
BIT(i,j)
Ackermann denoted the predicate
BIT(i,j)
El(j,i)
The binary representation of a number
i
i
bj
… b3b2b1b0
i
BIT(i,j)
bj
\lfloor ⋅ \rfloor
i
j
BIT(i,j)
BIT(j,i)
In programming languages such as C, C++, Java, or Python that provide a and a the BIT predicate
BIT(i,j)
(i>>j)&1
. The subexpression i>>j
shifts the bits in the binary representation of i
BIT(i,j)
For a set represented as a bit array, the BIT predicate can be used to test set membership. For instance, subsets of the non-negative integers
\{0,1,\ldots\}
i
\{i,j,k,...\}
i,j,k,...
2i+2j+2k+ …
S
i
S
BIT(S,i)
i
The same technique may be used to test membership in subsets of any sequence
x0,x1,...
java.util.EnumSet
uses this technique to implement a set data structure for enumerated types. Ackermann's encoding of the hereditarily finite sets is an example of this technique, for the recursively-generated sequence of hereditarily finite sets.In the mathematical study of computer security, the private information retrieval problem can be modeled as one in which a client, communicating with a collection of servers that store a binary wishes to determine the result of a BIT predicate
BIT(i,j)
i
The BIT predicate is often examined in the context of first-order logic, where systems of logic result from adding the BIT predicate to first-order logic. In descriptive complexity, the complexity class FO describes the class of formal languages that can be described by a formula in first-order logic with a comparison operation on totally ordered variables (interpreted as the indexes of characters in a string) and with predicates that test whether this string has a given character at a given numerical index. A formula in this logic defines a language consisting of its finite models. However, with these operations, only a very restricted class of languages, the star-free regular languages, can be described. Adding the BIT predicate to the repertoire of operations used in these logical formulas results in a more robust complexity class,, meaning that it is less sensitive to minor variations in its definition.
The class is the same as the class, of first-order logic with addition and multiplication predicates.It is also the same as the circuit complexity class DLOGTIME-uniform AC0. Here, AC0 describes the problems that can be computed by circuits of AND gates and OR gates with polynomial size, bounded height, and unbounded fanout. "Uniform" means that the circuits of all problem sizes must be described by a single algorithm. More specifically, it must be possible to index the gates of each circuit by numbers in such a way that the type of each gate and the adjacency between any two gates can be computed by a deterministic algorithm whose time is logarithmic in the size of the circuit (DLOGTIME).
In 1964, German–British mathematician Richard Rado used the BIT predicate to construct the infinite Rado graph. Rado's construction is just the symmetrization of Ackermann's 1937 construction of the hereditary finite sets from the BIT predicate: two vertices numbered
i
j
BIT(i,j)
BIT(j,i)
The resulting graph has many important properties: it contains every finite undirected graph as an induced subgraph, and any isomorphism of its induced subgraphs can be extended to a symmetry of the whole graph.