Home
Proof by contradiction works because
- Sets and objects can be defined and can be identified using the definition
- For any object and any set, we can determine if the object is in the set ()
- Sets can be formed by specifying the elemetns of the set, e.g. $X = \left{ \text{people with blue eyes} \right} or
#proof:
SFAC, 1-3 are true.
let
By ax. 2, we can determine if or .
Claims:
SFAC , then is a set and is an element of itself, but should not contain sets which are elements of themselves. So . Contradiction
Since , then is a set and . So, by def of , . Contraction. So at least one of our assumptions is not true.
#def:
In CSC 310 the term language is defined to be "a set of strings of characters"
Syntax - form taken by various valid expressions
Semantics - meaning associated with those valid expressions
In this class, our goal is to know which words are associated with certain formal languages.
#def:
- Alphabet - A finite set of symbols (characters)
- Alphabets must not be infinite
- Word - a valid string of characters
- Valid is defined by the language def
How can we precisely define an infinite language?
- Using English (bad)
- Listing enough examples to establish a pattern (bad)
- Using mathematical expressions to represent how many times a particular character should be repeated (not generalisable)
"All odd length strings of 1s"
English is often vague and/or ambiguous
#Side Note:
used to represent the empty string
For "all odd length string of 1s":
For "all even length string of 1s":
- How many examples should be listed?
- At what point does the pattern become "obvious"?
for "all even length strings of 1s"
but then notations must be explained
is not mathematical (in this case), the exponent is the number of times the character must be repeated
- length
- concat: Notations: , ,
#def:
Closure of a language under concatenation is the set of all strings that can be derived from applying the concatenation operation to the characters int he alphabet in all possible combinations
For an alphabet , we generally denote this closure language as , sometimes called "Sigma Star" or "Kleene Star"
Ex: given , then
Ex: given , then
#ex:
If , find .
#ex:
If , find .
"Constructive Proof/Algorithm"
Prove by constructive algorithm that "abba" is a word in where
- By definition of the operator, contains all words that can be constructed from the underlying factors of .
- "abba" is thus a word in because "abba" can be constructed by the concatenation seq (ab) (ba).
#def:
Modified Kleene closure using as superscript:
For
#ex:
Prove by constructive algorithm that for that contains all words of the form for
In general, any word in the form where can be constructed from
This
#def: (Axiom of extension)
Two sets are equal iff they have the same elements.
#proof: (Prove that )
Let . So by def of intersection, and . So which shows Let . Then and . Since , then . So and . So $x \in (A \cup B)\ap (A \setminus B).
[there's more that I don't feel like writing ...]
#thm: (For any set of strings , )
Recursive definitions can be used to define lnaguages
Each recursive language definition consists of three parts
- We explicitly define some elements of the set (base case)
- We provide one or more rules for constructing additional elts of the set from known elts
- We specify that no other words are allowed
Example
Consider language which can be defined in English as "all strings of x's length one or greater"
Here is a recursive def:
- "x" is a word in
- If is a word in the concat("x", ) is also a word in
- contains only those words that can be generated from rules 1 and 2
*
as superscript = {0,}
+
as superscript = {1,}
+
without superscript is or (|
in my world)
Definition
Every individual character when bold is a regex, when written in boldface is a regex
If and are regexps then so are:
- - define scope
- - concat
- - or
- -
{0,}