statusfailed / open-hypergraphs

a datastructure for scalable combinatorial syntax
MIT License
10 stars 0 forks source link

Black box small finite function stats #1

Open chadbrewbaker opened 7 months ago

chadbrewbaker commented 7 months ago

A code I wrote a few years back to take any function from A -> A for small A and fingerprint single element iteration graphs around every fixed point. Simple stats like index/period histograms too.

https://github.com/chadbrewbaker/endoscope/blob/master/src/Endoscope.hs

Might be useful as a linter to suggest likely function equalities or suggest function element permutations that are faithful up to single element iteration and fixed points. If you want a I have a C code specialized for f: u32 -> u32. It takes about 500mb of RAM and can count range collapse or fixed points in about 5-30 seconds for most functions as a few assembler operations. The computation can be trivially parallelized on CPU/GPU but you will still have to store and merge the 2^32 bitvectors.