1

Questions. I have a sequence (ordered list) composed of $n=10$ elements, i.e. $A=\{3,1,3,7,7,3,1,1,3,2\}$.

  1. How can I write, with a general notation, the subsequence $B_k$ that has identical elements, i.e. $\{3,3,3,3\}$, $\{7,7\}$, $\{1,1,1\}$, including single-element subsequences, like $\{2\}$, and such that $\bigcup B_k = A$? I mean, the unique values in $A$ are $\{3, 1, 7, 2\}$. How can I write a generic $B_k$, such that if I choose $k=3$, I get $B_{3} = \{3,3,3,3\}$, if I choose $k=1$, I get $B_{1} = \{1,1,1\}$, if I choose $k=7$, I get $B_{7} = \{7,7\}$, and if I choose $k=2$, I get $B_{2} = \{2\}$?

  2. For each subsequence, $B_{3} = \{3,3,3,3\}$, $B_{1} = \{1,1,1\}$, $B_{7} = \{7,7\}$, and $B_{2} = \{2\}$, how can I denote the first element of each subsequence respect to $A$? I mean, the first element of $B_{3} = \{3,3,3,3\}$ is the $1^{st}$ element of $A$, the first element of $B_{1} = \{1,1,1\}$ is the $2^{nd}$ element of $A$, the first element of $B_{7} = \{7,7,7\}$ is the $4^{th}$ element of $A$, and the first element of $B_{2} = \{2\}$ is the $10^{th}$ element of $A$.

Ommo
  • 329
  • 1
    Not aware of any universally recognized notation for that, but you can come up with something. If $A={a_i}$ Then, for an element $N$, we might define $A[N]$ to be the set of indices $i$ for which $a_i=N$. Thus, in your example, $A[7]={4,5}$ , $A[2]={10}$, and $A[8]=\emptyset$. Just one possibility, of course. – lulu Nov 06 '23 at 11:24
  • Thanks @lulu :-) If possible, I would need something general, I mean, with indices (and not with numbers like $A[7]={4,5}$) – Ommo Nov 06 '23 at 12:21
  • any other suggestion? – Ommo Nov 06 '23 at 16:12
  • Sorry, I really don't understand what you are trying to do. Your example seems very cumbersome and I don't see what information is conveyed by it. My notation (which may not serve your purpose, I understand), tells you the common value and the indices that take that common value. But perhaps you want something else. – lulu Nov 06 '23 at 16:17
  • If it helps, you can adapt my notation and write, say, $A[a_1]$ to denote all the indices which have the same value as $a_1$. Thus, with your $A$, $A[a_1]={1,3,6,9}$. That seems worse to me, as it doesn't reveal the common value, but again I don't understand how you intend to use this. – lulu Nov 06 '23 at 16:21
  • thanks for your comment. I edited my question. Is it a bit clearer now? – Ommo Nov 06 '23 at 16:44
  • Not really, I'd have said that my notation does that. Writing, e.g., $A[3]={1,3,6,9}$ means that the sequence ${a_1, a_3, a_6, a_9}={3,3,3,3}$. If all you care about is the number of $3's$ you could just count that sequence, or write something like $n_A(3)=4$ to mean than $A$ contains exactly four $3's$. – lulu Nov 06 '23 at 16:50
  • thanks, how can I write $\bigcup B_k = A$ with your notation, if $B_k$ indicates a generic subsequence of A where all the elements of $B_k$ are identical to $k$? – Ommo Nov 06 '23 at 16:54
  • 2
    I really don't understand. I think you have very precise requirements that you are not articulating, or at least that I am not understanding. Anyway, it's clear that $\bigcup A[k]={1, \cdots, 10}$ since every index takes exactly one value. I have no idea what the union of your $B_k's$ means as you have lost the ordering. If you tell me that $B_1={3,3,3,3}$ how do I know where to put those $3's$ in the sequence? But, honestly, if you don't like my suggestion, don't use it! As I say, it may well not be suitable to your purpose. – lulu Nov 06 '23 at 16:59
  • thanks a lot for your comment @lulu :-) – Ommo Nov 06 '23 at 17:19

1 Answers1

0

I don't quite understand why anyone would want to do this, but I believe that there is some relatively standard notation for expressing the idea outlined in the question. First, a couple of notes:

  1. Don't use curly braces for this. Almost universally, curly braces denote sets, which are unordered and which do not contain repeated elements. Typically, one would assume that $$ \{3,1,3,7,7,3,1,1,3,2\} $$ denotes the set $$ \{3,1,7,2\}. $$ The usual notation for a sequence is an $n$-tuple, which is denoted by round braces. Thus the sequence intended in the original question would best be denoted by $$ (3,1,3,7,7,3,1,1,3,2).$$ If you want to be understood, use round braces, not curly braces.

  2. A sequence is a function. In the modern understanding, a sequence is a function, and a function is a set of ordered pairs (with the first element of each pair coming from the domain $\mathbb{N}$, and the second element of each pair coming from some co-domain). The notation $$ A = (3,1,3,7,7,3,1,1,3,2), $$ is a shorthand for the set $$ \{ (1,3), (2,1), (3,3), (4,7), (5,7), (6,3), (7,1), (8,1), (9,3), (10,2)\}. $$ Again, $A$ is a function. This notation indicates, for example, that $A(9) = 3$. This is usually denoted by the somewhat more concise notation $A_9 = 3$.

    A reasonable way of thinking of this is that an ordered pair $(m,x)$ indicates that the $m$-th element in the sequence is $x$—the first element gives a position in the list, while the second element gives the value which is found at that position.

