Presentation is loading. Please wait.

Presentation is loading. Please wait.

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


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:

1 Fast Walsh Transform

2 2

3 3

4 4

5 5

6 6

7 7

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

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

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

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

12 Hadamard Matrix

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

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

15 The Fast Walsh-Hadamard Transform Let's do the FWT of function f: ( ) (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:

16 The Fast Walsh-Hadamard Transform

17

18

19

20

21


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


Ads by Google