Unit 6 - Practice Quiz

MTH265 60 Questions
0 Correct 0 Wrong 60 Left
0/60

1 What is the primary focus of formal language theory in discrete mathematics?

introduction Easy
A. The study of continuous physical systems
B. The study of the syntactic structure of strings formed from alphabets
C. The study of human brain activity during speech
D. The study of natural human spoken languages

2 In the context of formal languages and automata, what does a computational model represent?

introduction Easy
A. An abstract mathematical machine that computes or recognizes languages
B. A physical computer processor
C. A programming language like Python
D. A database management system

3 Which mathematical symbol is standardly used to denote an alphabet in formal language theory?

alphabet Easy
A.
B.
C.
D.

4 Which of the following best defines an 'alphabet' in the context of discrete mathematics?

alphabet Easy
A. An infinite sequence of characters
B. A collection of words with specific meanings
C. A finite, non-empty set of symbols
D. A set of grammar rules

5 If , what is this specific alphabet commonly called?

alphabet Easy
A. The decimal alphabet
B. The binary alphabet
C. The empty alphabet
D. The unary alphabet

6 What is a 'word' or 'string' over an alphabet ?

words Easy
A. An infinite loop of characters from
B. A mathematical function mapping to real numbers
C. A finite sequence of symbols chosen from
D. A subset of

7 What is the length of the empty string (often denoted by or )?

words Easy
A. Infinite
B. 0
C. Undefined
D. 1

8 If a word is , what is its length, denoted as ?

words Easy
A. 3
B. 1
C. 4
D. 0

9 What binary operation is used to combine two strings in a free semigroup?

free semigroup Easy
A. Intersection
B. Cartesian product
C. Addition
D. Concatenation

10 What does the notation represent in formal languages?

free semigroup Easy
A. The union of two alphabets
B. The empty set
C. The set of all strings over , including the empty string
D. The set of all non-empty strings over

11 How is a 'language' formally defined over an alphabet ?

languages and regular languages Easy
A. Any infinite set of symbols
B. Any element of
C. The power set of
D. Any subset of

12 Which of the following operations is a standard regular operation used to build regular languages?

languages and regular languages Easy
A. Factorial
B. Division
C. Kleene star
D. Differentiation

13 What does the regular expression denote?

regular expressions Easy
A. Zero or more occurrences of 'a'
B. One or more occurrences of 'a'
C. Exactly one occurrence of 'a'
D. No occurrences of 'a'

14 In regular expressions, what does the symbol or typically represent?

regular expressions Easy
A. Concatenation
B. Intersection
C. Kleene star
D. Union (or logical OR)

15 Which regular expression represents the set of binary strings consisting of a single '0' or a single '1'?

regular expressions Easy
A.
B.
C.
D. $01$

16 What does the acronym DFA stand for in automata theory?

finite state automata Easy
A. Deterministic Finite Automaton
B. Digital Finite Architecture
C. Discrete Function Algorithm
D. Deterministic Formula Application

17 In a finite state automaton, what is the purpose of an 'accepting' or 'final' state?

finite state automata Easy
A. To halt the machine permanently regardless of input
B. To reset the machine to its start state
C. To indicate that the input string is valid and belongs to the language
D. To output an error message

18 A Deterministic Finite Automaton (DFA) is formally defined mathematically as a tuple with how many elements?

finite state automata Easy
A. 4-tuple
B. 7-tuple
C. 3-tuple
D. 5-tuple

19 According to the Chomsky hierarchy, which type of grammar generates regular languages?

grammars and types of grammars Easy
A. Type 2 (Context-free grammars)
B. Type 3 (Regular grammars)
C. Type 0 (Unrestricted grammars)
D. Type 1 (Context-sensitive grammars)

20 A formal grammar consists of variables (non-terminals), terminals, production rules, and what other essential component?

grammars and types of grammars Easy
A. A blank character
B. An accept state
C. A regular expression
D. A start symbol

21 If an alphabet is defined as , how many words of length 3 can be formed without repeating any symbols?

alphabet Medium
A. 6
B. 9
C. 27
D. 3

22 Let . Which of the following expressions represents the total number of words of length that can be formed over ?

words Medium
A.
B.
C.
D.

23 The free semigroup over an alphabet , denoted as , differs from the free monoid because it strictly excludes which of the following?

free semigroup Medium
A. The set of all single-character words
B. Infinite strings
C. The empty string
D. The universal set

24 If and are elements of a free semigroup over , what is the length of the concatenated word ?

free semigroup Medium
A. 4
B. 8
C. 6
D. 10

25 Let and . What is the resulting language of the concatenation ?

languages and regular languages Medium
A.
B.
C.
D.

26 Which of the following operations is NOT closed under the class of regular languages?

languages and regular languages Medium
A. Infinite Union
B. Kleene Star
C. Union
D. Intersection

27 If is a regular language over an alphabet , what can be conclusively said about its complement (where )?

languages and regular languages Medium
A. is always context-free but not regular.
B. is always empty.
C. is always a regular language.
D. is always finite.

28 Which of the following strings is NOT in the language generated by the regular expression ?

