3

Suppose I have a list (not a set) with entries $[x, x, x, y, z]$. Then the list is size of $5$.

What is the mathematical function that returns the number of elements?

Does cardinality only work on sets?

hardmath
  • 37,015
Olórin
  • 5,415
  • I think that this may help you. – Ivo Terek Mar 01 '15 at 04:17
  • 1
    If the list is unordered, such an object is sometimes called a multiset: http://en.wikipedia.org/wiki/Multiset . One could also call it, well, an unordered list, though this sounds like something a computer scientist might be more likely to say than a mathematician. If the order does matter, we usually write $(x, x, x, y, z)$ rather than with braces, and call the object a finite sequence or ordered list. In the ordered case, probably the most common term is length. I know of no special term for the unordered case, though probably most people would understand length here too. – Travis Willse Mar 01 '15 at 04:19

1 Answers1

4

We usually write ordered lists with parentheses, e.g. $(x,x,x,y,z)$. It would be entirely clear what you mean if you said $|(x,x,x,y,z)|=5$, though if you were trying to be excruciatingly pedantic, you might want to introduce a length function $\mathrm{len}((x,x,x,y,z))$ = 5.

nullUser
  • 27,877