CS504-Theory of Computation

Size: px
Start display at page:

Download "CS504-Theory of Computation"

Transcription

1 CS504-Theory of Computation Lecture 1: Introduction Waheed Noor Computer Science and Information Technology, University of Balochistan, Quetta, Pakistan Waheed Noor (CS&IT, UoB, Quetta) CS504-Theory of Computation March / 57

2 Outline 1 Course Description 2 Overview 3 Preliminaries 4 Proof Techniques 5 Quiz 1 Waheed Noor (CS&IT, UoB, Quetta) CS504-Theory of Computation March / 57

3 Outline 1 Course Description 2 Overview 3 Preliminaries 4 Proof Techniques 5 Quiz 1 Waheed Noor (CS&IT, UoB, Quetta) CS504-Theory of Computation March / 57

4 Theory of Computation (3-0) Objective This course is mainly about abstractions of what we can compute. The treatment is mathematical, but the point of view is that of Computer Science. Roughly speaking, the theory of computation can be divided into three overlapping subareas such as formal languages and automata theory, computability theory and complexity theory. In this course: Fundamental capabilities and limitations of computers Mathematical properties of computer hardware and software Relevance to practice, for example, in the design of new programming languages, compilers, string searching, pattern matching, computer security, artificial intelligence, etc. Learn about problem solving through argue, prove, express and abstract Assignments & problem sets after each unit Waheed Noor (CS&IT, UoB, Quetta) CS504-Theory of Computation March / 57

5 Books & Resources Books Michael Sipser, Introduction to Theory of Computation, 2nd Edition, Thomson Course Technology, 2006 [3] Harry Lewis and Christos Papadimitriou, Elements of the Theory of Computation, 2nd Edition, Prentice Hall, 1998 [1] Waheed Noor (CS&IT, UoB, Quetta) CS504-Theory of Computation March / 57

6 Origin Origin Started in 1930 s by mathematicians and logicians in an attempt to understand computation Mainly, to find the answer that all mathematical problems can be solved in a systematic way These research led the computers we know and use today Waheed Noor (CS&IT, UoB, Quetta) CS504-Theory of Computation March / 57

7 Outline 1 Course Description 2 Overview 3 Preliminaries 4 Proof Techniques 5 Quiz 1 Waheed Noor (CS&IT, UoB, Quetta) CS504-Theory of Computation March / 57

8 Overview What can be computed? Consider a very simple model of a problem. A problem is a set of strings (often binary strings) that we wish to distinguish. Example One problem might be the set of all binary strings divisible by three. To solve this problem we need to be able to say yes or no to each candidate binary string as to whether it is in the set or not. If we have an algorithm to do this, then we have solved the problem. These kinds of problems are called decidable. Waheed Noor (CS&IT, UoB, Quetta) CS504-Theory of Computation March / 57

9 Main Topics Finite Automata and Regular Languages Context-Free Languages Turing Machines Decidable and Undecidable Languages Complexity Theory Waheed Noor (CS&IT, UoB, Quetta) CS504-Theory of Computation March / 57

10 Subareas of Theory of Computation I Definition (Automata Theory) Automata theory deals with the definition, properties and power of different computation models such as finite automata, context-free grammars and Turing machines. Example Finite Automata used for text processing, compiler design and hardware design. Context-free Grammer used in defining programming languages and in AI. Turing Machines used for abstraction of real computers. Waheed Noor (CS&IT, UoB, Quetta) CS504-Theory of Computation March / 57

11 Subareas of Theory of Computation II Definition (Computability Theory) Deals with the theoretical models that classify problems as being solvable or unsolvable. These models played fundamental role in the development of real computers. In 1930, Godel, Turing and Church found that some of the mathematical problems are not solvable through computation. Example An arbitrary mathematical statement is true or false Definitely we need to formally what is computer, algorithm and computation. Waheed Noor (CS&IT, UoB, Quetta) CS504-Theory of Computation March / 57

12 Subareas of Theory of Computation III Definition (Complexity Theory) Deals in classifying problems based on their level of difficulty with rigorous proofs. The level of difficulty corresponds to the computational efficiency of the solution. Waheed Noor (CS&IT, UoB, Quetta) CS504-Theory of Computation March / 57

13 Subareas of Theory of Computation IV Example Easy Problems (Efficiently solvable) Sorting a list of 1 million numbers Computing the fastest path from Quetta to Karachi Hard Problems Time table scheduling of all courses in a large university Factoring a large integer number (say 250 digits) into its prime factors Waheed Noor (CS&IT, UoB, Quetta) CS504-Theory of Computation March / 57

14 Outline 1 Course Description 2 Overview 3 Preliminaries 4 Proof Techniques 5 Quiz 1 Waheed Noor (CS&IT, UoB, Quetta) CS504-Theory of Computation March / 57

15 Preliminaries: Mathematical Concepts I Set: A collection of well defined objects Natural Numbers: A set N = {1, 2, 3,...} Integer: A set Z = {..., 2, 1, 0, 1, 2,...} Rational Numbers: A set Q = { m n : m Z, n Z, n 0} Real Numbers: A set R = {x:x is a real number} Empty Set: Denote by φ = {} Subset: If A and B are two sets then A is a subset of B, A B if every element of A is also an element of B. φ is the subset of every set. Waheed Noor (CS&IT, UoB, Quetta) CS504-Theory of Computation March / 57

16 Preliminaries: Mathematical Concepts II Power set: if B is a set then power set of B is the set of all subsets of B, P(B) = {A : A B} Note φ P(B) and B P(B) Union: The union of two sets A and B is A B = {x : x A or x B} Intersection: The intersection of two sets A and B is A B = {x : x A and x B} Difference: The difference of two sets A and B is A B or A\B = {x : x A and x / B} Cartesian Product: The product of two sets A and B is A B = {(x, y) : x A and y B} Complement: The complement of a set A is A = {x : x / A} Waheed Noor (CS&IT, UoB, Quetta) CS504-Theory of Computation March / 57

17 Preliminaries: Mathematical Concepts III Binary Relation: The binary relation of two sets A and B is R such that R A B Function: A function f from set A to B is f : A B is a binary relation, R, that contains an ordered pair for each element a A as first element of the pair. Note Function f is also referred as f (a) = b or f maps a to b or image of a is b under f. The set A is called the domain of f. The set {b B : there is an a A with f (a) = b} is called the range of f. Waheed Noor (CS&IT, UoB, Quetta) CS504-Theory of Computation March / 57

18 Preliminaries: Mathematical Concepts IV Injective Function: or one-to-one, if for any distinct element a A and a A, we have f (a) f (a ). Surjective Function: or onto, if for each element b B there exist a A such that f (a) = b, i.e., the range of f is the set B. Bijective Function If f is both injective and surjective. Waheed Noor (CS&IT, UoB, Quetta) CS504-Theory of Computation March / 57

19 Preliminaries: Mathematical Concepts V Equivalence Relation: A binary relation R A A is equivalence relation if and only if R is reflexive, symmetric, and transitive. Waheed Noor (CS&IT, UoB, Quetta) CS504-Theory of Computation March / 57

20 Preliminaries: Mathematical Concepts VI Conditions Reflexive: a A, we have (a, a) R. Symmetric: a, b A, if (a, b) R then (b, a) R. Transitive: a, b, cina, if (a, b) R) and (b, c) R then (a, c) R Example Let A = {a, b, c}, a possible equivalence relation? Waheed Noor (CS&IT, UoB, Quetta) CS504-Theory of Computation March / 57

