5

I am being asked to define several of my algorithms in mathematical terms to describe my work to a customer. I am trying to determine if anybody knows whether common operators for collections like sequences, lists, tuples, etc have been defined. If so, is there a good reference that I could be pointed to. Thanks. I am interested in the actual symbols used. I am wondering if the following would make sense or be appropiate to anybody.

Given two sequences (or strings):

S = (A, B, C) and T = (A, D, H)

In my mind, the intersection of these sequences would look like S ∩ T = (A) and the union of these sequences would be S ∪ T = (A, B, C, A, D, H)

sesteel
  • 75
  • 5

2 Answers2

9

Sequences or lists in which there is an implied ordering of the elements are commonly delimited between 〈 and 〉. For example:

S = 〈A, B, C〉 (They look like <A, B, C>, but taller. HTML entities are &lang; and &rang; )

If there is no order implied, use set notation.

S = {A, B, C}

Tuples, such as rows from a table or ordered pairs/triples, use parentheses:

car = (Toyota, Camry, 2010)
coordinates = (10, 45)

The union and intersection of sets are represented with the ∪ and ∩ symbols, as usual.

For lists, the operations are different. You concatenate lists rather than finding their union. This can be represented as S+T or simply ST (depending on who's watching).

As tuples are indivisible, the union or intersection of two of them is nonsensical.

You might want to ask this on https://cstheory.stackexchange.com/

Barry Brown
  • 4,095
0

Sounds like set notation and set-builder notation. Check out the links for more details and references.

JB King
  • 16,775