In CFG, the symbols that can't be replaced by anything are called ________.
- ATerminal
- BNon-Terminal
- CProduction
- DAll of given
Terminals are the final letters of words and are never rewritten.
MCQs, short and long questions from lecture 31.Lecture 31 ki MCQs, short aur long sawal.
31 MCQs · 3 short · 2 long questions · 31 MCQs from past papers31 MCQs · 3 short · 2 long sawal · 31 MCQs past papers se
In CFG, the symbols that can't be replaced by anything are called ________.
Terminals are the final letters of words and are never rewritten.
Left hand side of a production in CFG consists of:
Every CFG production rewrites exactly one nonterminal.
The symbols that cannot be replaced by anything are called terminals
Terminals are never rewritten.
CFG given S → bS | Sb | aa represents language
b's can be added on either side of the single aa, giving b*aab*.
In CFG, the symbols that cannot be replaced by anything are called
Terminals are never rewritten.
The grammatical rules which involves meaning of words are called:
Rules about meaning are semantics; rules about form are syntax.
The CFG S --> aSa | bSb | a | b | Λ represents the language
Adding the same letter on both sides around a, b or Λ builds every palindrome.
The major problem in the earliest computers was
The handout says early computers had trouble handling mathematical formulae, which led to grammars and parsing.
The production S --> SS | a | b | Λ can be expressed by RE
S can produce any sequence of a's and b's, including Λ.
"CFG" stands for ________
CFG means Context Free Grammar.
The high level language is converted into assembly language codes by a program called compiler.
A compiler translates high-level code into lower-level code.
Grammatical rules which involve the meaning of words are called ________
Rules about meaning are semantics.
Grammatical rules which do not involve the meaning of words are called ________
Rules about form only are syntactic rules.
The symbols that must be replaced by other things are called ________
Nonterminals must be rewritten before a word is reached.
The grammatical rules are often called ________
Grammar rules are called productions.
The terminals are designated by ________ letters, while the non-terminals are designated by ________ letters.
By convention terminals are lowercase and nonterminals uppercase.
The language generated by ________ is called Context Free Language (CFL).
A CFL is the language generated by a CFG.
Σ = {a,b} Productions S → XaaX, X → aX, X → bX, X → Λ. This grammar defines the language expressed by ________
X generates (a+b)*, so XaaX gives (a+b)*aa(a+b)*.
Consider the Following CFG: (NOTE: Λ means NULL) S->Xa X->aX|bX|Λ above given CFG can be represented by RE
X gives (a+b)*, followed by a final a.
The langue generated by CFG is called Context free language (CFL)
A CFG generates a context free language.
The symbols that can't be replaced by anything are called -----------------
Terminals cannot be replaced.
S → aXb|bXa X → aX|bX|Λ The given CFG generates the language of strings in English
Words are a…b or b…a.
One language can have ……… CFG(s)
A CFL has at least one (in fact many) CFGs.
The language generated by the CFG is called the language ……by the CFG
It is the language produced (generated) by the CFG.
In CFG, the symbols that cannot be replaced by anything are called:
Terminals cannot be replaced.
The production S --> SS | a | b | Λ can be expressed by RE:
It generates (a+b)* (including Λ), which is not listed.
The same non terminals can be written in single line if they have more than one..........
Productions with the same left side can be combined with |.
There is at least one production that has one........on its left side:
A CFG has at least one production with the start non-terminal S on its left.
Left hand side of CFG may consist of:
One non-terminal on the left side.
The language generated by CFG is called ________.
By definition the language generated by a context free grammar is a context free language.
Left hand side of a production in Context free grammar (CFG) consists of ________.
In a CFG every production has exactly one nonterminal on its left side.
No MCQs match this filter.Is filter mein koi MCQ nahi.
Why Context Free Grammars are called Context Free?
Because every production has a single nonterminal on its left side, so that nonterminal can be replaced by its right side wherever it appears, regardless of the symbols around it (its context). In context-sensitive grammars a replacement may depend on the neighbouring symbols.
Alternative form of this production S → aS, S → bS, S → Λ.
The productions can be written in one line as S → aS | bS | Λ. This grammar generates (a+b)*, all strings over {a,b} including Λ.
Write alternative form of this production. S → aS, S → bS, S → Λ
The three productions can be written together with the bar symbol as S → aS | bS | Λ. This grammar generates (a+b)*.
Construct corresponding CFG for the given language: All words of even length but not multiple of 3.
Even length but not a multiple of 3 means length 6k+2 or 6k+4. Over {a,b}: S → YS | XX | XXXX, Y → XXXXXX, X → a | b. Each Y adds 6 letters and the end adds 2 or 4.
Construct corresponding CFG for the given language: Palindrome (both even and odd palindrome).
S → aSa | bSb | a | b | Λ. The rules aSa and bSb add the same letter at both ends; ending with a or b gives odd palindromes and ending with Λ gives even palindromes.