1
$\begingroup$

I am trying to prove that the product of cardinality of two languages A and B (|A|*|B|) is not always equal to cardinality of concatenated languages A and B (|AB|).

I'm thinking that I can do something like:

The cardinality of {∅}, |{∅}| = 1.

Let A be language with cardinality (# of strings) of 5.

|{∅}|*|A| = 5.

However, |A{∅}| != 5 as concatenating with something that doesn't exist results in still results in ∅. Therefore, |A{∅}|=0.

Is this a correct approach or am I doing something wrong here?

2 Answers 2

1

Eric has explained where your reasoning originally went wrong. To see how it can happen that $|AB| \neq |A|\times|B|$, you need to consider the possibility that given a string $x = ab$ with $a \in A$ and $b \in B$ different values of $a$ and $b$ may give the same $x$. E.g., if your alphabet comprises the single letter $\alpha$ and $A = B =\{\alpha, \alpha\alpha\}$, then $|A| = |B| = 2$, but $|AB| = |\{\alpha\alpha, \alpha\alpha\alpha, \alpha\alpha\alpha\alpha\}| = 3$ (and not $4$, because there are two ways of writing $\alpha\alpha\alpha$ as $ab$ with $a \in A$ and $b \in B$).

2

This is not correct, because $\{\emptyset\}$ is not the same as $\emptyset$. While $\{\emptyset\}$ has one element, $\emptyset$ has no elements, and so $|A|\cdot|\emptyset|=5\cdot 0=0$, not $5$.

  • 0
    I'm sorry, I just edited my post to fix the mistakes. Is this still the wrong approach to prove the cardinality problem that I mentioned?2017-01-29
  • 1
    How are you considering $\{\emptyset\}$ to be a language? If you mean for $\emptyset$ to denote the empty string, then it is not true that $A\{\emptyset\}$ is empty, since you can take any element of $A$ and concatenate it with the empty string.2017-01-29
  • 0
    Thank you for the explanation. That's what I was trying to clarify as I wasn't sure.2017-01-29