# Fast Walsh Transform. 2 3 4 5 6 7 Unexpected Distance One way to measure a sort of "correlation" between two Boolean functions is to compare their.

## Presentation on theme: "Fast Walsh Transform. 2 3 4 5 6 7 Unexpected Distance One way to measure a sort of "correlation" between two Boolean functions is to compare their."— Presentation transcript:

Fast Walsh Transform

2

3

4

5

6

7

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. 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 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 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 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:

So if we map the values in the affine truth table: {0,1} -> {1,-1}, we find the same functions as in the Hadamard development. 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.

The Fast Walsh-Hadamard Transform 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 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:

Download ppt "Fast Walsh Transform. 2 3 4 5 6 7 Unexpected Distance One way to measure a sort of "correlation" between two Boolean functions is to compare their."

Similar presentations