DVA325 Formal Languages, Automata and Models of Computation (FABER)

Size: px
Start display at page:

Download "DVA325 Formal Languages, Automata and Models of Computation (FABER)"

Transcription

1 DVA325 Formal Languages, Automata and Models of Computation (FABER) Lecture 1 - Introduction School of Innovation, Design and Engineering Mälardalen University 11 November 2014 Abu Naser Masud FABER November 11, / 87

2 CONTENTS 1 Adminstrivia 2 Basic Set Theory 3 Countable Sets 4 Uncountable sets 5 Cardinality of Sets Abu Naser Masud FABER November 11, / 87

3 ACKNOWLEDGEMENTS The lecture materials in the slides are either directly copied or influenced from the lecture material of Prof. Gordana Dodig-Crnkovic. Some parts of the lecture are taken from Prof. Johnnie Baker s slides. Abu Naser Masud FABER November 11, / 87

4 COURSE HOME PAGE URL: Visit home page regularly! Abu Naser Masud FABER November 11, / 87

5 JFLAP Abu Naser Masud FABER November 11, / 87

6 WORK HOUR Abu Naser Masud FABER November 11, / 87

7 REFERENCE BOOK Abu Naser Masud FABER November 11, / 87

8 WHY THEORY OF COMPUTATION 1 A real computer can be modelled by a mathematical object: a theoretical computer. 2 A formal language is a set of strings, and can represent a computational problem. 3 A formal language can be described in many different ways that ultimately prove to be identical. 4 Simulation: the relative power of computing models can be based on the ease with which one model can simulate another. Abu Naser Masud FABER November 11, / 87

9 WHY THEORY OF COMPUTATION 1 A real computer can be modelled by a mathematical object: a theoretical computer. 2 A formal language is a set of strings, and can represent a computational problem. 3 A formal language can be described in many different ways that ultimately prove to be identical. 4 Simulation: the relative power of computing models can be based on the ease with which one model can simulate another. Abu Naser Masud FABER November 11, / 87

10 WHY THEORY OF COMPUTATION 1 A real computer can be modelled by a mathematical object: a theoretical computer. 2 A formal language is a set of strings, and can represent a computational problem. 3 A formal language can be described in many different ways that ultimately prove to be identical. 4 Simulation: the relative power of computing models can be based on the ease with which one model can simulate another. Abu Naser Masud FABER November 11, / 87

11 WHY THEORY OF COMPUTATION 1 A real computer can be modelled by a mathematical object: a theoretical computer. 2 A formal language is a set of strings, and can represent a computational problem. 3 A formal language can be described in many different ways that ultimately prove to be identical. 4 Simulation: the relative power of computing models can be based on the ease with which one model can simulate another. Abu Naser Masud FABER November 11, / 87

12 WHY THEORY OF COMPUTATION 5 Robustness of a general computational model. 6 The Church-Turing thesis: everything algorithmically computable is computable by a Turing machine. 7 Study of non-determinism: languages can be described by the existence or non-existence of computational paths. 8 Understanding unsolvability: for some computational problems there is no corresponding algorithm that will unerringly solve them. Abu Naser Masud FABER November 11, / 87

13 PRACTICAL APPLICATIONS 1 Efficient compilation of computer languages 2 String search 3 Investigation of the limits of computation, recognizing difficult/unsolvable problems 4 Applications to other areas: circuit verification economics and game theory (finite automata as strategy models in decision-making); theoretical biology (L-systems as models of organism growth) computer graphics (L-systems) linguistics (modelling by grammars) Abu Naser Masud FABER November 11, / 87

14 Basic Set Theory Abu Naser Masud FABER November 11, / 87

15 SET A set is an unordered collection of objects referred to as elements. A set is said to contain its elements. Different ways of describing a set (Set Representation). 1 Explicitly: listing the elements of a set {1, 2, 3} is the set containing 1, 2, and 3. The members or elements of the set are included inside the braces. {1, 1, 2, 3, 3} = {1, 2, 3} since repetition is irrelevant. {1, 2, 3} = {3, 2, 1} since sets are unordered. Abu Naser Masud FABER November 11, / 87

16 SET 1 Explicitly: listing the elements of a set {1, 2, 3,..., 99} is the set of positive integers less than 100; {1, 2, 3,...} is a way we denote an infinite set (in this case, the natural numbers). = {} is the empty set, or the set containing no elements. Abu Naser Masud FABER November 11, / 87

17 SET 1 Explicitly: listing the elements of a set {1, 2, 3,..., 99} is the set of positive integers less than 100; {1, 2, 3,...} is a way we denote an infinite set (in this case, the natural numbers). = {} is the empty set, or the set containing no elements. Note { } Abu Naser Masud FABER November 11, / 87

18 SET 1 Explicitly: listing the elements of a set {1, 2, 3,..., 99} is the set of positive integers less than 100; {1, 2, 3,...} is a way we denote an infinite set (in this case, the natural numbers). = {} is the empty set, or the set containing no elements. Note Sometimes we give a name to a set. For example A = {1, 2, 3}, here, A is the set containing the elements 1, 2, and 3. Abu Naser Masud FABER November 11, / 87

19 SET 1 Explicitly: listing the elements of a set {1, 2, 3,..., 99} is the set of positive integers less than 100; {1, 2, 3,...} is a way we denote an infinite set (in this case, the natural numbers). = {} is the empty set, or the set containing no elements. 2 Implicitly: by using a set builder notations S = {j j > 0, and j = 2k for some k > 0}. S = {j j >= 0, and j =< 100}. Abu Naser Masud FABER November 11, / 87

20 SET 1 Explicitly: listing the elements of a set {1, 2, 3,..., 99} is the set of positive integers less than 100; {1, 2, 3,...} is a way we denote an infinite set (in this case, the natural numbers). = {} is the empty set, or the set containing no elements. 2 Implicitly: by using a set builder notations S = {j j > 0, and j = 2k for some k > 0}. S = {j j >= 0, and j =< 100}. should be read as such that Abu Naser Masud FABER November 11, / 87

21 SOME IMPORTANT SETS Natural Numbers ( non negative integers) N = {1, 2, 3...} Integers Z = {..., 2, 1, 0, 1, 2, 3,...} Positive Integers Z + = {1, 2, 3,...} Rational Numbers Q = {p/q p Z, q Z, and q 0} Real Numbers R x S means x is an element of set S x S means x is not an element of set S Abu Naser Masud FABER November 11, / 87

22 UNIVERSAL SET Abu Naser Masud FABER November 11, / 87

23 SET OPERATIONS Suppose A = {1, 2, 3} and B = {2, 3, 4, 5} Union A B = {1, 2, 3, 4, 5} Intersection A B = {2, 3} Difference A \ B = {1} B \ A = {4, 5} sometimes we write - instead of \ A B A B A B A B A B A \ B Abu Naser Masud FABER November 11, / 87

24 SET OPERATIONS Complement Suppose Universal set is {1,..., 7} and A = {1, 2, 3} A = U A = A = {4, 5, 6, 7} Abu Naser Masud FABER November 11, / 87

25 SET OPERATIONS Complement Suppose Universal set is {1,..., 7} and A = {1, 2, 3} A = U A = A = {4, 5, 6, 7} Note A = A Abu Naser Masud FABER November 11, / 87

26 SET OPERATIONS Abu Naser Masud FABER November 11, / 87

27 SET OPERATIONS A B means A is a subset of B. Equivalently, B contains A. Every element of A is also in B. x((x A) (x B)). Abu Naser Masud FABER November 11, / 87

28 SET OPERATIONS A B means A is a subset of B. A B means B is a superset of A. A = B if and only if A and B have exactly the same elements. Equivalently iff, A B and B A iff, x((x A) (x B)). So in order to show equality of sets A and B, show: A B B A Abu Naser Masud FABER November 11, / 87

29 SET OPERATIONS A B means A is a proper subset of B. That means, A B, and A B. Abu Naser Masud FABER November 11, / 87

30 EXAMPLES - SET OPERATIONS Quick examples: {1, 2, 3} {1, 2, 3, 4, 5} {1, 2, 3} {1, 2, 3, 4, 5} Is {1, 2, 3}? Abu Naser Masud FABER November 11, / 87

31 EXAMPLES - SET OPERATIONS Quick examples: {1, 2, 3} {1, 2, 3, 4, 5} {1, 2, 3} {1, 2, 3, 4, 5} Is {1, 2, 3}? Yes! Abu Naser Masud FABER November 11, / 87

32 EXAMPLES - SET OPERATIONS Quick examples: {1, 2, 3} {1, 2, 3, 4, 5} {1, 2, 3} {1, 2, 3, 4, 5} Is {1, 2, 3}? Yes! Is {1, 2, 3}? Abu Naser Masud FABER November 11, / 87

33 EXAMPLES - SET OPERATIONS Quick examples: {1, 2, 3} {1, 2, 3, 4, 5} {1, 2, 3} {1, 2, 3, 4, 5} Is {1, 2, 3}? Yes! Is {1, 2, 3}? No! Abu Naser Masud FABER November 11, / 87

34 EXAMPLES - SET OPERATIONS Quick examples: {1, 2, 3} {1, 2, 3, 4, 5} {1, 2, 3} {1, 2, 3, 4, 5} Is {1, 2, 3}? Yes! Is {1, 2, 3}? No! Is {, 1, 2, 3}? Abu Naser Masud FABER November 11, / 87

35 EXAMPLES - SET OPERATIONS Quick examples: {1, 2, 3} {1, 2, 3, 4, 5} {1, 2, 3} {1, 2, 3, 4, 5} Is {1, 2, 3}? Yes! Is {1, 2, 3}? No! Is {, 1, 2, 3}? Yes! Abu Naser Masud FABER November 11, / 87

36 EXAMPLES - SET OPERATIONS Quick examples: {1, 2, 3} {1, 2, 3, 4, 5} {1, 2, 3} {1, 2, 3, 4, 5} Is {1, 2, 3}? Yes! Is {1, 2, 3}? No! Is {, 1, 2, 3}? Yes! Is {a} {a}? Abu Naser Masud FABER November 11, / 87

37 EXAMPLES - SET OPERATIONS Quick examples: {1, 2, 3} {1, 2, 3, 4, 5} {1, 2, 3} {1, 2, 3, 4, 5} Is {1, 2, 3}? Yes! Is {1, 2, 3}? No! Is {, 1, 2, 3}? Yes! Is {a} {a}? No! Abu Naser Masud FABER November 11, / 87

38 EXAMPLES - SET OPERATIONS Quick examples: {1, 2, 3} {1, 2, 3, 4, 5} {1, 2, 3} {1, 2, 3, 4, 5} Is {1, 2, 3}? Yes! Is {1, 2, 3}? No! Is {, 1, 2, 3}? Yes! Is {a} {a}? No! Is {a} {a}? Abu Naser Masud FABER November 11, / 87

39 EXAMPLES - SET OPERATIONS Quick examples: {1, 2, 3} {1, 2, 3, 4, 5} {1, 2, 3} {1, 2, 3, 4, 5} More About Empty or Null Set ( ) Is {1, 2, 3}? Yes! S = S Is {1, 2, 3}? No! S = Is {, 1, 2, 3}? Yes! S \ = S Is {a} {a}? No! \ S = Is {a} {a}? No! = Universal Set Abu Naser Masud FABER November 11, / 87

40 DEMORGAN S LAWS 1 A B = A B 2 A B = A B Abu Naser Masud FABER November 11, / 87

41 DEMORGAN S LAWS 1 A B = A B 2 A B = A B Proof of First Law: Suppose x A B Suppose x A B = x A B = x A and x B = x A and x B = x A and x B = x A and x B = x A B = x A B = x A B Abu Naser Masud FABER November 11, / 87

42 DEMORGAN S LAWS 1 A B = A B 2 A B = A B Proof of First Law: Suppose x A B = x A B = x A and x B = x A and x B = x A B Try to prove the second law. Suppose x A B = x A and x B = x A and x B = x A B = x A B Abu Naser Masud FABER November 11, / 87

43 CARDINALITY OF SETS Definition The cardinality of any finite set S is represented as S, and is the number of distinct elements in S. Examples: S = {1, 2, 3}. Thus S = 3. S = {1, 2, 3, 4, 4, 4, 5}. Thus S = 5. S =. Thus S = 0. S = {, { }}. Thus S = 2. S = {0, 1, 2, 3,...}. Thus S =infinite. Abu Naser Masud FABER November 11, / 87

44 POWER SETS Definition The power set of any set S is the set of all the subsets of S. The power set of any set S is represented by 2 S or P(S) Examples S = {a}, 2 S = {, {a}} S = {a, b}, 2 S = {, {a}, {b}, {a, b}} S =, 2 S = { } Fact: If S is finite, 2 S = 2 S. Abu Naser Masud FABER November 11, / 87

45 CARTESIAN PRODUCT Abu Naser Masud FABER November 11, / 87

46 INJECTIVE, SURJECTIVE, AND BIJECTIVE FUNCTIONS Let f : A B be a function. Here domain of f is set A, and range of f is set B. Definitions 1 If for any a 1, a 2 A, f (a 1 ) = f (a 2 ) = a 1 = a 2, f is said to be injective or one-to-one. 2 If for any b B, there exists a A such that f (a) = b, f is said to be surjective or onto. 3 If a function f is both injective and surjective, it is called bijective or one-to-one correspondence. Abu Naser Masud FABER November 11, / 87

47 INJECTIVE, SURJECTIVE, AND BIJECTIVE FUNCTIONS Abu Naser Masud FABER November 11, / 87

48 PROOF TECHNIQUES 1 Proof by Construction 2 Proof by Induction 3 Proof by Contradiction Abu Naser Masud FABER November 11, / 87

49 PROOF BY CONSTRUCTION ( AN EXAMPLE) We define a graph to be k-regular if every node in the graph has degree k. Theorem For each even number n > 2 there exists 3-regular graph with n nodes. Abu Naser Masud FABER November 11, / 87

50 PROOF BY CONSTRUCTION We can construct a graph G = (V, E) such that V = n and n > 2 nodes. V = {0, 1,..., n 1} We make two kind of edges: 1 E 1 = {(i, i + 1) 0 i n 1} {(n 1, 0)} Edges between adjacent nodes 2 E 2 = {(i, i + n/2) 0 i n/2 1} Cross edges between nodes in two halves E = E 1 E 2 End of Proof Abu Naser Masud FABER November 11, / 87

51 PROOF BY INDUCTION We have statements P 1, P 2, P 3,... If we know for some k that P 1, P 2,..., P k are true for any n k that P 1, P 2,..., P n imply P n+1 Then Every P i is true Abu Naser Masud FABER November 11, / 87

52 PROOF BY INDUCTION (PROCEDURE) Inductive Basis or Base Case Prove that P 1 is true Inductive Hypothesis (IH) Let s assume P 1, P 2,..., P n are true, for any n >= 1 Inductive Step Prove that P n+1 is true from the IH. Abu Naser Masud FABER November 11, / 87

53 PROOF BY INDUCTION (AN EXAMPLE) Theorem A binary tree of height n has at most 2 n leaves. Proof let L(i) be the number of leaves at level i Abu Naser Masud FABER November 11, / 87

54 PROOF We want to show: L(i) 2 i Inductive basis L(0) = 1 (the root node) Inductive hypothesis Let s assume L(i) 2 i for all i = 0, 1,..., n Induction step we need to show that L(n + 1) 2 n+1 Abu Naser Masud FABER November 11, / 87

55 PROOF - INDUCTIVE STEP Abu Naser Masud FABER November 11, / 87

56 PROOF - INDUCTIVE STEP Abu Naser Masud FABER November 11, / 87

57 PROOF BY INDUCTION (ANOTHER EXAMPLE) Theorem - Cardinality of Power Set Let S be a finite set with S = n (S has n elements). Then P(S) = 2 n elements. In other words, S has 2 n subsets. This statement can be proved by induction. We can see that it is true for n=0,1,2,3 by examination. = { } 2 0 = 1 {1} = {, {1}} 2 1 = 2 {1, 2} = {, {1}, {2}, {1, 2}} 2 2 = 4 {1, 2, 3} = {, {1}, {2}, {3}, {1, 2}, {1, 3}, {2, 3}, {1, 2, 3}} 2 3 = 8 Abu Naser Masud FABER November 11, / 87

58 INDUCTIVE PROOF BASE CASE The simplest case is the set with 0 elements (there is just one such set), that has 2 0 = 1 subsets. INDUCTIVE HYPOTHESIS (IH) Assume that the claim is valid for all sets with k elements, i.e. that every set with k elements has 2 k subsets. Abu Naser Masud FABER November 11, / 87

59 INDUCTIVE PROOF BASE CASE The simplest case is the set with 0 elements (there is just one such set), that has 2 0 = 1 subsets. INDUCTIVE HYPOTHESIS (IH) Assume that the claim is valid for all sets with k elements, i.e. that every set with k elements has 2 k subsets. Prove the Inductive step from IH Show that IH implies that the proposition is true for every set with k + 1 element, that is show that each set with k + 1 elements has 2 k+1 subsets. Abu Naser Masud FABER November 11, / 87

60 INDUCTIVE STEP Let x S. Consider the set S = S \ {x} where x is any element of S. S = k + 1 implies S = k. In counting the number of subsets of S, we have 1 The number of subsets of S (subsets of S excluding x) 2 All the subsets of S with x adjoined to them (subsets of S including x). From the induction hypothesis, there are 2 k subsets of S. Abu Naser Masud FABER November 11, / 87

61 INDUCTIVE STEP (CONTD.) Now adjoin x to all the subsets of S. This does not change its number. So, there are 2 k subsets of S including x in each of them. So, in total we have 2 k + 2 k = 2 2 k = 2 k+1 subsets of S. Thus P(k) = P(k + 1) Therefore: n N S = n = P(S) = 2 n Abu Naser Masud FABER November 11, / 87

62 PROOF BY CONTRADICTION We want to prove that a statement P is true. 1 We assume that P is false. 2 Then we arrive at a conclusion that contradicts our assumptions. 3 Therefore, statement P must be true. Abu Naser Masud FABER November 11, / 87

