# Universal set of subsets A and B

The question is: Two subsets given:
$A = \{ Z, H, O, V, N, I, R \}$;
$B = \{ I, G, O, R \}$

The aim is to find universal set of this subsets. I tried to use definition of "universal set" and here are my suggestions:

1. Universal set is array of UNIQUE characters of subsets:
$U = \{ Z, H, O, V, N, I, R, G \}$

2. Universal set is ALL characters of subsets:
$U = \{ Z, H, O, V, N, I, R, I, G, O, R \}$

3. Universal set is all alphabetical characters:
$U =\{ A, \dots Z \}$

Which one is true?

The universal set $U$ could be either $(1): U = A\cup B$ or $(3)$ (in which case $A\cup B\subsetneq U)$:

Without more information, we cannot conclude which, if either. The Universal Set is simply the set which contains all elements in the domain. Without the domain clearly defined, we cannot conclude just how large $U$ is; we can only conclude, by the definition of "subset", that if $A \subseteq U$ and $B\subseteq U$, then $A\cup B \subseteq U$.

The second "option" you list is simply the same set as described by $(1)$: A set of elements is a set with each element counting once and only once. So, for example, $\{1, 1, 2, 3, 3\} = \{1, 2, 3\}$.

• Thank you for explanations! The next task I need to complete is construct a table of the encoder for this universal set (using Huffman algorithm). I think that it's doesn't matter, is it 1st or 3rd alternative because entries of characters that neither in A nor B are equals to 0 and can't influence on table of encoder. Am I right? – Igor Dec 6 '13 at 17:09
• It is 1 or 3 because U contains all elements in A, all elements in B, and perhaps (but not necessarily) more elements. We need only list each element once. – Namaste Dec 6 '13 at 17:18
• OK, thanks for this too :) Once again (to clarify this for me) - choosing 1 or 3 can't affect on Huffman's table of encoder, right? – Igor Dec 6 '13 at 17:23
• I don't forgot it :) Carlos to forgive vary :-) - your answer was right too – Igor Dec 6 '13 at 17:31
• @amWhy: Very nice feedback! +1 – Amzoti Dec 7 '13 at 0:20

According to set theory, both 1. and 2. are the same set: $\{X,Y,X\}=\{X,Y\}$. Repetition and order does not matter. This set is equal to $\{G,H,I,N,O,R,V,Z\}$ and can be notated as $A\cup B$ (union of sets $A$ and $B$).

Any universal set must contain $A$ and must contain $B$ so it must contain its union: $A\cup B\subseteq U$. So, whatever you take as you universal set is up to you as longer as $G\in U$, $H\in U$, $I\in U$, $N\in U$, $O\in U$, $R\in U$, $V\in U$ and $Z\in U$. Your alternative 3. is such a solution.

• Thank you too! It's quite clear for me now. I can repeat the question I placed in comment below - youe opinion is also important for me: The next task I need to complete is construct a table of the encoder for this universal set (using Huffman algorithm). I think that it's doesn't matter, is it 1st or 3rd alternative because entries of characters that neither in A nor B are equals to 0 and can't influence on table of encoder. Am I right? – Igor Dec 6 '13 at 17:11