Choose a generator of the multiplicative group of the quadratic finite field extension. Its shifts define distinct exponents modulo . Equality of two sums of exponents gives . Since are independent over the prime field, and , so the unordered pairs coincide. Thus the exponents form a Sidon set in the cyclic group. Taking integer representatives preserves the Sidon property. Primes within below give representatives in an interval of length .
Write , choose , and let count the points of in the length- window ending at , for . Each element occurs in precisely such windows, so . The Cauchy-Schwarz inequality consequently gives
On the other hand, a pair of difference belongs to exactly windows; larger differences contribute none. The Sidon set condition permits at most one pair for each positive difference . Therefore
Combining these two estimates proves the sliding-window upper bound for Sidon sets:
If , the final inequality for this quadratic polynomial implies ; otherwise . With the chosen , and . Thus
Together with part (i)'s construction, this proves that the maximum cardinality is . The lower and upper error terms need not have the same size to establish that asymptotic conclusion.
We use the Bose-Chowla Sidon construction, deriving its difference property explicitly. Let be an odd prime and choose a generator of the multiplicative group of a finite field of the quadratic finite field extension . Such a generator cannot belong to , so are linearly independent over the prime field. For each , the nonzero field element has a unique exponent modulo , with . The exponents are distinct.
Suppose in the cyclic group. Multiplying the corresponding field elements gives
Subtract the common term. Linear independence of gives and . Thus the two unordered pairs are the roots of the same monic quadratic polynomial, so . Either , giving the same ordered difference, or , giving two zero differences. This is exactly the Sidon set property.
Choose the integer representatives in . Equality of integer differences implies equality modulo , so their Sidon property persists in the integers. Now apply the given prime-gap hypothesis at to get for large . The representatives fit inside , because , and their cardinality is
Only the supplied short-interval prime existence and the elementary structure of a finite field are used.
First consider a -free bipartite graph with parts , each of size at most , and edges. Count pairs in which is a -element subset of the graph neighbourhood of . Any vertices of have at most common neighbours, since common neighbours would form the complete bipartite graph . Consequently
If the average degree of a vertex is bounded in terms of , then and the required result is immediate. Otherwise, convexity of and the preceding inequality give
and hence . Every graph has a bipartite spanning subgraph containing at least half its edges, obtained by choosing a random bipartition. Applying the bipartite estimate to that subgraph proves the Kővári–Sós–Turán theorem in the required form:
The stated "nice" subsets of the finite cyclic group are Sidon sets. If
then . Niceness forces ; the alternative pairing would force . Thus the ordered nonzero differences are distinct elements of the nonzero residue classes. Therefore
so
For a Sidon set , put and let count points in a window of consecutive integers. Each point occurs in windows, so . Cauchy-Schwarz gives . Each positive difference occurs at most once and contributes windows, giving the upper bound . Thus . Taking gives the displayed estimate, which combines with the Bose-Chowla Sidon construction to determine the asymptotic maximum.