21 Graph I A graph G consist of pair of a set V and a set E, i.e., G = (V, E), called vertices and edges, respectively. The elements of set of edges E are distinct pairs of vertices connected to each other. For example, in the following figure K 5 is the graph of five vertices and K 3,3 also called complete bipartite graph on = 6 vertices, and 3 = 9 edges. Waheed Noor (CS&IT, UoB, Quetta) CS504-Theory of Computation March / 57

22 Graph II Degree of a vertix v denoted by deg(v) of a graph is the number of edges incident to the vertex, where we count the loop twice. Path in a graph is a sequence of connected vertices by edges. Waheed Noor (CS&IT, UoB, Quetta) CS504-Theory of Computation March / 57

23 Alphabets, Strings & Languages Definition (Alphabet) An alphabet is a finite set of symbols. For example, letters, digits, and punctuations. The alphabet is usally denoted by Σ Example The set {0, 1} is the binary alphabet. ASCII is an example of alphabet Unicode approximately consist of 100,000 characters from alphabets around the world Waheed Noor (CS&IT, UoB, Quetta) CS504-Theory of Computation March / 57

24 Alphabets, Strings & Languages Definition (Strings) A string is a finite sequence of symbols drawn from the alphabet and that string is called the string over that alphabet. String is also sometimes called word or sentence. The length of a string s is usually written as s and the empty string is denoted by ɛ whose length is zero. Example university is a string of length ten. Concatenation Concatenation is a string operation that simply join/append a string with another string. For example, if s 1 = Balochistan and s 2 = University are two strings, then concatenation denoted by s 1 s 2 = BalcohstanUniversity. Waheed Noor (CS&IT, UoB, Quetta) CS504-Theory of Computation March / 57

25 Terms for Parts of Strings Waheed Noor (CS&IT, UoB, Quetta) CS504-Theory of Computation March / 57

26 Alphabets, Strings & Languages Definition (Language) Broadly, a language is any countable set of strings over some fixed alphabet. Here it is not related to the meanings associated to the strings. Example Set of all syntactically well-formed C programs is a language. Set of all grammatically correct English sentences is also a language. Waheed Noor (CS&IT, UoB, Quetta) CS504-Theory of Computation March / 57

27 Boolean Values Definition Boolean values are denoted as 1 and 0 representing true and false respectively that are used in logic, specifically connected to boolean algebra, boolean functions, and proposition calculus. The basic boolean operations and the truth table is given bellow Waheed Noor (CS&IT, UoB, Quetta) CS504-Theory of Computation March / 57

28 Outline 1 Course Description 2 Overview 3 Preliminaries 4 Proof Techniques 5 Quiz 1 Waheed Noor (CS&IT, UoB, Quetta) CS504-Theory of Computation March / 57

29 Theorem Definition In mathematics, a theorem is a statement that has been proved true on the basis of some previously well established statements. The proof of a theorem is the sequence of mathematical statements that justifies the truth of the theorem. A proof contains axioms (assumptions, premise, considered to be true without proof, fundamental to the subject), hypotheses, and previously proven theorems. A proof of a theorem is a logical argument that deduces the conclusion from the hypothesis. Theorem (Example) If x is odd then x 2 is odd. Waheed Noor (CS&IT, UoB, Quetta) CS504-Theory of Computation March / 57

30 Some Terminologies Axiom: A starting point of reasoning, self-evident principle or a statement accepted without proof, e.g., a + b = b + a. They are also considered as assumptions that characterize the area of study. Proposition: A theorem of no particular importance and whose proof is very easy. Lemma: A short theorem that is used as stepping stone for proving some large theorems. Corollary: A theorem that clearly follows from the truth of some other theorem and often requires little or no proof. Waheed Noor (CS&IT, UoB, Quetta) CS504-Theory of Computation March / 57

31 How to Prove a Theorem? I It is related to question How to solve a problem?. There is not specific way of proofing something but following tips may be helpful[2]. Read and completely understand the statement of the theorem to be proved. Most often this is the hardest part. Sometimes, theorem contains theorems inside them. For example, Property A is and only if property B, we may need to show two statements. 1 If property A is true then property B is true, i.e., A B 2 If property B is true then property A is true, i.e., B A Question Set A is equal to set B Waheed Noor (CS&IT, UoB, Quetta) CS504-Theory of Computation March / 57

32 How to Prove a Theorem? II Try to work out a few simple cases of the theorem just to get a grip on it, For example, Sum of cubes of success natural numbers (positive integers) is a square. Try to write down the proof once you have it. This is to ensure the correctness of your proof. Often, mistakes are found at the time of writing. Finding proofs takes time, we do not come prewired to produce proofs. Be patient, think, express and write clearly and try to be precise as much as possible. Waheed Noor (CS&IT, UoB, Quetta) CS504-Theory of Computation March / 57

33 Proofing Techniques Some generic proofing strategies that we will study in this course are as followed: Direct Proof Constructive Proof Nonconstructive Proof Proof by Contradiction Proof by Induction Waheed Noor (CS&IT, UoB, Quetta) CS504-Theory of Computation March / 57

34 Direct Proof Definition In direct proof, we often approach the theorem directly by showing its truth or falsehood by directly combining well established facts. This strategy is often applicable to prove propositions, since the proposition are often so obviously true. In direct proof Take the original statement (hypothesis), say p. Assume it to be true. Show directly that another statement (conclusion), say q, is true. I.e., p q. Waheed Noor (CS&IT, UoB, Quetta) CS504-Theory of Computation March / 57

35 Direct Proof: Examples Theorem If n is an odd positive integer then n 2 is odd as well. Proof. Assume that n is an odd positive integer that can be written as, n = 2k + 1, where k is any positive integer such that k 0. Then n 2 = (2k + 1) 2 = 4k 2 + 4k + 1 since 2 is a common factor, we will have n 2 = 2(2k 2 + 2k) + 1 since the term 2(2k 2 + 2k) is even, and even plus one is odd, therefore we conclude that n 2 is odd. Waheed Noor (CS&IT, UoB, Quetta) CS504-Theory of Computation March / 57

36 Direct Proof: Examples Theorem Let a, b and c be integers and if a divides b and a divides c then a also divides b + c. Proof. Let a, b and c be integers and assume that a divides b and a divides c, then by definition b = ak and c = al, where k and l are also integers, and then b + c = ak + al, since, a is a common factor, then we can write and since k + l is an integer, hence a divides b + c b + c = a(k + l), Waheed Noor (CS&IT, UoB, Quetta) CS504-Theory of Computation March / 57

37 Direct Proof: Examples Theorem (Class Activity) If m and n are odd integers then mn is also an odd integer. Waheed Noor (CS&IT, UoB, Quetta) CS504-Theory of Computation March / 57

38 Direct Proof: Examples Theorem Let G = (V, E) be a graph, then the sum of the degrees of all vertices, deg(v), is an even integer. v V Tip: First try on some graphs. Proof. Assume G be a graph with the set of vertices V and set of edges E, then since, each edge is incident on two distinct vertices, and since, by definition, degree of a vertex is the number edges incident on that vertex, therefore, each edge will contribute 2 to the summation, hence, the sum of the degrees of all vertices is an even integer. Waheed Noor (CS&IT, UoB, Quetta) CS504-Theory of Computation March / 57

