2
$\begingroup$

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?

  • 1
    Definitely not a question in set theory, despite the apparent use of the word "Set".2012-10-28
  • 1
    What is the main objective of constructing this model?2012-10-28
  • 0
    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?2012-10-29

1 Answers 1

2
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\}$$