## Looking for grammar expert

Hello,

I recently created a portal page but I think my portal have some grammatical error. Looking for someone who can fix grammar errors.

(If you will be uncomfortable then you can take screenshot, Write comment on images that which word is incorrect or simply write replacement text. You can use MS Paint.)

Thanks.

## Is every language described by a grammar?

I read the following argument showing that not every language is described by a grammar:

For a fixed alphabet $$Sigma$$ and variables $$V$$ there are uncountable many languages over $$Sigma$$ since the power set of $$Sigma^ast$$ is uncountable. But grammars are finite objects by construction and thus there are only countably many grammars. In total, there can only be countably many languages described by grammars. Hence, there are this uncountably many languages that cannot be described by grammars.

I understand the idea of the argument, however i am not convinced by how they show that there are only countably many grammars. What do they mean by “finite objects”? Couldn’t one just take the set $${ (V,Sigma, P, S) | ; Psubseteq (Vcup Sigma)^+ times (Vcup Sigma)^ast,; Sin V}$$, which is clearly uncountable, to get uncountably many grammars? Or do the languages that they generate fall together so often that we only get countably many languages generated by grammars in the end?

## automata – Removing left factoring from Context-Free Grammar

I know that, removing left factoring is a simple task.
And i understand following procedure:

$$S→aA | aB$$
Becomes:
$$S→aS’$$
$$S’→A|B$$

Yet I’m running into problems with this particular grammar:

$$S→AD|bbS|bScS|BS$$
$$A→aAbb | abb$$
$$B→aB|ba|b$$
$$D→cDd|cccd$$

How to remove left factoring from it, I’m trying to convert it into LL(1) grammar

## formal languages – Grammar and Enumerator for Decision and Halting Problem

in theoretical computer science I learned for every recursive enumerable language there would be an enumerator and a grammar. So since decision problem and halting problem are recursively enumerable, I was wondering what kind of grammar and enumerator could this be.

Ok since there exists a sequence of M_i I would start with M_1 and find all words for this TM and give them out. So if I have any TM is there a possibility to give all words out which are accepted by this TM? I probably would have to give all w_i to it and compute the first i words for i steps, then i+1 words for i+1 steps and so on. Or maybe something like DFS on all configurations. This really sounds like that only for one TM this could go on forever. So I would need to start the second TM for the same period of time after a while… Seems as if something similiar could work for Halting Problem. Do you have any more refined thoughts on this one?

But the Problem with the Grammar seems to be more challenging. How could I possibly come up with a Grammar for these problems? You would have to generate code(M_i) in such a way that its always in the language. So you would have to simulate the TM through grammmar on different words. It somewhat comes down to the question whether a TM accepts anything or holds on any entry. Or is it more “okay we proofed, so there must be some kind of grammar even though I can´t comeup with an idea for it”.

Greets,

Felix

## turing machines – 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”

## optimization – Is there any good method to find if a grammar is optimal for a problem?

I’ve been thinking about grammatical evolution problems and how the grammar influences the algorithm performance. It came to my mind the huge impact that the grammar that you’re using has in the time that takes an algorithm to reach an optimum solution.

The simplest example would be if your problem doesn’t involve trigonometric operations. If you’re trying to find `f(x) = 3x - 1/2`, including sins, tangents or square roots in your grammar will, almost certainly, slowen your algorithm as the population complexity will grow. Other not-so-evident simplifications for a grammar would be trigonometric identities:

``````tan(x) = sen(x) / cos(x)
``````

Talking about this last example, I don’t know how to determine the importance of the impact of including `tan(x)` between the grammar rules to produce valid solutions. Or in other words, knowing if adding `tan(x)` will be better in terms of performance than don’t doing it and thus, forcing the evolution to combine two or more operators and terminals to being able to use that operation and making the grammar ambiguous.

So this two are the questions:

1. Is there any way of knowing if a grammar is optimal for finding a solution?
2. Which evolutionary algorithm or machine learning method (considering that I’m almost profane in this discipline, some explanation is wellcome) would you use for finding optimal or sub-optimal grammars?

Thanks

## I will provide you with five professional courses to learn English language with high quality for \$10

#### I will provide you with five professional courses to learn English language with high quality

English is one of the easiest languages to learn, isn’t it? Get ready for your IELTS or TOEFL with these five courses.

What you’ll learn

• By studying these courses you will attain the standard of English needed to

express yourself and your ideas clearly.
• This will benefit you in your current workplace, in finding new jobs and in all

areas of future study.
• When you have completed Everyday English, you will be ideally placed to

progress to Business English or IELTS course.
• English Grammar Test is available

Description

 Nowadays in the competitive job market, it is necessary to speak English. However English is not only the most useful language in the world. It is also one of the easiest languages to learn. If you want a good job in business, technology, or science, then you must start learning English. And… with a native speaker, you will also gain a bit of British accent. Each lesson of these courses begins with a set of clearly stated objectives and an explanation of its place in the the overall program of study. There are 5-courses self-assessment tests and activities to measure your progress within each lesson.  So, join the courses and brush up your English before taking any English test. Topics Covered  Spelling Sentence structure and construction Infinitives and Gerund Tenses Verbs Comprehension and composition Everyday Expressions

The relevant courses are:
1-TEFL Course Teach English Online As A Foreign Language

2-The Complete Punctuation Course English Writing – Grammar

3-English Grammar tenses & structures

4-Learn Fluent English – For Students & Business Professionals

5-English Speaking People’s Appearance and Character

.

## How to convert FDA to context free grammar?

I have an assignment, which is solved by making an FDA out of the information given, then figuring out the CFG out of the FDA, but I’m having trouble doing that step. Any help is appreciated! Here is the picture of the exercise:

A token is dorpped from A, B or C. The two keys (-.- these things) make the token go right or left depending on the position in which they are in (the token falls parallel to the direction of the key). When a token passes through a key, it makes it switch positions so that the next token that passes through goes in the opposite direction than the last.

What I have to do is write a program in python that, given a string (eg ABCAAAC, meaning a token was dropped from A, then another from B, then another from C, etc.) I have to determine wether or not it belongs to the language composed of the strings in which the last character (the last tken dropped) falls from exit one. To do this, first I figured out the automaton that models this behaviour, and the next step would be figuring out the grammar for that language by looking/doing smth with the FDA (I have to do it this way, not with regex).

Here is the picture of the FDA, I’m not sure it’s correct:

## How to remove null production from context free grammar?

How to remove null production and simply the grammar?

$$S to a mid Ab mid aBa \ A to b mid epsilon \ B to b mid A$$

Can the simplification result in this CFG?

$$S to a mid aBa \ A to b \ B to b$$

## Unrestricted grammar for L={wc^id^j}

What is the unrestricted grammar describing this language?