1 / 21

Unexpected Distance

One way to measure a sort of "correlation" between two Boolean functions is to compare their truth tables and count the number of bits which differ; this is their Hamming distance.

astro
Download Presentation

Unexpected Distance

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. One way to measure a sort of "correlation" between two Boolean functions is to compare their truth tables and count the number of bits which differ; this is their Hamming distance. • Since we expect about half the bit positions to differ (on average), we can subtract that expected distance and come up with what I am calling -- for lack of a better term -- the "unexpected distance" (UD). The magnitude of the UD relates to just how unexpected the distance is, while the sign indicates the direction. Consider two functions and their difference: Unexpected Distance

  2. Here we have a Hamming distance of 6 between the two functions. This is an unexpected distance or UD of 6 - 4 = +2, which means that 2 more bits differ than we would expect. Unexpected Distance

  3. Another way to compute Boolean correlation is to accumulate the bits of one function (as integers) by addition or subtraction as selected by the other function. For example: Unexpected Distance

  4. This technique yields the UD value directly. With some work, we can now compare a Boolean function to each possible affine Boolean function, and develop both a distance and an unexpected distance to each: Unexpected Distance

  5. Hadamard Matrix

  6. So if we map the values in the affine truth table: {0,1} -> {1,-1}, we find the same functions as in the Hadamarddevelopment. These are the Walsh functions, and here both developments produce the same order, which is called "natural" or "Hadamard." • Walsh functions have fast transforms which reduce the cost of correlation computations from n*n to n log n, which can be a very substantial reduction. Hadamard Matrix

  7. A Fast Walsh Transform (FWT) essentially computes the correlations which we have been calling the "unexpected distance" (UD). It does this by calculating the sum and difference of two elements at a time, in a sequence of particular pairings, each time replacing the elements with the calculated values. The Fast Walsh-Hadamard Transform

  8. Let's do the FWT of function f: (1 0 0 1 1 1 0 0) • (a',b') = (a+b, a-b) • So for the values (1,0), we get (1+0, 1-0) which is just (1,1). We start out pairing adjacent elements, then every other element, then every 4th element, and so on until the correct pairing is impossible: The Fast Walsh-Hadamard Transform

  9. The Fast Walsh-Hadamard Transform

  10. The Fast Walsh-Hadamard Transform

More Related