#!/usr/local/bin/perl # say the M,N and rate R # of Gallager codes made from Steiner systems. # # I ran this and appended the answers to code/SUMMARY/buildable # # see also buildable.p $tstring = "S" ; $kmin = 1 ; $kmax = 55 ; foreach $k ( $kmin..$kmax ) { $M = 6 * $k + 1 ; &doit; $M = 6 * $k + 3 ; &doit; } sub doit { $N = $M * ($M-1) / 6 ; $K = $N - $M ; $R = $K/$N ; printf "%7.2g\t%s\t%4d\t%4d\n" , $R , $tstring , $N , $M ; }