Cryptography and Network Security
Page 126 on this book
\documentclass[usenames,dvipsnames]{beamer}
\usepackage{colortbl}
\usepackage{dcolumn}
\usefonttheme[onlymath]{serif}
\usepackage{amsmath}
\usepackage{array,multirow,booktabs,fourier,polynom}
\usepackage[justification=centering]{caption}
\usetheme{Madrid}
\newcolumntype{2}{D{.}{}{2.0}}
\begin{document}
\begin{frame}
\frametitle{Polynomial Arithmetic over $GF(2)$}
\polylongdiv{x^3+x+1}{x+1}
\end{frame}
\end{document}
Can I make the division shown in the book using \polylongdiv
? I know that it can be achieved using array
, but \polylongdiv
is very simple.
Best Answer
A little while back I had a go at reimplementing polynomial long division as what I wanted wasn't easily available via the
polynom
package. I've just had a go at putting in modular arithmetic and the first attempt seems to work with some caveats - the main one being that I haven't implemented modular division, so providing your steps don't involve figuring out the multiplicative inverse of an integer modulo a base, then you should be fine.Sample code:
Result:
(The pink background is a "feature" of the screenshot program.)
Code is on github.