What is a context-free grammar?

Language Theory: Context-Free Grammar

Quiz
•
Other
•
University
•
Medium
REMECITO CAPIN
Used 1+ times
FREE Resource
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
A context-free grammar is a formal grammar that describes a formal language in terms of production rules that define how strings of symbols can be formed.
A context-free grammar is a data structure.
A context-free grammar is a mathematical equation.
A context-free grammar is a type of programming language.
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What are the four components of a context-free grammar?
Non-terminal symbols, Terminal symbols, Production rules, Start symbol
Non-terminal symbols, Terminal symbols, Production rules, End symbol
Non-terminal symbols, Terminal symbols, Derivation rules, Start symbol
Non-terminal symbols, Terminal symbols, Production rules, Final symbol
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is a production rule in a context-free grammar?
A production rule in a context-free grammar is a rule that defines how a nonterminal symbol can be replaced by a sequence of terminal and/or nonterminal symbols.
A production rule in a context-free grammar is a rule that defines how a terminal symbol can be replaced by a sequence of nonterminal symbols.
A production rule in a context-free grammar is a rule that defines how a nonterminal symbol can be replaced by another nonterminal symbol.
A production rule in a context-free grammar is a rule that defines how a nonterminal symbol can be replaced by a sequence of terminal symbols.
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the difference between a terminal symbol and a non-terminal symbol in a context-free grammar?
A terminal symbol represents a basic unit of the language, while a non-terminal symbol represents a group of terminal or non-terminal symbols.
A terminal symbol represents a specific rule in the grammar, while a non-terminal symbol represents a basic unit of the language.
A terminal symbol represents a basic unit of the language, while a non-terminal symbol represents a specific rule in the grammar.
A terminal symbol represents a group of terminal or non-terminal symbols, while a non-terminal symbol represents a basic unit of the language.
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the start symbol in a context-free grammar?
A terminal symbol
A production rule
A regular expression
A non-terminal symbol
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the language generated by a context-free grammar?
A context-free grammar generates a context-free language.
A context-free grammar generates a context-sensitive language.
A context-free grammar generates a regular language.
A context-free grammar generates a regular expression.
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the Chomsky normal form for a context-free grammar?
A -> BC or A -> b
A -> BC or A -> a
A -> B or A -> C
A -> a or A -> b
Create a free account and access millions of resources
Similar Resources on Wayground
10 questions
Simbol, String, Bahasa, dan Hirarky Chomsky

Quiz
•
University
10 questions
Power Electronics Lab

Quiz
•
University
16 questions
Nama Tempat Umum

Quiz
•
University - Professi...
10 questions
HISTORICAL BACKGROUND OF TEXT LINGUISTIC

Quiz
•
University
12 questions
TESOL Grammar Session # 2

Quiz
•
University
13 questions
Pengaturcaraan - Struktur Kawalan

Quiz
•
9th Grade - University
10 questions
Diodes

Quiz
•
University
10 questions
Tokens Lexeme and Pattern

Quiz
•
University
Popular Resources on Wayground
25 questions
Equations of Circles

Quiz
•
10th - 11th Grade
30 questions
Week 5 Memory Builder 1 (Multiplication and Division Facts)

Quiz
•
9th Grade
33 questions
Unit 3 Summative - Summer School: Immune System

Quiz
•
10th Grade
10 questions
Writing and Identifying Ratios Practice

Quiz
•
5th - 6th Grade
36 questions
Prime and Composite Numbers

Quiz
•
5th Grade
14 questions
Exterior and Interior angles of Polygons

Quiz
•
8th Grade
37 questions
Camp Re-cap Week 1 (no regression)

Quiz
•
9th - 12th Grade
46 questions
Biology Semester 1 Review

Quiz
•
10th Grade