Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

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|improve this question
1  
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
add comment

1 Answer

up vote 1 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|improve this answer
add comment

Your Answer

 
discard

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.