comp.lang.ada
 help / color / mirror / Atom feed
From: j80edd <j80edd@netscapeonline.co.uk>
Subject: HELP! ADA and Binary Strings
Date: 2000/03/19
Date: 2000-03-19T00:00:00+00:00	[thread overview]
Message-ID: <38D4CEB9.A2D70036@netscapeonline.co.uk> (raw)

I have an algorithm which i need to implement in ada but i am having a
little trouble with it. The problem is defined below.

INPUT: A set S of k binary strings, each of length n; a positive integer
r.
QUESTION: Is there an n-bit string y such that for every string x in S,
the Hamming distance, H(x, y) is at most r?.
COMMENTS: The Hamming distance, H(x, y), between binary strings x and y
of length n, is the number of bit positions in which x and y have
different values.

In order to calculate then hamming distance the xor opperator is used on
the two binary strings, and then the number of ones is counted. The
problem is how to hold the binary strings. Is there any way in ada to
access the binary value of a integer or character?  currently i am
trying to us an array of an array of type boolean. Any help would be
greatly appreciated.


Scott





             reply	other threads:[~2000-03-19  0:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-03-19  0:00 j80edd [this message]
2000-03-19  0:00 ` HELP! ADA and Binary Strings Robert A Duff
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox