Definition: Suppose we let R be a relation on a set A.
We will be writing aRb instead of (a,b) \elementof R to indicate a is related to b via the relation R.

R is reflexive. For every element a in the set A, aRa is true.

R is symmetric. aRb implies bRa.

R is transitive. For every element a, b and c in the set A, if aRb and bRc, then aRc
irreflexive != not reflexive: there is no element a such that aRa is true.
asymmetric != not symmetric: there is no element a, b such that aRb -> bRa

R is an equivalence relation on A if R is reflexive, symmetric, and transitive.

If R is symmetric and transitive, is R reflexive? Nope.
Theorem: If a relation R on a set S is an equivalence relation, then R partitions S into disjoint non-empty equivalence classes, i.e. there exists S1, S2, S3, ... such that S = S1 U S2 U S3 U ... and for every i,j (i != j)

Principles of Strong Math Induction
Suppose P(n) is a statement about n element of Z
To prove P(n) is true for n >= n_0, it is sufficient to show 2 things:
1) P(n) is true
2) for every k >= n_0, if P(n) is true for all n, n_0 <= n <= k, then P(k+1) is true.

Recursive Definitions

One of the most commonly used definitions is the recursive definition of the factorial. n! = { n = 0 ? 1 : n * (n - 1) }

Concatenation of languagesL^0 = { [Epsilon] }

Kleene closure L^*

Palindromes

Let [Sigma] be any alphabet.
The languague pal of palindromes over [Sigma] can be recursively defined as follows:
i. [Epsilon] elementof pal
ii. For any symbol a in [Sigma], a elementof pal
iii. For any symbol a in [Sigma] and any string x in pal,

Ex 1:

{0,01}^* is a regular language - corresponding regex - (0+10)^*

Ex 2:

The language over {0,1} described as composed of strings where
a. there is exactly one 0
{1}^*{0}{1}^* -- 1*01*
b. there are exactly three 0s
1*01*01*01*
c. even length
((0+1)(0+1))*
d. string with odd number of 1s
0*10*(10*10*)*
e. length = 6
(0+1+e)(0+1+e)(0+1+e)(0+1+e)(0+1+e)(0+1+e)
f. ends in one, no consecutive 0s
1*(01)*1*(10)*1
1*(1*011*)*1

HOMEWORK #1

Consider r_1 = 0*+1*
r_2 = 01* + 10* + 1*0 + (0*1)*
Find a string such that
a. r_1 is true and r_2 is not true
00
b. r_1 is not true and r_1 is true
01
c. both r_1 and r_2 are true
11
d. both r_1 and r_2 are not true
010
considering [Sigma] = {0,1}

Definition: recognize

(see definition under Languages)
single 'pass' from left to right
remembering
modeling by directed graphs
finite state machine / automaton

Exercise

Write a regular expression that generates all strings over {0,1} that do not contain 3 consecutive 0s.

Definition: finite automaton

A finite automaton (FA) or a finite state machine is a 5-tuple (Q, Sigma, delta, q_0, F) where
Q is a finite set of states
Sigma is a finite alphabet of symbols
delta is a (transition) function Q x Sigma -> Q
q_0 elementof Q is an initial state
F subsetof Q is a set of final/accepting states

Example 1:

language over the alphabet {0,1} that ends in 10. A regular expression that will generate this will be (0+1)*10

Equivalent

Kleene's Theorem

The language generated by regular expression L(r) is equivalent to the language accepted by FA machine M, L(M).

L(R) is the language generated by the regular expression R
L(M) is the language recognized by DFA M

part 1

given a regular expression r, there exists a DFA M such that L(r) = L(M)
It is sufficient to show that we can construct an NFA with epsilon transitions for any regular expression r.
i) base cases
r = null
r = epsilon
r = a, a elementof Sigma

The majority of the textbooks are available in the Cubao branch. Need this by Thursday.

Assignments will be given regularly; however, assignments will be checked randomly.

Dr. Mccluskey will arrive in January and handle the second half of CS130 for both classes.

When we're given, for example, some input: 5, 11
and the output: 16
What we've done between the input and the output is computing the sum.

In this sense we will be using 'computer' and 'algorithm' in the same sense as CS110 and CS101

Just as an overview, we will be discussing the following models for computation

Finite automata (FA)

Pushdown automata

Turing machine, which is the strongest model and generally accepted as capable of doing all computations

Actually, the first part of the textbook deals with preliminaries only, and I will be assigning you to read Chapter 1 of the textbook.
Submit by tomorrow a 3x5 index card with the following information:
[Front]
Chua, Sandra Jean V.
Sacha
3 BS CS
Philippine Science High School
12 August 1983
sachac@iname.com