discrete mathematics in computer science
play

Discrete Mathematics in Computer Science Tuples and the Cartesian - PowerPoint PPT Presentation

Discrete Mathematics in Computer Science Tuples and the Cartesian Product Malte Helmert, Gabriele R oger University of Basel Sets vs. Tuples A set is an unordered collection of distinct objects. A tuple is an ordered sequence of objects.


  1. Discrete Mathematics in Computer Science Tuples and the Cartesian Product Malte Helmert, Gabriele R¨ oger University of Basel

  2. Sets vs. Tuples A set is an unordered collection of distinct objects. A tuple is an ordered sequence of objects.

  3. Sets vs. Tuples A set is an unordered collection of distinct objects. A tuple is an ordered sequence of objects.

  4. Tuples k -tuple: ordered sequence of k objects ( k ∈ N 0 ) written ( o 1 , . . . , o k ) or � o 1 , . . . , o k � unlike sets, order matters ( � 1 , 2 � � = � 2 , 1 � ) objects may occur multiple times in a tuple objects contained in tuples are called components terminology: k = 2: (ordered) pair k = 3: triple more rarely: quadruple, quintuple, sextuple, septuple, . . . if k is clear from context (or does not matter), often just called tuple

  5. Tuples k -tuple: ordered sequence of k objects ( k ∈ N 0 ) written ( o 1 , . . . , o k ) or � o 1 , . . . , o k � unlike sets, order matters ( � 1 , 2 � � = � 2 , 1 � ) objects may occur multiple times in a tuple objects contained in tuples are called components terminology: k = 2: (ordered) pair k = 3: triple more rarely: quadruple, quintuple, sextuple, septuple, . . . if k is clear from context (or does not matter), often just called tuple

  6. Equality of Tuples Definition (Equality of Tuples) Two n -tuples t = � o 1 , . . . , o n � and t ′ = � o ′ 1 , . . . , o ′ n � are equal ( t = t ′ ) if for i ∈ { 1 , . . . , n } it holds that o i = o ′ i .

  7. Cartesian Product Definition (Cartesian Product and Cartesian Power) Let S 1 , . . . , S n be sets. The Cartesian product S 1 × · · · × S n is the following set of n -tuples: S 1 × · · · × S n = {� x 1 , . . . , x n � | x 1 ∈ S 1 , x 2 ∈ S 2 , . . . , x n ∈ S n } . Ren´ e Descartes: French mathematician and philosopher (1596–1650) Example: A = { a , b } , B = { 1 , 2 , 3 } A × B =

  8. Cartesian Product Definition (Cartesian Product and Cartesian Power) Let S 1 , . . . , S n be sets. The Cartesian product S 1 × · · · × S n is the following set of n -tuples: S 1 × · · · × S n = {� x 1 , . . . , x n � | x 1 ∈ S 1 , x 2 ∈ S 2 , . . . , x n ∈ S n } . Ren´ e Descartes: French mathematician and philosopher (1596–1650) Example: A = { a , b } , B = { 1 , 2 , 3 } A × B =

  9. Cartesian Product Definition (Cartesian Product and Cartesian Power) Let S 1 , . . . , S n be sets. The Cartesian product S 1 × · · · × S n is the following set of n -tuples: S 1 × · · · × S n = {� x 1 , . . . , x n � | x 1 ∈ S 1 , x 2 ∈ S 2 , . . . , x n ∈ S n } . The k -ary Cartesian power of a set S (with k ∈ N 1 ) is the set S k = {� o 1 , . . . , o k � | o i ∈ S for all i ∈ { 1 , . . . , k }} = S × · · · × S . � �� � k times Ren´ e Descartes: French mathematician and philosopher (1596–1650) Example: A = { a , b } , B = { 1 , 2 , 3 } A 2 =

  10. (Non-)properties of the Cartesian Product The Cartesian product is not commutative, in most cases A × B � = B × A . not associative, in most cases ( A × B ) × C � = A × ( B × C ) Why? Exceptions?

  11. (Non-)properties of the Cartesian Product The Cartesian product is not commutative, in most cases A × B � = B × A . not associative, in most cases ( A × B ) × C � = A × ( B × C ) Why? Exceptions?

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend