Hello,

  Is there a way in R to construct an (error correcting) binary code
  e.g. for an source alphabet containing integers from 1 to say 255
  with the property that each pair of distinct codewords of length m
  is at Hamming distance exactly m/2 ?

  I was suggested to use so called simplex codes, which should be
  fairly standard, but I haven't found a direct way via R packages
  to do so, that's why I ask whether there might be in indirect way 
  to solve this problem.

  Example:
  v1  =c(1,2,3,4)
  v2  =c(1,2,5,6)
  similarity(v1,v2)=0.5, (because 2 out of 4 elements are equal).
  Obviously, a binary representation of would yield a different
  similarity of:
  binary(v1) =001 010 011 100
  binary(v1) =001 010 101 110
  similarity(binary(v1),binary(v2))= 9/12

  Remark: The focus here is not on error correction, but rather the
  binary encoding retaining similarity of the elements of vectors.

Many thanks,
Bjoern


	[[alternative HTML version deleted]]

