Theory of Computation: Question Set – 08
What is proof by cases?
Proof by cases is a method of proof where one breaks a proof into several cases and shows that the conclusion holds true in each of them. The cases are often based on the values of some variables or parameters involved in the proof. This method is often useful when the direct proof is too complicated.
What is a counterexample?
A counterexample is an example that disproves a statement. If a statement is false, then there must be at least one counterexample that shows that the statement is not true in all cases. Counterexamples can be useful in constructing proofs by contradiction.
What is a vacuous proof?
A vacuous proof is a proof that uses an empty set of objects to prove a statement. For example, the statement “all unicorns have a horn” is vacuously true because there are no unicorns to disprove the statement.
What is a formal language?
A formal language is a set of strings of symbols or characters that are defined according to a set of rules, such as a grammar or regular expression. Formal languages are often used in computer science and mathematics to describe and analyze the syntax of programming languages, natural languages, and other symbolic systems.
What is the difference between a formal language and a natural language?
A formal language is a language that is defined by a set of rules, whereas a natural language is a language that has evolved naturally over time and is used for communication between humans. Formal languages are usually much more precise and unambiguous than natural languages, which can be interpreted in many different ways depending on context.
What is the Chomsky hierarchy of formal languages?
The Chomsky hierarchy is a classification of formal languages based on their complexity and the type of grammar needed to generate them. The hierarchy consists of four levels: regular languages, context-free languages, context-sensitive languages, and recursively enumerable languages.
What is the difference between a regular language and a context-free language?
A regular language is a language that can be described by a regular expression or a finite automaton, while a context-free language is a language that can be described by a context-free grammar. Context-free languages are more expressive than regular languages, and can describe more complex patterns in strings.
What is a context-free grammar?
A context-free grammar is a set of production rules that describe how to generate strings in a formal language. Each production rule consists of a nonterminal symbol that can be replaced by a sequence of terminal and nonterminal symbols. Context-free grammars are commonly used to describe programming languages and other formal languages.
What is the difference between a terminal symbol and a nonterminal symbol in a context-free grammar?
In a context-free grammar, terminal symbols are the basic symbols that make up the strings in the language, while nonterminal symbols represent groups of symbols that can be replaced by other symbols according to the production rules of the grammar.