# Set notation question.

Registered User
edited September 2008
So I know that |A| Would be 'the number of elements in A', so |{^, a, aabb}| = 3

I have a question on my homework where I have to discuss the statement |AB| = |A||B|

How am I to understand this question? Is this valid in English:
"The number of strings formed by concatenating a string from set A with a string from set B is equal to (???)"

Legionnaired on

## Posts

• Registered User regular
edited September 2008
"The number of strings formed by concatenating a string from set A with a string from set B is equal to the number of strings in A multiplied by the number of strings in B"

Seems reasonable and correct. Given that on the left side we're only allowed to take one string from A and concatenate one string from B, this is correct because the number of possible combinations would be the number of choices for A times the number of choices for B.

Daenris on
• Registered User regular
edited September 2008
As far as I can tell,
"The number of strings formed by concatenating a string from set A with a string from set B is equal to the number of strings in A multiplied by the number of strings in B"

is the correct interpretation. It's not true though, because if A={a,aa} and B={a,aa}, then AB={aa,aaa,aaaa}. Also, what if one of the sets is the null set?

Marty81 on
• Registered User regular
edited September 2008
Marty81 wrote: »
As far as I can tell,
"The number of strings formed by concatenating a string from set A with a string from set B is equal to the number of strings in A multiplied by the number of strings in B"

is the correct interpretation. It's not true though, because if A={a,aa} and B={a,aa}, then AB={aa,aaa,aaaa}. Also, what if one of the sets is the null set?

Yeah, there is that because you end up with four results (a, aaa, aaa, aaaa) but obviously two of them are identical. It depends on whether or not you cull the results from your AB concatenation before counting the elements. It's been a number of years since I've dealt with any set theory stuff, so I'm not sure what you'd do.

Though if a set is null you get the correct result of 0, because you can't concatenate any elements of B onto A because there are no elements in B. If however, set B contains a null string, then it has one element and again the result is correct.

Daenris on
• Registered User regular
edited September 2008
I believe a set by definition does not contain duplicate elements, so the statement is not true. However, |AB| <= |A||B| would hold.

FunkyWaltDogg on
Burnage wrote:
FWD is very good at this game.
• Registered User
edited September 2008
I believe a set by definition does not contain duplicate elements, so the statement is not true. However, |AB| <= |A||B| would hold.

Truth.

A = {1, 2, 3} and B = {3, 4, 5}

AB = {1, 2, 3, 4, 5}

|AB| = 5, but |A||B| = (3)(3) = 9.

CrystalMethodist on
• Registered User regular
edited September 2008
I believe a set by definition does not contain duplicate elements, so the statement is not true. However, |AB| <= |A||B| would hold.

Truth.

A = {1, 2, 3} and B = {3, 4, 5}

AB = {1, 2, 3, 4, 5}

|AB| = 5, but |A||B| = (3)(3) = 9.

Well, no. First off, in this case AB is talking about concatenation, not union. So with your example, the concatenation AB = {13,14,15,23,24,25,33,34,35} which is 9 elements. This is dealing with string/language sets. Though as seen in the example already given it's not always the case that |AB| = |A||B|

Daenris on
• Registered User regular
edited September 2008
So I know that |A| Would be 'the number of elements in A', so |{^, a, aabb}| = 3
The word you're looking for is cardinality. |A| represents the cardinality of the set A.

Azio on