From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=0.6 required=5.0 tests=BAYES_20,FREEMAIL_FROM, INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,7fafe440ec61d8a3,start X-Google-Attributes: gid103376,public From: j80edd Subject: HELP! ADA and Binary Strings Date: 2000/03/19 Message-ID: <38D4CEB9.A2D70036@netscapeonline.co.uk>#1/1 X-Deja-AN: 599503196 X-Report: Report abuse to abuse@netscapeonline.co.uk Content-Transfer-Encoding: 7bit X-Original-NNTP-Posting-Host: 10.20.1.166 X-Accept-Language: en-GB,en Content-Type: text/plain; charset=us-ascii X-Trace: 19 Mar 2000 11:58:39 GMT, 10.20.1.166 Organization: Netscape Online member MIME-Version: 1.0 Newsgroups: comp.lang.ada Date: 2000-03-19T00:00:00+00:00 List-Id: 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