A catalogue of proofs that various sets, functions and relations are primitive recursive 26 February 2012 at 20:57

Size: px
Start display at page:

Download "A catalogue of proofs that various sets, functions and relations are primitive recursive 26 February 2012 at 20:57"

Transcription

1 A catalogue of proofs that various sets, functions and relations are primitive recursive 26 February 2012 at 20:57 Public In this note (which is mainly intended as a 'memo' for myself) I am interested in cataloguing numerous proofs that some basic sets, functions and relations are primitive recursive. All such primitive recursive formulas have the property that they can be implemented as Unlimited Register Machine (URM) programs, i.e., they are Turing-computable. The idea in this note is to formulate proofs of Turing-computability mathematically without having to formulate URM programs explicitly, by first showing that some very simple formulas are Turing-computable, and then building up new Turingcomputable formulas from these using processes which are proven to yield Turing-computable functions from Turingcomputable functions. I want to catalogue as many examples of these proofs as I can here. The starting point is to note that the following very simple functions are Turing-computable: The proof that these are Turing-computable is immediate from the fact that they can each be implemented using the single-line URM programs 1 Z(1), 1 S(1), and 1 C(m, 1) respectively. One way to build up new Turing-computable functions from these is by substitution, defined as follows:

2 It is a basic theorem of computability theory that a function obtained by substitution from Turing-computable functions is itself Turing-computable. Another way to build up new Turing-computable functions from more basic ones is by primitive recursion, defined as follows for a function of one variable: Thus, to show that primitive recursion applies to a function of one variable, we need h(0) and an ability to compute h(n+1) given n and h(n). We represent this ability by defining an appropriate function of the form g(n, h(n)) = h(n+1). We can extend the definition of primitive recursion to functions of more than one variable as follows: It is again a basic theorem of computability theory that a function obtained by primitive recursion from other functions which are Turing-computable must itself be Turing-computable. A function is said to be primitive recursive if it can be obtained from basic primitive recursive functions using the operations of substitution and primitive recursion a finite number of times. It is a basic theorem of computability theory that every primitive recursive function is Turing-computable. To extend the concept of Turing-computability to sets, we use the concept of the characteristic function of a set:

3 A subset A of the set of natural numbers N is said to be a Turing-computable set if its characteristic function is a Turing-computable function, and it is said to be a primitive recursive set if its characteristic function is a primitive recursive function. Since every primitive recursive function is a Turing-computable function, it follows immediately that every primitive recursive set is also a Turing-computable set. We can do something similar for relations, using the concept of the characteristic function of a relation: A relation R is then said to be a Turing-computable relation if its characteristic function is a Turing-computable function, and it is said to be a primitive recursive relation if its characteristic function is a primitive recursive function. Using these concepts it is possible to prove that functions defined by cases are primitive recursive. The key theorems here are the following:

4 It is also possible to use these concepts to prove that bounded minimizations, otherwise known as bounded searches, are primitive recursive. The definition of bounded minimization (on a function) is as follows: The key theorem relating to functions defined by bounded minimization on a function is as follows: Similar considerations apply to bounded minimization on a relation:

5 I will begin by providing proofs here that the following basic functions, sets and relations are primitive recursive, and then continue proving other non-standard cases in this note over the next few months:

6 The constant function C a (n) = a is primitive recursive for each natural number a. Proof: By induction. First note that C(n) = 0 = zero(n) is primitive recursive, since the zero function is a basic primitive recursive function. This establishes the basis for induction. Next, assume that C a-1 (n) = a - 1 is primitive recursive. Then C a (n) = succ(c a-1 (n)) is also primitive recursive, since it is obtained by substitution using the primitive recursive functions succ and C a- 1(n). It follows by the principle of mathematical induction that C a (n) is primitive recursive for each natural number a.

7 2. For k 1, every constant function of k variables C aᵏ(n 1, n 2,..., n k ) = a is primitive recursive. Proof: The case k = 1 was shown to be primitive recursive in the previous proof. But for each k > 1 we have C aᵏ(n 1, n 2,..., n k ) = C a ¹(n 1 ) = C a ¹(U 1ᵏ(n 1, n 2,..., n k )) Thus for each k > 1 the function C aᵏ(n 1, n 2,..., n k ) = a is primitive recursive because it is defined by substitution from the primitive recursive function C a ¹ and the projection function U 1ᵏ which is a basic primitive recursive function. 3. The function add(n, m) = n + m is primitive recursive. Proof: Let h(n, m) add(n, m). Then we have: h(n, 0) = add(n, 0) = n h(n, m+1) = add(n, m+1) = add(n, m) + 1 Therefore we can write: h(n, 0) = f(n) = U 1 ¹(n) h(n, m+1) = g(n, m, h(n, m)) = succ(u 3 ³(n, m, h(n, m))) Therefore add(n, m) can be obtained by substitution and primitive recursion from the basic primitive recursive functions U 1 ¹, succ, and U 3 ³ and must therefore be primitive recursive itself. 4. The function mult(n, m) = n m is primitive recursive. Proof: Let h(n, m) mult(n, m). Then we have: h(n, 0) = mult(n, 0) = 0 h(n, m+1) = mult(n, m+1) = n + mult(n, m) Therefore we can write: h(n, 0) = f(n) = zero(n) h(n, m+1) = g(n, m, h(n, m)) = add(u 1 ³(n, m, h(n, m)), U 3 ³(n, m, h(n, m))) Therefore mult(n, m) can be obtained by substitution and primitive recursion from the basic primitive recursive functions zero, U 1 ³, and U 3 ³, and the primitive recursive function add. It follows that mult(n, m) must itself be primitive recursive. 5. The linear function f(n) = an + b, with a and b fixed natural numbers, is primitive recursive. Proof: We can write: f(n) = add(mult(c a (n), U 1 ¹(n)), C b (n)) Thus f(n) = an + b is primitive recursive, since it is obtained by substitution using the primitive recursive functions add, mult, C a, C b, and U 1 ¹. 6. The exponentiation function exp(n, m) = nᵐ is primitive recursive. Proof: Let h(n, m) exp(n, m). Then we have: h(n, 0) = exp(n, 0) = 1 h(n, m+1) = exp(n, m+1) = n nᵐ Therefore we can write: h(n, 0) = f(n) = C 1 (n) h(n, m+1) = g(n, m, h(n, m)) = mult(u 1 ³(n, m, h(n, m)), U 3 ³(n, m, h(n, m))) Thus exp(n, m) is primitive recursive, since it is obtained by substitution and primitive recursion using the primitive recursive functions C 1, mult, U 1 ³ and U 3 ³. 7. The predecessor function pred(n) = n -1 if n > 0, pred(n) = 0 if n = 0, is primitive recursive.

