  The concept of p-ordering for a prime p was introduced by Manjul Bhargava (in
his PhD thesis) to develop a generalized factorial function over an arbitrary
subset of integers. This notion of p-ordering provides a representation of
polynomials modulo prime powers, and has been used to prove properties of roots
sets modulo prime powers. We focus on the complexity of finding a p-ordering
given a prime p, an exponent k and a subset of integers modulo p^k.
  Our first algorithm gives a p-ordering for set of size n in time O(nk\log p),
where set is considered modulo p^k. The subsets modulo p^k can be represented
succinctly using the notion of representative roots (Panayi, PhD Thesis, 1995;
Dwivedi et.al, ISSAC, 2019); a natural question would be, can we find a
p-ordering more efficiently given this succinct representation. Our second
algorithm achieves precisely that, we give a p-ordering in time O(d^2k\log p +
nk \log p + nd), where d is the size of the succinct representation and n is
the required length of the p-ordering. Another contribution that we make is to
compute the structure of roots sets for prime powers p^k, when k is small. The
number of root sets have been given in the previous work (Dearden and Metzger,
Eur. J. Comb., 1997; Maulick, J. Comb. Theory, Ser. A, 2001), we explicitly
describe all the root sets for p^2, p^3 and p^4.
