I’ve been lurking for awhile an occasionally posting. I work in IT, and I used to do a lot of programming. One of the topics I was reading here recently was discussing how to quickly access items stored in a memory palace. One of the suggestions was to number every 5th location by associating some shape like: 5 = hook, snake, Superman, seahorse, a wave or water. Then jump to the closest memory location at for example 15 then work backward to get whatever is stored at 13.
There is a very similar problem in computer science when you have a data table which stores information at an index. So we might store information about Jacob, age 23, blonde, blue eyes, etc. at index number 13. A computer might start at index 1 and compare it to Jacob, and move on to 2, 3, 4 etc until it arrives at Jacob in index 13. This is called a linear search and isn’t very efficient, especially as the table gets bigger.
So to get around this issue programmers have developed something called a “hash table”. The way this works is you take something about the data, in this example we used Jacob and we create a hash function that when fed in the name jacob will return the index jacob is stored at. So we might add up the acsii values of the letters, 106+97+99+111+98= 511. We take 511*.025 = 12.775 round that up to 13 and go straight to Jacob at index 13. Because you always use the hash function to calculate the index of a search term, you’ll always find Jacob.
If you use the same hash function on a different name and it returns index 13, then in the computer you’d use another data structure called a linked list to connect that name to Jacob. So you’d have to look through stuff linked into index 13, but that would be quicker than going through the whole list from index zero to the end.
So I began to wonder if this type of thing could be used to gain faster access to data in your memory palace.
I haven’t really worked out how you could implement an efficient hash function in your head. It could be something as easy as having a number of memory palaces, and if it is related to food, the memory palace is the shopping centre, which has 26 aisles A-Z, so you’d quickly jump to the right palace and the correct aisle and do a quick walk down it to find what you want.
But a better hashing function would allow for more spread and less linking, so you might be able to jump straight to what you want.