Mathematical analysis of an iterative algorithm for low-density code decoding