0
$\begingroup$

How to prove the inequality of concatenating two languages? $|AB|\leq |A| \cdot |B|$

I know that:

Let $A,B \subseteq \Sigma^*$ and the concatenating of $A,B$ will as following: $AB=\{wx \mid w \in A, x \in B \}$. Hence by definition $\forall x \in w$ will be concatenating with every word in $B$ and vice versa, and if no words are repeated we get the new language which has the length of: $|A|\cdot|B|$. And $AB$ could be less than $|A|\cdot|B|$ because some words which could be repeated are ignored like, $\{aa,aaa\}\in A$, and $\{aa,a\} \in B$ we get: $\{aaaa,aaa,aaaaa,aaaa\} = \{aaa,aaaa,aaaaa\}$.

But I'm not sure if there is more direct way to prove it just using the inequalities with some simplifications like a normal equation?

$\endgroup$
2
  • 2
    $\begingroup$ We discourage "please check whether my answer is correct" questions, as only "yes/no" answers are possible, which won't help you or future visitors. See here and here. Can you edit your post to ask about a specific conceptual issue you're uncertain about? As a rule of thumb, a good conceptual question should be useful even to someone who isn't looking at the problem you happen to be working on. If you just need someone to check your work, you might seek out a friend, classmate, or teacher. $\endgroup$
    – D.W.
    Commented Feb 21, 2022 at 9:33
  • $\begingroup$ @D.W I don't think this is a "please check my answer" type of question. The OP simply stated how he/she tried to prove it and asked for a more "mathematical" proof of the same fact $\endgroup$
    – nir shahar
    Commented Feb 22, 2022 at 16:21

2 Answers 2

3
$\begingroup$

There is a simple function $f:A\times B\rightarrow AB$ (where $A\times B$ is the cross product of two sets).

Its not hard to show that this function is also onto, and therefore $|A|\cdot |B|=|A\times B|\ge |AB|$ as required.

$\endgroup$
0
$\begingroup$

How about induction on languages?

Proof. Assume that for every subset of $A$ the statement holds. Then there are two cases to consider:

  1. Suppose $A = \varnothing$. Then $|A \bullet B| = |\varnothing \bullet B| = |\varnothing| = 0 \leq |\varnothing| \cdot |B| = 0$.
  2. Suppose $A = S \cup T$, for any two disjoint subsets $S$ and $T$. Then $$ |A \bullet B| = |(S \cup T) \bullet B| = |(S \bullet B) \cup (T \bullet B)| \leq |S \bullet B| + |T \bullet B| \leq \\ \leq |S| \cdot |B| + |T| \cdot |B| = (|S| + |T|) \cdot |B| = |A| \cdot |B|. $$
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.