39 Direct Proof: Class Work Theorem Let G = (V, E) be a graph, then the sum of the degrees of all vertices is equal to twice the number of edges, i.e, deg(v) = 2 E. Theorem v V if n is an even integer then 7n + 4 is an even integer. Theorem if m is an even integer and n is an odd integer then m + n is an odd integer. Waheed Noor (CS&IT, UoB, Quetta) CS504-Theory of Computation March / 57

40 Outline 1 Course Description 2 Overview 3 Preliminaries 4 Proof Techniques 5 Quiz 1 Waheed Noor (CS&IT, UoB, Quetta) CS504-Theory of Computation March / 57

41 Quiz 1 Q1 : Let m and n are integers and if m and n are perfect squares then mn is also perfect square. Q2 : If m is an even integer and n is an odd integer then mn is an even integer. Q3 : If m and n are odd integers then mn is also an odd integer. Waheed Noor (CS&IT, UoB, Quetta) CS504-Theory of Computation March / 57

42 Constructive Proofs Definition A technique of proofing that shows the existence of a mathematical object by creating or providing a way for creating the object. It is also called constructive proof of existence. The structure for such theorems and proofs are as followed: Theorem There exists x, i.e., x U x and x have P(x) Proof. Let x = a (where a is a specific element in U x ) Verify that the property P(x) is true. Waheed Noor (CS&IT, UoB, Quetta) CS504-Theory of Computation March / 57

43 Constructive Proofs: Example Theorem Prove that there exists an integer n such that m 7 2m+4 = 5. Comment: Often time we need to do the real work before writing the proof of a theorem. Here, we must first derive some integer value for m that satisfy the property/equation. Proof. Set m = 3, then m 7 2m+4 = 3 7 2( 3)+4 = 10 2 = 5 Waheed Noor (CS&IT, UoB, Quetta) CS504-Theory of Computation March / 57

44 Constructive Proof: Example Theorem There exists are real number x such that x 2 +3x 3 2x+3 = 1. Proof. Set x = 2, then x 2 +3x 3 2x+3 = = 7 7 = 1. You can also set x = 3 and prove. Waheed Noor (CS&IT, UoB, Quetta) CS504-Theory of Computation March / 57

45 Constructive Proof: Class Activity Theorem There exists distinct positive integers m, n, and r such that each is perfect square and m = n + r. Theorem If f (x) = x 3 + x 5, then there exists a positive real number k such that f (k) = 7. Waheed Noor (CS&IT, UoB, Quetta) CS504-Theory of Computation March / 57

46 Non-Constructive Proof Definition A proof that indirectly shows a mathematical object exists with out providing an example or way of creating it. Sometime, in this type of proof, we may use contradiction, which we will study shortly. Constructive, and non-constructive proof are also called proof of existence. In calculus, there are very popular example of non-constructive proof of existence such as intermediate value theorem and mean value theorem. Waheed Noor (CS&IT, UoB, Quetta) CS504-Theory of Computation March / 57

47 Non-constructive Proof: Example Theorem Let f (x) = x 3 3x 2 + 2x 4, there exists a real number r such that 2 < r < 3 and f (r) = 0. Proof. Note that f (2) = 2 3 3(2 2 ) + 2(2) 4 = 4 and f (3) = 3 3 3(3 2 ) + 2(3) 4 = 2. Thus f (2) < 0 < f (3), since f is continuous function and by intermediate value theorem, there is a real number r such that 2 < r < 3 and f (r) = 0. Waheed Noor (CS&IT, UoB, Quetta) CS504-Theory of Computation March / 57

48 For All Proof: Example Theorem For all positive real number x, x + 4 x 4 Comment: Some time doing proof backward is helpful but definitely you should present it in the forward manner, i.e., assuming the hypothesis and then concluding P(x). Proof. Let x be a positive real number, then clearly, (x 2) 2 0, since the square of a real number is always positive and expanding will give us x 2 4x + 4 0, and by assumption x is positive, so, dividing by x will preserve the inequality and we will get x x 0, finally, x + 4 x 4. Waheed Noor (CS&IT, UoB, Quetta) CS504-Theory of Computation March / 57

49 Proof by Cases: Example Sometime, the hypothesis is broken into simpler cases that are investigated separately. Theorem If x is real number such that x 2 1 x+2 > 0, then either x > 1 or 2 > x < 1. Waheed Noor (CS&IT, UoB, Quetta) CS504-Theory of Computation March / 57

50 Proof by Cases: Example Theorem For every real number a, lim x a (x 1) sin x x 2 x exists. Waheed Noor (CS&IT, UoB, Quetta) CS504-Theory of Computation March / 57

51 Proof by Contradiction Definition In this technique we assume the hypotheses are true while the conclusion is false and try to reach at the contradiction. If theorem states that a statement S is true, then by contradiction we assume that the statement S is false. That is, we need to show S false is true. And if we show this false then we are at the contradiction. Waheed Noor (CS&IT, UoB, Quetta) CS504-Theory of Computation March / 57

52 Proof by Contradiction: Example Theorem Let x and y be real numbers. if 5x + 25y = 1723, then x or y are not an integer. Proof. Assume x and y be real numbers such that 5x + 25y = 1723, Now, assume that both x and y are integers. Using the distributive law the expression will become 5(x + 5y) = Since, x and y are integers this implies that 1723 is divisible by 5. However, 1723 is clearly not divisible by 5. Hence, this contradiction establishes the result that x or y is not integer. Waheed Noor (CS&IT, UoB, Quetta) CS504-Theory of Computation March / 57

53 Proof by Contradiction: Example Theorem For all positive real numbers a, b, and c, if ab = c, then a c or b c. Proof. Suppose, a, b, and c are positive real numbers such that ab = c, and suppose a > c and b > c, note that the c is the positive square root and by order property of real numbers, b > c ab > a c, since a > 0, and a > c a c > c. c = c, since c > 0. Thus ab > a c > c. c = c implies ab > c. But since ab = c, hence ab is not greater than c, a contradiction. This proves that our assumption a > c and b > c can not be true when a, b, and c are positive real numbers such that ab = c. Therefore, a c or b c. Waheed Noor (CS&IT, UoB, Quetta) CS504-Theory of Computation March / 57

54 Proof by Contradiction: Class Activity Theorem Let n be a positive integer. If n 2 is even, then n is even. Waheed Noor (CS&IT, UoB, Quetta) CS504-Theory of Computation March / 57

55 Proof by Induction Principle of Mathematical Induction Definition It is a method of proof that is used to show a given statement P(n) is true for all natural numbers n. It normally consists of two steps, base case or basis and inductive step, where the base case is to prove the given statement for first natural number, while the inductive step shows the statement is true for the next natural number. We infer, from these two steps, that the statement is true for all natural numbers. This kind of proof takes the form: Basis: Show that P(1) is true. Induction Hypothesis: Assume that for some fixed but arbitrary n 1, P(n) is true. Induction Inductive Step: Using the induction hypothesis, we show that the P(n + 1). Waheed Noor (CS&IT, UoB, Quetta) CS504-Theory of Computation March / 57

