Note: Not sure if this is the correct site for this question. I found other finite-autometa theory questions here, so posting here.
Suppose a language is defined over two letters
L1 = { aa , b }
We take Kleen closure over it:
S1 = aab
S2 = aaaabb
Now my question is simple, what is the string length of these two strings S1 and S2?
According to my understanding since string length can only be determined by the number of character it uses and since 'aa' is a single character so string lengths for both strings should be:
S1 = 2 characters or string of length 2
S2 = 4 characters or string of length 4
According to my teacher string length for each string is
S1 = 3 characters
S2 = 6 characters
You are confusing two different concepts: languages/strings and alphabets/symbols.
Languages are sets of strings. Alphabets are (nonempty finite) sets of symbols. Strings are (typically finite) sequences of symbols.
You say L1 is defined over two letters, but then write L1 = {aa, b}. So you could mean two things:
Under the first interpretation, S1 and S2 have lengths 2 and 4 characters, respectively. Under the second interpretation, S1 and S2 have lengths 3 and 6 characters, respectively. Crucially, the meaning of * (Kleene star) is overloaded:
Often, when it does not cause confusion, alphabets can be treated as being essentially the same as (finite, nonempty) languages of strings of length one.
HOWEVER, they are not the same thing, and dropping that distinction has confused you (and lots of other people)… so it may be a simplification of dubious value.