From de5f06f5829a2589aa99421f056b4f8400f58b7c Mon Sep 17 00:00:00 2001 From: wolfwood Date: Fri, 16 Jun 2023 15:08:01 -0500 Subject: [PATCH] comment out optimization discussion outline --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 8344b4a..46b1530 100644 --- a/README.md +++ b/README.md @@ -82,6 +82,7 @@ The wrinkle here is that if we store all the layouts, we can use an array where ## Current Code My current appoach can be found in [](c/spiral.c). I learned about [combinadic](https://en.wikipedia.org/wiki/Combinatorial_number_system) numbers, which give a way to directly map layouts with *i* nodes to the range [0, **M** choose *i*). This allows me to use a flat array to store the set of current and previous layouts. By constructing the layout iteration code to match the combinadic ordering, the array can be written in order without lookups. Some calculation is necessary to determine the combinadic indexes of a layout's children. How to do this efficiently is the primary consideration of the wide variety of experiments in this file. + ## Invariants * all layouts with fewer than **N** nodes are dead