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 9000835
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T00:21:34+00:00 2026-06-16T00:21:34+00:00

How can I show that the following language is (not) context-free? The argument that

  • 0

How can I show that the following language is (not) context-free? The argument that it’s not regular goes as follows.

enter image description here

I suspect this language to be context-free… The reason why I think this, is because L = {an bm c{n+m} | n,m >= 0} is context-free. A proof for this can be found at

http://cg.scs.carleton.ca/~michiel/TheoryOfComputation/TheoryOfComputation.pdf (p102 in pdf; p94 in text)

The proof is kind of long and it can probably be proven much shorter by making use of the equivalence with PDAs (i.e. pushing first some symbol n “+” m times on the stack, and consequently taking it off again n+m times.) Either way, this example makes me believe that my original language must also be context-free. Yet, I don’t really see how I can argue for this.

  • 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-16T00:21:35+00:00Added an answer on June 16, 2026 at 12:21 am

    No, your assumption is not correct!

    The language L = { x = y + z | where x, y, z are binary integers and x is the sum of y and z} is not Context Free Languages(CFL).

    I try to explain.

    First of all, consider following examples strings s in language L.

    110 = 100 + 10   
    1110 = 1100 + 10  
    :
    111000 = 110000 + 1000    
    

    In my explanation LHS is X in question and RHS is Y + Z.

    What is pumping Lemma for CFL?
    If a language L is context-free, then there exists some integer p ≥ 1 such that any string s in L with |s| ≥ p. (where p is a “pumping length” can be written as

    s = uvxyz
    with substrings u, v, x, y and z, such that
    1. |vxy| ≤ p,
    2. |vy| ≥ 1, and
    3. uv nxy nz is in L for every natural number n.  
    

    This definition | ≥ 1, and
    3. uv nxy nz is in L for every natural number n.

    Notice: Middle part of s , vxy not greater then pumping length p. (condition 1)

    [SOLUTION]:

    Let us choose a string s in L that satisfy condition |s| ≥ p

    our s is 1m0q = 1m-10q + 10q , where q > p , m-1 > p

    Now total length of s is 2m + 2q -1 that is greater then p and of-course for some combination of natural numbers this inequality is possible (I am not including length of + and = to keep explanation simple )

    Now our s is in language and sufficiently large according to pumping lemma for CFG.

    Now break it:

    u vxy z = 1m0q = 1m-10q + 10q

    Try to find v and y to pump and generate new string in language L, But keep in mind v and y should not be too much far than p (according to condition 1).

    You don’t have any choice for v and y such that you can generate new strings in language!

    (Step-1): Because if you chose to increase 1 then you can’t pump both side RHS and LHS of = because last 1 on LHS is at q (>p) to first 1 of RHS. hence not possible to generate new strings in language.

    (Step-2): Suppose you like to pump 0 again its not possible to increase 0 on LHS and RHS together because last 0 on LHS in m-1 (>p) distend to first 0 on RHS.

    (Step-3): You can’t pump a combination of 111...000... both side. , try this you will get string out of language L.

    Try other options too within the rules of Pumping Lemma. you would not find correct choice for v and y.

    [ANSWER]

    So he have a string s in L that is sufficiently large and using that we can’t generate new strings in language. its contradict to Pumping Lemma for CFL hence given L is not a CFL.

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

Sidebar

Related Questions

can anyone recommend a website crawler that can show me all of the links
Is there an IDE/Tool/script/something that can show call hierarchy and/or data flow in Scala+Java
I want to design a splash screen that can show the current loading process
It seems that we can show layers and even use a different zPosition for
I know that you can show current GPS moving location on map with WP7
I've an application that you can show and close several Dialogs with: showDialog(...) removeDialog(...)
I'm looking for applications that have rich maven pom(s) and can show lot of
I'm currently trying to setup a GUI in Tkinter so that I can show
As we know, press up arrow key can show history commands,but i found that
On a blank winform code can be added to show lines that intersect (crosshairs)

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.