56 Proof by Induction: Example Theorem For any n 0, n = n2 +n 2 Proof. Basis Step, Let n = 0, then the sum on left is zero. Induction Hypothesis, Assume that for some n > 0, m = m2 +m 2, where m n. Induction Step, n + (n + 1) = ( n) + (n + 1) = n2 +n 2 + (n + 1) = n2 +n+2n+2 2 = (n+1)2 +(n+1) 2 Hence, proved. Waheed Noor (CS&IT, UoB, Quetta) CS504-Theory of Computation March / 57

57 Homework Reading Read the contrapositive proof, show the proof of the following theorem. Hint: You can first try by direct proof, however it will be difficult therefore if you fail try the contrapositive proof. Theorem For all integers m and n, if the product mn is even, then m is even or n is even. Prove the following theorem by contradiction and direct proof. Theorem For all positive real numbers a, b, and c, if a 2 + b 2 = c 2, then a + b c. Waheed Noor (CS&IT, UoB, Quetta) CS504-Theory of Computation March / 57

58 References I Harry Lewis and Christos Papadimitriou. Elements of the Theory of Computation. Prentice Hall, 2nd edition, G. Polya. How to Solve It: A New Aspect of Mathematical Methods. Princeton University Press, 2nd edition, Michael Sipser. Introduction to the Theory of Computation. Thomson Course Technology, 2nd edition, Waheed Noor (CS&IT, UoB, Quetta) CS504-Theory of Computation March / 57

Automata and Languages Computability Theory Complexity Theory

Automata and Languages Computability Theory Complexity Theory Theory of Computation Chapter 0: Introduction 1 What is this course about? This course is about the fundamental capabilities and limitations of computers/computation This course covers 3 areas, which make

More information

,QWURGXFWL W 7KHRU RI &RPSXWDWLRQ

,QWURGXFWL W 7KHRU RI &RPSXWDWLRQ ,QWURGXFWL W 7KHRU RI $XWRPDWD )RUPD /DQJXDJHV &RPSXWDWLRQ (Feodor F. Dragan) Department of Computer Science Kent State University Spring, 2004 Automata & Formal Languages, Feodor F. Dragan, Kent State

More information

CS504-Theory of Computation

CS504-Theory of Computation CS504-Theory of Computation Lecture 4: Context-Free Languages Waheed Noor Computer Science and Information Technology, University of Balochistan, Quetta, Pakistan Waheed Noor (CS&IT, UoB, Quetta) CS504-Theory

More information

LOGIC & SET THEORY AMIN WITNO

LOGIC & SET THEORY AMIN WITNO LOGIC & SET THEORY AMIN WITNO.. w w w. w i t n o. c o m Logic & Set Theory Revision Notes and Problems Amin Witno Preface These notes are for students of Math 251 as a revision workbook

More information

2.8 Cardinality Introduction Finite and Infinite Sets 2.8. CARDINALITY 73

2.8 Cardinality Introduction Finite and Infinite Sets 2.8. CARDINALITY 73 2.8. CARDINALITY 73 2.8 Cardinality 2.8.1 Introduction Cardinality when used with a set refers to the number of elements the set has. In this section, we will learn how to distinguish between finite and

More information

CS 2336 Discrete Mathematics

CS 2336 Discrete Mathematics CS 2336 Discrete Mathematics Lecture 4 Proofs: Methods and Strategies 1 Outline What is a Proof? Methods of Proving Common Mistakes in Proofs Strategies : How to Find a Proof? 2 What is a Proof? A proof

More information

Proof: A logical argument establishing the truth of the theorem given the truth of the axioms and any previously proven theorems.

Proof: A logical argument establishing the truth of the theorem given the truth of the axioms and any previously proven theorems. Math 232 - Discrete Math 2.1 Direct Proofs and Counterexamples Notes Axiom: Proposition that is assumed to be true. Proof: A logical argument establishing the truth of the theorem given the truth of the

More information

Mathematics for Computer Science/Software Engineering. Notes for the course MSM1F3 Dr. R. A. Wilson

Mathematics for Computer Science/Software Engineering. Notes for the course MSM1F3 Dr. R. A. Wilson Mathematics for Computer Science/Software Engineering Notes for the course MSM1F3 Dr. R. A. Wilson October 1996 Chapter 1 Logic Lecture no. 1. We introduce the concept of a proposition, which is a statement

More information

1 SET THEORY CHAPTER 1.1 SETS

1 SET THEORY CHAPTER 1.1 SETS CHAPTER 1 SET THEORY 1.1 SETS The main object of this book is to introduce the basic algebraic systems (mathematical systems) groups, ring, integral domains, fields, and vector spaces. By an algebraic

More information

MAT2400 Analysis I. A brief introduction to proofs, sets, and functions

MAT2400 Analysis I. A brief introduction to proofs, sets, and functions MAT2400 Analysis I A brief introduction to proofs, sets, and functions In Analysis I there is a lot of manipulations with sets and functions. It is probably also the first course where you have to take

More information

i=1 i=1 Warning Do not assume that every outcome is equally likely without good reason.

i=1 i=1 Warning Do not assume that every outcome is equally likely without good reason. 5 Probability The question of what probability really is does not have a totally satisfactory answer. The mathematical approach is to regard it as a function which satisfies certain axioms. Definition

More information

ÖVNINGSUPPGIFTER I RESTRIKTIONFRIA SPRÅK

ÖVNINGSUPPGIFTER I RESTRIKTIONFRIA SPRÅK ÖVNINGSUPPGIFTER I RESTRIKTIONFRIA SPRÅK RECURSIVELY ENUMERABLE LANGUAGES & TURING MACHINES TURING MACHINES Problem. CH9 Problem 3c (Sudkamp) Construct a Turing Machine with input alphabet {a, b} to perform:

More information

Discrete Mathematics Lecture 2 Logic of Quantified Statements, Methods of Proof, Set Theory, Number Theory Introduction and General Good Times

Discrete Mathematics Lecture 2 Logic of Quantified Statements, Methods of Proof, Set Theory, Number Theory Introduction and General Good Times Discrete Mathematics Lecture 2 Logic of Quantified Statements, Methods of Proof, Set Theory, Number Theory Introduction and General Good Times Harper Langston New York University Predicates A predicate

More information

The Natural Numbers. Peter J. Kahn

The Natural Numbers. Peter J. Kahn Math 3040 Spring 2009 The Natural Numbers Peter J. Kahn [Revised: Mon, Jan 26, 2009] Contents 1. History 2 2. The basic construction 2 3. Proof by Induction 7 4. Definition by induction 12 5. Addition

More information

Discrete Mathematics, Chapter 5: Induction and Recursion

Discrete Mathematics, Chapter 5: Induction and Recursion Discrete Mathematics, Chapter 5: Induction and Recursion Richard Mayr University of Edinburgh, UK Richard Mayr (University of Edinburgh, UK) Discrete Mathematics. Chapter 5 1 / 20 Outline 1 Well-founded

More information

Mathematical Induction. Lecture 10-11

Mathematical Induction. Lecture 10-11 Mathematical Induction Lecture 10-11 Menu Mathematical Induction Strong Induction Recursive Definitions Structural Induction Climbing an Infinite Ladder Suppose we have an infinite ladder: 1. We can reach

More information

GRAPH THEORY: INTRODUCTION

GRAPH THEORY: INTRODUCTION GRAPH THEORY: INTRODUCTION DEFINITION 1: A graph G consists of two finite sets: a set V (G) of vertices a set E(G) of edges, where each edge is associated with a set consisting of either one or two vertices