regular expressions Medium
A. $010101$
B. $000$
C. $1001$
D. $110011$

29 What language is represented by the regular expression ?

regular expressions Medium
A. Strings starting with 'b' and ending with 'a'
B. Strings where 'a' is immediately followed by 'b'
C. Strings containing at least one 'a' and one 'b'
D. Strings of 'a's and 'b's starting with 'a' and ending with 'b'

30 Which regular expression represents the set of all binary strings with an even number of $0$s (ignoring $1$s)?

regular expressions Medium
A.
B.
C.
D.

31 If is a regular expression, which of the following is equivalent to the simplified expression ?

regular expressions Medium
A.
B.
C.
D.

32 In a Deterministic Finite Automaton (DFA), what happens if a string finishes processing and the automaton is in a non-accepting state?

finite state automata Medium
A. The string is rejected.
B. The automaton crashes.
C. The string is reversed and processed again.
D. The string is sent to an error state.

33 A DFA is formally defined as a 5-tuple . What does represent in this definition?

finite state automata Medium
A. The set of accept states
B. The input alphabet
C. The transition function
D. The initial state

34 How many states are minimally required for a DFA to accept exactly the set of strings over that end with the substring ?

finite state automata Medium
A. 2
B. 5
C. 4
D. 3

35 Which of the following statements about Nondeterministic Finite Automata (NFAs) and DFAs is mathematically true?

finite state automata Medium
A. DFAs allow -transitions but NFAs do not.
B. Every NFA can be converted to an equivalent DFA.
C. DFAs typically have fewer states than their equivalent NFAs in the worst case.
D. NFAs can recognize more languages than DFAs.

36 An NFA has exactly 4 states. What is the maximum number of states in an equivalent DFA constructed using the subset construction method?

finite state automata Medium
A. 24
B. 16
C. 4
D. 8

37 In the Chomsky hierarchy, which type of grammar specifically generates context-free languages?

grammars and types of grammars Medium
A. Type 3
B. Type 1
C. Type 0
D. Type 2

38 Consider the grammar with production rules . What language does this grammar generate?

grammars and types of grammars Medium
A.
B.
C.
D.

39 Which of the following best characterizes the production rules of a Type 3 (Regular) grammar?

grammars and types of grammars Medium
A. Productions are of the form where .
B. Productions are strictly of the form or .
C. Productions can have multiple non-terminals on the left-hand side.
D. It can generate the language .

40 A grammar is formally defined as a 4-tuple . What does the component represent?

grammars and types of grammars Medium
A. The set of production rules
B. The set of terminal symbols
C. The set of variables (non-terminals)
D. The start symbol

41 In the context of formal language theory and theoretical computability, which of the following best describes a fundamental, mathematically proven limitation of formal systems in determining language membership?

introduction Hard
A. Rice's Theorem dictates that any non-trivial semantic property of the languages recognized by Turing machines is undecidable.
B. The Chomsky-Schützenberger representation theorem states that no algorithmic process can decide whether an arbitrary context-free language is empty.
C. The pumping lemma for unrestricted grammars demonstrates that no formal grammar can recognize non-recursive languages.
D. Myhill's Theorem guarantees that a language is Turing-recognizable if and only if its syntactic monoid is infinite.

42 Let be an uncountably infinite alphabet. Which of the following statements rigorously holds true regarding the set of all finite words and the power set of , denoted ?

alphabet Hard
A. is uncountable, but remains undefined because formal languages strictly require finite alphabets.
B. is countably infinite because words are of finite length, but is uncountably infinite.
C. is uncountably infinite, and has a strictly greater uncountable cardinality than .
D. Both and possess the exact same uncountable cardinality due to the properties of Kleene closure on uncountable sets.

43 According to the Fine and Wilf theorem (periodicity lemma) in combinatorics on words, if a word has periods and , what is the mathematically necessary and sufficient condition on the length of to guarantee that also has a period of ?

words Hard
A.
B.
C.
D.

44 Let and be non-empty words over an alphabet . If the commutation equation holds true, which of the following is an inevitable structural consequence for and ?

words Hard
A. The length of must be an exact multiple of the length of , or vice-versa.
B. There exists a primitive word such that and for some positive integers .
C. and must be palindromes of each other.
D. The words and must have the exact same length and be identical ().

45 Let be an arbitrary semigroup. The free semigroup on a generating set , denoted , is characterized by a specific universal mapping property. Which of the following statements mathematically captures this freeness property?

free semigroup Hard
A. For any mapping , there exists a unique semigroup homomorphism such that for all .
B. For any mapping , there is an injective homomorphism that preserves the semigroup operation.
C. Every mapping can be bijectively mapped to a unique element in the alphabet .
D. The semigroup is isomorphic to the quotient of by the minimal congruence relation containing .

46 Consider the free semigroup over and a congruence relation defined such that for any , if and only if they have the same length modulo 3. What is the algebraic structure of the quotient semigroup ?

free semigroup Hard
A. It is an infinite semigroup consisting of three disjoint sub-semigroups.
B. It is a finite semigroup that fails to be a group because it lacks an identity element (the empty word is not in ).
C. It is a free monoid of rank 3.
D. It is a finite semigroup mathematically isomorphic to the cyclic group .

