CSCI 311 Midterm 1 Flashcards

1
Q

set

A

a collection of elements without any structure (except membership)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

set operations

A

union (U), intersection (∩), difference (-), complementation (overbar)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

union (U)

A

S1 U S2 = {x : x ∈ S1 or x ∈ S2}

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

intersection (∩)

A

S1 ∩ S2 = {x : x ∈ S1 and x ∈ S2}

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

difference (-)

A

S1 - S2 = {x : x ∈ S1 and x ∉ S2}

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

complementation (overbar)

A

S overbar = {x : x ∈ U (the universal set), x ∉ S}

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

U represents the

A

universal set

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

∅ represents the

A

empty set

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

S double overbar simply represents

A

S (the complement of the complement is the set)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

DeMorgan’s Law

A

the complement of S1 U S2 is the complement of S1 ∩ the complement of S2;
the complement of S1 ∩ S2 is the complement of S1 U the complement of S2

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

subset

A

S1 ⊆ S if every element of S1 is also and element of S (S1 could be the same as S)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

proper subset

A

S1 ⊂ S if S contains at least one element not in S1

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

disjoint

A

S1 ∩ S2 = ∅

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

power set

A

the set of all susbsets of S is the power set of S

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Cartesian Product of Sets

A

S = S1 x S2 = {(x,y) : x ∈ S1, y ∈ S2}

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

partition

A

S = S1 U S2 U … U Sn and for any Si ∩ Sj = ∅, i =/= j, then S1, S2, …, Sn is a partition of S

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

functions

A

f : S1 → S2 is a rule that assigns a unique element of S2 to elements in S1 (S1 = domain, S2 = range)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

total function

A

f(x) ∈ S2 ∀ x ∈ S1

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

relations

A

a subset of a Cartesian product of sets

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

a function can be a ? but a ? is not necessarily a function

A

relation

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

equivalence relations

A

E ] {(x,y) : …} ⊂ S x S is an equivalence relation if it is reflexive, symmetric, and transitive (notation ≡)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

graphs

A

vertices (singular) and edges (pairs > direction specified by pair order [vertex to vertex])

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

walk

A

travel the edges

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

path

A

no repeated edges

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
simple path
no repeated edge or vertices
26
cycle
a walk from vi to itself with no repeated edges
27
simple cycle
a cycle with no repeated vertices except vi
28
tree
a directed graph; no cycles; unique root; exactly one path from the root to any other vertices; no out edges (leaf nodes)
29
proof techniques
induction (assume true, prove it, so it is true) and contradiction (arrive at conclusion we know is incorrect but we used logical steps)
30
language
a set of strings on an alphabet Σ
31
language operation
concatenation, reverse, length, empty string, substring
32
alphabet (Σ)
a finite, non-empty set of symbols
33
strings
a finite set of symbols from Σ
34
concatenation
put strings together | e.g. w = ab and v = ba > wv = abba
35
reverse (R)
notation: w^R; reverse of the string (e.g. abab > baba)
36
length
|w| = n
37
empty string (λ)
the string with no characters in it; |λ| = 0, λw = w and wλ = 0
38
substring
any string of consecutive symbols in w w^n : repeating w n times w^∅ : λ
39
Σ* (closure)
the set of strings obtained by concatenating 0 or more symbols from Σ
40
Σ+ (positive closure)
Σ* - λ
41
the complementation of a language with respect to Σ*
L overbar = Σ* - L
42
the reverse of a language
L^R = {w^R : w ∈ L} (reverse of any string in language)
43
concatenation of L1 and L2
L1L2 = {xy : x ∈ L1, y ∈ L2}
44
grammars
``` definted by G = (V, T, S, P) where V = a finite set of variables T = a finite set of terminal symbols S ∈ V = the start variable P = a finite set of productions/rules ``` e.g. G = ({S}, {a,b}, S, P) with P given by S > aSb | λ
45
the language generated by the grammar G
L(G) = {w ∈ T* : S *> w}
46
equivalence of two grammars
two grammars G1 and G2 are equivalent if L(G1) = L(G2)
47
input
string over a given alphabet
48
storage
unlimited number of cells; each sell holds a single symbol, read/write
49
control unit
in one of a finite number of internal states (can change internal state based on state in, input, and storage in some definite manner - transition function)
50
transition function
(current state, input file, storage) > (next state, storage) or current configuration > next configuration
51
deterministic automata
each move is uniquely determined by the current configuration
52
non-deterministic automata
at each point, there may be several possible moves, so we can only predict a set of possible actions
53
accepter
binary output response (yes/no)
54
tansduer
string of symbols as output
55
a DFA is defined by
M = (Q, Σ, δ, q0, F) with Q = a set of internal states Σ = a finite set of symbols called the input alphabet δ = transition function; Q x Σ > Q a total function q0 ∈ Q = the initial state (only one) F = a subset of Q; a set of final states
56
the language accepted by the DFA M = (Q, Σ, δ, q0, F) is
the set of strings on Σ accepted by M: L(M) = {w ∈ Σ* : δ*(q0, w) ∈ F}
57
δ* : Q x Σ* (is/is not) a total function
is
58
the complementation of L(M)
{w ∈ Σ* : δ*(q0, w) ∉ F}
59
the DFA for the complementation of a language
switch all final states to nonfinal and vice versa
60
regular language
a language is regular if and only if there exists some DFA, M, such that L = L(M)
61
NFA defined by
M = (Q, Σ, δ, q0, F) with δ = Q x (Σ U {λ}) > 2^Q
62
differences in NFA from DFA
1. the range of δ is in 2^Q (i.e. the value of δ is not a single state, but a set of states 2. λ can be the second argument of δ (i.e. lambda transitions allowed) 3. δ(qi, a) = ∅ is possible (trap state)
63
the language of an NFA
given M = (Q, Σ, δ, q0, F), L(M) = {w ∈ Σ* : δ*(q0, w) ∩ F =/= ∅}
64
two finite accepters M1 and M2 are equivalent if
L(M1) = L(M2)
65
a DFA is a (subset/proper subset/not a subset) of an NFA, meaning ?
proper subset; for any NFA you can convert to a DFA