Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

Modulo-N code

From Wikipedia, the free encyclopedia
Lossy Compression Algorithm
This articlerelies largely or entirely on asingle source. Relevant discussion may be found on thetalk page. Please helpimprove this article byintroducing citations to additional sources.
Find sources: "Modulo-N code" – news ·newspapers ·books ·scholar ·JSTOR
(October 2025)

Modulo-N code is alossy compression algorithm used to compresscorrelated data sources usingmodular arithmetic.

Compression

[edit]

When applied to two nodes in anetwork whose data are in close range of each other modulo-N code requires one node (say odd) to send the coded data value as the raw dataMo=Do{\displaystyle M_{o}=D_{o}}; the even node is required to send the coded data as theMe=DemodN{\displaystyle M_{e}=D_{e}{\bmod {N}}}. Hence the name modulo-N code.

Since at leastlog2K{\displaystyle \log _{2}K} bits are required to represent a numberK in binary, the modulo coded data of the two nodes requireslog2Mo+log2Me{\displaystyle \log _{2}M_{o}+\log _{2}M_{e}} bits. As we can generally expectlog2Melog2Mo{\displaystyle \log _{2}M_{e}\leq \log _{2}M_{o}} always, becauseMeN{\displaystyle M_{e}\leq N}. This is how compression is achieved.[1]

A compression ratio achieved isC.R.=log2Mo+log2Me2log2Mo.{\displaystyle {\text{C.R.}}={\frac {\log _{2}M_{o}+\log _{2}M_{e}}{2\log _{2}M_{o}}}.}

Decompression

[edit]

At the receiver, by joint decoding, we may complete the process of extracting the data and rebuilding the original values. The code from the even node is reconstructed by theassumption that it must be close to the data from the odd node. Hence the decoding algorithm retrieves even node data as

CLOSEST(Mo,N.k+Me).{\displaystyle \operatorname {CLOSEST} (M_{o},N.k+M_{e}).}

The decoder essentially finds the closest match toMoN.k+Me{\displaystyle M_{o}\simeq N.k+M_{e}} and the decoded value is declared asN.k+Me{\displaystyle N.k+M_{e}}

Example

[edit]

For a mod-8 code, we haveEncoder

D_o=43,D_e=47M_o=43,M_e=47 mod(8) = 7,

Decoder

 M_o=43,M_e=47 mod(8) = 7, D_o=43,D_e=CLOSEST(43,8⋅k + 7)4385+7{\displaystyle 43\simeq 8\cdot 5+7} D_o=43,D_e=47

Modulo-N decoding is similar tophase unwrapping and has the same limitation: If the difference from one node to the next is more thanN/2 (if the phase changes from one sample to the next more thanπ{\displaystyle \pi }), then decoding leads to an incorrect value.

See also

[edit]
  • DISCUS is a more sophisticated technique for compressing correlated data sources.
  • Delta encoding is a related algorithm used in lossless compression algorithms designed for correlated data sources.

References

[edit]
  1. ^Franco, Fernando (2021-08-27)."Three effective ways to create modulo n integer sequences".Franco Fernando. Retrieved2025-09-21.
Retrieved from "https://en.wikipedia.org/w/index.php?title=Modulo-N_code&oldid=1314884534"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2025 Movatter.jp