Documente Academic
Documente Profesional
Documente Cultură
Course Description:
What is computation?
Models of computation
- Regular Expressions
- Grammars Context-free and otherwise
- Automata
Mathematical Science
- Precise definitions
- Prove properties
- Simplified models
Applications (Laboratory)
GRADING SYSTEM
The elements of a set must be distinct, unordered and well-defined. You write the
elements of a set separated by commas and the whole thing enclosed in braces { }.
Example:
The sets {1,1,2,3}, {1,2,3,3}, and {2,3,1,3} can be simply written as a set with three
elements {1,2,3}.
A set may be either finite or infinite. If the elements can be counted or enumerated,
then the set is said to finite. Otherwise, it is infinite. For example, the set of capital
letters in the English alphabet are finite. On the other hand, the set of real numbers are
infinite. The ellipses () at the end of the list denote an infinite list of elements.
The number of elements in a finite set is termed as the cardinality of the set denoted by
| |. Thus, if A = {1,2,3}, then the cardinality |A| = 3.
Universal Set is the totality of all elements under consideration. This is denoted by the
symbol u.
A set containing no elements is called an empty set. This is denoted by or { }.
Set Membership
We use the symbol ("is an element of") to denote set membership. Otherwise, we
write to denote that the element is not an element of the set.
Example:
Set Containment
We use the symbol ("is a subset of") to denote set containment. We say "set A is a
subset of set b" if and only if every element of set A is an element of set B. Otherwise, if
set A is not a subset of B, we write A B.
Example:
A set is equal to another set, if and only if the sets have the same elements. For
example, if A = {1,2,3} and B = {3,2,1}, then A = B.
Proper Subset
Example:
Complement of A A' is the set of all elements that are not in the set A (but are in the
universal set u.
Union of A and B A B is the set of all elements that are either in sets A or B.
Intersection of A and B A B is the set of all elements that are both in sets A and
B.
Difference of A and B A B is the set of all elements that are in set A but not in set
B.
Symmetric Difference of A and B A B is the set of all elements that are either in A
or in B but not both.
Example:
A B = {1,2,3,4,5,7}
A B = {1,3}
A B = {2,4,5,7}
A B = {5,7}
A' = {2,4,6,8,9,10}
u = {1,2,3,4,5,6,7,8,9,10}
a. (A B) C
Solution: (A B) = {2,4}
C = {1,3,5,7,9}
{2,4} {1,3,5,7,9} = {1,2,3,4,5,7,9}
b. A (B C)
Solution: A = {1,2,3,4,5}
(B C) = {1,2,3,4,5,6,7,8,9}
c. A (B C)
d. (A (B C) ) D
e. (A B) (A B)'
RELATIONS
Allow us to formalize the notion of relationships that exist among the sets under
consideration.
A relation can be thought of as a table that lists the relationships of elements to other
elements. For example, Table below shows which students are taking which courses.
Student Course
Don BSCS
Anna MSCS
Erwin MBA
Dona BSME
Deck BSIS
Thus, Don is taking BSCS and Anna is taking MSCS. In the language of relations, we
would say that Don is related to BSCS and that Anna is related to MSCS.
Cartesian product
Denoted by A x B, where A and B be non-empty sets. That is, A x B is the set of all
ordered pairs (x.y) such that x comes from A and y comes from B; x is called the first
coordinate component and y is called the second coordinate component.
Example:
Relation
A (binary) relation R from a set A to a set B is any subset of the Cartesian product
AxB. If an ordered pair (x,y) R, we say x is related to y by R, and we write xRy. If
A=B, we call R a (binary) relation on A.
If a relation is given as a table, the domain consists of the entries in the first column and
the range consists of those in the second column.
Example:
Student Course
Don BSCS
Anna MSCS
Erwin MBA
Dona BSME
Deck BSIS
R = { (Don, BSCS), (Anna, MSCS), (Erwin, MBA), (Dona, BSME), (Deck, BSIS) }
The domain of R (first column) is the set A, and the range of R (second column) is the
set B.
A relation may also be given by simply specifying the ordered pairs that belong to the
relation. Another way is by giving a rule for membership in the relation.
Example:
A B
2 4
2 6
3 3
3 6
Example:
Supposed a card is drawn from an ordinary deck of playing cards. In how may
ways can we draw
a) A heart or a spade?
b) A heart or an ace?
c) A numbered card or a king?
If S1, S2,,Sn are non empty sets, then the number of elements in the Cartesian
product S1 x S2 x x Sn is the product is
|s1 x S2 x x Sn| = |S1| x |S2| x x |Sn|
Example: