1

I dont need a proof, since this is an objective exam question and allowed 2 mins only. The options are regular or cfl or csl. I dont understand how to tackle this.

If we I write it as

(a^n b^n | n<100) UNION (a^n b^n | n>100)

Now call first part L1 and second part L2 and then try to compliment using,

De-morgons Law L'= L1' INTERSECTION L2'

I dont think thats the right way or a quick way considering the fact we need to spend 2-3 mins only. Any better approch to this?

Njol
  • 3,271
  • 17
  • 32
Gate Aspirant
  • 21
  • 1
  • 3
  • Wouldn't the complement simply be {w ∈ Σ* | w != a^n b^n ∀ n != 100} (i.e. Σ*\L)? – Njol Jan 22 '14 at 14:44
  • Thanks @Njol but compliment is given by Sigma* - L which I think has more strings than what your language shows, I maybe wrong , but I usually convert language into what it "says". According to me compliment of the given language means that mean All strings that are not a^100 b^100. This looks right but still not sure. – Gate Aspirant Jan 22 '14 at 14:54
  • A complement in general (i.e. in set theory) is the universe (which depends on the context, for languages it's Σ* I guess), minus the set. Thus if you have the definition of the set you can simply negate it to get the complement. – Njol Jan 22 '14 at 15:01
  • Yes but here how do I know what class of language I endup doing a compliment, surely it would be inside CSL but how to say its not in regular or cfl or csl, some discussion on a facebook group ended up in a conclusion that its cfl, but I dont understand it a single bit and doubt its correctness. I can share it here if I dont get voted down for pasting its link here. – Gate Aspirant Jan 22 '14 at 15:10
  • L is a CFL as {a^n b^n ∀ n ∈ N} is a CFL. And since the complement of a CFL cannot be a CFL your only option left is CSL. BTW: You should rephrase the question if you want to know the class of the complement of L. – Njol Jan 22 '14 at 15:23
  • 1
    @Njol `since the complement of a CFL cannot be a CFL` is NOT CORRECT it may or may not be a CFL. I know its cfl (L), and i think question is asking about its compliment only, still I'll make it more clear – Gate Aspirant Jan 22 '14 at 15:42
  • I'll better cease this discussion then because I can't come up with a (valid) simple proof for the class of L complement :S – Njol Jan 22 '14 at 15:47

1 Answers1

1

That is the right way to do, L = {a^n b^n | n<100} UNION {a^n b^n | n>100}

The first part is regular and second part is DCFL. Now, L' = COMP({a^n b^n | n<100}) INTERSECT COMP({a^n b^n | n>100})

regular complement is always regular and DCFL complement is always DCFL and hence CFL.

So, Regular intersect CFL gives CFL.

Arjun Suresh
  • 91
  • 1
  • 11