Set 7 Flashcards
What is important about the components of a vector?
That they are all drawn from the same field of values, e.g Reals or Rationals
Give four ways vectors can be represented
- A list of values
- A one-dimensional array
- A dictionary (if the vector can be considered to represent a function)
- Visually (using an arrow)
How can a vector be represented in code if the vector is viewed as a function?
A dictionary
What does vector addition achieve?
Translation
What does scalar-vector multiplication achieve?
Scaling
What is another name for dot product?
Scalar product
What is a convex combination of vectors u and v?
αu + βv
such that α , β >= 0
and α + β = 1
What is the scalar product of vectors: A = (a1,a2) and B = (b1,b2)
A.B = a1b1 + a2b2
What is an application of the dot product?
Finding the angle between two vectors
In a convex combination of u and v, what is the significance of α = β = 0.5?
The resultant vector is the midpoint of the position vectors u and v
When might it be appropriate to represent a vector using a dictionary?
If the vector is used to represent a function
What is a set?
A set is an unordered collection of values in which each value occurs at most once
What does proper subset mean? What is its symbol?
- Equality not allowed
- (a set is a subset of itself but not a proper subset of itself)
- ⊂
A\B
Set difference between A and B
What is a finite set?
One whose elements can be counted off by natural numbers up to a particular number
What is the Cartesian product of A and B?
The set of all ordered pairs (a, b) where a is a member of A and b is a member of B.
What can the Cartesian product be used for?
Defining function types
What is a countable set?
A set with the same cardinality as some subset of the natural numbers
What are regular expressions?
Metalanguage for defining all valid strings of a regular language
What is the purpose of regular expressions?
Allow for regular languages to be described in a convenient shorthand notation
What is the RegEx metacharacter for: zero or more
*
What is the RegEx metacharacter for: one or more
+
RegEx : zero or one lots of
?
What are | ? * + called in RegEx?
Metacharacters