0
$\begingroup$

I have a set of items $I=\{i_1, i_2,...,i_m\}$ and a set of shops $S=\{s_1,s_2,...,s_n\}$. Each shop has at least one or more items and same item can appear in multiple shops. How can I mathematically write a function that results all items $\in I$ that belong to any $s_j\in S$? The problem is, I have an Idea of using partial functions, but it needs a set as input, in my case its single shop.

$\endgroup$

closed as off-topic by trying, Claude Leibovici, user91500, B. Goddard, Dando18 Sep 16 '17 at 14:41

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question is missing context or other details: Please improve the question by providing additional context, which ideally includes your thoughts on the problem and any attempts you have made to solve it. This information helps others identify where you have difficulties and helps them write answers appropriate to your experience level." – trying, Claude Leibovici, user91500, B. Goddard, Dando18
If this question can be reworded to fit the rules in the help center, please edit the question.

0
$\begingroup$

$$f:S\to P(I) \\f(s_j)=\{i\in I: g(s_j, i)\}$$ where $$g:S\times I \to \{true, false\}\\ g(s,i)\equiv ( i\textrm{ belongs to }s)$$

$\endgroup$
  • $\begingroup$ I have one question, why $I^2$? I suppose its a powerset of $I$, so shouldn't it be $P(I)$ $\endgroup$ – Cap Sep 15 '17 at 9:16
  • $\begingroup$ Yes, you are right. $\endgroup$ – Jaroslaw Matlak Sep 15 '17 at 9:23

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