Language Theory: Context-Free Grammar

Language Theory: Context-Free Grammar

University

15 Qs

quiz-placeholder

Similar activities

KRTU KELAS XII PERTEMUAN 3

KRTU KELAS XII PERTEMUAN 3

12th Grade - University

13 Qs

Review Unit 1

Review Unit 1

University

10 Qs

Teaching Methods

Teaching Methods

12th Grade - University

10 Qs

LLP_W7

LLP_W7

University

12 Qs

GE-PC Module 6

GE-PC Module 6

University

15 Qs

Is It Legit? Checkology Quiz

Is It Legit? Checkology Quiz

11th Grade - University

12 Qs

PURCOMM LESSON 3: EVALUATING MESSAGES AND IMAGES

PURCOMM LESSON 3: EVALUATING MESSAGES AND IMAGES

University

12 Qs

Power Electronics Lab

Power Electronics Lab

University

10 Qs

Language Theory: Context-Free Grammar

Language Theory: Context-Free Grammar

Assessment

Quiz

Other

University

Medium

Created by

REMECITO CAPIN

Used 1+ times

FREE Resource

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is a context-free grammar?

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

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?