Category Archives: computer-science

OpenMP Tutorial: Part 2

This is a continuation of the OpenMP tutorial. Last time we wrote the following program:

It gives a proof that the number $N = 770948605618065977$ is prime by testing all the possible factors up to the integer part of the square root of $N$. To recap, this program creates two threads and tests half […]

Simple OpenMP Tutorial

Today, I'll give you a simple and practical example of using OpenMP with gcc. What's OpenMP? It's a C/C++/Fortran library for writing multithreaded applications. What's that? Most computers these days have multiple cores so that multiple tasks can be done in parallel. With multiple cores, you can edit pictures and listen to music at the […]

Python's "map" method and permutations of lists

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:

Polynomial over finite field: permutation polynomial?

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 […]

Book Review: Hsu's Behind Deep Blue

Author: Feng-Hsiung Hsu Title: Behind Deep Blue: Building the Computer that Defeated the World Chess Champion 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 […]