Group Abstract Group Abstract

Message Boards Message Boards

Fast Fourier transform visualizations

Posted 3 years ago

enter image description here

Attachments:
POSTED BY: Todd Rowland
4 Replies
Posted 3 years ago
POSTED BY: Brad Klee

Brad, this is pretty interesting. I will look more closely later, but a quick question is why aren't you using BooleanConvert[#, "ANF"] ? Is it the same ANF?

What has me most confused in my original post, is that I can rearrange the basis vectors by hand to simplify the DFT matrix, but cannot see how to do that systematically (e.g. in code which works for general 2^n). It looks like your pictures might admit a similar simplification.

POSTED BY: Todd Rowland
Posted 3 years ago

Hi Todd, nice typing, but did you mean "important columns" rather than "other stuff"... I'm glad I checked because I may not have noticed the similarity to my recent proof finding the Algebraic Normal Form for certain radix cellular automata:

TermsUpTo[vars_ : {__Slot}, nMax_
  ] := TermsUpTo[vars /. Slot -> S, nMax] /. S -> Slot

TermsUpTo[vars_ /; ! MemberQ[Head /@ vars, Slot], nMax_Integer
  ] := TermsUpTo[vars, Table[nMax, {Length[vars]}]]

TermsUpTo[vars_ /; ! MemberQ[Head /@ vars, Slot], nMax_ : {__Integer}
  ] := Reverse[SortBy[Union[Flatten[
     Outer[Times @@ DeleteCases[Times[#1, #2], 0] &,
      Flatten[Outer[MapThread[#1^#2 &,
          {vars, {##}}] &,
        Sequence @@ Range /@ nMax,
        1], Length[nMax] - 1],
      Tuples[{0, 1}, Length[nMax]], 1]]],
   Flatten[{#} /. {Power[x_, y_] :> Table[x, {y}],
       Times -> List}] &]]

CAtoANF[color_, radius_] := Function[Evaluate[
    Mod[TermsUpTo[Slot /@ Range[2 radius + 1], color - 1], color]]
   ] @@@ Tuples[Reverse[Range[0, color - 1]], 2 radius + 1]

With[{CAtoANFPrimes = CAtoANF[Prime[#], 1] & /@ Range[4]},
 Column[MapIndexed[
   Row[Show[#, ImageSize -> 400] & /@ {ArrayPlot[#1],
       ArrayPlot[Inverse[#1, Modulus -> Prime[#2[[1]]] ]]}, 
     Spacer[5]] &, CAtoANFPrimes]]]

prime proofs

Effectively a constructive proof of existence of ANF for first few primes, which is expected to extend to all primes. If you try this with composites mixed in, matrix inversion breaks, and it starts to look like Galois Field Theory will be necessary.

However, we can go immediately to four colors, because I fixed the proof in that one particular case:

CAtoANF4 = Function[Evaluate[
     Mod[TermsUpTo[Slot /@ Range[6], 1], 4]]
    ] @@@ Tuples[{1, 0}, 6];

Row[Show[#, ImageSize -> 400] & /@ {ArrayPlot[CAtoANF4],
   ArrayPlot[Inverse[CAtoANF4, Modulus -> 4]]}, Spacer[5]]

four color proof

Notice similarity to your BitReverseOrder, but it's not exactly the same.

Anyways, I tried to go to radix six, but couldn't figure it out. Any ideas?

Do you know a reference for a proof that even says ANF exists for any radix?

I might lecture this summer how useful ANF is for complexity ordering search spaces... When you can cut something down from say $3^{27}$ to $3^{10}$ it becomes a lot easier to be thorough and actually get some results. Even if you stay at $3^{27}$ or higher, extra info about functional complexity can help building ocean maps for deep dive searches.

POSTED BY: Brad Klee

enter image description here -- you have earned Featured Contributor Badge enter image description here Your exceptional post has been selected for our editorial column Staff Picks http://wolfr.am/StaffPicks and Your Profile is now distinguished by a Featured Contributor Badge and is displayed on the Featured Contributor Board. Thank you!

POSTED BY: EDITORIAL BOARD
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard