• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

Card Range To Study

through

image

Play button

image

Play button

image

Progress

1/39

Click to flip

Use LEFT and RIGHT arrow keys to navigate between flashcards;

Use UP and DOWN arrow keys to flip the card;

H to show hint;

A reads text to speech;

39 Cards in this Set

  • Front
  • Back

Alphabet

Is a finite set of symbols

Ambiguity

A grammar is unambiguous if every sentence in the grammar has a unique leftmost derivation. A grammar is ambiguous if it is not unambiguous

Inherent Ambiguity

A CFL is inherently ambiguous if every CFG that generates L is ambiguous

Cardinality

Number of elements in a set




If there is a one to one, onto function f: {1,2…n} => X, then X has cardinality n, written card (X)= n X is finiteIf Y is not finite, then there is a one to one function g; Y ->Y that is not onto Y is infinite

Cartesian Product

A Cartesian product is a mathematical operation which returns a set (or product set or simply product) from multiple sets. That is, for sets A and B, the Cartesian product A × B is the set of all ordered pairs (a, b) where a ∈ A and b ∈ B. Products can be specified using set-builder notation

Chomsky Hierarchy (types, acceptors, grammars)

Specifically in the area of formal languages, the Chomsky hierarchy (occasionally referred to as Chomsky-Schützenberger hierarchy) is a containment hierarchy of classes of formal grammars. This hierarchy of grammars was described by Noam Chomsky in 1956.It is also named after Marcel-Paul Schützenberger, who played a crucial role in the development of the theory of formal languages.A formal grammar of this type consists of a finite set of production rules (left-hand side → right-hand side), where each side consists of a sequence of the following symbols:a finite set of nonterminal symbols (indicating that some production rule can yet be applied)a finite set of terminal symbols (indicating that no production rule can be applied)a start symbol (a distinguished nonterminal symbol)

Chomsky Normal Form (CNF) and CNF algorithms

If all of its production rules are of the form:A → BC, orA → a, orS → ε,Where A, B, and C are nonterminal symbols, a is a terminal symbol (a symbol that represents a constant value), S is the start symbol, and ε denotes the empty string. Also, neither B nor C may be the start symbol, and the third production rule can only appear if ε is inL(G), namely, the language produced by the context-free grammar G.Every grammar in Chomsky normal form is context-free, and conversely, every context-free grammar can be transformed into an equivalent one which is in Chomsky normal form and has a size no larger than the square of the original grammar's size.

Context Free Grammar

a set of recursive rewriting rules (or productions) used to generate patterns of strings. A CFG consists of the following components: a set of terminal symbols, which are the characters of the alphabet that appear in the strings generated by the grammar.

Countable

Able to be counted (?)

Denumerable or Countably Infinite

A set is countably infinite if its elements can be put in one-to-one correspondence with the set of natural numbers. In other words, one can count off all elements in the set in such a way that, even though the counting will take forever, you will get to any particular element in a finite amount of time.

Derivation, Derivation Tree

For every derivation of sentential form S -> w, there is a corresponding derivation tree (DT) which is an oriented tree with these characteristics

DFA Minimization

Is the task of transforming a given deterministic finite automaton (DFA) into an equivalent DFA that has a minimum number of states. Here, two DFAs are called equivalent if they recognize the same regular language. Several different algorithms accomplishing this task are known and described in standard textbooks on automata theory.

DFA Constructions (complement, union, intersection)

Deterministic finite automata, the drawing with the circles and crap

Equivalence of regular sets, grammers, expressions, and DFAs.

Kleene's Theorem




We have shown how to convert a regular expression to an NFA; the proof that these represent the same language is straightforward (by induction). However, we have asserted that there is a correspondence in both directions; this is formalised in Kleene's Theorem:

Equivalence relations and classes

Reflexivity: xRx
Symmetry: If xRy then yRx

Expression Graphs

`is a directed graph satisfying these propertiesNode are called statesOne node is the start stateSome of the nodes (possibly noe) are final statesEvery arc is labeled with a regular expression

Function

X-> Y is a relation on X and Y such that if x € X, y1, y2 € Y and (x, y1) (x,y2) € f then y1 = y2

Grammar

a set of production rules for strings


The rules describe how to form strings from the language's alphabet that are valid according to the language's syntax.

Grammar Graphs

Start with a CFG G= (V, ∑, P,S)

Language

Start with an alphabet ∑The set of all strings over ∑ is denoted ∑*A language over ∑ is any subset of ∑*

Leftmost, Rightmost Derivations

If we always expanded the left/right most variable first

NFAs and conversion to DFAs

http://fleder44.net/312/notes/26_converting_nfa/index.html

Palindrome

Reverse of word = word

PDAs

Pushdown automata are used in theories about what can be computed by machines. They are more capable than finite-state machines but less capable than Turing machines. Deterministic pushdown automata can recognize all deterministic context-free languages while nondeterministic ones can recognize all context-free languages. Mainly the former are used in parser design.

Production Rule

a rewrite rule specifying a symbol substitution that can be recursively performed to generate new symbol sequences.

Pumping Lemmas (Regular and Context Free)

Describes an essential property of all regular languages. Informally, it says that all sufficiently long words in a regular language may be pumped — that is, have a middle section of the word repeated an arbitrary number of times — to produce a new word that also lies within the same languageis a lemma that gives a property shared by all context-free languages. It generalizes the pumping lemma for regular languages.

Recursive Definitions

Method used to define a set X


Explains how to generate an element of X


Especially useful if X is infinite


Also called inductive definitions

Regular Expressions

a special text string for describing a search pattern

Regular Sets ( Regular Languages)

the languages that are generated by Type-3 grammars (regular grammars).

Regular Grammars

A -> aB
a -> a


A -> empty

Relations

???

Binary Relations

On a set A is a collection of ordered pairs of elements of A. In other words, it is a subset of the Cartesian product A2 = A × A. More generally, a binary relation between two sets A and B is a subset of A × B. The terms correspondence, dyadic relation and 2-place relation are synonyms for binary relation.

Reversal

...

Sentential Form

any string derivable from the start symbol

Sets

A collection of objects

Power set

The set of all subsets

String

A finite sequence of symbols from the alphabet

Terminal Vocabulary

Terminal symbols are literal symbols which may appear in the outputs of the production rules of a formal grammar and which cannot be changed using the rules of the grammar. Applying the rules recursively to a source string of symbols will usually terminate in a final output string consisting only of terminal symbols.

Nonterminal Vocabulary

Nonterminal symbols are those symbols which can be replaced. They may also be called simply syntactic variables. A formal grammar includes a start symbol, a designated member of the set of nonterminal from which all the strings in the language may be derived by successive applications of the production rules. In fact, the language defined by a grammar is precisely the set of terminal strings that can be so derived.