63 PROOF BY CONTRADICTION (AN EXAMPLE) Theorem 2 is not rational (irrational) Proof: Assume by contradiction that it is rational 2 = n/m, where n and m have no common factors We will show that this is impossible Abu Naser Masud FABER November 11, / 87

64 PROOF BY CONTRADICTION Abu Naser Masud FABER November 11, / 87

65 COUNTABLE SETS* Definition (At most countable) A countable set is a set with the same cardinality (number of elements) as some subset of the set of natural numbers. Definition (formal) A set S is called countable if there exists an injective function f from S to the natural numbers N = {0, 1, 2, 3,...} (f : S N). (*) The term is due to Georg Cantor ( ) Abu Naser Masud FABER November 11, / 87

66 COUNTABLE SETS 2 n n =< 0 f (n) = 2n 1 n >= 1 Abu Naser Masud FABER November 11, / 87

67 COUNTABLE AND UNCOUNTABLE SETS Abu Naser Masud FABER November 11, / 87

68 CARDINALITY OF INFINITE SETS We started with the natural numbers N = {0, 1, 2, 3,...}. Then Add infinitely many negative whole numbers to get the integers Z = {0, 1, 1, 2, 2, 3, 3,...} Then add infinitely many rational fractions to get the rationals R = {0, 1/1, 1/2, 1/3,...} Each infinite addition seem to increase cardinality: N < Z < Q But is this true? Abu Naser Masud FABER November 11, / 87

69 CARDINALITY OF INFINITE SETS We started with the natural numbers N = {0, 1, 2, 3,...}. Then Add infinitely many negative whole numbers to get the integers Z = {0, 1, 1, 2, 2, 3, 3,...} Then add infinitely many rational fractions to get the rationals R = {0, 1/1, 1/2, 1/3,...} Each infinite addition seem to increase cardinality: N < Z < Q But is this true? NO! Abu Naser Masud FABER November 11, / 87

70 RATIONAL NUMBERS Theorem The set of positive rational numbers is countable. Positive Rational Numbers: 1 2, 3 4, 7 8,... Abu Naser Masud FABER November 11, / 87

71 NAIVE IDEA Abu Naser Masud FABER November 11, / 87

72 BETTER APPROACH Abu Naser Masud FABER November 11, / 87

73 BETTER APPROACH Abu Naser Masud FABER November 11, / 87

74 RATIONAL NUMBERS We proved: the set of rational numbers is countable by describing an enumeration procedure Abu Naser Masud FABER November 11, / 87

75 LANGUAGE Language A language is a set of strings that are constructed by some specific rules related with the language. Strings A string is a sequence of symbols defined over an alphabet Σ. Alphabet An alphabet is a finite nonempty set Σ of symbols. Example Σ = {a, b} Strings = {a, b, ab, ba} Abu Naser Masud FABER November 11, / 87

76 Let S be any set. An enumeration procedure for S is an algorithm that generates all elements of S one by one. A set is countable if there is an enumeration procedure for it. Abu Naser Masud FABER November 11, / 87

77 COUNTABLE FINITE STRINGS Theorem The set of all finite strings of symbols {a, b, c} + is countable. Proof: We will describe the enumeration procedure (Constructive proof). Abu Naser Masud FABER November 11, / 87

78 COUNTABLE FINITE STRINGS Abu Naser Masud FABER November 11, / 87

79 BETTER APPROACH Assume a better enumeration order of strings: 1 Produce all strings of length 1 2 Produce all strings of length 2 3 Produce all strings of length 3 4 Produce all strings of length 4 5 and so on... Abu Naser Masud FABER November 11, / 87

80 COUNTABLE FINITE STRINGS Abu Naser Masud FABER November 11, / 87

81 COUNTABLE FINITE STRINGS (CONTD.) Theorem The set of all finite strings is countable. Proof: Any finite string can be encoded with a binary string of 0 s and 1 s. Find an enumeration procedure for the set of finite strings. Abu Naser Masud FABER November 11, / 87

82 COUNTABLE FINITE STRINGS (CONTD.) Abu Naser Masud FABER November 11, / 87

83 Abu Naser Masud FABER November 11, / 87

84 UNCOUNTABLE SETS Definition A set is uncountable if it is not countable. If a set is not countable, there is no enumeration procedure to enumerate all the elements of the set. Why? Abu Naser Masud FABER November 11, / 87

85 UNCOUNTABLE SETS Theorem The set of all infinite strings is uncountable. Proof (by contradiction): We assume we have an enumeration procedure for the set of infinite strings. Abu Naser Masud FABER November 11, / 87

86 CANTOR S DIAGONAL ARGUMENT Abu Naser Masud FABER November 11, / 87

87 CANTOR S DIAGONAL ARGUMENT We can construct a new string W that is missing in our enumeration! Conclusion The set of all infinite strings is uncountable! An infinite string can be seen as a function f : N N (nth output is nth bit in the string) Corollary There are some integer functions that cannot be described by finite strings (programs/algorithms). Abu Naser Masud FABER November 11, / 87

88 EXAMPLE OF UNCOUNTABLE INFINITE SETS Theorem Let S be an countably infinite set. The powerset 2 S of S is uncountable. Proof We show 2 S is uncountably infinite by showing that 2 N is uncountably infinite. There exists a bijection between 2 N and 2 S. As the bijection exists between N to S. Thus it is sufficient to show that 2 N is uncountably infinite. Abu Naser Masud FABER November 11, / 87

89 PROOF (CONTD.) Assume that the set 2 N is countably infinite (proof by contradiction). So, there is a one-to-one function f : 2 N N. (Counts the number of elements of 2 N ) Equivalently, there is a onto function f : N 2 N (it enumerates the elements of the power set 2 N ) We can enumerate the elements of 2 N as follows: Make a binary table T such that 1 if j f (i) T ij = 0 otherwise Abu Naser Masud FABER November 11, / 87

90 PROOF (CONTD.) Make a binary table T such that 1 if j f (i) T ij = 0 otherwise f(0) f(1) f(2) f(3) f(4) Abu Naser Masud FABER November 11, / 87

91 PROOF (CONTD.) Make a binary table T such that 1 if j f (i) T ij = 0 otherwise Consider the set X N corresponding to the flipped diagonal. X = {j T jj = 0} X = {j j f (j)} f(0) f(1) f(2) f(3) f(4) Abu Naser Masud FABER November 11, / 87

92 PROOF (CONTD.) Make a binary table T such that 1 if j f (i) T ij = 0 otherwise Consider the set X N corresponding to the flipped diagonal. X = {j T jj = 0} X = {j j f (j)} f(0) f(1) f(2) f(3) f(4) Such X will never appear as a row in this table. And so f is not onto. Abu Naser Masud FABER November 11, / 87

93 Thus we have an element X N such that j X implies j f (j) = j X, a contradiction. Conclusion Thus 2 N and hence 2 S is uncountably infinite. Abu Naser Masud FABER November 11, / 87

94 APPLICATION (LANGUAGES) Example Alphabet: Σ = {a, b} The set of all finite strings: S = {a, b} = {λ, a, b, aa, ab, ba, bb, aaa, aab,...} Infinite and Countable The powerset of S contains all languages: P(S) = {{λ}, {a}, {a, b}, {aa, ab, aab},...} Uncountable and Infinite Abu Naser Masud FABER November 11, / 87

95 APPLICATION Finite strings (algorithms): countable Languages (power set of strings): uncountable There are infinitely many more languages than finite strings. Conclusion: There are some languages that cannot be described by finite strings (algorithms). Abu Naser Masud FABER November 11, / 87