More information

Equivalence Relations

Equivalence Relations Equivalence Relations A relation that is reflexive, transitive, and symmetric is called an equivalence relation. For example, the set {(a, a), (b, b), (c, c)} is an equivalence relation on {a, b, c}. An

More information

vertex, 369 disjoint pairwise, 395 disjoint sets, 236 disjunction, 33, 36 distributive laws

vertex, 369 disjoint pairwise, 395 disjoint sets, 236 disjunction, 33, 36 distributive laws Index absolute value, 135 141 additive identity, 254 additive inverse, 254 aleph, 466 algebra of sets, 245, 278 antisymmetric relation, 387 arcsine function, 349 arithmetic sequence, 208 arrow diagram,

More information

CS 441 Discrete Mathematics for CS Lecture 6. Informal proofs. CS 441 Discrete mathematics for CS. Proofs

CS 441 Discrete Mathematics for CS Lecture 6. Informal proofs. CS 441 Discrete mathematics for CS. Proofs CS 441 Discrete Mathematics for CS Lecture 6 Informal proofs Milos Hauskrecht milos@cs.pitt.edu 5329 Sennott Square Proofs The truth value of some statements about the world are obvious and easy to assess

More information

Discrete Structures for Computer Science: Counting, Recursion, and Probability

Discrete Structures for Computer Science: Counting, Recursion, and Probability Discrete Structures for Computer Science: Counting, Recursion, and Probability Michiel Smid School of Computer Science Carleton University Ottawa, Ontario Canada michiel@scs.carleton.ca December 15, 2016

More information

Sets and Cardinality Notes for C. F. Miller

Sets and Cardinality Notes for C. F. Miller Sets and Cardinality Notes for 620-111 C. F. Miller Semester 1, 2000 Abstract These lecture notes were compiled in the Department of Mathematics and Statistics in the University of Melbourne for the use

More information

Elementary Number Theory and Methods of Proof. CSE 215, Foundations of Computer Science Stony Brook University http://www.cs.stonybrook.

Elementary Number Theory and Methods of Proof. CSE 215, Foundations of Computer Science Stony Brook University http://www.cs.stonybrook. Elementary Number Theory and Methods of Proof CSE 215, Foundations of Computer Science Stony Brook University http://www.cs.stonybrook.edu/~cse215 1 Number theory Properties: 2 Properties of integers (whole

More information

Lecture 5. Introduction to Set Theory and the Pigeonhole Principle

Lecture 5. Introduction to Set Theory and the Pigeonhole Principle Lecture 5. Introduction to Set Theory and the Pigeonhole Principle A set is an arbitrary collection (group) of the objects (usually similar in nature). These objects are called the elements or the members

More information

Computing Science 272 The Integers

Computing Science 272 The Integers Computing Science 272 The Integers Properties of the Integers The set of all integers is the set Z = {, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, }, and the subset of Z given by N = {0, 1, 2, 3, 4, }, is the set

More information

3. Abstract Boolean Algebras. Identity Laws. Compliments Laws. Associative Laws. Commutative Laws. Distributive Laws. Discussion

3. Abstract Boolean Algebras. Identity Laws. Compliments Laws. Associative Laws. Commutative Laws. Distributive Laws. Discussion 3. ABSTRACT BOOLEAN ALGEBRAS 123 3. Abstract Boolean Algebras 3.1. Abstract Boolean Algebra. Definition 3.1.1. An abstract Boolean algebra is defined as a set B containing two distinct elements 0 and 1,

More information

Course Notes for CS336: Graph Theory

Course Notes for CS336: Graph Theory Course Notes for CS336: Graph Theory Jayadev Misra The University of Texas at Austin 5/11/01 Contents 1 Introduction 1 1.1 Basics................................. 2 1.2 Elementary theorems.........................

More information

CARDINALITY, COUNTABLE AND UNCOUNTABLE SETS PART ONE

CARDINALITY, COUNTABLE AND UNCOUNTABLE SETS PART ONE CARDINALITY, COUNTABLE AND UNCOUNTABLE SETS PART ONE With the notion of bijection at hand, it is easy to formalize the idea that two finite sets have the same number of elements: we just need to verify

More information

Introduction to Theory of Computation

Introduction to Theory of Computation Introduction to Theory of Computation Prof. (Dr.) K.R. Chowdhary Email: kr.chowdhary@iitj.ac.in Formerly at department of Computer Science and Engineering MBM Engineering College, Jodhpur Tuesday 28 th

More information

2. Methods of Proof Types of Proofs. Suppose we wish to prove an implication p q. Here are some strategies we have available to try.

2. Methods of Proof Types of Proofs. Suppose we wish to prove an implication p q. Here are some strategies we have available to try. 2. METHODS OF PROOF 69 2. Methods of Proof 2.1. Types of Proofs. Suppose we wish to prove an implication p q. Here are some strategies we have available to try. Trivial Proof: If we know q is true then

More information

Oh Yeah? Well, Prove It.

Oh Yeah? Well, Prove It. Oh Yeah? Well, Prove It. MT 43A - Abstract Algebra Fall 009 A large part of mathematics consists of building up a theoretical framework that allows us to solve problems. This theoretical framework is built

More information

1.5 Problems and solutions

1.5 Problems and solutions 15 PROBLEMS AND SOLUTIONS 11 15 Problems and solutions Homework 1: 01 Show by induction that n 1 + 2 2 + + n 2 = n(n + 1)(2n + 1) 01 Show by induction that n 1 + 2 2 + + n 2 = n(n + 1)(2n + 1) We ve already

More information

Sets and Subsets. Countable and Uncountable

Sets and Subsets. Countable and Uncountable Sets and Subsets Countable and Uncountable Reading Appendix A Section A.6.8 Pages 788-792 BIG IDEAS Themes 1. There exist functions that cannot be computed in Java or any other computer language. 2. There

More information

CSCE 355 Foundations of Computation

CSCE 355 Foundations of Computation CSCE 355 Foundations of Computation Stephen A. Fenner August 30, 2016 Abstract These notes are based on two lectures per week. Sections beginning test test with a star (*) are optional. The date above

More information

A Primer on Mathematical Proof

A Primer on Mathematical Proof A Primer on Mathematical Proof A proof is an argument to convince your audience that a mathematical statement is true. It can be a calculation, a verbal argument, or a combination of both. In comparison

More information

Encoding Turing Machines

Encoding Turing Machines 147 What do we know? Finite languages Regular languages Context-free languages?? Turing-decidable languages There are automata and grammar descriptions for all these language classes Different variations

More information

Basic Properties of Turing-recognizable Languages

Basic Properties of Turing-recognizable Languages Basic Properties of Turing-recognizable Languages 152 Theorem A Let A, B * be Turing-decidable languages. Then also languages 1. * \ A, 2. A B, and 3. A B are Turing-decidable. Proof. 1. Let M A be the

More information

AN INTRODUCTION TO LOGIC. and PROOF TECHNIQUES

AN INTRODUCTION TO LOGIC. and PROOF TECHNIQUES i AN INTRODUCTION TO LOGIC and PROOF TECHNIQUES Michael A. Henning School of Mathematical Sciences University of KwaZulu-Natal ii Contents 1 Logic 1 1.1 Introduction....................................

