mathstodon.xyz is one of the many independent Mastodon servers you can use to participate in the fediverse.
A Mastodon instance for maths people. We have LaTeX rendering in the web interface!

Server stats:

2.8K
active users

#datastructures

4 posts4 participants0 posts today

Interesting idea, although I don't know if it needs to be a primitive. The os.tree() function in #Python does this for file systems and, as a model, could be used as the basis for other kinds of tree structures. (Note that os.tree() also properly handles both top down and bottom up processing.)

> Programming languages should have a tree traversal primitive. blog.tylerglaiel.com/p/program

Tyler Glaiel's Blog · Programming languages should have a tree traversal primitiveBy Tyler Glaiel
#programming#C#CPP

🎯 Let’s Juggle Arrays! Master the Art of Rotation with the Juggling Algorithm 🔄✨
In this post, we’ll break down the steps and uncover the magic behind this algorithm:
✅ Why cycles matter : How GCD helps us divide the array into manageable chunks 🔢
✅ Step-by-step rotation : Move elements in a juggling pattern—no extra memory needed! 🚀
✅ Interactive examples : Follow along as we rotate arrays left or right with ease 🔄
#Coding #Algorithms #DataStructures #TechTips #ProblemSolving

For $PROJECT I am wondering how sparse a bitmap needs to be before it's worth looking at alternatives.

Say I have a 32-bit random seed and it produces a tuple (x_1, x_2, ..., x_n) of attributes through some process we want to analyze. What I'd like is to build an index that lets me identify seed values with, say, x_1=4, or quickly intersect several indexes to find a seed value with x_1=4 and x_2 = 13 and x_3 = 5.

If the domain of x_i is small (say, 16 different values) then we could use a bunch of bitmaps -- they're only 512MiB each. Each bitmap will be only 6% populated, is that enough to consider a fancier representation that compresses the bitmap?

I've read "Searchable compressed representations of very sparse bitmaps" stevenpigeon.com/Publications/ but my feeling right now is this isn't a good fit.

There are a bunch of ideas of the form "index a collection of containers, which may be arrays or compressed arrays or bitmaps" which probably only work well when the set is not very evenly distributed.