Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We are supposed to come up with a mathematical model describing a file system and its operations. The file system stores metadata in a database, and retrieves it when necessary. How does one go about modelling this in set theory?

eg: F : Set of all Files, T : Set of all Tags f belongs to F, t belongs to T g(f) gives t where all the associated tags for that file are returned h(t) gives f where all the associated files for that tag(s) are returned

then how does one model it using set theory? any hint, clue, links?

share|cite|improve this question
Definitely not a question in set theory, despite the apparent use of the word "Set". – Asaf Karagila Oct 28 '12 at 19:32
What is the main objective of constructing this model? – Alex Oct 28 '12 at 19:59
to represent the system (which happens to be a filesystem) as a mathematical model. if set theory is not applicable, then what would be appropriate? – kicker86 Oct 29 '12 at 3:50
up vote 2 down vote accepted
The following dynamic and variable sets are defined as, 

$F$ : Set of Files
$T$ : Set of Tags
$S$ : Set of Tags in query ( $S \subseteq T$ ) $$ R = \{(f,t) \mid f \,\, has \,\, tag \,\,t; f \in F, t \in T\}$$ $$g(f) = \{t : f \, R \, t\}$$ $g$ is an operation which takes input as a file $f$ and returns the set of tags ($t \in S$) related by $R$ to that file.

$$h(t) = \{f : f \, R \, t\}$$ $h$ is an operation which takes input as a tag $t$ and returns the set of files ($f \in F_{S}$) related by $R$ to that tag.
The relation $R$ is stored as a set of ordered pairs $(f,t)$, where $R \subseteq F \times T$.
A query operation on a single tag is expressed as: $$q(t) = F_{S} \,\, where \,\, \{f \in F_{S} \mid h(t) = f\}$$

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.