- Update ->4/5/17 I bought my first Knuth book today! It's on Combinatorics/Sorting/Searching. This is getting serious :)
Distracting_KATAS
This is a repo for all the katas that distract me while I'm trying to get work done. This is mainly because I like working on puzzles and am working on getting better at:
- Algorithms
- Data Structures
- Mathematical Puzzles
- Logic in solving Problems
- Matrices and Linear Algebra (eigenvalues, eigenvectors, etc)
- Regex (regular expressions) -> need to get better at this
- Arithmetic Progression/ sequences in programming -> Design patterns
- Dictionaries => key value pairs and matrices
- Enums (specifically in Ruby, which I don't really know right now, or wait...in Python!)
- Bitwise operations => Indempotency, Monotonicity, etc -> bin(n+(1 << 32))
- Currying in other languages (eg. Javascript)
- Datetime in Python (stripping/ parsing using RegEx)
- Flattening nested lists using Lambdas
I also have a bad habit of not leaving \n after my code. Need to get better at including that on Github. I apologize for meaningless commits of \n, but it won't become a habit.
Making a list of concepts learning through katas:
-
Recursion with Memoization
-
Binary Expansion
-
Polybius squares
-
Hamming Distances
-
Swapping two Numbers without Temp: (where swap is function swap([ary]))
ary[0] = ary[0] + ary[1]
ary[1] = ary[0] - ary[1]
ary[0] = ary[0] - ary[1]
-
Pascal's Triangle
-
Collatz Conjecture (3n + 1)
-
Isogeny -> Cryptography
-
Bresenham algorithm
-
Annulus Theorem -> => Area of Annulus-> (PI * L^2) / 4
-
Holomorphic Functions
-
Heron's Formula => Math.sqrt(p(p-a)(p-b)(p-c)) where a is length a, b is length b, c is length c and p is perimeter / 2
-
Monte Carlo Integration
-
Tetration -> Knuth's Up Arrow Notation vs Conway's Chained arrow notation (1->2->3->4 etc)
-
Zeckendorf's Theorem and Negafibonacci numbers
-
Fenwick trees
-
Logical disjunction/conjunction -> boolean mathematics XOR OR, etc
-
Inverse Gamma Function
-
Jaccard Similarity Coefficient
-
Chebyshev Polynomials -> de Moivre's formula
-
Runge's phenomenon
-
Levenshtein distance vs Hamming distance
-
Edit Distance -> Smith-Waterman algorithm, Needleman-Wunsch algorithm -> NLP applications -> sorting strings
-
Mobius Function -> number theory/ combinatorics
-
Trilinear Interpolation
-
Crypto -> Polygraphic Substitution, Transposition Ciphers, Pigpen Ciphers, Vigenere ciphers
-
Polybius Squares x1 y1 x2 y2 row and column to determine encryption of letter
-
Fisher -Yates shuffle, Sattolo's algorithm
-
Taylor Series --> Zeno's paradox
-
Voronoi (diagram) / Centroidal Voronoi tessellation -> Fortune's algorithm
-
Petersen Graphs/ Spanning Trees (Combinatorics/ Graph Theory)
-
Incremental Voronoi Insertion -> Farthest-first-traversal algorithm (greedy algos)
-
Bowyer-Watson Algorithm -> adds point to Delaunay triangulation -> used to obtain Voronoi diagram -> very interesting! -> think point clouds and terrain
-
RMST-> Rectilinear Minimum Spanning Tree -> weight of edge between a pair of pints is rect dist between 2 pts
-
Antipodal theorem -> Borsuk-Ulam theorem (reading S. Ulam's book)
-
Baire Category Theorem (BCT)
-
Alpha-Beta Pruning
-
Ergodic transformations -> "a mapping of a plane onto itself, in which the successive images of a point were dense in the whole plane." -Ulam
-
GAN-> Ian G. (AI wtb) generative adversarial network
-
Evolutionary algorithms (Ud#city)
-
Homomorphic Encryption and Differential Privacy (Ud#city)
-
Motivic Cohomology
-
Quantum bogosort :)
-
Pell numbers -> recursive
-
Langton's ant -> two-dimensional universal Turing machine
-
Topological Sort -> DAG (Directed Acrylic Graph)
-
Grothendieck topology
-
Manacher's algorithm
-
Gamma function
-
Simplicial set
-
Hadamard Matrix
-
Blum Blum Shub : pseudorandom number generator
-
Gyrovector spaces
-
Neville's Method of Polynomial Interpolation
-
Transitivity (graph theory)
-
Circuits, Cycles, Trees and Digraphs (graph theory)
-
Heyting Algebra (from PS community on FP)
-
Skeleton Category of Finite Sets (from PS community on FP)
-
Heyting Functors (from PS community on FP)
-
Cnoidal waves and the Korteweg-de Vries equation, Boussinesq approximation/ waves
-
Ultra filters..from E Kiehl's talk on "A Categorical View of Computational Effects."
-
Outstanding explanation of DAGs, Directed Acrylic Graphs, using example of buying travelling (you need to get a visa to get a passport, you need foreign exchange to buy gifts, etc).
- Richard Southwell also has a great intro to Mathematica that directly shows the relationship between Adjacency Matrices and something like Directed Graphs. See here.
-
McGregor Graphs. See Knuth video -> Sat Solvers, Van der Waerden's Problem etc
-
Implementing a Garbage Collector in C++ -> Boehm garbage collector, mark-sweep algorithm
-
Row Polymorphism vs Subtyping via PureScript
-
System F vs System U and Graph Reduction
- pertaining to Haskell compiler and lazy evaluation
-
Runge-Katta and Lipschitz Continuity, Adams Moulton
-
Prefix sum (see this Lambda World talk on Naperian Functors)
-
Tambara functors from Bartosz talk (which I usually have to watch about five times)
-
Bitonic Sort courtesy of Compiling to Categories