tags:

views:

44

answers:

1

This explains it but only for 2 dimensions : http://en.wikipedia.org/wiki/Multidimensional_parity-check_code

While for a 2-dimensional it's rather easy, how would you code it for 3 or more dimensions ?

Thank you.

+1  A: 

The 2D example from wikipedia distributes the digits into several rows and calculates the parity for each row and column.

A 3D version would distribute the digits into rows, columns and layers (think of multiple grids stacked on one another, forming a cube). Then you just need to calculate the parity bits for the layer component and you are done.

Adrian Grigore