Top Banner
Fast Walsh Transform
21

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.

Apr 01, 2015

Download

Documents

Elmer Nessmith
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: 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.

Fast Walsh

Transform

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

2

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

3

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

4

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

5

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

6

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

7

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

Unexpected DistanceOne 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:

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

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.

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

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:

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

Unexpected DistanceThis 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:

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

Hadamard Matrix

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

Hadamard Matrix

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.

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

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.

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

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:

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

The Fast Walsh-Hadamard Transform

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

The Fast Walsh-Hadamard Transform

Page 18: 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.
Page 19: 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.
Page 20: 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.
Page 21: 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.