96 NUMBER SETS Venn Diagram of Number Sets ( N Z Q A R R C Abu Naser Masud FABER November 11, / 87

97 MORE ON CARDINALITY Cardinality is a measure of the size of a set. Cardinality of a finite set is simply its number of elements. Two finite sets have the same cardinality if they have the same number of elements. Abu Naser Masud FABER November 11, / 87

98 MORE ON CARDINALITY Cardinality is a measure of the size of a set. Cardinality of a finite set is simply its number of elements. Two finite sets have the same cardinality if they have the same number of elements. What about the cardinality of an infinite set? Abu Naser Masud FABER November 11, / 87

99 MORE ON CARDINALITY Cardinality is a measure of the size of a set. Cardinality of a finite set is simply its number of elements. Two finite sets have the same cardinality if they have the same number of elements. What about the cardinality of an infinite set? We cannot count the number of elements of an infinite set. An infinite set has infinite cardinality. Abu Naser Masud FABER November 11, / 87

100 MORE ON CARDINALITY Cardinality is a measure of the size of a set. Cardinality of a finite set is simply its number of elements. Two finite sets have the same cardinality if they have the same number of elements. What about the cardinality of an infinite set? We cannot count the number of elements of an infinite set. An infinite set has infinite cardinality. Are all infinities the same? Abu Naser Masud FABER November 11, / 87

101 MORE ON CARDINALITY Cardinality is a measure of the size of a set. Cardinality of a finite set is simply its number of elements. Two finite sets have the same cardinality if they have the same number of elements. What about the cardinality of an infinite set? We cannot count the number of elements of an infinite set. An infinite set has infinite cardinality. Are all infinities the same? No Abu Naser Masud FABER November 11, / 87

102 MORE ON CARDINALITY Cardinality is a measure of the size of a set. Cardinality of a finite set is simply its number of elements. Two finite sets have the same cardinality if they have the same number of elements. What about the cardinality of an infinite set? We cannot count the number of elements of an infinite set. An infinite set has infinite cardinality. Are all infinities the same? No How can we compare the cardinality of two infinite sets? Abu Naser Masud FABER November 11, / 87

103 MORE ON CARDINALITY (CONTD...) Equal cardinality If we can establish a one-to-one correspondence between two sets, then we have proved that the two sets have the same cardinality. This is true for both finite and infinite sets. Are the cardinality of the two sets {1, 2, 3} and {1/4, 1/3, 1/2} equal? Yes, we can simply count the number of elements. Another way to check the equal cardinality is the one-to-one correspondence 1 1/4 2 1/3 3 1/2 Abu Naser Masud FABER November 11, / 87

104 MORE ON CARDINALITY (CONTD...) Are the cardinality of the two sets {1, 2, 3} and {4, 5, 6, 7} equal? Abu Naser Masud FABER November 11, / 87

105 MORE ON CARDINALITY (CONTD...) Are the cardinality of the two sets {1, 2, 3} and {4, 5, 6, 7} equal? No, there is no one-to-one correspondence between the two sets. Abu Naser Masud FABER November 11, / 87

106 MORE ON CARDINALITY (CONTD...) Are the cardinality of the two sets {1, 2, 3} and {4, 5, 6, 7} equal? No, there is no one-to-one correspondence between the two sets. Are the cardinality of the set of natural numbers N and the set of whole numbers Z equal? Abu Naser Masud FABER November 11, / 87

107 MORE ON CARDINALITY (CONTD...) Are the cardinality of the two sets {1, 2, 3} and {4, 5, 6, 7} equal? No, there is no one-to-one correspondence between the two sets. Are the cardinality of the set of natural numbers N and the set of whole numbers Z equal? Yes. Abu Naser Masud FABER November 11, / 87

108 MORE ON CARDINALITY (CONTD...) Are the cardinality of the two sets {1, 2, 3} and {4, 5, 6, 7} equal? No, there is no one-to-one correspondence between the two sets. Are the cardinality of the set of natural numbers N and the set of whole numbers Z equal? We can make the following one-to-one correspondence between the two sets Abu Naser Masud FABER November 11, / 87

109 MORE ON CARDINALITY (CONTD...) In order to show that this is indeed the one-to-one correspondence, we need to show that 1 There is a REGULAR PATTERN here that we can continue FOREVER. 2 If we continue this pattern, we will never run out of numbers to pair up from each set, and we will never skip any numbers in either set. Does the previous one-to-one correspondence satisfy condition 1 and 2 above? Abu Naser Masud FABER November 11, / 87

110 MORE ON CARDINALITY (CONTD...) ℵ 0 (Aleph-null) The cardinality of the set of natural numbers is an infinite quantity. We call it ℵ 0 (Aleph-null). We have proved that N = Z = ℵ 0. Abu Naser Masud FABER November 11, / 87

111 MORE ON CARDINALITY (CONTD...) ℵ 0 (Aleph-null) The cardinality of the set of natural numbers is an infinite quantity. We call it ℵ 0 (Aleph-null). We have proved that N = Z = ℵ 0. But the set of whole numbers Z contain one more element 0 than the natural numbers. So, we can conclude that ℵ 0 = ℵ Abu Naser Masud FABER November 11, / 87

112 MORE ON CARDINALITY (CONTD...) ℵ 0 (Aleph-null) The cardinality of the set of natural numbers is an infinite quantity. We call it ℵ 0 (Aleph-null). We have proved that N = Z = ℵ 0. But the set of whole numbers Z contain one more element 0 than the natural numbers. So, we can conclude that ℵ 0 = ℵ This is not true for any regular finite number. For any regular number n, n n + 1. But ℵ 0 is not a regular number. Abu Naser Masud FABER November 11, / 87

113 MORE ON CARDINALITY (CONTD...) What is the consequences of ℵ 0 = ℵ 0 + 1? We get ℵ 0 = ℵ = ℵ = ℵ = ℵ = ℵ = ℵ 0 + n, for any finite regular number n Abu Naser Masud FABER November 11, / 87

114 MORE ON CARDINALITY (CONTD...) There is a one-to-one correspondence between the set of integers Z and the set of natural numbers N. Can you find that correspondence? Abu Naser Masud FABER November 11, / 87

115 MORE ON CARDINALITY (CONTD...) There is a one-to-one correspondence between the set of integers Z and the set of natural numbers N. Can you find that correspondence? So, the cardinality Z is Z = ℵ 0. Abu Naser Masud FABER November 11, / 87

116 MORE ON CARDINALITY (CONTD...) There is a one-to-one correspondence between the set of integers Z and the set of natural numbers N. Can you find that correspondence? So, the cardinality Z is Z = ℵ 0. But the number of integers must be twice the number of natural numbers. So, we have the following consequences: 2ℵ = ℵ 0 2ℵ = ℵ ℵ 0 = ℵ 0 4ℵ 0 = 2ℵ 0 = ℵ 0 Abu Naser Masud FABER November 11, / 87

117 MORE ON CARDINALITY (CONTD...) Also, since 2ℵ 0 3ℵ 0 4ℵ 0. We have the following implication ℵ 0 3ℵ 0 ℵ 0 = 3ℵ 0 = ℵ 0 If we continue this argument, we get nℵ 0 = ℵ 0 for any regular finite number n. Abu Naser Masud FABER November 11, / 87

118 MORE ON CARDINALITY (CONTD...) Also, since 2ℵ 0 3ℵ 0 4ℵ 0. We have the following implication ℵ 0 3ℵ 0 ℵ 0 = 3ℵ 0 = ℵ 0 If we continue this argument, we get nℵ 0 = ℵ 0 for any regular finite number n. Try to prove that the cardinality of the set of rational numbers R = ℵ 0 and ℵ n 0 = ℵ 0 Abu Naser Masud FABER November 11, / 87

119 MORE ON CARDINALITY (CONTD...) Is the cardinality of the set of real numbers R = ℵ 0? Abu Naser Masud FABER November 11, / 87

120 MORE ON CARDINALITY (CONTD...) Is the cardinality of the set of real numbers R = ℵ 0? No! Suppose we have the following correspondence: Abu Naser Masud FABER November 11, / 87

121 MORE ON CARDINALITY (CONTD...) Is the cardinality of the set of real numbers R = ℵ 0? No! Suppose we have the following correspondence: We can use the Cantor s diagonal argument to show that there is no one-to-one correspondence. Abu Naser Masud FABER November 11, / 87

122 MORE ON CARDINALITY (CONTD...) So, the cardinality of the set of real numbers is a different infinite quantity. Let s call it ℵ 1 (or c). Abu Naser Masud FABER November 11, / 87

123 MORE ON CARDINALITY (CONTD...) So, the cardinality of the set of real numbers is a different infinite quantity. Let s call it ℵ 1 (or c). Interpretation of ℵ 0 and ℵ 1 : (Figure captured from: Abu Naser Masud FABER November 11, / 87

124 MORE ON CARDINALITY (CONTD...) It has been conjectured that 2 ℵ 0 = ℵ 1 = c. However, the set theory can neither prove nor disprove the hypothesis (undecidable problem). Abu Naser Masud FABER November 11, / 87

125 MORE ON CARDINALITY (CONTD...) It has been conjectured that 2 ℵ 0 = ℵ 1 = c. We also have ℵ 0 < ℵ 1 However, the set theory can neither prove nor disprove the hypothesis (undecidable problem). Abu Naser Masud FABER November 11, / 87

126 MORE ON CARDINALITY (CONTD...) It has been conjectured that 2 ℵ 0 = ℵ 1 = c. We also have ℵ 0 < ℵ 1 The Continuum Hypothesis The continuum hypothesis states that there are no other cardinalities between ℵ 0 and ℵ 1. However, the set theory can neither prove nor disprove the hypothesis (undecidable problem). Abu Naser Masud FABER November 11, / 87

127 MORE ON CARDINALITY (CONTD...) It has been conjectured that 2 ℵ 0 = ℵ 1 = c. We also have ℵ 0 < ℵ 1 The Continuum Hypothesis The continuum hypothesis states that there are no other cardinalities between ℵ 0 and ℵ 1. However, the set theory can neither prove nor disprove the hypothesis (undecidable problem). Generalized version of the continuum hypothesis (Hausdorff in 1908) which is also undecidable: 2 ℵn = ℵ n+1 Abu Naser Masud FABER November 11, / 87

128 MORE ON CARDINALITY (CONTD...) Cantor s Theorem For every set S, the cardinality of S is strictly less than the cardinality of its power set: S < P(S). Abu Naser Masud FABER November 11, / 87

129 MORE ON CARDINALITY (CONTD...) Cantor s Theorem For every set S, the cardinality of S is strictly less than the cardinality of its power set: S < P(S). So, by Cantor s theorem, we have ℵ 0 = N < P(N) < P(P(N)) < P(P(P(N))) <... These increasing cardinalities are in one-to-one correspondence with the natural numbers N. Thus we have a countably infinite number of infinities! Abu Naser Masud FABER November 11, / 87

130 Seems Abulike Naser Masud we have another countably FABER infinite set of infinite November 11, / 87 MORE ON CARDINALITY (CONTD...) Cantor s Theorem For every set S, the cardinality of S is strictly less than the cardinality of its power set: S < P(S). So, by Cantor s theorem, we have ℵ 0 = N < P(N) < P(P(N)) < P(P(P(N))) <... These increasing cardinalities are in one-to-one correspondence with the natural numbers N. Thus we have a countably infinite number of infinities! By using the cardinality of real numbers, we obtain ℵ 1 = R < P(R) < P(P(R)) < P(P(P(R))) <...

131 MORE ON CARDINALITY (CONTD...) Basically, we really have only one countably infinite set of infinite cardinalities. ℵ 0 = N < P(N) = ℵ 1 = R < P(P(R)) < P(P(P(R))) <... Abu Naser Masud FABER November 11, / 87

132 READING MATERIALS 1 An Introduction to Formal Languages and Automata, Peter Linz. Section 1.1, Infinite Sets: Abu Naser Masud FABER November 11, / 87

Cardinality revisited

Cardinality revisited Cardinality revisited A set is finite (has finite cardinality) if its cardinality is some (finite) integer n. Two sets A,B have the same cardinality iff there is a one-to-one correspondence from A to B

More information

Cardinality. Hebrew alphabet). We write S = ℵ 0 and say that S has cardinality aleph null.

Cardinality. Hebrew alphabet). We write S = ℵ 0 and say that S has cardinality aleph null. Section 2.5 1 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 (i.e., a bijection) from A to

More information

CSE 20 DISCRETE MATH. Fall

CSE 20 DISCRETE MATH. Fall CSE 20 DISCRETE MATH Fall 2017 http://cseweb.ucsd.edu/classes/fa17/cse20-ab/ Today's learning goals Define and compute the cardinality of a set. Use functions to compare the sizes of sets. Classify sets

More information

1. Functions and set sizes 2. Infinite set sizes. ! Let X,Y be finite sets, f:x!y a function. ! Theorem: If f is injective then X Y.

1. Functions and set sizes 2. Infinite set sizes. ! Let X,Y be finite sets, f:x!y a function. ! Theorem: If f is injective then X Y. 2 Today s Topics: CSE 20: Discrete Mathematics for Computer Science Prof. Miles Jones 1. Functions and set sizes 2. 3 4 1. Functions and set sizes! Theorem: If f is injective then Y.! Try and prove yourself

More information

Finite and Infinite Sets

Finite and Infinite Sets Finite and Infinite Sets MATH 464/506, Real Analysis J. Robert Buchanan Department of Mathematics Summer 2007 Basic Definitions Definition The empty set has 0 elements. If n N, a set S is said to have

More information

Sets. Definition A set is an unordered collection of objects called elements or members of the set.

Sets. Definition A set is an unordered collection of objects called elements or members of the set. Sets Definition A set is an unordered collection of objects called elements or members of the set. Sets Definition A set is an unordered collection of objects called elements or members of the set. Examples:

More information

Countability. Jason Filippou UMCP. Jason Filippou UMCP) Countability / 12

Countability. Jason Filippou UMCP. Jason Filippou UMCP) Countability / 12 Countability Jason Filippou CMSC250 @ UMCP 06-23-2016 Jason Filippou (CMSC250 @ UMCP) Countability 06-23-2016 1 / 12 Outline 1 Infinity 2 Countability of integers and rationals 3 Uncountability of R Jason

More information

29. Army Housing (a) (b) (c) (d) (e) (f ) Totals Totals (a) (b) (c) (d) (e) (f) Basketball Positions 32. Guard Forward Center

29. Army Housing (a) (b) (c) (d) (e) (f ) Totals Totals (a) (b) (c) (d) (e) (f) Basketball Positions 32. Guard Forward Center Infinite Sets and Their Cardinalities As mentioned at the beginning of this chapter, most of the early work in set theory was done by Georg Cantor He devoted much of his life to a study of the cardinal

More information

of the hypothesis, but it would not lead to a proof. P 1

of the hypothesis, but it would not lead to a proof. P 1 Church-Turing thesis The intuitive notion of an effective procedure or algorithm has been mentioned several times. Today the Turing machine has become the accepted formalization of an algorithm. Clearly

More information

Sets. Gazihan Alankuş (Based on original slides by Brahim Hnich et al.) August 6, Outline Sets Equality Subset Empty Set Cardinality Power Set