47 Using the Myhill-Nerode theorem, what is the exact number of equivalence classes of the indistinguishability relation for the language ?

languages and regular languages Hard
A. Exactly where is the length of the longest string evaluated, because subset construction cannot determinize it in finite states.
B. Exactly two, representing whether a string currently has an equal number of 0s and 1s or an unequal number.
C. Countably infinite, because every unique difference between the count of 0s and 1s in a prefix requires a distinct equivalence class.
D. Uncountably infinite, as every real number configuration of ratios between 0s and 1s maps to a unique state.

48 Let be a regular language and be an arbitrary, non-regular language. The right quotient of with respect to is defined as . What can be guaranteed about the language ?

languages and regular languages Hard
A. is always a non-regular language.
B. is regular if and only if is a context-free language.
C. The regularity of depends entirely on the algebraic structure of and is generally undecidable.
D. is always a regular language.

49 Which of the following is an accurate synthesis of the closure properties of strictly non-regular languages?

languages and regular languages Hard
A. They are closed under complementation, but not under union or intersection.
B. They are closed under union and intersection, but not under Kleene star.
C. They are not closed under union, intersection, or complementation.
D. They are closed under intersection with regular languages, but not closed under complementation.

50 By applying Arden's Theorem, consider the language equation , where and are regular languages. If the empty string , what is the unique solution for ?

regular expressions Hard
A.
B.
C.
D.

51 The Brzozowski derivative of a regular expression with respect to a symbol , denoted , describes the language . What is the derivative ?

regular expressions Hard
A.
B.
C.
D.

52 Which of the following algebraic identities involving regular expressions and is mathematically FALSE in general?

regular expressions Hard
A.
B.
C.
D.

53 When converting a Non-deterministic Finite Automaton (NFA) with states to a Deterministic Finite Automaton (DFA) using the subset construction, the worst-case number of reachable states in the resulting minimal DFA is . Which canonical language requires exactly states in its minimal DFA while only needing states in an NFA?

finite state automata Hard
A. The language of strings over where the -th symbol from the right is '1'.
B. The language of strings over containing exactly occurrences of '1'.
C. The language of palindromes of length at most .
D. The language of strings over where the -th symbol from the left is '1'.

54 Let be a minimal DFA recognizing a language . We construct an NFA for the reverse language by reversing all transition directions, designating as the sole accept state, and creating a new start state with -transitions to all states in . In the worst case, what is the minimum number of states required when this resulting NFA is determinized back into a DFA?

finite state automata Hard
A. Exactly states, because the structural minimization of regular languages is symmetric under reversal.
B. Up to states, resulting from the cross-product construction of the reversed transitions.
C. Exactly states, to account for the new start state and -transitions.
D. Up to states, as reversing a minimal DFA can produce an NFA whose equivalent minimal DFA is exponentially larger.

55 Consider a DFA with states. If the DFA accepts at least one string, what is the strict theoretical upper bound on the length of the shortest accepted string?

finite state automata Hard
A.
B.
C.
D.

56 Two DFAs, and , have and states respectively. When constructing the minimal DFA for the intersection language , what is the maximum possible state complexity (number of states) of the resulting minimal DFA?

finite state automata Hard
A.
B.
C.
D.

57 In the Chomsky Hierarchy, Context-Sensitive Grammars (CSGs) are characterized by productions of the form . What is the critical structural restriction that mathematically prevents CSGs from generating all recursively enumerable languages?

grammars and types of grammars Hard
A. The grammar cannot contain more non-terminal symbols than the length of the longest string it produces.
B. The left side must consist of a single non-terminal symbol surrounded by terminal context strings.
C. Derivations must be strictly applied in a leftmost fashion to prevent infinite recursive looping.
D. The length of the string on the right side of the production must be greater than or equal to the length of the string on the left side ().

58 Let be a Context-Free Grammar strictly in Chomsky Normal Form (CNF). If derives a terminal string of length , exactly how many derivation steps (rule applications) are mathematically required to produce ?

grammars and types of grammars Hard
A.
B.
C.
D.

59 An inherently ambiguous context-free language is a language for which every possible context-free grammar generating it is ambiguous. Which of the following defines a classic inherently ambiguous language?

grammars and types of grammars Hard
A.
B.
C.
D.

60 Ogden's Lemma is an advanced generalization of the standard Pumping Lemma for Context-Free Languages (CFLs). What specific analytical advantage does Ogden's Lemma provide over the standard CFL Pumping Lemma?

grammars and types of grammars Hard
A. It allows pumping and in a downward direction only (i.e., ), avoiding the need to test infinite string expansions.
B. It proves that all context-free languages are closed under intersection and complementation by pumping variables independently.
C. It allows the designation of specific positions in a string as 'distinguished,' guaranteeing the pumped substrings contain at least one distinguished position, thereby proving non-context-freeness for edge-case languages.
D. It determines whether an ambiguous context-free grammar can be determinized into an LR(1) grammar by isolating the pumping length.