8 Proof: Let h(n) pred(n). Then we have: h(0) = 0 h(n + 1) = pred(n + 1) = n Writing h(n + 1) = g(n, h(n)) = U 1 ²(n, h(n)) we see that pred(n) is obtained by primitive recursion using the basic primitive recursive function U 1 ², and must therefore be primitive recursive itself. 8. The cut-off subtraction function n + m = n - m if m n, n + m = 0 if n < m, is primitive recursive. Proof: Let h(n, m) n + m. Then we have: h(n, 0) = n h(n, m + 1) = n + (m + 1) = (n + m) + 1 = pred(n + m) Therefore we can write: h(n, 0) = f(n) = U 1 ¹(n) h(n, m+1) = g(n, m, h(n, m)) = pred(u 3 ³(n, m, h(n, m))) It follows that cut-off subtraction is primitive recursive because it is obtained by substitution and primitive recursion using the primitive recursive functions U 1 ¹, pred and U 3 ³. 9. The functions max(n, m) and min(n, m) are primitive recursive. Proof: We have min(n, m) = n + (n + m) = U 1 ²(n, m) + (U 1 ²(n, m) + U 2 ²(n, m)) so min(n, m) is obtained by substitution using the cut-off subtraction function which is primitive recursive, and the basic primitive recursive functions U 1 ² and U 2 ². It must therefore be primitive recursive itself. But: max(n, m) + min(n, m) = n + m max(n, m) = n + m + min(n, m) = n + m + (n + (n + m)) = m + (n + m) Therefore max(n, m) = add(u 2 ²(n, m), (U 1 ²(n, m) + U 2 ²(n, m))) so max(n, m) is obtained by substitution using the add and cut-off subtraction functions which are primitive recursive, and the basic primitive recursive functions U 1 ² and U 2 ². It must therefore be primitive recursive itself. 10. The function adf(n, m) = n - m is primitive recursive. Proof: We can write adf(n, m) = (n + m) + (m + n) = add((u 1 ²(n, m) + U 2 ²(n, m)), (U 2 ²(n, m) + U 1 ²(n, m))) so adf(n, m) is obtained by substitution using the add and cut-off subtraction functions which are primitive recursive, and the basic primitive recursive functions U 1 ² and U 2 ². It must therefore be primitive recursive itself. 11. The signum function sg(n) = 1 if n > 0, sg(n) = 0 if n = 0, is primitive recursive. (This is the characteristic function of the set of positive integers). Proof: We have sg(n) = 1 + (1 + n) = C 1 (n) + (C 1 (n) + U 1 ¹(n)) Therefore sg(n) is primitive recursive because it is obtained by substitution using cut-off subtraction, which is primitive recursive, and the basic primitive recursive functions C 1 and U 1 ¹. Since sg(n) = 1 + sg(n) = C 1 (n) + sg(n) is obtained by substitution from the primitive recursive functions C 1, cut-off subtraction and sg, it is also a primtive recursive function. (This is the characteristic function of the set {0}).

9 12. The remainder function rem(n, m) is primitive recursive, where: rem(n, m) = the remainder when n is divided by m if m 0, rem(n, m) = 0 if m = 0. Proof: To prove this we use the fact that if a function h can be obtained from known primitive recursive functions by primitive recursion where a variable other than the last is taken as the recursion variable, the function h is primitive recursive. Thus, for example, we can show that h(n + 1, m) is primitive recursive instead of always having to show that h(n, m + 1) is primitive recursive. The former is more convenient than the latter in some cases, such as this one. Therefore let h(n, m) rem(n, m). Using the first variable as the recursion variable we clearly have h(0, m) = 0. We have h(n + 1, m) = 0 if m = 0 or if m = n + 1, and h(n + 1, m) = h(n, m) + 1 otherwise. A little thought shows we can write this as a single equation as: h(n + 1, m) = sg(m)sg(adf(add(n, 1), m))add(1, h(n, m)) Therefore we can write: h(0, m) = f(m) = zero(m) h(n, m+1) = g(n, m, h(n, m)) = mult(mult(sg(m), sg(adf(add(n, 1), m))), add(1, h(n, m))) It follows that the remainder function rem(n, m) is primitive recursive because it is obtained by substitution and primitive recursion (over the first variable) using the primitive recursive functions, zero, mult, sg, adf, add, C 1 ³, U 1 ³, U 2 ³, and U 3 ³ (the constant and projection functions are not shown explicitly in the expression to reduce clutter). 13. The quotient function quot(n, m) is primitive recursive, where: quot(n, m) = the quotient when n is divided by m if m 0, quot(n, m) = 0 if m = 0. Proof: Let h(n, m) quot(n, m). Using the first variable as the recursion variable we clearly have h(0, m) = 0. We have h(n + 1, m) = h(n, m) + 1 if rem(n + 1, m) = 0, and h(n + 1, m) = h(n, m) if rem(n + 1, m) 0. We can write this as a single equation as: h(n + 1, m) = sg(rem(n + 1, m))h(n, m) + (1 - sg(rem(n + 1, m)))(h(n, m) + 1) Therefore we can write: h(0, m) = f(m) = zero(m) h(n + 1, m) = add(mult(sg(rem(add(n, 1), m)), h(n, m)), mult((1 + sg(rem(add(n, 1), m))), add(h(n, m), 1))) It follows that the quotient function quot(n, m) is primitive recursive because it is obtained by substitution and primitive recursion (over the first variable) using the primitive recursive functions, zero, mult, sg, adf, add, cut-off subtraction C 1 ³, U 1 ³, U 2 ³, and U 3 ³ (the constant and projection functions are not shown explicitly in the expression to reduce clutter). 14. The factorial function fac(n) = n! is primitive recursive. Proof: Let h(n) fac(n). Then we have: h(0) = 1 h(n + 1) = g(n, h(n)) = (n + 1)h(n) = mult(add(n, 1), h(n)) It follows that fac(n) is primitive recursive since it is obtained by substitution and primitive recursion using the primitive recursive functions mult and add, and the (not shown explicitly) basic primitive recursive constant and projection functions. 15. The relation eq of equality between two natural numbers is primitive recursive. Proof: Let χ eq (n, m) = 1 if n = m, χ eq (n, m) = 0 if n m. Then we can write: χ eq (n, m) = 1 + sg(adf(n, m))

10 Therefore the characteristic function of the equality relation is a primitive recursive function, since it is obtained by substitution using the primitive recursive functions sg, adf and cut-off subtraction, and a constant. It follows that the equality relation is primitive recursive. 16. The relations, >, and < are primitive recursive. Proof: Let χ (n, m) = 1 if n m, χ (n, m) = 0 if n > m. Then we can write: χ (n, m) = 1 + sg(n + m) Therefore the characteristic function of the relation is a primitive recursive function, since it is obtained by substitution using the primitive recursive functions sg, cut-off subtraction, and a constant. It follows that the relation is primitive recursive. It follows immediately that the relation > is primitive recursive since its characteristic function is χ > (n, m) = 1 + χ (n, m), which is a primitive recursive function since it is obtained by substitution using the primitive recursive functions χ (n, m), cut-off subtraction and a constant. Let χ (n, m) = 1 if n m, χ (n, m) = 0 if n < m. Then we can write: χ (n, m) = sg(n + m) + χ eq (n, m) Therefore the characteristic function of the relation is a primitive recursive function, since it is obtained by substitution using the primitive recursive functions sg, cut-off subtraction, add, and χ eq. It follows that the relation is primitive recursive. It follows immediately that the relation < is primitive recursive since its characteristic function is equal to 1 + χ (n, m), which is a primitive recursive function since it is obtained by substitution using the primitive recursive functions χ (n, m), cut-off subtraction and a constant. 17. The function C(n, r) = n C r (the binomial coefficient) if r n, C(n, r) = 0 if r > n, is primitive recursive. Proof: We have: nc r = n!/(r!(n - r)!) = fac(n)/(fac(r)fac(n - r)) = quot(fac(n), fac(r)fac(n + r)) Note that for r > n this reduces to quot(fac(n), fac(r)) = 0. Therefore we can write C(n, r) as a single equation as: C(n, r) = quot(fac(n), fac(r)fac(n + r)) It follows that C(n, r) is a primitive recursive function since it is obtained by substitution using the primitive recursive functions quot, fac, mult, cut-off subtraction and projection functions (projection functions not shown explicitly). 18. The function div(n, y) = 1 if y n, div(n, y) = 0 otherwise, is a primitive recursive function. Proof: If y n we have rem(n, y) = 0. Therefore we can write: div(n, y) = 1 + sg(rem(n, y)) It follows that div(n, y) is primitive recursive, since it is obtained by substitution using the primitive recursive functions sg, rem, cut-off subtraction and a constant. 19. Suppose that the function f: N² N is primitive recursive and that a is a fixed natural number. Then each of the following functions of two variables, g 1, g 2, g 3, is primitive recursive: g 1 (n 1, n 2 ) = f(a, n 1, n 2 ) g 2 (n 1, n 2 ) = f(n 1, a, n 2 ) g 3 (n 1, n 2 ) = f(n 1, n 2, a) Proof: In the case of g 1 we can write: g 1 (n 1, n 2 ) = f(c a ²(n 1, n 2 ), U 1 ²(n 1, n 2 ), U 2 ²(n 1, n 2 )) Thus, g 1 is primitive recursive because it is defined by substitution using the primitive recursive functions f, C a ², U 1 ², and U 2 ². Analogous arguments show that g 2 and g 3 are also primitive recursive.

11 20. If the function f: N² N is primitive recursive, then so is the function g: N N given by g(n) = f(n, n). Proof: We can write: g(n) = f(u 1 ¹(n), U 1 ¹(n)) Thus, g(n) can be defined by substitution in terms of the primitive recusrive functions f and U 1 ¹, so it must itself be a primitive recursive function. 21. Proof: The function g satisfies the equations: g(n 1, n 2,..., n k, 0) = 0 g(n 1, n 2,..., n k, z + 1) = g(n 1, n 2,..., n k, z) + f(n 1, n 2,..., n k, z + 1) This shows that g is defined by primitive recursion from the primitive recursive functions add and f, using constants. It follows that g is itself primitive recursive. 22. The set Pr of prime numbers is primitive recursive. Proof: A natural number n > 0 is prime if and only if it has exactly two divisors, itself and 1. Thus n > 0 is prime if and only if [y=1, n] div(n, y) = 2. The characteristic function of the set Pr of prime numbers can thus be written as: χ Pr (n) = χ eq ( [y=1, n] div(n, y), 2) Now let g: N² N be the function defined by: g(n, z) = 0 if z = 0 g(n, z) = [y=1, z] div(n, y) otherwise Since div is a primitive recursive function, and g is a bounded summation function of the form appearing in 21 above, it follows that g is a primitive recursive function. Also, for n > 0, we have: g(n, n) = [y=1, n] div(n, y) Now let h: N N be the function given by h(n) = g(n, n), which is primitive recursive by item 20 above. We observe that for all natural numbers n (i.e., n = 0 and n > 0), we have: χ Pr (n) = χ eq (h(n), 2) Thus χ Pr is obtained by substitution from the primitive recursive functions χ eq and h using constants, and so is a primitive recursive function. It follows that the set of prime numbers Pr is a primitive recursive set. 23. The set E of even numbers is primitive recursive. Proof: Let h(n) χ E (n) (the characteristic function of E). Then we have: h(0) = 1 h(n + 1) = g(n, h(n)) = 1 + h(n)

12 Thus χ E is obtained by substitution and primitive recursion using cut-off subtraction (a primitive recursive function), constants and projection functions (not shown explicitly), and is therefore primitive recursive. It follows that the set E of even numbers is primitive recursive. 24. Proof: Let R 3 be the two-place relation defined by: R 3 (n, m) not R 1 (n, m) and not R 2 (n, m) Then it follows from the 'definition by cases' theorem for relations that f is primitive recursive provided that R 1, R 2 and R 3 are primitive recursive relations which are mutually exclusive and exhaustive. From the definition of R 3, at least one of the relations holds for all pairs (n, m), so the three relations are exhaustive. To show that the three relations are mutually exclusive, note first that R 3 is mutually exclusive with both R 1 and R 2 by construction. Next, we note that if max(n, 2m) 21, then either n 21 3n + 4m 63, or 2m 21 m 11 3n + 4m 44. Thus R 1 and R 2 are mutually exclusive. Therefore the three relations are mutually exclusive and exhaustive. Next we show that each of the relations is primitive recursive. The characteristic function of R 1 is: χ R1 (n, m) = χ (21, max(n, 2m)) Thus, χ R1 is obtained by substitution from the primitive recursive functions χ, max and mult using constants. It follows that χ R1 is a primitive recursive function, and hence R 1 is a primitive recursive relation. The characteristic function of R 2 is: χ R2 (n, m) = χ eq (3n + 4m, 43) Thus χ R2 is obtained by substitution from the primitive recursive functions χ eq, add and mult using constants. It follows that χ R2 is a primitive recursive function, and hence that R 2 is a primitive recursive relation. Finally, the characteristic function of R 3 is: χ R3 (n, m) = 1 + sg(χ R1 (n, m) + χ R2 (n, m)) Thus χ R3 is obtained by substitution from the primitive recursive functions χ R1, χ R2, sg, add and cut-off subtraction using constants. It follows that χ R3 is a primitive recursive function, and hence that R 3 is a primitive recursive relation. Thus f is a primitive recursive function. 25. Let the function g: N² N be defined by g(n, z) = μy z ( n - y² = 0), and let the function h: N N be defined by h(n) = g(n, n). Then h is primitive recursive. Proof: By item 20 above, h is primitive recursive if g is. By the key theorem on bounded minimization on a function, g is primitive recursive if the function f: N² N given by f(n, y) = n - y² is primitive recursive. But f is clearly primitive recursive since it is obtained by substitution from the primitive recursive functions adf and mult. Hence g, and therefore h, are primitive recursive.

13 26. The function p which enumerates the prime numbers is primitive recursive. Proof: The function p is defined so that p(0) = 1, p(1) = 2 (the first prime number), and for n > 1, p(n) is the nth prime number. Having a specified value for p(0), the natural way to define p by recursion is to put p(n + 1) = the smallest natural number y such that y is prime and p(n) < y. We can write this mathematically as: p(n + 1) = μy (χ Pr (y) = 1 and p(n) < y) Now define a two-place relation S as follows: S(m, y) χ Pr (y) = 1 We have: χ S (m, y) = χ eq (χ Pr (y), 1) Therefore χ S is primitive recursive since it is obtained by substitution from the primitive recursive functions χ eq and χ Pr using constants. Thus the relation S is primitive recursive. Also the relation < is primitive recursive. Now define the relation R by: R(m, y) S(m, y) and m < y χ Pr (y) = 1 and m < y We have: χ R (m, y) = χ S (m, y) χ > (y, m) Therefore χ R is primitive recursive since it is obtained by substitution from the primitive recursive functions mult, χ S and χ >. It follows from the key theorem on bounded minimization on a relation that the function g: N² N given by g(m, z) = μy z (χ Pr (y) = 1 and m < y) is primitive recursive. We observe that g(p(n), z) = p(n + 1) provided that p(n + 1) z. We need to find a suitable bound z. We can use a standard result from number theory that the nth prime number p(n) satisfies the inequality p(n) exp(2, exp(2, n-1)) where exp refers to exponentiation. Therefore let h:n N be defined by h(n) = exp(2, exp(2, n)). Then h is a primitive recursive function since it is obtained by substitution from the primitive recursive function exp using constants. We also have p(n + 1) h(n). It follows that p(n + 1) = g(p(n), h(n)) where g and h are primitive recursive. Thus we can define p by primitive recursion as p(0) = 1 p(n + 1) = g(p(n), h(n)) using the primitive recursive functions g, h and the constant 1. It follows that p is a primitive recursive function. 27. Let f:n N be the function defined by f(n) = μy (n < 3ʸ). Then f is primitive recursive. Proof: We use the fact that n < 3ʸ for all n when y = n. Therefore we must have f(n) n. Define the function g: N² N by g(n, z) = μy z (n < 3ʸ). Then we have f(n) = g(n, n), i.e., f equals g when the bound z in g is set equal to n. Therefore f(n) is primitive recursive if g(n, n) is primitive recursive by item 20 above. By the key theorem on bounded minimization on a relation, g(n, n) is primitive recursive if the relation R(n, y) n < 3ʸ is primitive recursive. But the characteristic function of R can be written as χ R (n, y) = χ > (exp(3, y), n) which is defined by substitution using the primitive recursive functions χ >, exp and constants. Thus R is a primitive recursive relation, so g and therefore f are primitive recursive functions. 28. Let f:n N be the function defined by f(0) = 1 f(n + 1) = μy (f(n) < y and y is not divisible by 4) Then f is primitive recursive.

14 Proof: We can use the approach of showing that f is defined by primitive recursion from known primitive recursive functions. In doing this it is the definition of f(n + 1) which requires attention, since f(0) is simply defined using a constant. Let R(m, y) be the relation given by: R(m, y) m < y and y is not divisible by 4 The characteristic function of R is χ R (m, y) = χ > (y, m) (1 + χ eq (div(y, 4), 0)) Thus χ R is obtained by substitution from the primitive recursive functions χ >, χ eq, mult, div, and cut-off subtraction using constants. It follows that χ R is a primitive recursive function, and hence that R is a primitive recursive relation. Hence, by the key theorem on bounded minimization on a relation, the function g: N² N given by g(m, z) = μy z R(m, y) is primitive recursive. We have f(n + 1) = μy R(f(n), y) and so to show that f(n + 1) is given by a primitive recursive function we require a bound z on y. To find a suitable bound, note that the smallest possible value for f(n + 1) is f(n) + 1. However, if f(n) + 1 is divisible by 4, then the next smallest is f(n) + 2. Thus, the biggest gap that can occur between f(n) and f(n + 1) is 2. Therefore a suitable bound z on y is f(n) + 2. So letting h: N N be defined by h(m) = m + 2 (so that h is primitive recursive), we have f(n + 1) = μy h(f(n)) R(f(n), y) = g(f(n), h(f(n))) Therefore we have f(0) = 1 f(n + 1) = g(f(n), h(f(n))) so that f is obtained by primitive recursion from the constant 1 and the primitive recursive functions g and h. Thus f is a primitive recursive function.

Chapter 6 Recursive functions

Chapter 6 Recursive functions Chapter 6 Recursive functions 165 6.1 Introduction Other formalization of the concept of effective procedure: computable functions over the natural numbers. Computable functions? Basic functions. Function

More information

CHAPTER 4. COMPUTABILITY AND DECIDABILITY

CHAPTER 4. COMPUTABILITY AND DECIDABILITY CHAPTER 4. COMPUTABILITY AND DECIDABILITY 1. Introduction By definition, an n-ary function F on N assigns to every n-tuple k 1,...,k n of elements of N a unique l N which is the value of F at k 1,...,k

More information

MAT 243 Test 2 SOLUTIONS, FORM A

MAT 243 Test 2 SOLUTIONS, FORM A MAT 243 Test 2 SOLUTIONS, FORM A 1. [15 points] Calculate the following quantities: a. 17 mod 4 Solution: 17 17 4 = 17 4 4 = 1. 4 b. 17 div 4 17 Solution: = 4. 4 c. (( 1) mod 12) mod (27 div 5) Solution:

More information

Phil 320 Chapter 7: Recursive sets and relations Note: 0. Introduction Significance of and main objectives for chapter 7:

Phil 320 Chapter 7: Recursive sets and relations Note: 0. Introduction Significance of and main objectives for chapter 7: Phil 320 Chapter 7: Recursive sets and relations (Note: We cover only section 7.1.) 0. Introduction Significance of and main objectives for chapter 7: 1. Chapter 7 generalizes the notion of recursive (or

More information

Automata Theory CS F-14 Counter Machines & Recursive Functions

Automata Theory CS F-14 Counter Machines & Recursive Functions Automata Theory CS411-2015F-14 Counter Machines & Recursive Functions David Galles Department of Computer Science University of San Francisco 14-0: Counter Machines Give a Non-Deterministic Finite Automata

More information

Recursive Functions. 6.1 Primitive Recursive Functions

Recursive Functions. 6.1 Primitive Recursive Functions 6 Recursive Functions The intuitive notion of an effectively computable function is the notion of a function for which there are definite, explicit rules, following which one could in principle compute

More information

SEQUENCES, MATHEMATICAL INDUCTION, AND RECURSION

SEQUENCES, MATHEMATICAL INDUCTION, AND RECURSION CHAPTER 5 SEQUENCES, MATHEMATICAL INDUCTION, AND RECURSION Copyright Cengage Learning. All rights reserved. SECTION 5.5 Application: Correctness of Algorithms Copyright Cengage Learning. All rights reserved.

More information

Bulgarian Math Olympiads with a Challenge Twist

Bulgarian Math Olympiads with a Challenge Twist Bulgarian Math Olympiads with a Challenge Twist by Zvezdelina Stankova Berkeley Math Circle Beginners Group September 0, 03 Tasks throughout this session. Harder versions of problems from last time appear

More information

1.3 Primitive Recursive Predicates and Bounded Minimalization

1.3 Primitive Recursive Predicates and Bounded Minimalization 12 1 Primitive Recursive Functions 1.3 Primitive Recursive Predicates and Bounded Minimalization 1.3.1 Case discrimination function The case discrimination function D is defined by D(x, y, z) = v x 0 v

More information

Recursion. Tjark Weber. Functional Programming 1. Based on notes by Sven-Olof Nyström. Tjark Weber (UU) Recursion 1 / 37

Recursion. Tjark Weber. Functional Programming 1. Based on notes by Sven-Olof Nyström. Tjark Weber (UU) Recursion 1 / 37 Tjark Weber Functional Programming 1 Based on notes by Sven-Olof Nyström Tjark Weber (UU) Recursion 1 / 37 Background FP I / Advanced FP FP I / Advanced FP This course (Functional Programming I) (5 hp,

More information

SEQUENCES, MATHEMATICAL INDUCTION, AND RECURSION

SEQUENCES, MATHEMATICAL INDUCTION, AND RECURSION CHAPTER 5 SEQUENCES, MATHEMATICAL INDUCTION, AND RECURSION Alessandro Artale UniBZ - http://www.inf.unibz.it/ artale/ SECTION 5.5 Application: Correctness of Algorithms Copyright Cengage Learning. All

More information

ELEMENTARY NUMBER THEORY AND METHODS OF PROOF

ELEMENTARY NUMBER THEORY AND METHODS OF PROOF CHAPTER 4 ELEMENTARY NUMBER THEORY AND METHODS OF PROOF Copyright Cengage Learning. All rights reserved. SECTION 4.3 Direct Proof and Counterexample III: Divisibility Copyright Cengage Learning. All rights

More information

1. Chapter 1, # 1: Prove that for all sets A, B, C, the formula

1. Chapter 1, # 1: Prove that for all sets A, B, C, the formula Homework 1 MTH 4590 Spring 2018 1. Chapter 1, # 1: Prove that for all sets,, C, the formula ( C) = ( ) ( C) is true. Proof : It suffices to show that ( C) ( ) ( C) and ( ) ( C) ( C). ssume that x ( C),

More information

ELEMENTARY NUMBER THEORY AND METHODS OF PROOF

ELEMENTARY NUMBER THEORY AND METHODS OF PROOF CHAPTER 4 ELEMENTARY NUMBER THEORY AND METHODS OF PROOF Copyright Cengage Learning. All rights reserved. SECTION 4.2 Direct Proof and Counterexample II: Rational Numbers Copyright Cengage Learning. All

More information

ELEMENTARY NUMBER THEORY AND METHODS OF PROOF

ELEMENTARY NUMBER THEORY AND METHODS OF PROOF CHAPTER 4 ELEMENTARY NUMBER THEORY AND METHODS OF PROOF Copyright Cengage Learning. All rights reserved. SECTION 4.3 Direct Proof and Counterexample III: Divisibility Copyright Cengage Learning. All rights

More information

Recursion. Lars-Henrik Eriksson. Functional Programming 1. Based on a presentation by Tjark Weber and notes by Sven-Olof Nyström

Recursion. Lars-Henrik Eriksson. Functional Programming 1. Based on a presentation by Tjark Weber and notes by Sven-Olof Nyström Lars-Henrik Eriksson Functional Programming 1 Based on a presentation by Tjark Weber and notes by Sven-Olof Nyström Tjark Weber (UU) Recursion 1 / 41 Comparison: Imperative/Functional Programming Comparison:

More information

Discrete Mathematics SECOND EDITION OXFORD UNIVERSITY PRESS. Norman L. Biggs. Professor of Mathematics London School of Economics University of London

Discrete Mathematics SECOND EDITION OXFORD UNIVERSITY PRESS. Norman L. Biggs. Professor of Mathematics London School of Economics University of London Discrete Mathematics SECOND EDITION Norman L. Biggs Professor of Mathematics London School of Economics University of London OXFORD UNIVERSITY PRESS Contents PART I FOUNDATIONS Statements and proofs. 1

More information

Recursion and Induction: Haskell; Primitive Data Types; Writing Function Definitions

Recursion and Induction: Haskell; Primitive Data Types; Writing Function Definitions Recursion and Induction: Haskell; Primitive Data Types; Writing Function Definitions Greg Plaxton Theory in Programming Practice, Spring 2005 Department of Computer Science University of Texas at Austin

More information

(a) Give inductive definitions of the relations M N and M N of single-step and many-step β-reduction between λ-terms M and N. (You may assume the

(a) Give inductive definitions of the relations M N and M N of single-step and many-step β-reduction between λ-terms M and N. (You may assume the COMPUTER SCIENCE TRIPOS Part IB 205 Paper 6 4 (AMP) (a) Give inductive definitions of the relations M N and M N of single-step and many-step β-reduction between λ-terms M and N. (You may assume the definition

More information

SECTION 5.1. Sequences

SECTION 5.1. Sequences SECTION 5.1 Sequences Sequences Problem: count number of ancestors one has 2 parents, 4 grandparents, 8 greatgrandparents,, written in a row as 2, 4, 8, 16, 32, 64, 128, To look for pattern of the numbers,

More information

Summary of Course Coverage

Summary of Course Coverage CS-227, Discrete Structures I Spring 2006 Semester Summary of Course Coverage 1) Propositional Calculus a) Negation (logical NOT) b) Conjunction (logical AND) c) Disjunction (logical inclusive-or) d) Inequalities

More information

1 Elementary number theory

1 Elementary number theory Math 215 - Introduction to Advanced Mathematics Spring 2019 1 Elementary number theory We assume the existence of the natural numbers and the integers N = {1, 2, 3,...} Z = {..., 3, 2, 1, 0, 1, 2, 3,...},

More information

Number System. Introduction. Natural Numbers (N) Whole Numbers (W) Integers (Z) Prime Numbers (P) Face Value. Place Value

Number System. Introduction. Natural Numbers (N) Whole Numbers (W) Integers (Z) Prime Numbers (P) Face Value. Place Value 1 Number System Introduction In this chapter, we will study about the number system and number line. We will also learn about the four fundamental operations on whole numbers and their properties. Natural

More information

We can create PDAs with multiple stacks. At each step we look at the current state, the current input symbol, and the top of each stack.

We can create PDAs with multiple stacks. At each step we look at the current state, the current input symbol, and the top of each stack. Other Automata We can create PDAs with multiple stacks. At each step we look at the current state, the current input symbol, and the top of each stack. From all of this information we decide what state

More information

Integers and Mathematical Induction

Integers and Mathematical Induction IT Program, NTUT, Fall 07 Integers and Mathematical Induction Chuan-Ming Liu Computer Science and Information Engineering National Taipei University of Technology TAIWAN 1 Learning Objectives Learn about

More information

4 Generating functions in two variables

