Reputation
Top tag
Next privilege 250 Rep.
View close votes
Badges
9
Newest
 Critic
Impact
~2k people reached

  • 0 posts edited
  • 0 helpful flags
  • 13 votes cast
May
21
comment Set builder notation for matching element pairs
Thanks for your answer. Do you think the multiset union symbol $\uplus$ is clear and popular enough to use on its own? Or would I need to write a sentence or even define it (that it adds the sum together).
May
21
accepted Set builder notation for matching element pairs
May
20
comment Set builder notation for matching element pairs
@copper.hat Thanks. Is there any other (less cumbersome) notation I could use?
May
20
comment Set builder notation for matching element pairs
@copper.hat I get it now... but if $S$ is not a set, the set builder notation is not applicable I guess. What would you use instead, if $S$ was a multi-set?
May
20
comment Set builder notation for matching element pairs
@copper.hat In my particular case I am collecting the 'b' part. (In reality they are numbers that I will need to sum over with $\sum$ but as such it is unrelated to this problem.) To use the surname and name example, the pairs are ('murphy', 'joe') and ('murphy', 'tony') and I want ('joe', 'tony'). In the case $S$ is not a set but a bag, if there happens to be ('murphy', 'joe'),('murphy', 'joe'),('murphy', 'tony') I want ('joe','joe','tony').
May
20
comment Set builder notation for matching element pairs
@hardmath Well in my particular case order does not matter (although it would be useful to learn how to do it with a sequence too I guess :) ). So yes the correct definition is a bag or multi-set.
May
20
comment Set builder notation for matching element pairs
@copper.hat I don't want to count the number of times. I want a list of the actual elements. Imagine it is a pair of 'surname' and 'name' and we're extracting the list of 'names' with the same 'surname'.
May
20
comment Set builder notation for matching element pairs
@hardmath Yes. Thats why I said $S$ becomes a list and not a set, you can see it as a sequence. But I don't know if there is any elegant mathematical notation to iterate through and extract the list (or bag or whatever) of $b$ items.
May
20
asked Set builder notation for matching element pairs
May
11
accepted Right notation to recurse over a sequence or list
May
11
comment Right notation to recurse over a sequence or list
Thanks. Yes I was looking for something like that, but I wasn't sure if the colon was accepted mathematical notation for the head / tail of a list. (In Haskell its written :, in Scala its written ::). To me it seems a bit more correct, because $xs$ can be the empty list.
May
10
comment Right notation to recurse over a sequence or list
Regarding the right fold (vs left fold), the result would be different though right? I want to first apply $f()$ to $x_1$, then $x_2$ etc. while with the left fold it applies $f()$ to $x_n$ first.
May
10
comment Right notation to recurse over a sequence or list
Thanks. My concern is that if $n = 1$ then $x_1, ..., x_{n-1}$ becomes invalid, because $n-1$ becomes $0$, so $x_1, ..., x_0$ is incorrect, when it should be the empty sequence. I once saw somewhere a different syntax, but I cannot recall where, but it was something like $F(p, h:t) = F(t, f(h, a))$ but I am not sure if it was with the colon and whether it is correct.
May
8
awarded  Critic
May
7
revised Right notation to recurse over a sequence or list
added 3 characters in body
May
7
asked Right notation to recurse over a sequence or list
Feb
7
comment Is there a syntax to refer to the domain of a partial function?
Thanks. Is $Dom(R)$ standard or do I have to define it as you did before I use it?
Feb
7
comment Is there a syntax to refer to the domain of a partial function?
Thanks for clarifying that. What guarantees the uniqueness of the first element of the pair though with respect to the other pairs? And what is the way of referring to the set of first elements of each pair?
Feb
7
asked Is there a syntax to refer to the domain of a partial function?
Feb
7
accepted Can I use set operators on sequences?