This is a MATLAB script for counting the number of minimum weight codewords (a.k.a error coefficient) of PAC codes. There are two scripts provided: "err_coeff_pac_parfor.m" uses parallel for loop while "err_coeff_pac.m does not.
As the following paper explains, there is a semi-closed form expression for the numeration relative to the one for polar codes. That is, knowning the the number of minimum weight codewords of polar codes, we can find consider the impact of precoding for any precoding polynomial to count the error coefficient of PAC codes. Hence, this script gives you the error coefficeint of polar codes as well.
M. Rowshan and J. Yuan, "Fast Enumeration of Minimum Weight Codewords of PAC Codes," 2022 IEEE Information Theory Workshop (ITW), 2022, pp. 255-260, doi: 10.1109/ITW54588.2022.9965901.
Additionally, a separate script for counting the number of minimum weight codewords (a.k.a error coefficient) of polar codes is provided. For more about the method used in this script, please see the paper below:
https://arxiv.org/abs/2111.08843
If you find this algorithm useful, please cite the papers above. Thanks.
Please report any bugs to mrowshan at ieee dot org