4 Generating functions in two variables 4 Generating functions in two variables (Wilf, sections.5.6 and 3.4 3.7) Definition. Let a(n, m) (n, m 0) be a function of two integer variables. The 2-variable generating function of a(n, m) is F (x,

More information

6.001 Notes: Section 4.1

6.001 Notes: Section 4.1 6.001 Notes: Section 4.1 Slide 4.1.1 In this lecture, we are going to take a careful look at the kinds of procedures we can build. We will first go back to look very carefully at the substitution model,

More information

Introduction to Automata Theory. BİL405 - Automata Theory and Formal Languages 1

Introduction to Automata Theory. BİL405 - Automata Theory and Formal Languages 1 Introduction to Automata Theory BİL405 - Automata Theory and Formal Languages 1 Automata, Computability and Complexity Automata, Computability and Complexity are linked by the question: What are the fundamental

More information

Recursive Definitions and Structural Induction

Recursive Definitions and Structural Induction Recursive Definitions and Structural Induction Introduction If it is difficult to define an object explicitly, it may be easy to define this object in terms of itself (i.e., the current term could be given

More information

CS 6402 DESIGN AND ANALYSIS OF ALGORITHMS QUESTION BANK

CS 6402 DESIGN AND ANALYSIS OF ALGORITHMS QUESTION BANK CS 6402 DESIGN AND ANALYSIS OF ALGORITHMS QUESTION BANK Page 1 UNIT I INTRODUCTION 2 marks 1. Why is the need of studying algorithms? From a practical standpoint, a standard set of algorithms from different

More information

CSE-321 Programming Languages 2010 Midterm

CSE-321 Programming Languages 2010 Midterm Name: Hemos ID: CSE-321 Programming Languages 2010 Midterm Score Prob 1 Prob 2 Prob 3 Prob 4 Total Max 15 30 35 20 100 1 1 SML Programming [15 pts] Question 1. [5 pts] Give a tail recursive implementation

More information

EDAA40 At home exercises 1

EDAA40 At home exercises 1 EDAA40 At home exercises 1 1. Given, with as always the natural numbers starting at 1, let us define the following sets (with iff ): Give the number of elements in these sets as follows: 1. 23 2. 6 3.

More information

Recursively Defined Functions

Recursively Defined Functions Section 5.3 Recursively Defined Functions Definition: A recursive or inductive definition of a function consists of two steps. BASIS STEP: Specify the value of the function at zero. RECURSIVE STEP: Give

More information

Chapter 3 Programming with Recursion

Chapter 3 Programming with Recursion Plan Chapter 3 Programming with Recursion 1. Examples... 3.2 2. Correctness... 3.5 3. Construction methodology... 3.13 4. Forms of recursion... 3.16 Sven-Olof Nyström/IT Dept/Uppsala University FP 3.1

More information

Discrete Mathematics Lecture 4. Harper Langston New York University

Discrete Mathematics Lecture 4. Harper Langston New York University Discrete Mathematics Lecture 4 Harper Langston New York University Sequences Sequence is a set of (usually infinite number of) ordered elements: a 1, a 2,, a n, Each individual element a k is called a

More information

Honors Precalculus: Solving equations and inequalities graphically and algebraically. Page 1

Honors Precalculus: Solving equations and inequalities graphically and algebraically. Page 1 Solving equations and inequalities graphically and algebraically 1. Plot points on the Cartesian coordinate plane. P.1 2. Represent data graphically using scatter plots, bar graphs, & line graphs. P.1

More information

Discrete Structures. Fall Homework3

Discrete Structures. Fall Homework3 Discrete Structures Fall 2015 Homework3 Chapter 5 1. Section 5.1 page 329 Problems: 3,5,7,9,11,15 3. Let P(n) be the statement that 1 2 + 2 2 + +n 2 = n(n + 1)(2n + 1)/6 for the positive integer n. a)

More information

Mock Exam. Juanjo Rué Discrete Mathematics II, Winter Deadline: 14th January 2014 (Tuesday) by 10:00, at the end of the lecture.

Mock Exam. Juanjo Rué Discrete Mathematics II, Winter Deadline: 14th January 2014 (Tuesday) by 10:00, at the end of the lecture. Mock Exam Juanjo Rué Discrete Mathematics II, Winter 2013-2014 Deadline: 14th January 2014 (Tuesday) by 10:00, at the end of the lecture. Problem 1 (2 points): 1. State the definition of perfect graph

More information

COMPUTABILITY THEORY AND RECURSIVELY ENUMERABLE SETS

COMPUTABILITY THEORY AND RECURSIVELY ENUMERABLE SETS COMPUTABILITY THEORY AND RECURSIVELY ENUMERABLE SETS JOSHUA LENERS Abstract. An algorithm is function from ω to ω defined by a finite set of instructions to transform a given input x to the desired output

More information

Math 187 Sample Test II Questions

Math 187 Sample Test II Questions Math 187 Sample Test II Questions Dr. Holmes October 2, 2008 These are sample questions of kinds which might appear on Test II. There is no guarantee that all questions on the test will look like these!

More information

n λxy.x n y, [inc] [add] [mul] [exp] λn.λxy.x(nxy) λmn.m[inc]0 λmn.m([add]n)0 λmn.n([mul]m)1

n λxy.x n y, [inc] [add] [mul] [exp] λn.λxy.x(nxy) λmn.m[inc]0 λmn.m([add]n)0 λmn.n([mul]m)1 LAMBDA CALCULUS 1. Background λ-calculus is a formal system with a variety of applications in mathematics, logic, and computer science. It examines the concept of functions as processes, rather than the

More information

ECE G205 Fundamentals of Computer Engineering Fall Exercises in Preparation to the Midterm

ECE G205 Fundamentals of Computer Engineering Fall Exercises in Preparation to the Midterm ECE G205 Fundamentals of Computer Engineering Fall 2003 Exercises in Preparation to the Midterm The following problems can be solved by either providing the pseudo-codes of the required algorithms or the

More information

Phil 320 Chapter 1: Sets, Functions and Enumerability I. Sets Informally: a set is a collection of objects. The objects are called members or

Phil 320 Chapter 1: Sets, Functions and Enumerability I. Sets Informally: a set is a collection of objects. The objects are called members or Phil 320 Chapter 1: Sets, Functions and Enumerability I. Sets Informally: a set is a collection of objects. The objects are called members or elements of the set. a) Use capital letters to stand for sets

More information

1. Find f(1), f(2), f(3), and f(4) if f(n) is defined recursively by f(0) = 1 and for n = 0, 1, 2,

1. Find f(1), f(2), f(3), and f(4) if f(n) is defined recursively by f(0) = 1 and for n = 0, 1, 2, Exercises Exercises 1. Find f(1), f(2), f(3), and f(4) if f(n) is defined recursively by f(0) = 1 and for n = 0, 1, 2, a) f(n + 1) = f(n) + 2. b) f(n + 1) = 3f(n). c) f(n + 1) = 2f(n). d) f(n + 1) = f(n)2

More information

1.3. Conditional expressions To express case distinctions like

1.3. Conditional expressions To express case distinctions like Introduction Much of the theory developed in the underlying course Logic II can be implemented in a proof assistant. In the present setting this is interesting, since we can then machine extract from a

More information

1. Divide by using long division. (8x 3 + 6x 2 + 7) (x + 2)

1. Divide by using long division. (8x 3 + 6x 2 + 7) (x + 2) Bellwork 0-7-4. Divide by using long division. (8x + 6x 2 + 7) (x + 2) Synthetic division is a shorthand method of dividing a polynomial by a linear binomial by using only the coefficients. For synthetic

More information

Discrete mathematics , Fall Instructor: prof. János Pach

Discrete mathematics , Fall Instructor: prof. János Pach Discrete mathematics 2016-2017, Fall Instructor: prof. János Pach - covered material - Lecture 1. Counting problems To read: [Lov]: 1.2. Sets, 1.3. Number of subsets, 1.5. Sequences, 1.6. Permutations,

More information

Math 302 Introduction to Proofs via Number Theory. Robert Jewett (with small modifications by B. Ćurgus)

Math 302 Introduction to Proofs via Number Theory. Robert Jewett (with small modifications by B. Ćurgus) Math 30 Introduction to Proofs via Number Theory Robert Jewett (with small modifications by B. Ćurgus) March 30, 009 Contents 1 The Integers 3 1.1 Axioms of Z...................................... 3 1.

More information

Chapter S:V. V. Formal Properties of A*

Chapter S:V. V. Formal Properties of A* Chapter S:V V. Formal Properties of A* Properties of Search Space Graphs Auxiliary Concepts Roadmap Completeness of A* Admissibility of A* Efficiency of A* Monotone Heuristic Functions S:V-1 Formal Properties

More information

DEPARTMENT - Mathematics. Coding: N Number. A Algebra. G&M Geometry and Measure. S Statistics. P - Probability. R&P Ratio and Proportion

DEPARTMENT - Mathematics. Coding: N Number. A Algebra. G&M Geometry and Measure. S Statistics. P - Probability. R&P Ratio and Proportion DEPARTMENT - Mathematics Coding: N Number A Algebra G&M Geometry and Measure S Statistics P - Probability R&P Ratio and Proportion YEAR 7 YEAR 8 N1 Integers A 1 Simplifying G&M1 2D Shapes N2 Decimals S1

More information

ELEMENTARY NUMBER THEORY AND METHODS OF PROOF

ELEMENTARY NUMBER THEORY AND METHODS OF PROOF CHAPTER 4 ELEMENTARY NUMBER THEORY AND METHODS OF PROOF Copyright Cengage Learning. All rights reserved. SECTION 4.8 Application: Algorithms Copyright Cengage Learning. All rights reserved. Application:

More information

THE AGDA STANDARD LIBRARY

THE AGDA STANDARD LIBRARY THE AGDA STANDARD LIBRARY N. P. STRICKLAND 1. Introduction In this document we give a survey of the structure, organisation and contents of the Agda standard library. We will mostly ignore foundational

More information

MA651 Topology. Lecture 4. Topological spaces 2

MA651 Topology. Lecture 4. Topological spaces 2 MA651 Topology. Lecture 4. Topological spaces 2 This text is based on the following books: Linear Algebra and Analysis by Marc Zamansky Topology by James Dugundgji Fundamental concepts of topology by Peter

More information

Solutions. (a) Claim: A d-ary tree of height h has at most 1 + d +...

Solutions. (a) Claim: A d-ary tree of height h has at most 1 + d +... Design and Analysis of Algorithms nd August, 016 Problem Sheet 1 Solutions Sushant Agarwal Solutions 1. A d-ary tree is a rooted tree in which each node has at most d children. Show that any d-ary tree

