Strings and Sets Flashcards
1
Q
does order matter for substrings and subsets
A
Order matters in substring but not subsets
2
Q
A ⊆ B (subset)
A
x ∈ A ⇒ x ∈ B
3
Q
A ∈ B (element)
A
A ∈ B
4
Q
A ∪ B (union)
A
x ∈ A or x ∈ B
5
Q
A ∩ B (and)
A
x ∈ A and x ∈ B
6
Q
A \ B (difference)
A
x ∈ A and x ∉ B
7
Q
A = B
A
A ⊆ B and B ⊆ A
8
Q
How to calculate number of subset?
A
2^n where n is the length of the set