### 2D EC

Reed-Solomon erasure code (EC) is a commonly used data redundancy coding method in storage and communication systems. Through EC encoding, data can be expanded by any ratio. EC encoding can be performed in either one dimension (1D EC) or two dimensions (2D EC) to extend the original data.

The reason for introducing EC in the context of DA is to increase the probability of hiding data from being discovered. Taking the example of M + M 1D EC, it requires hiding more than M data chunks to truly hide one of the data chunks. If data sampling is performed, there is a probability of more than 1/2 of discovering data unavailability. In comparison, for the original data without EC encoding, the probability of the data being discovered as unavailable is only 1/M.

2D EC is more complex compared to 1D EC as it requires simultaneous data expansion in two dimensions. It can be visualized as shown in the following diagram:

In the DA scenario, compared to 1D EC, 2D EC allows for the extraction of a smaller amount of data to detect data unavailability. Taking an original data size of M X N as an example, 1D EC expands it to M X 2N data, and by extracting one column (M X 1 data chunks), there is a 1/2 probability of discovering data unavailability. On the other hand, 2D EC expands it to 2M X 2N data, and by extracting just one (1 X 1) data chunk, there is a 1/4 probability of discovering data unavailability. With two consecutive extractions, the probability of discovering data unavailability approaches 1/2. In scenarios where M is larger, 2D EC requires extracting a smaller amount of data compared to 1D EC.