What algorithms exist for this hypergraph data structure?

This is very minimal, but it hints at a type of ontology structure and software system I want to develop. Does it remind you of any known, studied data structures and algorithms?
ontology = set()

def add(s):
ontology.add(s)

def show():
for item in ontology:
print(item)

def link(s1, s2):
# Python requires you add hashable objects to sets to determine duplicates; sets aren’t hashable because mutable, apparently
ontology.add(frozenset([s1, s2]))

def delete(s):
ontology.discard(s)
ontology = set()

def add(s):
ontology.add(s)

def show():
for item in ontology:
print(item)

def link(s1, s2):
# Python requires you add hashable objects to sets to determine duplicates; sets aren’t hashable because mutable, apparently
ontology.add(frozenset([s1, s2]))

def delete(s):
ontology.discard(s)
The key thing is this allows reification. You can add two things, link them, and that linked unit acts as a thing. You can link it to other things. Every link is a hyperedge. Every hyperedge is a node. It’s basically a subset of a set of elements closed under pairing. One would want to develop more useful algorithms, at this point. For starters: - An algorithm that checks that every element in every linked pair is present in the set. - An algorithm that finds all the elements linked with the same element. - An algorithm that combines every element linked to an element into a single element linked to that element. The latter is partially a way to establish “definitions as extensions”: if we associate “animal” with “duck”, “animal” with “lion”, etc., we can merge all the animals into a single set of animals, and link it to the word “animal”. Do you recognize this exact structure? Know any papers on it?
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server