Sets. Gazihan Alankuş (Based on original slides by Brahim Hnich et al.) August 6, Outline Sets Equality Subset Empty Set Cardinality Power Set Gazihan Alankuş (Based on original slides by Brahim Hnich et al.) August 6, 2012 Gazihan Alankuş (Based on original slides by Brahim Hnich et al.) Gazihan Alankuş (Based on original slides by Brahim Hnich

More information

Class 8 - Sets (Lecture Notes)

Class 8 - Sets (Lecture Notes) Class 8 - Sets (Lecture Notes) What is a Set? A set is a well-defined collection of distinct objects. Example: A = {1, 2, 3, 4, 5} What is an element of a Set? The objects in a set are called its elements.

More information

CITS2211 Discrete Structures Turing Machines

CITS2211 Discrete Structures Turing Machines CITS2211 Discrete Structures Turing Machines October 23, 2017 Highlights We have seen that FSMs and PDAs are surprisingly powerful But there are some languages they can not recognise We will study a new

More information

Cardinality and Bijections

Cardinality and Bijections Countable and Cardinality and Bijections Gazihan Alankuş (Based on original slides by Brahim Hnich et al.) August 13, 2012 Countable and Countable and Countable and How to count elements in a set? How

More information

COUNTING AND PROBABILITY

COUNTING AND PROBABILITY CHAPTER 9 COUNTING AND PROBABILITY Copyright Cengage Learning. All rights reserved. SECTION 9.2 Possibility Trees and the Multiplication Rule Copyright Cengage Learning. All rights reserved. Possibility

More information

Permutation Groups. Every permutation can be written as a product of disjoint cycles. This factorization is unique up to the order of the factors.

Permutation Groups. Every permutation can be written as a product of disjoint cycles. This factorization is unique up to the order of the factors. Permutation Groups 5-9-2013 A permutation of a set X is a bijective function σ : X X The set of permutations S X of a set X forms a group under function composition The group of permutations of {1,2,,n}

More information

Reading 14 : Counting

Reading 14 : Counting CS/Math 240: Introduction to Discrete Mathematics Fall 2015 Instructors: Beck Hasti, Gautam Prakriya Reading 14 : Counting In this reading we discuss counting. Often, we are interested in the cardinality

More information

SOLITAIRE CLOBBER AS AN OPTIMIZATION PROBLEM ON WORDS

SOLITAIRE CLOBBER AS AN OPTIMIZATION PROBLEM ON WORDS INTEGERS: ELECTRONIC JOURNAL OF COMBINATORIAL NUMBER THEORY 8 (2008), #G04 SOLITAIRE CLOBBER AS AN OPTIMIZATION PROBLEM ON WORDS Vincent D. Blondel Department of Mathematical Engineering, Université catholique

More information

Advanced Automata Theory 4 Games

Advanced Automata Theory 4 Games Advanced Automata Theory 4 Games Frank Stephan Department of Computer Science Department of Mathematics National University of Singapore fstephan@comp.nus.edu.sg Advanced Automata Theory 4 Games p. 1 Repetition

More information

1. The empty set is a proper subset of every set. Not true because the empty set is not a proper subset of itself! is the power set of A.

1. The empty set is a proper subset of every set. Not true because the empty set is not a proper subset of itself! is the power set of A. MAT 101 Solutions to Sample Questions for Exam 1 True or False Questions Answers: 1F, 2F, 3F, 4T, 5T, 6T, 7T 1. The empty set is a proper subset of every set. Not true because the empty set is not a proper

More information

Introduction to Computational Manifolds and Applications

Introduction to Computational Manifolds and Applications IMPA - Instituto de Matemática Pura e Aplicada, Rio de Janeiro, RJ, Brazil Introduction to Computational Manifolds and Applications Part 1 - Foundations Prof. Jean Gallier jean@cis.upenn.edu Department

More information

Edge-disjoint tree representation of three tree degree sequences

Edge-disjoint tree representation of three tree degree sequences Edge-disjoint tree representation of three tree degree sequences Ian Min Gyu Seong Carleton College seongi@carleton.edu October 2, 208 Ian Min Gyu Seong (Carleton College) Trees October 2, 208 / 65 Trees

More information

Pattern Avoidance in Unimodal and V-unimodal Permutations

Pattern Avoidance in Unimodal and V-unimodal Permutations Pattern Avoidance in Unimodal and V-unimodal Permutations Dido Salazar-Torres May 16, 2009 Abstract A characterization of unimodal, [321]-avoiding permutations and an enumeration shall be given.there is

More information

Slide 1 Math 1520, Lecture 13

Slide 1 Math 1520, Lecture 13 Slide 1 Math 1520, Lecture 13 In chapter 7, we discuss background leading up to probability. Probability is one of the most commonly used pieces of mathematics in the world. Understanding the basic concepts

More information

SETS OBJECTIVES EXPECTED BACKGROUND KNOWLEDGE 1.1 SOME STANDARD NOTATIONS. Sets. MODULE - I Sets, Relations and Functions

SETS OBJECTIVES EXPECTED BACKGROUND KNOWLEDGE 1.1 SOME STANDARD NOTATIONS. Sets. MODULE - I Sets, Relations and Functions 1 SETS Let us consider the following situation : One day Mrs. and Mr. Mehta went to the market. Mr. Mehta purchased the following objects/items. "a toy, one kg sweets and a magazine". Where as Mrs. Mehta

More information

Discrete Mathematics and Probability Theory Spring 2014 Anant Sahai Note 11

Discrete Mathematics and Probability Theory Spring 2014 Anant Sahai Note 11 EECS 70 Discrete Mathematics and Probability Theory Spring 2014 Anant Sahai Note 11 Counting As we saw in our discussion for uniform discrete probability, being able to count the number of elements of

More information

Week 3-4: Permutations and Combinations

Week 3-4: Permutations and Combinations Week 3-4: Permutations and Combinations February 20, 2017 1 Two Counting Principles Addition Principle. Let S 1, S 2,..., S m be disjoint subsets of a finite set S. If S = S 1 S 2 S m, then S = S 1 + S

More information

Block 1 - Sets and Basic Combinatorics. Main Topics in Block 1:

Block 1 - Sets and Basic Combinatorics. Main Topics in Block 1: Block 1 - Sets and Basic Combinatorics Main Topics in Block 1: A short revision of some set theory Sets and subsets. Venn diagrams to represent sets. Describing sets using rules of inclusion. Set operations.

More information

Grade 7/8 Math Circles February 21 st /22 nd, Sets

Grade 7/8 Math Circles February 21 st /22 nd, Sets Faculty of Mathematics Waterloo, Ontario N2L 3G1 Sets Grade 7/8 Math Circles February 21 st /22 nd, 2017 Sets Centre for Education in Mathematics and Computing A set is a collection of unique objects i.e.

More information

Theory of Probability - Brett Bernstein

Theory of Probability - Brett Bernstein Theory of Probability - Brett Bernstein Lecture 3 Finishing Basic Probability Review Exercises 1. Model flipping two fair coins using a sample space and a probability measure. Compute the probability of

More information

Math 127: Equivalence Relations

Math 127: Equivalence Relations Math 127: Equivalence Relations Mary Radcliffe 1 Equivalence Relations Relations can take many forms in mathematics. In these notes, we focus especially on equivalence relations, but there are many other

More information

Chapter 1. Probability

Chapter 1. Probability Chapter 1. Probability 1.1 Basic Concepts Scientific method a. For a given problem, we define measures that explains the problem well. b. Data is collected with observation and the measures are calculated.

More information

It is important that you show your work. The total value of this test is 220 points.

It is important that you show your work. The total value of this test is 220 points. June 27, 2001 Your name It is important that you show your work. The total value of this test is 220 points. 1. (10 points) Use the Euclidean algorithm to solve the decanting problem for decanters of sizes

More information

Halting Problem. Implement HALT? Today. Halt does not exist. Halt and Turing. Another view of proof: diagonalization. P - program I - input.

Halting Problem. Implement HALT? Today. Halt does not exist. Halt and Turing. Another view of proof: diagonalization. P - program I - input. Today. Halting Problem. Implement HALT? Finish undecidability. Start counting. HALT (P,I) P - program I - input. Determines if P(I) (P run on I) halts or loops forever. Notice: Need a computer with the

More information

CS1802 Week 6: Sets Operations, Product Sum Rule Pigeon Hole Principle (Ch )

CS1802 Week 6: Sets Operations, Product Sum Rule Pigeon Hole Principle (Ch ) CS1802 Discrete Structures Recitation Fall 2017 October 9-12, 2017 CS1802 Week 6: Sets Operations, Product Sum Rule Pigeon Hole Principle (Ch 8.5-9.3) Sets i. Set Notation: Draw an arrow from the box on

More information

A Combinatorial Proof of the Log-Concavity of the Numbers of Permutations with k Runs

A Combinatorial Proof of the Log-Concavity of the Numbers of Permutations with k Runs Journal of Combinatorial Theory, Series A 90, 293303 (2000) doi:10.1006jcta.1999.3040, available online at http:www.idealibrary.com on A Combinatorial Proof of the Log-Concavity of the Numbers of Permutations

More information

CLASS NOTES. A mathematical proof is an argument which convinces other people that something is true.

CLASS NOTES. A mathematical proof is an argument which convinces other people that something is true. Propositional Statements A mathematical proof is an argument which convinces other people that something is true. The implication If p then q written as p q means that if p is true, then q must also be

More information

4. Let U = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}, X = {2, 3, 4}, Y = {1, 4, 5}, Z = {2, 5, 7}. Find a) (X Y) b) X Y c) X (Y Z) d) (X Y) Z

4. Let U = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}, X = {2, 3, 4}, Y = {1, 4, 5}, Z = {2, 5, 7}. Find a) (X Y) b) X Y c) X (Y Z) d) (X Y) Z Exercises 1. Write formal descriptions of the following sets. a) The set containing the numbers 1, 10, and 100 b) The set containing all integers that are greater than 5 c) The set containing all natural

More information

Göttlers Proof of the Collatz Conjecture

Göttlers Proof of the Collatz Conjecture Göttlers Proof of the Collatz Conjecture Henry Göttler, Chantal Göttler, Heinrich Göttler, Thorsten Göttler, Pei-jung Wu goettlercollatzproof@gmail.com March 8, 2018 Abstract Over 80 years ago, the German

More information

Lecture 2: Sum rule, partition method, difference method, bijection method, product rules

Lecture 2: Sum rule, partition method, difference method, bijection method, product rules Lecture 2: Sum rule, partition method, difference method, bijection method, product rules References: Relevant parts of chapter 15 of the Math for CS book. Discrete Structures II (Summer 2018) Rutgers

More information

Permutation Groups. Definition and Notation

Permutation Groups. Definition and Notation 5 Permutation Groups Wigner s discovery about the electron permutation group was just the beginning. He and others found many similar applications and nowadays group theoretical methods especially those

More information

Game Theory and Algorithms Lecture 19: Nim & Impartial Combinatorial Games

Game Theory and Algorithms Lecture 19: Nim & Impartial Combinatorial Games Game Theory and Algorithms Lecture 19: Nim & Impartial Combinatorial Games May 17, 2011 Summary: We give a winning strategy for the counter-taking game called Nim; surprisingly, it involves computations

More information

Outline. Sets of Gluing Data. Constructing Manifolds. Lecture 3 - February 3, PM

Outline. Sets of Gluing Data. Constructing Manifolds. Lecture 3 - February 3, PM Constructing Manifolds Lecture 3 - February 3, 2009-1-2 PM Outline Sets of gluing data The cocycle condition Parametric pseudo-manifolds (PPM s) Conclusions 2 Let n and k be integers such that n 1 and

More information

With Question/Answer Animations. Chapter 6

With Question/Answer Animations. Chapter 6 With Question/Answer Animations Chapter 6 Chapter Summary The Basics of Counting The Pigeonhole Principle Permutations and Combinations Binomial Coefficients and Identities Generalized Permutations and

More information

MATHEMATICS 152, FALL 2004 METHODS OF DISCRETE MATHEMATICS Outline #10 (Sets and Probability)

MATHEMATICS 152, FALL 2004 METHODS OF DISCRETE MATHEMATICS Outline #10 (Sets and Probability) MATHEMATICS 152, FALL 2004 METHODS OF DISCRETE MATHEMATICS Outline #10 (Sets and Probability) Last modified: November 10, 2004 This follows very closely Apostol, Chapter 13, the course pack. Attachments

More information

Final exam. Question Points Score. Total: 150

Final exam. Question Points Score. Total: 150 MATH 11200/20 Final exam DECEMBER 9, 2016 ALAN CHANG Please present your solutions clearly and in an organized way Answer the questions in the space provided on the question sheets If you run out of room

More information

An interesting class of problems of a computational nature ask for the standard residue of a power of a number, e.g.,

An interesting class of problems of a computational nature ask for the standard residue of a power of a number, e.g., Binary exponentiation An interesting class of problems of a computational nature ask for the standard residue of a power of a number, e.g., What are the last two digits of the number 2 284? In the absence

More information

To be able to determine the quadratic character of an arbitrary number mod p (p an odd prime), we. The first (and most delicate) case concerns 2