With the above in mind, there is some somewhat standard notation which could be used. The intention of the question seems to be a desire to determine which indices (i.e. elements of the domain) map to specific values. For example, which indices map to $3$? This is precisely the preimage of $\{3\}$. Standard notation for this is $$ A^{-1}( \{3\} ) = \{1,3,6,9\}.$$ That is, the preimage of the set $\{3\}$ with respect to the function $A$ is the set $\{1,3,6,9\}$. Since it is understood that $A$ is a sequence (a special kind of function), this could be understood as saying that the first, third, sixth, and ninth entries in the list $A$ are all $3$.

The subsequence which consists only of $3$s is, then $$ A|_{A^{-1}(\{3\})} = \{(1,3),(3,3),(6,3),(9,3)\}, $$ i.e. the restriction of the function $A$ to the preimage of $\{3\}$ with respect to $A$. Note that this restricted function isn't quite a sequence in the usual sense, so tuple notation is probably not really appropriate here.

The original sequence is, then $$ A = \bigcup_{x\in\operatorname{img}(A)} A|_{A^{-1}(\{x\})},$$ i.e. the union of preimages of singletons $\{x\}$ with respect to $A$, where the union is taken over all elements $x \in \operatorname{img}(A)$ (the image, or range, of $A$).

  • Thanks a lot :-) just a question, has the image of $A$ only the unique elements of $A$, or all the elements of $A$? I would indeed need a set or a subsequence of the unique elements of $A$. If I start from the sequence $A=(3,1,3,7,7,3,1,1,3,2)$ and then I pass to the set $A={3,1,3,7,7,3,1,1,3,2}$ (even though I do not know how to do it, or if it is even possible), which should be the same as $A={3,1,7,2}$, i.e. I would have the unique elements like in a multiset...right? Indeed, my intention would be to use a subset or subsequence of the unique elements only, i.e. $(3,1,7,2$). – Ommo Nov 06 '23 at 18:32
  • 1
    @Ommo I don't understand your question. A set is an unordered collection of elements in which each element appears only once. You can fix some object $x$, and ask whether or not $x$ is an element of some set $A$. There are only two possible answers: yes or no. It doesn't make sense to ask "how many time is $x$ an element of $A$?" It either is, or is not, an element. – Xander Henderson Nov 06 '23 at 19:28
  • Thanks a lot :-) My question is the following: does the image of $A$, i.e. $\text{img}(A)$, correspond to $A = (3,1,3,7,7,3,1,1,3,2)$ or to something else? I am just trying to understand what you mean with $x\in \text{img}(A)$, so, which values $x$ can take. Other way around, do "singletons ${}$" correspond only to unique values of $A$, i.e. $3$, $1$, $7$, $2$? I guess that, with your statement "A set is an unordered collection of elements in which each element appears only once", you refer to the singletons ${x}$, but I am not sure. – Ommo Nov 06 '23 at 20:43
  • 1
    @Ommo No. The image of $A$ is a set. In this case, it is the set ${3,1,7,2}$. For any element of the image, you can define the preimage of that element, but the usual notation for preimages acts on sets, so the notation looks like $A^{-1}( {x} )$ (i.e. the preimage of the singleton set ${x}$ with respect to $A$, which consists of all of the points in the domain which map to $x$). – Xander Henderson Nov 06 '23 at 21:50
  • Perfect! Thanks a lot! Issue solved! :-) :-) – Ommo Nov 06 '23 at 21:58
  • I didn't downvote, but if you define a function $f$ as a set of ordered pairs such that if $(a,b)\in f$ and $(a,c)\in f$, then $b=c$, then it doesn't really make sense to speak of the "codomain" of a function. For instance, consider the function $f:\mathbb R\to\mathbb R$ given by $f(x)=x$, and the function $g:\mathbb R\to\mathbb C$ given by $g(x)=x$. – Joe Dec 28 '23 at 17:28
  • If you adopt the "set of ordered pairs" definition, then $f$ and $g$ are the same set, and so it doesn't make sense to say that $f$ has a different codomain to $g$, since that violates the principle that if two mathematical objects are equal, then they have identical properties. There is some discussion of this on Mathematics Stack Exchange – see When do two functions become equal?. – Joe Dec 28 '23 at 17:28
  • The way to get around this problem is to define a function as a triple $(A,B,f)$, where $A$ is the domain, $B$ is the codomain, and $f$ is the set of ordered pairs. The triple definition is due to Bourbaki, I believe. – Joe Dec 28 '23 at 17:28
  • @Joe Nothing I've written really contradicts what you've said. I just chose not to be so pedantic in writing the answer, as (a) the answer is already pretty pedantic and (b) this particular distinction was not terribly relevant to the question being asked. Yes, a function is a triple consisting of a set of ordered pairs, a domain, and a codomain. But we often elide the domain and codomain and refer to a function by just the set of ordered pairs (in the same way that a field is really a field $(k,+,\cdot)$, but we often just talk about "the field $k$"). – Xander Henderson Dec 29 '23 at 13:43