What is a make sense (meaningful) example of language that an unrestricted grammar could generate?

I have learned that:

  1. Unrestricted grammar is used to define (or describe) a formal language.
  2. Unrestricted grammar is used to define recursively enumerable set [https://en.wikipedia.org/wiki/Recursively_enumerable_set][1].

I’d like to find a meaningful example for #1 case which is similar to below context sensitives grammar example to learn the purpose of unrestricted grammar. I could find a meaningful example for context sensitives grammar but I could not find a one for the unrestricted grammar yet. Could you help me?

Language for “Network racing game record” with below record instances:

Mr. Bean Male Player 1

Ms. Emma Female Player 2

Mr. Hải n/a Computer 3

Ms. Tú n/a Computer 4

Production rule:

S ⟶ Title Name TAB Sex UserType TAB Rank

Title WomanName ⟶ "Ms. " WomanName

Title ManName ⟶ "Mr. " ManName

WomanName TAB Sex "Player" ⟶ WomanName TAB "Female" "Player"

ManName TAB Sex "Player" ⟶ ManName TAB "Male" "Player"

Name TAB Sex "Computer" ⟶ Name TAB "n/a" "Computer"

Name ⟶ WomanName

Name ⟶ ManName

Sex ⟶ "Male"

Sex ⟶ "Female"

UserType ⟶ "Player"

UserType ⟶ "Computer"

Rank ⟶ "1"

Rank ⟶ "2"

Rank ⟶ "3"

Rank ⟶ "4"

WomanName ⟶ "Emma"

WomanName ⟶ "Tú"

ManName ⟶ "Bean"

ManName ⟶ "Hải"

TAB ⟶ "\t"

Why there is no Turing Machine that accepts the Diagonal Language?

Given the diagonal language

$ $ L_d = {i: \sigma_i \notin L(M_i)}$ $

Where $ M_i$ are all Turing Machines and $ \sigma_i$ are all the words, if you put in in a Matrix like this:

$ $ \begin{array} {|c|c|c|c|c|c|c|} \hline & \sigma_1 & \sigma_2 & \sigma_3 & \sigma_4 & \sigma_5 & …\ \hline M_1 & 1 & 0 & 1 & \dotsb & \dotsb & \dotsb \ \hline M_2 & 0 & 0 & 1 & \dotsb & \dotsb & \dotsb \ \hline M_3 & 1 & 0 & 1 & \dotsb & \dotsb & \dotsb \ \hline M_4 & \vdots & \vdots & \vdots & 1 & \dotsb & \dotsb \ \hline M_5 & \vdots & \vdots & \vdots & \vdots & \ddots & \dotsb \ \hline \vdots & \vdots & \vdots & \vdots & \vdots & \vdots & \ddots \ \hline \end{array}$ $

Then $ L_d$ is represented by the numbers in the diagonal of the matrix. In class I was told that there is no TM that accept $ L_d$ , but I do not quite understand why is that, could somebody help?

PS: The above explanation was included because I did not know if this is called Diagonal Language in English, Spanish is my mother tongue.

How to interpret this context free language?

$ S -> aAA$

$ A -> aS | bS | a$

Trivial thing:

starting and ending with a

Atleast 3 a’s are definitely present

(These are very layman observations…but seriously I am unable to figure out what exactly this language is all about. …) My attempt:

What I am able to generate



a bS A

a ba AA A

a ba ***

This suggests after b there should be atleast 1 a

*(Coz those *** have all

  1. a’s


  1. if bS used then again a ‘ba**’


  1. if aS used length also increases by atleast 3.)*

I know this is not a good analysis..and so I am not expecting any answer but would definitely expect some comments about some intuition or idea..plz any help would be much regarded..

(Although answers are always welcome 😉 )

How to set C++ language standard for VS2019 in an Unreal project?

I am trying to a simple thing, just like that, in a header file;

#include <filesystem> #include <iostream>   namespace fs = std::filesystem;   

And IntelliSense goes: namespace std has no member filesystem.

Okay no worries, it’s an easy fix. Just set the C++ language standard in the propery pages…

Well, it turns out it isn’t, it’s not an option in Unreal VS project. Tried typing in search bar, View -> Property pages, but no luck.

Okay let’s try doing the whole thing in a console project first.

Same message from IntelliSense as before.

Ok, no worries, I found this.

I found my settings under: Project > projectname Properties

And voila, the console app works.

Let’s try it in the Unreal project.

Well, well… My options are limited here.


I had a look around in the project settings as well:


How do I get this filesystem header work with my project?

How can Kneser-Ney Smoothing be integrated into a neural language model?

I found a paper titled Multimodal representation: Kneser-Ney Smoothing/Skip-Gram based neural language model. I am curious about how the Kneser-Ney Smoothing technique can be integrated into a feed-forward neural language model with one linear hidden layer and a softmax activation. What is the purpose of the Kneser-Ney in such a neural network, and how can it be used for learning the conditional probability for the next word?

C language programming

I want to create a simple triangle by hash and like this one # ## ### I can create a triangle by hash n×n width and length and hope also to create the above triangle so i hope anyone would give me some hint on how to do that

L = {x / |x| = 3}. Is this language regular?

L = { x / |x| = 3 }

Assume that x belongs to alphabet {0,1}. I think the above language is regular. A DFA can be used to determine the above language. Am i correct? Is the above language regular?

If this language L is regular, then it should satisfy pumping lemma. Then there exist w = xyz, where y can be raised to any power of n >= 0. And still the resulting string would be in the language L.

But on the other hand, if we pump more letters then the resulting string will not be in the language. The language L only accepts string of length 3.

Pumping Lemma states that for every regular language there exists an integer p, such that string w of at-least length p can be written as w = xyz and y can be pumped.

Here are my doubts.

  1. Is this language L regular?
  2. If so does it satisfy Pumping Lemma?
  3. Pumping Lemma states that every regular language has a pumping length p >=1. Does this language does not have one?