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 the syntactic structure of strings formed from alphabets
B. The study of human brain activity during speech
C. The study of continuous physical systems
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. A physical computer processor
B. A programming language like Python
C. An abstract mathematical machine that computes or recognizes languages
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 set of grammar rules
D. A finite, non-empty set of symbols

5 If , what is this specific alphabet commonly called?

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

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

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

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

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

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

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

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

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

10 What does the notation represent in formal languages?

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

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

languages and regular languages Easy
A. Any infinite set of symbols
B. Any subset of
C. Any element of
D. The power set 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. No occurrences of 'a'
B. Zero or more occurrences of 'a'
C. One or more occurrences of 'a'
D. Exactly one occurrence of 'a'

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

regular expressions Easy
A. Kleene star
B. Concatenation
C. Intersection
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. $01$
C.
D.

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

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

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

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

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

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

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

grammars and types of grammars Easy
A. Type 3 (Regular grammars)
B. Type 1 (Context-sensitive grammars)
C. Type 2 (Context-free grammars)
D. Type 0 (Unrestricted 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 start symbol
D. A regular expression

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

alphabet Medium
A. 27
B. 9
C. 6
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. The empty string
C. Infinite strings
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. 8
B. 6
C. 4
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. Intersection
B. Infinite Union
C. Kleene Star
D. Union

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 empty.
B. is always a regular language.
C. is always context-free but not regular.
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 containing at least one 'a' and one 'b'
B. Strings of 'a's and 'b's starting with 'a' and ending with 'b'
C. Strings where 'a' is immediately followed by 'b'
D. Strings starting with 'b' and ending with 'a'

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 sent to an error state.
D. The string is reversed and processed again.

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

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

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. 3
C. 4
D. 5

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. DFAs typically have fewer states than their equivalent NFAs in the worst case.
C. NFAs can recognize more languages than DFAs.
D. Every NFA can be converted to an equivalent DFA.

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. 8
B. 24
C. 16
D. 4

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 2
D. Type 0

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 strictly of the form or .
B. Productions can have multiple non-terminals on the left-hand side.
C. It can generate the language .
D. Productions are of the form where .

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 terminal symbols
B. The set of production rules
C. The start symbol
D. The set of variables (non-terminals)

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

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. Both and possess the exact same uncountable cardinality due to the properties of Kleene closure on uncountable sets.
D. is uncountably infinite, and has a strictly greater uncountable cardinality than .

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

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. The semigroup is isomorphic to the quotient of by the minimal congruence relation containing .
C. Every mapping can be bijectively mapped to a unique element in the alphabet .
D. For any mapping , there is an injective homomorphism that preserves the semigroup operation.

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

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. Uncountably infinite, as every real number configuration of ratios between 0s and 1s maps to a unique state.
C. Countably infinite, because every unique difference between the count of 0s and 1s in a prefix requires a distinct equivalence class.
D. Exactly two, representing whether a string currently has an equal number of 0s and 1s or an unequal number.

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 regular language.
B. The regularity of depends entirely on the algebraic structure of and is generally undecidable.
C. is always a non-regular language.
D. is regular if and only if is a context-free 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 not closed under union, intersection, or complementation.
B. They are closed under union and intersection, but not under Kleene star.
C. They are closed under intersection with regular languages, but not closed under complementation.
D. They are closed under complementation, but not under union or intersection.

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 where the -th symbol from the left is '1'.
C. The language of palindromes of length at most .
D. The language of strings over containing exactly occurrences of '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. Up to states, as reversing a minimal DFA can produce an NFA whose equivalent minimal DFA is exponentially larger.
D. Exactly states, to account for the new start state and -transitions.

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. Derivations must be strictly applied in a leftmost fashion to prevent infinite recursive looping.
B. The left side must consist of a single non-terminal symbol surrounded by terminal context strings.
C. The grammar cannot contain more non-terminal symbols than the length of the longest string it produces.
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 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.
B. It proves that all context-free languages are closed under intersection and complementation by pumping variables independently.
C. It allows pumping and in a downward direction only (i.e., ), avoiding the need to test infinite string expansions.
D. It determines whether an ambiguous context-free grammar can be determinized into an LR(1) grammar by isolating the pumping length.