https://github.com/dfischer/godel
https://github.com/dfischer/godel
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/dfischer/godel
- Owner: dfischer
- License: gpl-2.0
- Created: 2021-03-19T23:12:18.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-09-10T03:41:49.000Z (almost 7 years ago)
- Last Synced: 2025-03-05T05:16:59.090Z (over 1 year ago)
- Homepage:
- Size: 82 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Godel
This repository is a proof of concept of an implementation of [Godel Hashes](https://doi.org/10.1109/SCAM.2014.40),
a perfect and compact hash which preserves structural information.
Here, a simple encoding of alphabetical characters is used as the prime basis for a countable total order.
E.g.
`'a' = 1, 'b' = 2 ... 'z' = 26`
For encoding purposes, a "word", or sequence of characters, is defined as a function of the character domain
and a range of integers which indicate an index in the word.
E.g.
```
f = "hello"
f(0) = 'h'
f(1) = 'e'
f(2) = 'l'
f(3) = 'l'
f(4) = 'o'
```
Using this functional interpretation of a word, we can use Definition V.3 of the paper to compute an order-preserving
Godel Hash of any word.
As demonstrated in the linked paper, Godel Hashes are subject to all set operations. This allows efficient search of arbitrary data using the hash itself, **not** the data.