Discrete Structures Li Tak Sing( 李德成 ) mt263f-11-12.ppt 1.

Slides:



Advertisements
Similar presentations
Countability. The cardinality of the set A is equal to the cardinality of a set B if there exists a bijection from A to B cardinality? bijection? injection.
Advertisements

Basic Structures: Functions and Sequences
Basic Structures: Sets, Functions, Sequences, Sums, and Matrices
Basic Structures: Sets, Functions, Sequences, Sums, and Matrices
1 Diagonalization Fact: Many books exist. Fact: Some books contain the titles of other books within them. Fact: Some books contain their own titles within.
Introduction to Computability Theory
Lecture 15UofH - COSC Dr. Verma 1 COSC 3340: Introduction to Theory of Computation University of Houston Dr. Verma Lecture 15.
Courtesy Costas Busch - RPI1 A Universal Turing Machine.
1 Linear Bounded Automata LBAs. 2 Linear Bounded Automata are like Turing Machines with a restriction: The working space of the tape is the space of the.
CSE115/ENGR160 Discrete Mathematics 04/03/12 Ming-Hsuan Yang UC Merced 1.
Regular Languages Sequential Machine Theory Prof. K. J. Hintz Department of Electrical and Computer Engineering Lecture 3 Comments, additions and modifications.
Module 5 Topics Proof of the existence of unsolvable problems
Regular Languages Sequential Machine Theory Prof. K. J. Hintz Department of Electrical and Computer Engineering Lecture 3 Comments, additions and modifications.
Sequence A list of objects arranged in a particular order.
Costas Busch - RPI1 Mathematical Preliminaries. Costas Busch - RPI2 Mathematical Preliminaries Sets Functions Relations Graphs Proof Techniques.
Courtesy Costas Busch - RPI1 Mathematical Preliminaries.
Fall 2004COMP 3351 A Universal Turing Machine. Fall 2004COMP 3352 Turing Machines are “hardwired” they execute only one program A limitation of Turing.
CS 310 – Fall 2006 Pacific University CS310 The Halting Problem Section 4.2 November 15, 2006.
1 Introduction to Computability Theory Lecture11: The Halting Problem Prof. Amos Israeli.
1 Lecture 6 Topics –Proof of the existence of unsolvable problems Problems/languages not in REC Proof Technique –There are more problems/languages than.
Induction and recursion
Cardinality of Sets Section 2.5.
Sequences and Summations
Section 2.4. Section Summary Sequences. Examples: Geometric Progression, Arithmetic Progression Recurrence Relations Example: Fibonacci Sequence Summations.
1 Strings and Languages. 2 Review Sets and sequences Functions and relations Graphs Boolean logic:      Proof techniques: – Construction, Contradiction,
MA/CSSE 474 Theory of Computation Functions, Closure, Decision Problems.
1 Chapter 1 Introduction to the Theory of Computation.
Construction Techniques (1) - 1ICOM 4075 (Fall, 2010) UPRM Department of Electrical and Computer Engineering University of Puerto Rico at Mayagüez 2005.
1 1 CDT314 FABER Formal Languages, Automata and Models of Computation Lecture 15-1 Mälardalen University 2012.
Mathematical Preliminaries. Sets Functions Relations Graphs Proof Techniques.
Discrete Structures Li Tak Sing( 李德成 ) Lecture note 2 1.
Basic Structures: Sets, Functions, Sequences, and Sums CSC-2259 Discrete Structures Konstantin Busch - LSU1.
Induction Proof. Well-ordering A set S is well ordered if every subset has a least element. [0, 1] is not well ordered since (0,1] has no least element.
A Universal Turing Machine
Relations, Functions, and Countability
ICS 253: Discrete Structures I Induction and Recursion King Fahd University of Petroleum & Minerals Information & Computer Science Department.
INFIINITE SETS CSC 172 SPRING 2002 LECTURE 23. Cardinality and Counting The cardinality of a set is the number of elements in the set Two sets are equipotent.
Mathematical Preliminaries
Discrete Structure Li Tak Sing( 李德成 ) Lecture 13 1.
Discrete Structures Li Tak Sing ( 李德成 ) Lectures
CS 103 Discrete Structures Lecture 13 Induction and Recursion (1)
Chapter 2 With Question/Answer Animations. Section 2.1.
1 Linear Bounded Automata LBAs. 2 Linear Bounded Automata (LBAs) are the same as Turing Machines with one difference: The input string tape space is the.
1 Turing’s Thesis. 2 Turing’s thesis: Any computation carried out by mechanical means can be performed by a Turing Machine (1930)
CompSci 102 Discrete Math for Computer Science February 7, 2012 Prof. Rodger Slides modified from Rosen.
Classifications LanguageGrammarAutomaton Regular, right- linear Right-linear, left-linear DFA, NFA Context-free PDA Context- sensitive LBA Recursively.
1 Melikyan/DM/Fall09 Discrete Mathematics Ch. 7 Functions Instructor: Hayk Melikyan Today we will review sections 7.3, 7.4 and 7.5.
Section 3.2: Sequences and Summations. Def: A sequence is a function from a subset of the set of integers (usually the set of natural numbers) to a set.
CS 285- Discrete Mathematics
1 Mathematical Preliminaries. 2 Sets Functions Relations Graphs Proof Techniques.
CompSci 102 Discrete Math for Computer Science March 13, 2012 Prof. Rodger Slides modified from Rosen.
Strings and Languages Denning, Section 2.7. Alphabet An alphabet V is a finite nonempty set of symbols. Each symbol is a non- divisible or atomic object.
Section 2.5. Cardinality Definition: A set that is either finite or has the same cardinality as the set of positive integers (Z + ) is called countable.
Chapter 2 1. Chapter Summary Sets (This Slide) The Language of Sets - Sec 2.1 – Lecture 8 Set Operations and Set Identities - Sec 2.2 – Lecture 9 Functions.
Section Recursion  Recursion – defining an object (or function, algorithm, etc.) in terms of itself.  Recursion can be used to define sequences.
1 A Universal Turing Machine. 2 Turing Machines are “hardwired” they execute only one program A limitation of Turing Machines: Real Computers are re-programmable.
Sequences Lecture 11. L62 Sequences Sequences are a way of ordering lists of objects. Java arrays are a type of sequence of finite size. Usually, mathematical.
1 Proof of the Day: The length of a string is the number of symbols it contains. For example, the length of is five. Let L = { w such that w is a.
Nonregular Languages Section 2.4 Wed, Oct 5, 2005.
Discrete Mathematics CS 2610
A Universal Turing Machine
2.4 Sequences and Summations
Cardinality of Sets Section 2.5.
Nonregular Languages Section 2.4 Wed, Oct 5, 2005.
Discrete Structures for Computer Science
ICS 253: Discrete Structures I
COMPS263F Unit 3 Discrete Structures Li Tak Sing( 李德成 ) Room A
Formal Languages, Automata and Models of Computation
Chapter 1 Introduction to the Theory of Computation
Cardinality Definition: The cardinality of a set A is equal to the cardinality of a set B, denoted |A| = |B|, if and only if there is a one-to-one correspondence.
Presentation transcript:

Discrete Structures Li Tak Sing( 李德成 ) mt263f ppt 1

Counting Strings The set A* of all strings over a finite alphabet A is countably infinite. Proof. A* is the union of A 0, A 1,... Since each A n is finite, therefore the union of these finite sets are countable. 2

Uncountable sets Diagonalization  Let A be an alphabet with two or more symbols and let S o, S 1,..., S n,..., be countable listing of sequences of the form S n =(a no, a n1,....), where a ni  A. The sequences are listed as the rows of the following infinite matrix: 3

Then there is a sequence S=(b 0, b 1, b 2,..) over A that is not in the original list. We can construct S from the list of diagonal elements (a 00, a 11, a 22,...) by changing each element so that b n  a nn for each n. 4

Uncountability of the reals. 5

Limits on computability The set of programs for a programming language is countably infinite. Programs can be considers as strings over a particular set of alphabets, therefore, according to the countability of strings, programs are countabily infinite. 6

Not everything is computable We only have countable programs, therefore we can only generate countable number of results. For example, there are uncountable real numbers. So we cannot use programs to generate all the real numbers as we only have countable programs. 7

Higher cardinalities |A|<|power(A)| Proof. This is true for finite A. For infinite A, we see that for each element of A, say x, {x} is an element of A. So we can see that |A| is at lease less than or equal to |power(A)|. Would it be possible that |A|=|power(A)|? 8

Higher cardinalities Assume that that is the case, therefore there is a bijection between A and power(A). So each x in A is associated with a subset S x of A. Now, consider the subset: S={x  A|x  S x } There is an y such that S=S y Now, y  S y  y  S y and y  S y  y  S y Therefore, contradition and such bijection does not exist. Therefore |A|<|power(A)| 9

There are uncountably many languages over a finite alphabet A language is a subset of all the strings over a set of alphabets. So all the languages over a set of alphabets form the power set of all the strings over a set of alphabets. Since the set of all strings over a set of alphabets is countably infinite, the power set is uncountably infinite. 10

Examples 1.Show that the cardinality of the odd integers is the same as the cardinality of the integers. 2.Show that the set of even natural numbers have the same cardinality as the set Z of integers. 3.Prove that the open intervals of real numbers (1,2) and (4,10) have the same cardinality. 11

Solution 12

Solution 13

Construction Techniques Inductively Defined Sets  Basis: Specify one or more elements of s.  Induction: Give one or more rules to construct new elements of S from existing elements of S.  Closure: State that S consists exactly of the elements obtained by the basis and induction steps. 14

Examples Consider how to define the following sets inductively: 1.{4,2,0,-2...} 2.{2, 6,18, 54,….} 3.{4,-8, 16, -32,...} 4.{...,-6,-3,0,3,6,...} 15

Solution 16

Strings All strings over A*  Basis:  A*  Induction: if s  A* and a  A, then as  A*. 17

String examples Show how to generate the following set of strings inductively. 1.S={ab, aabb, aaabbb,....} 2.S={aba, aabaa, aaabaaa,.....} 3.S={ab, abab, ababab,...} 4.S={a m (bc) n |m,n  N} 18

Solution 19

Lists All lists over A  Basis: <>  lists(A).  Induction: If x  A and L  lists(A), then cons(x,L)  list(A). 20

Lists examples Write the inductive definiton for the sets: 1.C={L|L  lists({a,b}) where a's and b's alternate} 2.S={x|x  lists(N) and x has even length} 21

Solution 22

Binary trees All binary trees over A  Basis: <>  B.  Induction: if x  A and L,R  B, then tree(L,x,R)  B. 23

Binary trees Write an inductive definition for each of the following Binary trees 1.All binary trees over {a} 2.The set of binary trees over {a} where each node has two identical subtrees. 24

Solution 25