GraphTheory[SpecialGraphs]
PaleyGraph
construct Paley graph
Calling Sequence
Parameters
Description
Examples
PaleyGraph(p)
PaleyGraph(p,k)
PaleyGraph(p,k,m)
p
-
prime integer
k
positive integer
m
irreducible univariate polynomial of degree k over GF(p)
If the input is PaleyGraph(p) where p is congruent to 1 modulo 4, then the output is an unweighted undirected graph G on p vertices labeled 0,1,...,p-1 where the edge {i,j}, with i<j, is in G iff j-i is a quadratic residue in Zp.
If the input is PaleyGraph(p) where p is congruent to 3 modulo 4, then the output is an unweighted directed graph G on p vertices labeled 0,1,...,p-1 where the arc [i,j] is in G iff j-i is a quadratic residue in Zp.
If the input is PaleyGraph(p,k) where q=pk is congruent to 1 modulo 4, then the output is an unweighted undirected graph G on q vertices labeled 0,1,...,q-1 where the edge {i,j}, i<j, is in G iff y-x is a square in the finite field GF(q), where x is the ith element and y is the jth element in GF(q). The numbering of the elements in GF(q) is lexicographical.
Similarly, if the input is PaleyGraph(p,k) where q=pk is congruent to 3 modulo 4, then the output is an unweighted directed graph G on q vertices labeled 0,1,...,q-1 where the arc [i,j] is in G iff y-x is a square in the finite field GF(q), where x is the ith element and y is the jth element in GF(q). The numbering of the elements in GF(q) is lexicographical.
The vertex label for the element f(x) in Zp[x] is f(p). For example, in GF(23) the elements are ordered 0,1,x,x+1,x2,x2+1,x2+x,x2+x+1. Thus the label for element x2+1 is 22+1=5.
The field can be specified by the user by specifying the extension polynomial for GF(q), a monic irreducible polynomial m(x) in Zp[x] of degree k.
with⁡GraphTheory:
with⁡SpecialGraphs:
P≔PaleyGraph⁡5
P≔Graph 1: an undirected graph with 5 vertices and 5 edge(s)
DrawGraph⁡P
E≔Edges⁡P
E≔0,1,0,4,1,2,2,3,3,4
P≔PaleyGraph⁡2,2
P≔Graph 2: an undirected graph with 4 vertices and 6 edge(s)
E≔0,1,0,2,0,3,1,2,1,3,2,3
P≔PaleyGraph⁡3,2,y2+1
P≔Graph 3: an undirected graph with 9 vertices and 18 edge(s)
See Also
SpecialGraphs
Download Help Document