To be able to determine the quadratic character of an arbitrary number mod p (p an odd prime), we. The first (and most delicate) case concerns 2 Quadratic Reciprocity To be able to determine the quadratic character of an arbitrary number mod p (p an odd prime), we need to be able to evaluate q for any prime q. The first (and most delicate) case

More information

arxiv: v1 [math.co] 11 Jul 2016

arxiv: v1 [math.co] 11 Jul 2016 OCCURRENCE GRAPHS OF PATTERNS IN PERMUTATIONS arxiv:160703018v1 [mathco] 11 Jul 2016 BJARNI JENS KRISTINSSON AND HENNING ULFARSSON Abstract We define the occurrence graph G p (π) of a pattern p in a permutation

More information

Counting. Chapter 6. With Question/Answer Animations

Counting. Chapter 6. With Question/Answer Animations . All rights reserved. Authorized only for instructor use in the classroom. No reproduction or further distribution permitted without the prior written consent of McGraw-Hill Education. Counting Chapter

More information

Enumeration of Pin-Permutations

Enumeration of Pin-Permutations Enumeration of Pin-Permutations Frédérique Bassino, athilde Bouvel, Dominique Rossin To cite this version: Frédérique Bassino, athilde Bouvel, Dominique Rossin. Enumeration of Pin-Permutations. 2008.

More information

Lecture 18 - Counting

Lecture 18 - Counting Lecture 18 - Counting 6.0 - April, 003 One of the most common mathematical problems in computer science is counting the number of elements in a set. This is often the core difficulty in determining a program

More information

Greedy Flipping of Pancakes and Burnt Pancakes

Greedy Flipping of Pancakes and Burnt Pancakes Greedy Flipping of Pancakes and Burnt Pancakes Joe Sawada a, Aaron Williams b a School of Computer Science, University of Guelph, Canada. Research supported by NSERC. b Department of Mathematics and Statistics,

More information

Mathematical Foundations of Computer Science Lecture Outline August 30, 2018

Mathematical Foundations of Computer Science Lecture Outline August 30, 2018 Mathematical Foundations of omputer Science Lecture Outline ugust 30, 2018 ounting ounting is a part of combinatorics, an area of mathematics which is concerned with the arrangement of objects of a set

More information

arxiv: v1 [math.co] 24 Nov 2018

arxiv: v1 [math.co] 24 Nov 2018 The Problem of Pawns arxiv:1811.09606v1 [math.co] 24 Nov 2018 Tricia Muldoon Brown Georgia Southern University Abstract Using a bijective proof, we show the number of ways to arrange a maximum number of

More information

On uniquely k-determined permutations

On uniquely k-determined permutations On uniquely k-determined permutations Sergey Avgustinovich and Sergey Kitaev 16th March 2007 Abstract Motivated by a new point of view to study occurrences of consecutive patterns in permutations, we introduce

More information

RMT 2015 Power Round Solutions February 14, 2015

RMT 2015 Power Round Solutions February 14, 2015 Introduction Fair division is the process of dividing a set of goods among several people in a way that is fair. However, as alluded to in the comic above, what exactly we mean by fairness is deceptively

More information

Minimal tilings of a unit square

Minimal tilings of a unit square arxiv:1607.00660v1 [math.mg] 3 Jul 2016 Minimal tilings of a unit square Iwan Praton Franklin & Marshall College Lancaster, PA 17604 Abstract Tile the unit square with n small squares. We determine the

More information

UCSD CSE 21, Spring 2014 [Section B00] Mathematics for Algorithm and System Analysis

UCSD CSE 21, Spring 2014 [Section B00] Mathematics for Algorithm and System Analysis UCSD CSE 21, Spring 2014 [Section B00] Mathematics for Algorithm and System Analysis Lecture 3 Class URL: http://vlsicad.ucsd.edu/courses/cse21-s14/ Lecture 3 Notes Goal for today: CL Section 3 Subsets,

More information

LESSON 2: THE INCLUSION-EXCLUSION PRINCIPLE

LESSON 2: THE INCLUSION-EXCLUSION PRINCIPLE LESSON 2: THE INCLUSION-EXCLUSION PRINCIPLE The inclusion-exclusion principle (also known as the sieve principle) is an extended version of the rule of the sum. It states that, for two (finite) sets, A

More information

Solution: This is sampling without repetition and order matters. Therefore

Solution: This is sampling without repetition and order matters. Therefore June 27, 2001 Your name It is important that you show your work. The total value of this test is 220 points. 1. (10 points) Use the Euclidean algorithm to solve the decanting problem for decanters of sizes

More information

CSE 573 Problem Set 1. Answers on 10/17/08

