patternMinor
Grammar and Real-numbers
Viewed 0 times
andrealnumbersgrammar
Problem
I am curious about following question. I've read other threads but the problem is slightly different:
Is the set of real numbers a language?
So my question is:
If I have a grammar, as defined in https://en.wikipedia.org/wiki/Formal_grammar#The_syntax_of_grammars
-
G = (P,N,S,$\sum$)
-
S- StartSymbol-
-
$\sum$ -terminal symbols
is it possible to have the set of real numbers in the set of terminal symbols?
The definition of a grammar on wikipedia says no.
Is it possible to define it otherwise?
Is the set of real numbers a language?
So my question is:
If I have a grammar, as defined in https://en.wikipedia.org/wiki/Formal_grammar#The_syntax_of_grammars
-
G = (P,N,S,$\sum$)
- P-production rules
- N-non terminals
-
S- StartSymbol-
-
$\sum$ -terminal symbols
is it possible to have the set of real numbers in the set of terminal symbols?
The definition of a grammar on wikipedia says no.
Is it possible to define it otherwise?
Solution
You could use the digits $\{0,\dots,9\} =: \Sigma$ as alphabet and consider infinite words. A word corresponds then to a real number. Those are known as $\omega$ languages link. There are omega-regular languages too.
Edit: The set of all real numbers, $\Sigma^\omega$, forms an $\omega$-regular language of course.
Edit: The set of all real numbers, $\Sigma^\omega$, forms an $\omega$-regular language of course.
Context
StackExchange Computer Science Q#116458, answer score: 3
Revisions (0)
No revisions yet.