More information

AXIOMS FOR THE INTEGERS

AXIOMS FOR THE INTEGERS AXIOMS FOR THE INTEGERS BRIAN OSSERMAN We describe the set of axioms for the integers which we will use in the class. The axioms are almost the same as what is presented in Appendix A of the textbook,

More information

Chapter 4. Number Theory. 4.1 Factors and multiples

Chapter 4. Number Theory. 4.1 Factors and multiples Chapter 4 Number Theory We ve now covered most of the basic techniques for writing proofs. So we re going to start applying them to specific topics in mathematics, starting with number theory. Number theory

More information

MOST attention in the literature of network codes has

MOST attention in the literature of network codes has 3862 IEEE TRANSACTIONS ON INFORMATION THEORY, VOL. 56, NO. 8, AUGUST 2010 Efficient Network Code Design for Cyclic Networks Elona Erez, Member, IEEE, and Meir Feder, Fellow, IEEE Abstract This paper introduces

More information

4&5 Binary Operations and Relations. The Integers. (part I)

4&5 Binary Operations and Relations. The Integers. (part I) c Oksana Shatalov, Spring 2016 1 4&5 Binary Operations and Relations. The Integers. (part I) 4.1: Binary Operations DEFINITION 1. A binary operation on a nonempty set A is a function from A A to A. Addition,

More information

Introduction to Modular Arithmetic

Introduction to Modular Arithmetic Randolph High School Math League 2014-2015 Page 1 1 Introduction Introduction to Modular Arithmetic Modular arithmetic is a topic residing under Number Theory, which roughly speaking is the study of integers

More information

Recursive Functions. Recursive functions are built up from basic functions by some operations.

Recursive Functions. Recursive functions are built up from basic functions by some operations. Recursive Functions Recursive functions are built up from basic functions by some operations. The Successor Function Let s get very primitive. Suppose we have 0 defined, and want to build the nonnegative

More information

Objectives and Homework List