More information

The Foundations: Logic and Proofs. Chapter 1, Part III: Proofs

The Foundations: Logic and Proofs. Chapter 1, Part III: Proofs The Foundations: Logic and Proofs Chapter 1, Part III: Proofs Rules of Inference Section 1.6 Section Summary Valid Arguments Inference Rules for Propositional Logic Using Rules of Inference to Build Arguments

More information

NOTES ON PROOF TECHNIQUES (OTHER THAN INDUCTION)

NOTES ON PROOF TECHNIQUES (OTHER THAN INDUCTION) NOTES ON PROOF TECHNIQUES (OTHER THAN INDUCTION) DAMIEN PITMAN Definitions & Theorems Definition: A direct proof is a valid argument that verifies the truth of an implication by assuming that the premise

More information

Problem 1: Show that every planar graph has a vertex of degree at most 5.

Problem 1: Show that every planar graph has a vertex of degree at most 5. Problem 1: Show that every planar graph has a vertex of degree at most 5. Proof. We will prove this statement by using a proof by contradiction. We will assume that G is planar and that all vertices of

More information

If f is a 1-1 correspondence between A and B then it has an inverse, and f 1 isa 1-1 correspondence between B and A.

If f is a 1-1 correspondence between A and B then it has an inverse, and f 1 isa 1-1 correspondence between B and A. Chapter 5 Cardinality of sets 51 1-1 Correspondences A 1-1 correspondence between sets A and B is another name for a function f : A B that is 1-1 and onto If f is a 1-1 correspondence between A and B,

More information

Summary. Valid Arguments and Rules of Inference Proof Methods Proof Strategies

Summary. Valid Arguments and Rules of Inference Proof Methods Proof Strategies Proofs 1 Summary Valid Arguments and Rules of Inference Proof Methods Proof Strategies 2 Section 1.6 3 Section Summary Valid Arguments Inference Rules for Propositional Logic Using Rules of Inference to

More information

1.3. INDUCTION 17. n (n + 1) 2 (cos x + i sin x) n = cos nx+i sin nx. This is known as de Moivre s theorem.

1.3. INDUCTION 17. n (n + 1) 2 (cos x + i sin x) n = cos nx+i sin nx. This is known as de Moivre s theorem. .3. INDUCTION 7.3 Induction.3. Definition and Examples Proofs by induction are often used when one tries to prove a statement made about natural numbers or integers. Here are examples of statements where

More information

Math Primer. Andrzej Wąsowski February 12, 2007

Math Primer. Andrzej Wąsowski February 12, 2007 Math Primer ndrzej Wąsowski wasowski@itu.dk February 12, 2007 Please, report all the bugs you can spot to the author! cknowledgments: Inspired by the appendix of Cormen et al. Introduction to lgorithms,

More information

Graph Theory. 1 Defining and representing graphs

Graph Theory. 1 Defining and representing graphs Graph Theory 1 Defining and representing graphs A graph is an ordered pair G = (V, E), where V is a finite, non-empty set of objects called vertices, and E is a (possibly empty) set of unordered pairs

More information

Definitions and examples

Definitions and examples Chapter 1 Definitions and examples I hate definitions! Benjamin Disraeli In this chapter, we lay the foundations for a proper study of graph theory. Section 1.1 formalizes some of the graph ideas in the

More information

6.045: Automata, Computability, and Complexity Or, Great Ideas in Theoretical Computer Science Spring, Class 7 Nancy Lynch

6.045: Automata, Computability, and Complexity Or, Great Ideas in Theoretical Computer Science Spring, Class 7 Nancy Lynch 6.045: Automata, Computability, and Complexity Or, Great Ideas in Theoretical Computer Science Spring, 2010 Class 7 Nancy Lynch Today Basic computability theory Topics: Decidable and recognizable languages

More information

Sequences. Chapter 3. n + 1 3n + 2 sin n n. 3. lim (ln(n + 1) ln n) 1. lim. 2. lim. 4. lim (1 + n)1/n. Answers: 1. 1/3; 2. 0; 3. 0; 4. 1.

Sequences. Chapter 3. n + 1 3n + 2 sin n n. 3. lim (ln(n + 1) ln n) 1. lim. 2. lim. 4. lim (1 + n)1/n. Answers: 1. 1/3; 2. 0; 3. 0; 4. 1. Chapter 3 Sequences Both the main elements of calculus (differentiation and integration) require the notion of a limit. Sequences will play a central role when we work with limits. Definition 3.. A Sequence

More information

Math 141: Lecture 1. Sets, natural numbers, induction, sums. Bob Hough. August 29, Bob Hough Math 141: Lecture 1 August 29, / 32

Math 141: Lecture 1. Sets, natural numbers, induction, sums. Bob Hough. August 29, Bob Hough Math 141: Lecture 1 August 29, / 32 Math 141: Lecture 1 Sets, natural numbers, induction, sums Bob Hough August 29, 2016 Bob Hough Math 141: Lecture 1 August 29, 2016 1 / 32 (Zermelo-Frenkel) Set Theory Basics A set is a collection of objects,

More information

3. Mathematical Induction

3. Mathematical Induction 3. MATHEMATICAL INDUCTION 83 3. Mathematical Induction 3.1. First Principle of Mathematical Induction. Let P (n) be a predicate with domain of discourse (over) the natural numbers N = {0, 1,,...}. If (1)

More information

Chapter 4 FUNCTIONS. dom f = {a A : b B (a, b) f } ran f = {b B : a A (a, b) f }

Chapter 4 FUNCTIONS. dom f = {a A : b B (a, b) f } ran f = {b B : a A (a, b) f } Chapter 4 FUNCTIONS Until now we have learnt how to prove statements, we have introduced the basics of set theory and used those concepts to present and characterize the main features of the sets of interest

More information

A declared mathematical proposition whose truth value is unknown is called a conjecture.

A declared mathematical proposition whose truth value is unknown is called a conjecture. Methods of Proofs Recall we discussed the following methods of proofs - Vacuous proof - Trivial proof - Direct proof - Indirect proof - Proof by contradiction - Proof by cases. A vacuous proof of an implication

More information

Theory of Computation (CS 46)

Theory of Computation (CS 46) Theory of Computation (CS 46) Sets and Functions We write 2 A for the set of subsets of A. Definition. A set, A, is countably infinite if there exists a bijection from A to the natural numbers. Note. This

More information

1.3 Induction and Other Proof Techniques

1.3 Induction and Other Proof Techniques 4CHAPTER 1. INTRODUCTORY MATERIAL: SETS, FUNCTIONS AND MATHEMATICAL INDU 1.3 Induction and Other Proof Techniques The purpose of this section is to study the proof technique known as mathematical induction.

More information

Cardinality. The set of all finite strings over the alphabet of lowercase letters is countable. The set of real numbers R is an uncountable set.

Cardinality. The set of all finite strings over the alphabet of lowercase letters is countable. The set of real numbers R is an uncountable set. Section 2.5 Cardinality (another) 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 bijection from A to B. If there is an injection

More information

Math 3000 Running Glossary

