I'm trying to figure out if there is a way better than $O(m^2)$ of converting between the power form $(\alpha^n)$ to polynomial basis. Right now, I'm just enumerating the entire field up to the $n$-th entry for power form to polynomial basis. To convert from polynomial basis to power form, I'm enumerating the field until I find an entry that matches.
Asked
Active
Viewed 185 times
2
-
I use a look-up-table myself (when feasible, e.g. when the size of the field is less than a million or thereabouts). If the field is larger, then going from $\alpha^n$ to $p(\alpha)$ for a "low" degree polynomial $p$ I would try square-and-multiply. Going the other way in a large field is an instance of the discrete logarithm problem. Meaning that in the general case no very attractive solution is known. – Jyrki Lahtonen Jan 19 '15 at 06:13
-
Was afraid of something like that. I think I'll try using a single bit lookup table that indicates if a value in the field is odd, and then doing the square-and-multiply algorithm in reverse. My memory requirements would be O(m²), and my time requirement O(m). A straight lookup table would be O(m³), a bit difficult around my required m = 16. – Russ Dill Jan 19 '15 at 08:12
-
When I was still actively programming myself, the first thing my programs did was to generate those LUTs. I only used fields of characteristic two and I internally represented elements of the field as an unsigned word/byte. This was in the DOS era, so I had to fit the LUTs into a 64kByte segment, meaning that the size of the field maxed out at 32768. Anyway, the internal presentation was then the index to LUT itself, so referring to LUT is O(1). And generating the LUT only needs to be done once. Of course, I also built a reverse table, so I had two LUTs. – Jyrki Lahtonen Jan 19 '15 at 08:22
-
See this question & answer for a toy example. In a comment to this question the OP gives a link to the use of log/antilog tables with a field of 256 elements. – Jyrki Lahtonen Jan 19 '15 at 08:24