PMMOD

While learning about infinite sets in functional programming, I remembered a program I'd written some time ago. I was interested in finding an arithmetic function that naturally produced a sudoku pattern. I was reading about Roman irregation and came across something called the Latin Square. It was a four by four grid filled with four different symbols such that no row or column contained the same symbol twice. The formula that generated this pattern was MMOD(5,[0,1,2,3,4]), which is basically modular times tables. Unforunately, the sodoku pattern only is observed when 5 is the first argument. The program demonstrates the odd patterns found by extracting primes and hammings from MMOD(n,[0..n-1]). Source is here --> http://1stclick.co.uk/PMMOD/PMMOD.c To compile under Linux, type...

gcc -o [target] [source] -lGL -lglut

into the terminal where source is where you saved the file and target is where and with what name you want the executable to be created. You may need to install the glut library which is done by typing into the terminal...

sudo apt-get install freeglut3-dev


Copyright 2008 No part of this website may be repoduced without permission