Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9039451
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T09:44:01+00:00 2026-06-16T09:44:01+00:00

I believe this language isn’t context free, because there is no chance that a

  • 0

I believe this language isn’t context free, because there is no chance that a PDA could compare 2 blocks of 0’s and 1’s of the same length and also remember it’s length for later use.

Unfortunately, I have no idea how to prove it.

I tried using the pumping lemma to no avail…

I’ve also tried to assume by contradiction that the language is context free and use the fact that the intersection of a context free language with a regular language is also context free (by finding some mysterious regular language L), and surprisingly (or not) – all my efforts were in vain…

Any help would be appreciated

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T09:44:02+00:00Added an answer on June 16, 2026 at 9:44 am

    Is the language { 0n1n0k | k != n} context free?

    No, the language L = { 0n1n0k | k!=n } is not a context free language. Also, Class of Regular Languages is subset of class Context free languages.

    You Idea using PDA is correct and obvious way to show that language is not context free.
    And we can’t draw PDA for language 0n1n0k because after matching prefix 0n to 1n stack become empty, then we don’t have stored information to check weather suffix 0K are equal to n or not.

    HINT: For formal proofs

    • First

    L = {0n1n0k | k!=n } now complement of L is L‘.

    L‘ = {{0n1n0n} that is well known context sensitive language (can be proof).

    And the complement of a context-sensitive language is itself context-sensitive.

    • Second

    For Pumping Lemma:

    L = {0n1n0k | k!=n } is Union of L1 and L2, Where
    L1 = {0n1n0k | k > n } and
    L2 = {0n1n0k | k < n },

    L = L1 U L2

    L1 and L2 both are non-context-free Language. and union of two non-context free languages are non-context-free.( that can easily proof by grammar)


    Also, The union, concatenation of two context-sensitive languages is context-sensitive.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How can I show that the following language is (not) context-free? The argument that
I believe this question applies equally well to C# as to Java, because both
There is some stuff that I never see in any programming language and I
I believe this is a fairly simple question but it is something I am
I believe this code may require more effort to comprehend than average, so I'm
I believe this question might have been previously attempted in 2006 on a different
I believe this question applies to any of the For Html helpers, but my
I believe this questions has been asked in some or the other way but
I believe this is a beginner's CSS question. I am utilizing the method described
I believe this to be related partially to short-circuiting logic, but I couldn't find

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.