Math 3000 Running Glossary Math 3000 Running Glossary Last Updated on: July 15, 2014 The definition of items marked with a must be known precisely. Chapter 1: 1. A set: A collection of objects called elements. 2. The empty set (

More information

MAD 3105 PRACTICE TEST 2 SOLUTIONS

MAD 3105 PRACTICE TEST 2 SOLUTIONS MAD 3105 PRACTICE TEST 2 SOLUTIONS 1. Define a graph G with V (G) = {a, b, c, d, e}, E(G) = {r, s, t, u, v, w, x, y, z} and γ, the function defining the edges, is given by the table ɛ r s t u v w x y z

More information

Chapter I Logic and Proofs

Chapter I Logic and Proofs MATH 1130 1 Discrete Structures Chapter I Logic and Proofs Propositions A proposition is a statement that is either true (T) or false (F), but or both. s Propositions: 1. I am a man.. I am taller than

More information

Math/CSE 1019: Discrete Mathematics for Computer Science Fall Suprakash Datta

Math/CSE 1019: Discrete Mathematics for Computer Science Fall Suprakash Datta Math/CSE 1019: Discrete Mathematics for Computer Science Fall 2011 Suprakash Datta datta@cse.yorku.ca Office: CSEB 3043 Phone: 416-736-2100 ext 77875 Course page: http://www.cse.yorku.ca/course/1019 1

More information

IMPORTANT NOTE: All the following statements are equivalent:

IMPORTANT NOTE: All the following statements are equivalent: .5 Congruences For this section, we think of m as a fixed positive integer. Definition 15. We say that a is congruent to b modulo m, and we write if m divides (a b). a b (mod m) IMPORTANT NOTE: All the

More information

Lecture 3. Mathematical Induction

Lecture 3. Mathematical Induction Lecture 3 Mathematical Induction Induction is a fundamental reasoning process in which general conclusion is based on particular cases It contrasts with deduction, the reasoning process in which conclusion

More information

CHAPTER 2. Graphs. 1. Introduction to Graphs and Graph Isomorphism

CHAPTER 2. Graphs. 1. Introduction to Graphs and Graph Isomorphism CHAPTER 2 Graphs 1. Introduction to Graphs and Graph Isomorphism 1.1. The Graph Menagerie. Definition 1.1.1. A simple graph G = (V, E) consists of a set V of vertices and a set E of edges, represented

More information

Chapter 1, Part III: Proofs

Chapter 1, Part III: Proofs Chapter 1, Part III: Proofs Summary Valid Arguments and Rules of Inference Proof Methods Proof Strategies Section 1.6 Section Summary Valid Arguments Inference Rules for Propositional Logic Using Rules

More information

Turing-machines. Friedl Katalin BME SZIT March 22, 2016

Turing-machines. Friedl Katalin BME SZIT March 22, 2016 Turing-machines Friedl Katalin BME SZIT friedl@cs.bme.hu March 22, 2016 The assumption that the memory of a PDA is a stack turns out to be a pretty strong restriction. Now, we introduce a computational

More information

Finite Sets. Theorem 5.1. Two non-empty finite sets have the same cardinality if and only if they are equivalent.

Finite Sets. Theorem 5.1. Two non-empty finite sets have the same cardinality if and only if they are equivalent. MATH 337 Cardinality Dr. Neal, WKU We now shall prove that the rational numbers are a countable set while R is uncountable. This result shows that there are two different magnitudes of infinity. But we

More information

1. Syntax of PL. The symbols of propositional logic (or the propositional calculus) are

1. Syntax of PL. The symbols of propositional logic (or the propositional calculus) are THE PROPOSITIONAL CALCULUS PL Contents 1. Syntax of PL.................................................. 1 1A. Formulas.............................................. 2 1B. Structural recursion....................................

More information

MULTIPLE CHOICE QUESTIONS. 1) Let A and B be any two arbitrary events then which one of the following is true?

MULTIPLE CHOICE QUESTIONS. 1) Let A and B be any two arbitrary events then which one of the following is true? DISCRETE SRUCTURES MULTIPLE CHOICE QUESTIONS 1) Let A and B be any two arbitrary events then which one of the following is true? a. P( A intersection B) = P(A). P(B) b. P(A union B) = P(A) + P(B) c. P(AB)

More information

Math 0413 Supplement Logic and Proof

Math 0413 Supplement Logic and Proof Math 0413 Supplement Logic and Proof January 17, 2008 1 Propositions A proposition is a statement that can be true or false. Here are some examples of propositions: 1 = 1 1 = 0 Every dog is an animal.

More information

The argument is that both L1 and its complement (L2UL3) are re, so L1 is recursive. (This is equally true for L2 and L3).

The argument is that both L1 and its complement (L2UL3) are re, so L1 is recursive. (This is equally true for L2 and L3). Name Homework 9 SOLUTIONS 1. For each of the language classes: regular, context-free, recursively enumerable, and recursive, and each operation: complement, union, intersection, concatenation, and *closure,

More information

AMTH140 Semester

AMTH140 Semester Question 1 [10 marks] (a) Suppose A is the set of distinct letters in the word elephant, B is the set of distinct letters in the word sycophant, C is the set of distinct letters in the word fantastic,

More information