CSE 573 Problem Set 1. Answers on 10/17/08 CSE 573 Problem Set. Answers on 0/7/08 Please work on this problem set individually. (Subsequent problem sets may allow group discussion. If any problem doesn t contain enough information for you to answer

More information

In how many ways can we paint 6 rooms, choosing from 15 available colors? What if we want all rooms painted with different colors?

In how many ways can we paint 6 rooms, choosing from 15 available colors? What if we want all rooms painted with different colors? What can we count? In how many ways can we paint 6 rooms, choosing from 15 available colors? What if we want all rooms painted with different colors? In how many different ways 10 books can be arranged

More information

Beyond Infinity? Joel Feinstein. School of Mathematical Sciences University of Nottingham

Beyond Infinity? Joel Feinstein. School of Mathematical Sciences University of Nottingham Beyond Infinity? Joel Feinstein School of Mathematical Sciences University of Nottingham 2006-2007 The serious mathematics behind this talk is due to the great mathematicians David Hilbert (1862 1943)

More information

Chapter 1. The alternating groups. 1.1 Introduction. 1.2 Permutations

Chapter 1. The alternating groups. 1.1 Introduction. 1.2 Permutations Chapter 1 The alternating groups 1.1 Introduction The most familiar of the finite (non-abelian) simple groups are the alternating groups A n, which are subgroups of index 2 in the symmetric groups S n.

More information

18 Completeness and Compactness of First-Order Tableaux

18 Completeness and Compactness of First-Order Tableaux CS 486: Applied Logic Lecture 18, March 27, 2003 18 Completeness and Compactness of First-Order Tableaux 18.1 Completeness Proving the completeness of a first-order calculus gives us Gödel s famous completeness

More information

Bishop Domination on a Hexagonal Chess Board

Bishop Domination on a Hexagonal Chess Board Bishop Domination on a Hexagonal Chess Board Authors: Grishma Alakkat Austin Ferguson Jeremiah Collins Faculty Advisor: Dr. Dan Teague Written at North Carolina School of Science and Mathematics Completed

More information

Notes for Recitation 3

Notes for Recitation 3 6.042/18.062J Mathematics for Computer Science September 17, 2010 Tom Leighton, Marten van Dijk Notes for Recitation 3 1 State Machines Recall from Lecture 3 (9/16) that an invariant is a property of a

More information

Determinants, Part 1

Determinants, Part 1 Determinants, Part We shall start with some redundant definitions. Definition. Given a matrix A [ a] we say that determinant of A is det A a. Definition 2. Given a matrix a a a 2 A we say that determinant

More information

TOPOLOGY, LIMITS OF COMPLEX NUMBERS. Contents 1. Topology and limits of complex numbers 1

TOPOLOGY, LIMITS OF COMPLEX NUMBERS. Contents 1. Topology and limits of complex numbers 1 TOPOLOGY, LIMITS OF COMPLEX NUMBERS Contents 1. Topology and limits of complex numbers 1 1. Topology and limits of complex numbers Since we will be doing calculus on complex numbers, not only do we need

More information

Enumeration of Two Particular Sets of Minimal Permutations

Enumeration of Two Particular Sets of Minimal Permutations 3 47 6 3 Journal of Integer Sequences, Vol. 8 (05), Article 5.0. Enumeration of Two Particular Sets of Minimal Permutations Stefano Bilotta, Elisabetta Grazzini, and Elisa Pergola Dipartimento di Matematica

More information

What is counting? (how many ways of doing things) how many possible ways to choose 4 people from 10?

What is counting? (how many ways of doing things) how many possible ways to choose 4 people from 10? Chapter 5. Counting 5.1 The Basic of Counting What is counting? (how many ways of doing things) combinations: how many possible ways to choose 4 people from 10? how many license plates that start with

More information

Permutation Tableaux and the Dashed Permutation Pattern 32 1

Permutation Tableaux and the Dashed Permutation Pattern 32 1 Permutation Tableaux and the Dashed Permutation Pattern William Y.C. Chen, Lewis H. Liu, Center for Combinatorics, LPMC-TJKLC Nankai University, Tianjin 7, P.R. China chen@nankai.edu.cn, lewis@cfc.nankai.edu.cn

More information

Best of luck on the exam!

Best of luck on the exam! CS103 Handout 18 Fall 2014 October 20, 2014 Practice Midterm Exam This practice exam is closed-book and closed-computer but open-note. You may have a doublesided, 8.5 11 sheet of notes with you when you

More information

NON-OVERLAPPING PERMUTATION PATTERNS. To Doron Zeilberger, for his Sixtieth Birthday

NON-OVERLAPPING PERMUTATION PATTERNS. To Doron Zeilberger, for his Sixtieth Birthday NON-OVERLAPPING PERMUTATION PATTERNS MIKLÓS BÓNA Abstract. We show a way to compute, to a high level of precision, the probability that a randomly selected permutation of length n is nonoverlapping. As

More information

ACHS Math Team Lecture: Introduction to Set Theory Peter S. Simon

ACHS Math Team Lecture: Introduction to Set Theory Peter S. Simon ACHS Math Team Lecture: Introduction to Set Theory Peter S. Simon Introduction to Set Theory A set is a collection of objects, called elements or members of the set. We will usually denote a set by a capital

More information

1.6 Congruence Modulo m

1.6 Congruence Modulo m 1.6 Congruence Modulo m 47 5. Let a, b 2 N and p be a prime. Prove for all natural numbers n 1, if p n (ab) and p - a, then p n b. 6. In the proof of Theorem 1.5.6 it was stated that if n is a prime number

More information

Cardinality of Accumulation Points of Infinite Sets

Cardinality of Accumulation Points of Infinite Sets International Mathematical Forum, Vol. 11, 2016, no. 11, 539-546 HIKARI Ltd, www.m-hikari.com http://dx.doi.org/10.12988/imf.2016.6224 Cardinality of Accumulation Points of Infinite Sets A. Kalapodi CTI

More information

The probability set-up

The probability set-up CHAPTER 2 The probability set-up 2.1. Introduction and basic theory We will have a sample space, denoted S (sometimes Ω) that consists of all possible outcomes. For example, if we roll two dice, the sample

More information

ECS 20 (Spring 2013) Phillip Rogaway Lecture 1

ECS 20 (Spring 2013) Phillip Rogaway Lecture 1 ECS 20 (Spring 2013) Phillip Rogaway Lecture 1 Today: Introductory comments Some example problems Announcements course information sheet online (from my personal homepage: Rogaway ) first HW due Wednesday

More information

SUDOKU Colorings of the Hexagonal Bipyramid Fractal

SUDOKU Colorings of the Hexagonal Bipyramid Fractal SUDOKU Colorings of the Hexagonal Bipyramid Fractal Hideki Tsuiki Kyoto University, Sakyo-ku, Kyoto 606-8501,Japan tsuiki@i.h.kyoto-u.ac.jp http://www.i.h.kyoto-u.ac.jp/~tsuiki Abstract. The hexagonal

More information

5.4 Imperfect, Real-Time Decisions

5.4 Imperfect, Real-Time Decisions 5.4 Imperfect, Real-Time Decisions Searching through the whole (pruned) game tree is too inefficient for any realistic game Moves must be made in a reasonable amount of time One has to cut off the generation

More information

arxiv: v1 [math.co] 7 Aug 2012

arxiv: v1 [math.co] 7 Aug 2012 arxiv:1208.1532v1 [math.co] 7 Aug 2012 Methods of computing deque sortable permutations given complete and incomplete information Dan Denton Version 1.04 dated 3 June 2012 (with additional figures dated

More information

Solutions for the Practice Questions

Solutions for the Practice Questions Solutions for the Practice Questions Question 1. Find all solutions to the congruence 13x 12 (mod 35). Also, answer the following questions about the solutions to the above congruence. Are there solutions

More information

The tenure game. The tenure game. Winning strategies for the tenure game. Winning condition for the tenure game

The tenure game. The tenure game. Winning strategies for the tenure game. Winning condition for the tenure game The tenure game The tenure game is played by two players Alice and Bob. Initially, finitely many tokens are placed at positions that are nonzero natural numbers. Then Alice and Bob alternate in their moves

More information

STRATEGY AND COMPLEXITY OF THE GAME OF SQUARES

STRATEGY AND COMPLEXITY OF THE GAME OF SQUARES STRATEGY AND COMPLEXITY OF THE GAME OF SQUARES FLORIAN BREUER and JOHN MICHAEL ROBSON Abstract We introduce a game called Squares where the single player is presented with a pattern of black and white

More information

Elementary Combinatorics

Elementary Combinatorics 184 DISCRETE MATHEMATICAL STRUCTURES 7 Elementary Combinatorics 7.1 INTRODUCTION Combinatorics deals with counting and enumeration of specified objects, patterns or designs. Techniques of counting are

More information

In Response to Peg Jumping for Fun and Profit

In Response to Peg Jumping for Fun and Profit In Response to Peg umping for Fun and Profit Matthew Yancey mpyancey@vt.edu Department of Mathematics, Virginia Tech May 1, 2006 Abstract In this paper we begin by considering the optimal solution to a

More information

CS103 Handout 25 Spring 2017 May 5, 2017 Problem Set 5

CS103 Handout 25 Spring 2017 May 5, 2017 Problem Set 5 CS103 Handout 25 Spring 2017 May 5, 2017 Problem Set 5 This problem set the last one purely on discrete mathematics is designed as a cumulative review of the topics we ve covered so far and a proving ground

More information

Section Summary. Permutations Combinations Combinatorial Proofs

Section Summary. Permutations Combinations Combinatorial Proofs Section 6.3 Section Summary Permutations Combinations Combinatorial Proofs Permutations Definition: A permutation of a set of distinct objects is an ordered arrangement of these objects. An ordered arrangement

More information

Asymptotic behaviour of permutations avoiding generalized patterns

Asymptotic behaviour of permutations avoiding generalized patterns Asymptotic behaviour of permutations avoiding generalized patterns Ashok Rajaraman 311176 arajaram@sfu.ca February 19, 1 Abstract Visualizing permutations as labelled trees allows us to to specify restricted

More information

EXPLAINING THE SHAPE OF RSK

EXPLAINING THE SHAPE OF RSK EXPLAINING THE SHAPE OF RSK SIMON RUBINSTEIN-SALZEDO 1. Introduction There is an algorithm, due to Robinson, Schensted, and Knuth (henceforth RSK), that gives a bijection between permutations σ S n and

More information

Classes of permutations avoiding 231 or 321

Classes of permutations avoiding 231 or 321 Classes of permutations avoiding 231 or 321 Nik Ruškuc nik.ruskuc@st-andrews.ac.uk School of Mathematics and Statistics, University of St Andrews Dresden, 25 November 2015 Aim Introduce the area of pattern

More information

Goldbach Conjecture (7 th june 1742)

Goldbach Conjecture (7 th june 1742) Goldbach Conjecture (7 th june 1742) We note P the odd prime numbers set. P = {p 1 = 3, p 2 = 5, p 3 = 7, p 4 = 11,...} n 2N\{0, 2, 4}, p P, p n/2, q P, q n/2, n = p + q We call n s Goldbach decomposition

More information

Lecture 3 Presentations and more Great Groups

Lecture 3 Presentations and more Great Groups Lecture Presentations and more Great Groups From last time: A subset of elements S G with the property that every element of G can be written as a finite product of elements of S and their inverses is

More information

CSE 21 Mathematics for Algorithm and System Analysis

CSE 21 Mathematics for Algorithm and System Analysis CSE 21 Mathematics for Algorithm and System Analysis Unit 1: Basic Count and List Section 3: Set CSE21: Lecture 3 1 Reminder Piazza forum address: http://piazza.com/ucsd/summer2013/cse21/hom e Notes on

More information

arxiv: v1 [cs.dm] 13 Feb 2015

arxiv: v1 [cs.dm] 13 Feb 2015 BUILDING NIM arxiv:1502.04068v1 [cs.dm] 13 Feb 2015 Eric Duchêne 1 Université Lyon 1, LIRIS, UMR5205, F-69622, France eric.duchene@univ-lyon1.fr Matthieu Dufour Dept. of Mathematics, Université du Québec

More information

THE ENUMERATION OF PERMUTATIONS SORTABLE BY POP STACKS IN PARALLEL

THE ENUMERATION OF PERMUTATIONS SORTABLE BY POP STACKS IN PARALLEL THE ENUMERATION OF PERMUTATIONS SORTABLE BY POP STACKS IN PARALLEL REBECCA SMITH Department of Mathematics SUNY Brockport Brockport, NY 14420 VINCENT VATTER Department of Mathematics Dartmouth College

More information

arxiv:cs/ v1 [cs.gt] 12 Mar 2007

arxiv:cs/ v1 [cs.gt] 12 Mar 2007 Linear time algorithms for Clobber Vincent D. Blondel, Julien M. Hendrickx and Raphaël M. Jungers arxiv:cs/0703054v1 [cs.gt] 12 Mar 2007 Department of Mathematical Engineering, Université catholique de

More information

The Sign of a Permutation Matt Baker

The Sign of a Permutation Matt Baker The Sign of a Permutation Matt Baker Let σ be a permutation of {1, 2,, n}, ie, a one-to-one and onto function from {1, 2,, n} to itself We will define what it means for σ to be even or odd, and then discuss

More information

CIS 2033 Lecture 6, Spring 2017

CIS 2033 Lecture 6, Spring 2017 CIS 2033 Lecture 6, Spring 2017 Instructor: David Dobor February 2, 2017 In this lecture, we introduce the basic principle of counting, use it to count subsets, permutations, combinations, and partitions,

More information