News for hackers. Stuff that matters.
Re:Talking is throwing fictional worlds at one another by YeGoblynQueenne on Tuesday September 15, 2020 @10:57AM (#24481899)
Ah, I see - my mistake. You're saying that one can count n "a"s followed by n "b"s without the need for a context-free grammar (or any grammar!). I agree.

What I meant by "the result will still have to be a context free grammar" was a context-free grammar that incorporates a counting mechanism, as part of its definition. Something like this, perhaps (in Definite Clause Grammars notation so you can actually run it as a Prolog program):

  'S' --> 'A'(N), 'B'(N).
  
  'A'([1]) --> 'A'.
  'A'([1|As]) --> 'A', 'A'(As).
  
  'B'([1]) --> 'B'.
  'B'([1|Bs]) --> 'B', 'B'(Bs).
  
  'A' --> [a].
  'B' --> [b].
Though that one is recursive (or at least the counting mechanism is) and I'm not sure how you'd do the same thing without recursion to be honest (or without going up a couple of levels to Turing-completeness so you can call arbitrary functions). So, never mind- I just misunderstood what you meant.
Re:Talking is throwing fictional worlds at one another by foldr on Tuesday September 15, 2020 @11:10AM (#24482049)
I see, fair enough. I think I may have misread your original comment.
Re:Talking is throwing fictional worlds at one another by YeGoblynQueenne on Tuesday September 15, 2020 @11:15AM (#24482108)
No, I misread yours :)