0 ( x) 2 = ( x)( x) = (( 1)x)(( 1)x) = ((( 1)x))( 1))x = ((( 1)(x( 1)))x = ((( 1)( 1))x)x = (1x)x = xx = x 2.

0 ( x) 2 = ( x)( x) = (( 1)x)(( 1)x) = ((( 1)x))( 1))x = ((( 1)(x( 1)))x = ((( 1)( 1))x)x = (1x)x = xx = x 2. SOLUTION SET FOR THE HOMEWORK PROBLEMS Page 5. Problem 8. Prove that if x and y are real numbers, then xy x + y. Proof. First we prove that if x is a real number, then x 0. The product of two positive

More information

Discrete Mathematics and Probability Theory Fall 2009 Satish Rao, David Tse Note 20

Discrete Mathematics and Probability Theory Fall 2009 Satish Rao, David Tse Note 20 CS 70 Discrete Mathematics and Probability Theory Fall 009 Satish Rao, David Tse Note 0 Infinity and Countability Consider a function (or mapping) f that maps elements of a set A (called the domain of

More information

Solve problems/calculate solutions. Develop models that describe real world situations. Offer definitions. Propose conjectures

Solve problems/calculate solutions. Develop models that describe real world situations. Offer definitions. Propose conjectures How to Prove Things Stuart Gluck, Ph.D. Director, Institutional Research Johns Hopkins University Center for Talented Youth (CTY) Carlos Rodriguez Assistant Director, Academic Programs Johns Hopkins University

More information

2. Graph Terminology

2. Graph Terminology 2. GRAPH TERMINOLOGY 186 2. Graph Terminology 2.1. Undirected Graphs. Definitions 2.1.1. Suppose G = (V, E) is an undirected graph. (1) Two vertices u, v V are adjacent or neighbors if there is an edge

More information

Mathematical induction & Recursion

Mathematical induction & Recursion CS 441 Discrete Mathematics for CS Lecture 15 Mathematical induction & Recursion Milos Hauskrecht milos@cs.pitt.edu 5329 Sennott Square Proofs Basic proof methods: Direct, Indirect, Contradiction, By Cases,

More information

Bipartite Graphs and Problem Solving

Bipartite Graphs and Problem Solving Bipartite Graphs and Problem Solving Jimmy Salvatore University of Chicago August 8, 2007 Abstract This paper will begin with a brief introduction to the theory of graphs and will focus primarily on the

More information

3. Recurrence Recursive Definitions. To construct a recursively defined function:

3. Recurrence Recursive Definitions. To construct a recursively defined function: 3. RECURRENCE 10 3. Recurrence 3.1. Recursive Definitions. To construct a recursively defined function: 1. Initial Condition(s) (or basis): Prescribe initial value(s) of the function.. Recursion: Use a

More information

CS 3719 (Theory of Computation and Algorithms) Lecture 4

CS 3719 (Theory of Computation and Algorithms) Lecture 4 CS 3719 (Theory of Computation and Algorithms) Lecture 4 Antonina Kolokolova January 18, 2012 1 Undecidable languages 1.1 Church-Turing thesis Let s recap how it all started. In 1990, Hilbert stated a

More information

Mathematical Induction

Mathematical Induction Mathematical Induction Victor Adamchik Fall of 2005 Lecture 2 (out of three) Plan 1. Strong Induction 2. Faulty Inductions 3. Induction and the Least Element Principal Strong Induction Fibonacci Numbers

More information

1 Connected simple graphs on four vertices

1 Connected simple graphs on four vertices 1 Connected simple graphs on four vertices Here we briefly answer Exercise 3.3 of the previous notes. Please come to office hours if you have any questions about this proof. Theorem 1.1. There are exactly

More information

MATHS 315 Mathematical Logic

MATHS 315 Mathematical Logic MATHS 315 Mathematical Logic Second Semester, 2006 Contents 2 Formal Statement Logic 1 2.1 Post production systems................................. 1 2.2 The system L.......................................

More information

Fundamentals Part 1 of Hammack

Fundamentals Part 1 of Hammack Fundamentals Part 1 of Hammack Dr. Doreen De Leon Math 111, Fall 2014 1 Sets 1.1 Introduction to Sets A set is a collection of things called elements. Sets are sometimes represented by a commaseparated

More information

Discrete Mathematics for CS Spring 2008 David Wagner Note 23

Discrete Mathematics for CS Spring 2008 David Wagner Note 23 CS 70 Discrete Mathematics for CS Spring 008 David Wagner Note 3 Infinity and Countability Consider a function (or mapping) f that maps elements of a set A (called the domain of f ) to elements of set

More information

Sets and functions. {x R : x > 0}.

Sets and functions. {x R : x > 0}. Sets and functions 1 Sets The language of sets and functions pervades mathematics, and most of the important operations in mathematics turn out to be functions or to be expressible in terms of functions.

More information

N P-Hard and N P-Complete Problems

N P-Hard and N P-Complete Problems N P-Hard and N P-Complete Problems Basic concepts Solvability of algorithms There are algorithms for which there is no known solution, for example, Turing s Halting Problem Decision problem Given an arbitrary

More information

Computability: Turing Machines and the Halting Problem

Computability: Turing Machines and the Halting Problem Computability: Turing Machines and the Halting Problem Jeremy Booher July 9, 2008 1 Effective Computability and Turing Machines In Hilbert s address to the International Congress of Mathematicians, he

More information

There are ten questions. Each question is worth 10 points. 1. Let ( ) denote the following statement about integers n:

There are ten questions. Each question is worth 10 points. 1. Let ( ) denote the following statement about integers n: Final Exam MAT 200 Solution Guide There are ten questions. Each question is worth 10 points. 1. Let ( ) denote the following statement about integers n: If n is divisible by 10, then it is divisible by

More information

DECIDABILITY AND UNDECIDABILITY

DECIDABILITY AND UNDECIDABILITY CISC462, Fall 2015, Decidability and undecidability 1 DECIDABILITY AND UNDECIDABILITY Decidable problems from language theory For simple machine models, such as finite automata or pushdown automata, many

More information

Set and element. Cardinality of a set. Empty set (null set) Finite and infinite sets. Ordered pair / n-tuple. Cartesian product. Proper subset.

Set and element. Cardinality of a set. Empty set (null set) Finite and infinite sets. Ordered pair / n-tuple. Cartesian product. Proper subset. Set and element Cardinality of a set Empty set (null set) Finite and infinite sets Ordered pair / n-tuple Cartesian product Subset Proper subset Power set Partition The cardinality of a set is the number

More information

Formal Languages and Automata Theory - Regular Expressions and Finite Automata -

Formal Languages and Automata Theory - Regular Expressions and Finite Automata - Formal Languages and Automata Theory - Regular Expressions and Finite Automata - Samarjit Chakraborty Computer Engineering and Networks Laboratory Swiss Federal Institute of Technology (ETH) Zürich March

More information

Regular Languages and Finite Automata

Regular Languages and Finite Automata Regular Languages and Finite Automata 1 Introduction Hing Leung Department of Computer Science New Mexico State University Sep 16, 2010 In 1943, McCulloch and Pitts [4] published a pioneering work on a

More information

Theory of Computation CSCI 3434, Spring 2010

Theory of Computation CSCI 3434, Spring 2010 Homework 4: Solutions Theory of Computation CSCI 3434, Spring 2010 1. This was listed as a question to make it clear that you would lose points if you did not answer these questions or work with another

More information

CHAPTER 3. Methods of Proofs. 1. Logical Arguments and Formal Proofs

CHAPTER 3. Methods of Proofs. 1. Logical Arguments and Formal Proofs CHAPTER 3 Methods of Proofs 1. Logical Arguments and Formal Proofs 1.1. Basic Terminology. An axiom is a statement that is given to be true. A rule of inference is a logical rule that is used to deduce

More information

Solving equations in algebra and in arithmetic

Solving equations in algebra and in arithmetic Solving equations in algebra and in arithmetic Yiannis N. Moschovakis UCLA and University of Athens Carnegie Mellon Summer School, 26 June, 2008 Outline We will consider equations p(x 1,..., x d ) = 0

More information

CS 103X: Discrete Structures Homework Assignment 3 Solutions

CS 103X: Discrete Structures Homework Assignment 3 Solutions CS 103X: Discrete Structures Homework Assignment 3 s Exercise 1 (20 points). On well-ordering and induction: (a) Prove the induction principle from the well-ordering principle. (b) Prove the well-ordering

More information

INTRODUCTION TO PROOFS: HOMEWORK SOLUTIONS

INTRODUCTION TO PROOFS: HOMEWORK SOLUTIONS INTRODUCTION TO PROOFS: HOMEWORK SOLUTIONS STEVEN HEILMAN Contents 1. Homework 1 1 2. Homework 2 6 3. Homework 3 10 4. Homework 4 16 5. Homework 5 19 6. Homework 6 21 7. Homework 7 25 8. Homework 8 28

More information

Lecture 17 : Equivalence and Order Relations DRAFT

Lecture 17 : Equivalence and Order Relations DRAFT CS/Math 240: Introduction to Discrete Mathematics 3/31/2011 Lecture 17 : Equivalence and Order Relations Instructor: Dieter van Melkebeek Scribe: Dalibor Zelený DRAFT Last lecture we introduced the notion

More information

CS 3719 (Theory of Computation and Algorithms) Definitions and Turing machines Lectures 2-5

CS 3719 (Theory of Computation and Algorithms) Definitions and Turing machines Lectures 2-5 CS 3719 (Theory of Computation and Algorithms) Definitions and Turing machines Lectures 2-5 Antonina Kolokolova January 7, 2015 1 Definitions: what is a computational problem? Now that we looked at examples

More information