Objectives and Homework List MAC 1140 Objectives and Homework List Each objective covered in MAC1140 is listed below. Along with each objective is the homework list used with MyMathLab (MML) and a list to use with the text (if you

More information

T. Background material: Topology

T. Background material: Topology MATH41071/MATH61071 Algebraic topology Autumn Semester 2017 2018 T. Background material: Topology For convenience this is an overview of basic topological ideas which will be used in the course. This material

More information

Math Introduction to Advanced Mathematics

Math Introduction to Advanced Mathematics Math 215 - Introduction to Advanced Mathematics Number Theory Fall 2017 The following introductory guide to number theory is borrowed from Drew Shulman and is used in a couple of other Math 215 classes.

More information

Assignment 1 (concept): Solutions

Assignment 1 (concept): Solutions CS10b Data Structures and Algorithms Due: Thursday, January 0th Assignment 1 (concept): Solutions Note, throughout Exercises 1 to 4, n denotes the input size of a problem. 1. (10%) Rank the following functions

More information

1.1 calculator viewing window find roots in your calculator 1.2 functions find domain and range (from a graph) may need to review interval notation

1.1 calculator viewing window find roots in your calculator 1.2 functions find domain and range (from a graph) may need to review interval notation 1.1 calculator viewing window find roots in your calculator 1.2 functions find domain and range (from a graph) may need to review interval notation functions vertical line test function notation evaluate

More information

A.1 Numbers, Sets and Arithmetic

A.1 Numbers, Sets and Arithmetic 522 APPENDIX A. MATHEMATICS FOUNDATIONS A.1 Numbers, Sets and Arithmetic Numbers started as a conceptual way to quantify count objects. Later, numbers were used to measure quantities that were extensive,

More information

The transition: Each student passes half his store of candies to the right. students with an odd number of candies eat one.

The transition: Each student passes half his store of candies to the right. students with an odd number of candies eat one. Kate s problem: The students are distributed around a circular table The teacher distributes candies to all the students, so that each student has an even number of candies The transition: Each student

More information

16.50 RANDPOLY: A random polynomial generator

16.50 RANDPOLY: A random polynomial generator 743 16.50 RANDPOLY: A random polynomial generator This package is based on a port of the Maple random polynomial generator together with some support facilities for the generation of random numbers and

More information

UNIT 1 BASICS OF AN ALGORITHM

UNIT 1 BASICS OF AN ALGORITHM UNIT 1 BASICS OF AN ALGORITHM Basics of an Algorithm Structure Page Nos. 1.0 Introduction 5 1.1 Objectives 6 1.2. Analysis and Complexity of Algorithms 6 1.3 Basic Technique for Design of Efficient Algorithms

More information

Ramsey s Theorem on Graphs

Ramsey s Theorem on Graphs Ramsey s Theorem on Graphs 1 Introduction Exposition by William Gasarch Imagine that you have 6 people at a party. We assume that, for every pair of them, either THEY KNOW EACH OTHER or NEITHER OF THEM

More information

05. Turing Machines and Spacetime. I. Turing Machines and Classical Computability.

05. Turing Machines and Spacetime. I. Turing Machines and Classical Computability. 05. Turing Machines and Spacetime. I. Turing Machines and Classical Computability. 1. Turing Machines A Turing machine (TM) consists of (Turing 1936): Alan Turing 1. An unbounded tape. Divided into squares,

More information

INTRODUCTION TO THE HOMOLOGY GROUPS OF COMPLEXES

INTRODUCTION TO THE HOMOLOGY GROUPS OF COMPLEXES INTRODUCTION TO THE HOMOLOGY GROUPS OF COMPLEXES RACHEL CARANDANG Abstract. This paper provides an overview of the homology groups of a 2- dimensional complex. It then demonstrates a proof of the Invariance

More information

Solution to Graded Problem Set 4

Solution to Graded Problem Set 4 Graph Theory Applications EPFL, Spring 2014 Solution to Graded Problem Set 4 Date: 13.03.2014 Due by 18:00 20.03.2014 Problem 1. Let V be the set of vertices, x be the number of leaves in the tree and

More information

Fall Recursion and induction. Stephen Brookes. Lecture 4

Fall Recursion and induction. Stephen Brookes. Lecture 4 15-150 Fall 2018 Stephen Brookes Lecture 4 Recursion and induction Last time Specification format for a function F type assumption guarantee (REQUIRES) (ENSURES) For all (properly typed) x satisfying the

More information

Functions. How is this definition written in symbolic logic notation?

Functions. How is this definition written in symbolic logic notation? functions 1 Functions Def. Let A and B be sets. A function f from A to B is an assignment of exactly one element of B to each element of A. We write f(a) = b if b is the unique element of B assigned by

More information

Sharp lower bound for the total number of matchings of graphs with given number of cut edges

Sharp lower bound for the total number of matchings of graphs with given number of cut edges South Asian Journal of Mathematics 2014, Vol. 4 ( 2 ) : 107 118 www.sajm-online.com ISSN 2251-1512 RESEARCH ARTICLE Sharp lower bound for the total number of matchings of graphs with given number of cut

More information

Catalan numbers. 2. In how many ways can you place 3 pairs of parentheses in the expression

Catalan numbers. 2. In how many ways can you place 3 pairs of parentheses in the expression Catalan numbers 1. In how many ways can you cut up a regular hexagon (6-sided polygon) into triangles using 3 nonintersecting diagonals? For example, there are 5 ways for a pentagon: 2. In how many ways

More information

Mathematically Rigorous Software Design Review of mathematical prerequisites

Mathematically Rigorous Software Design Review of mathematical prerequisites Mathematically Rigorous Software Design 2002 September 27 Part 1: Boolean algebra 1. Define the Boolean functions and, or, not, implication ( ), equivalence ( ) and equals (=) by truth tables. 2. In an

More information

The strong chromatic number of a graph

The strong chromatic number of a graph The strong chromatic number of a graph Noga Alon Abstract It is shown that there is an absolute constant c with the following property: For any two graphs G 1 = (V, E 1 ) and G 2 = (V, E 2 ) on the same

More information

MATH Iris Loeb.

MATH Iris Loeb. MATH 134 http://www.math.canterbury.ac.nz/math134/09/su1/c Iris Loeb I.Loeb@math.canterbury.ac.nz Office Hours: Thur 10.00-11.00, Room 703 (MSCS Building) The Limits of Formal Logic We now turn our attention

More information

It is important that you show your work. There are 134 points available on this test.

It is important that you show your work. There are 134 points available on this test. Math 1165 Discrete Math Test April 4, 001 Your name It is important that you show your work There are 134 points available on this test 1 (10 points) Show how to tile the punctured chess boards below with

More information

MC 302 GRAPH THEORY 10/1/13 Solutions to HW #2 50 points + 6 XC points

MC 302 GRAPH THEORY 10/1/13 Solutions to HW #2 50 points + 6 XC points MC 0 GRAPH THEORY 0// Solutions to HW # 0 points + XC points ) [CH] p.,..7. This problem introduces an important class of graphs called the hypercubes or k-cubes, Q, Q, Q, etc. I suggest that before you

More information

Safe Stratified Datalog With Integer Order Does not Have Syntax

Safe Stratified Datalog With Integer Order Does not Have Syntax Safe Stratified Datalog With Integer Order Does not Have Syntax Alexei P. Stolboushkin Department of Mathematics UCLA Los Angeles, CA 90024-1555 aps@math.ucla.edu Michael A. Taitslin Department of Computer

More information

Answers to specimen paper questions. Most of the answers below go into rather more detail than is really needed. Please let me know of any mistakes.

Answers to specimen paper questions. Most of the answers below go into rather more detail than is really needed. Please let me know of any mistakes. Answers to specimen paper questions Most of the answers below go into rather more detail than is really needed. Please let me know of any mistakes. Question 1. (a) The degree of a vertex x is the number

More information

Scan Scheduling Specification and Analysis

Scan Scheduling Specification and Analysis Scan Scheduling Specification and Analysis Bruno Dutertre System Design Laboratory SRI International Menlo Park, CA 94025 May 24, 2000 This work was partially funded by DARPA/AFRL under BAE System subcontract

More information

Using Arithmetic of Real Numbers to Explore Limits and Continuity

Using Arithmetic of Real Numbers to Explore Limits and Continuity Using Arithmetic of Real Numbers to Explore Limits and Continuity by Maria Terrell Cornell University Problem Let a =.898989... and b =.000000... (a) Find a + b. (b) Use your ideas about how to add a and

More information

Diagonalization. The cardinality of a finite set is easy to grasp: {1,3,4} = 3. But what about infinite sets?

Diagonalization. The cardinality of a finite set is easy to grasp: {1,3,4} = 3. But what about infinite sets? Diagonalization Cardinalities The cardinality of a finite set is easy to grasp: {1,3,4} = 3. But what about infinite sets? We say that a set S has at least as great cardinality as set T, written S T, if

More information

Math 221 Final Exam Review

Math 221 Final Exam Review Math 221 Final Exam Review Preliminary comment: Some of these problems a formulated using language and structures from graph theory. However they are generally self contained; no theorems from graph theory

More information

Part II. Graph Theory. Year

Part II. Graph Theory. Year Part II Year 2017 2016 2015 2014 2013 2012 2011 2010 2009 2008 2007 2006 2005 2017 53 Paper 3, Section II 15H Define the Ramsey numbers R(s, t) for integers s, t 2. Show that R(s, t) exists for all s,

More information

HOMEWORK FILE SOLUTIONS

HOMEWORK FILE SOLUTIONS Data Structures Course (CSCI-UA 102) Professor Yap Spring 2012 HOMEWORK FILE February 13, 2012 SOLUTIONS 1 Homework 2: Due on Thu Feb 16 Q1. Consider the following function called crossproduct: int crossproduct(int[]

More information

Lecture 8: Addition, Multiplication & Division

Lecture 8: Addition, Multiplication & Division Lecture 8: Addition, Multiplication & Division Today s topics: Signed/Unsigned Addition Multiplication Division 1 Signed / Unsigned The hardware recognizes two formats: unsigned (corresponding to the C

More information

Primes in Classes of the Iterated Totient Function

Primes in Classes of the Iterated Totient Function 1 2 3 47 6 23 11 Journal of Integer Sequences, Vol. 11 (2008), Article 08.1.2 Primes in Classes of the Iterated Totient Function Tony D. Noe 14025 NW Harvest Lane Portland, OR 97229 USA noe@sspectra.com

More information

31.6 Powers of an element

31.6 Powers of an element 31.6 Powers of an element Just as we often consider the multiples of a given element, modulo, we consider the sequence of powers of, modulo, where :,,,,. modulo Indexing from 0, the 0th value in this sequence

More information

Bounds on the signed domination number of a graph.

Bounds on the signed domination number of a graph. Bounds on the signed domination number of a graph. Ruth Haas and Thomas B. Wexler September 7, 00 Abstract Let G = (V, E) be a simple graph on vertex set V and define a function f : V {, }. The function

More information

Recursive Definitions Structural Induction Recursive Algorithms

Recursive Definitions Structural Induction Recursive Algorithms Chapter 4 1 4.3-4.4 Recursive Definitions Structural Induction Recursive Algorithms 2 Section 4.1 3 Principle of Mathematical Induction Principle of Mathematical Induction: To prove that P(n) is true for

More information

CT32 COMPUTER NETWORKS DEC 2015

CT32 COMPUTER NETWORKS DEC 2015 Q.2 a. Using the principle of mathematical induction, prove that (10 (2n-1) +1) is divisible by 11 for all n N (8) Let P(n): (10 (2n-1) +1) is divisible by 11 For n = 1, the given expression becomes (10

More information

UNIT-II NUMBER THEORY

UNIT-II NUMBER THEORY UNIT-II NUMBER THEORY An integer n is even if, and only if, n equals twice some integer. i.e. if n is an integer, then n is even an integer k such that n =2k An integer n is odd if, and only if, n equals

More information

Algorithm. Algorithm Analysis. Algorithm. Algorithm. Analyzing Sorting Algorithms (Insertion Sort) Analyzing Algorithms 8/31/2017

Algorithm. Algorithm Analysis. Algorithm. Algorithm. Analyzing Sorting Algorithms (Insertion Sort) Analyzing Algorithms 8/31/2017 8/3/07 Analysis Introduction to Analysis Model of Analysis Mathematical Preliminaries for Analysis Set Notation Asymptotic Analysis What is an algorithm? An algorithm is any well-defined computational

More information

Trees. 3. (Minimally Connected) G is connected and deleting any of its edges gives rise to a disconnected graph.

Trees. 3. (Minimally Connected) G is connected and deleting any of its edges gives rise to a disconnected graph. Trees 1 Introduction Trees are very special kind of (undirected) graphs. Formally speaking, a tree is a connected graph that is acyclic. 1 This definition has some drawbacks: given a graph it is not trivial

More information

A Study of the Perfect Cuboid Problem

A Study of the Perfect Cuboid Problem A Study of the Perfect Cuboid Problem Larry Wagner Abstract We develop a procedure to generate face-cuboids. A face-cuboid is a cuboid with only one noninteger face diagonal. We show that it impossible

More information