Python’s “map” method and permutations of lists

Posted by Jason Polak on 18. February 2018 · Write a comment · Categories: computer-science · Tags: , ,

Let’s look at Python’s map function. What does this function do? Here is the syntax:

It takes a function called function and applies it to each element of iterable, returning the result as an iterable. For example:

The output of this program is:

More »

Polynomial over finite field: permutation polynomial?

Posted by Jason Polak on 18. February 2018 · Write a comment · Categories: computer-science · Tags: , ,

Let’s assume you have a polynomial over a finite field $\F_q$, defined in Sage. How can you tell whether it’s a permutation polynomial? That is, when is the corresponding function $\F_q\to\F_q$ bijective?

This is how you might have a polynomial over $\F_q$ defined in Sage:

Here, the variable $x$ refers the element $x$ in the isomorphism $\F_q \cong \F_p[x]/\alpha(x)$ and $t$ is the variable in the polynomial ring $\F_q[t]$. Is $f$ a permutation polynomial? That of course depends on what $q$ is.
More »

Book Review: Hsu’s Behind Deep Blue

Posted by Jason Polak on 13. February 2016 · Write a comment · Categories: computer-science

Author: Feng-Hsiung Hsu
Title: Behind Deep Blue: Building the Computer that Defeated the World Chess Champion

Photo by Jason Polak (A chess set I received when I was sixteen).

I love battles of skill and stories of seemingly impossible goals. That’s the stuff of Bruce Lee, the Riemann hypothesis, and getting a tenure-track position. And then there’s the computer chess problem: create a machine that can beat the world chess champion at tournament-time chess. This happened nearly twenty years ago, when Deep Blue defeated Garry Kasparov in a six-game match. This is the story told in Behind Deep Blue by Feng-Hsiung Hsu.

Today in 2016, far more advanced chess programs like Stockfish running on a laptop can easily vanquish world-class human players. Hsu’s book however, has lost none of its intrigue or charm. Of course, there are several books written about Deep Blue, many of them chess analyses. Behind Deep Blue however is not a chess book. After all, if it were I wouldn’t be reviewing it on a mathematics blog. Instead, Behind Deep Blue is a story about a bunch of guys solving a computer science and hardware engineering problem.
More »