# 19.pdf - CMPSCI 250 Introduction to Computation Lecture#19...

• Test Prep
• 33
• 100% (1) 1 out of 1 people found this document helpful

This preview shows pages 1–10. Sign up to view the full content.

CMPSCI 250: Introduction to Computation Lecture #19: Proving the Basic Facts of Arithmetic David Mix Barrington 18 October 2017

This preview has intentionally blurred sections. Sign up to view the full version.

Proving the Facts of Arithmetic The Semiring of the Naturals The Definitions of Addition and Multiplication A Warmup: x: 0 + x = x Commutativity of Addition Associativity of Addition Commutativity of Multiplication Associativity and the Distributive Law
Example: Making Change Suppose I have \$5 and \$12 gift certificates, and I would like to be able to give someone a set of certificates for any integer number of dollars. I clearly can’t do \$4 or \$11, but if the amount is large enough I should be able to do it. By trial and error (or more cleverly) you can show that \$43 is the last bad amount.

This preview has intentionally blurred sections. Sign up to view the full version.

Example: Making Change Let P(n) be the statement “\$n can be made with \$5’s and \$12’s”. I’d like to prove n: (n 44) P(n) by strong induction, starting with P(44). It’s easy to prove n: P(n) P(n+5), which helps with the strong inductive step, namely n: Q(n) P(n+1), where Q(n) is the statement i:((i 44) (i n)) P(i).
Example: Making Change So let n be arbitrary and assume Q(n). If n 48, Q(n) includes P(n-4), and I can prove P(n+1) from P(n-4). But there are the cases of P(45), P(46), P(47), and P(48) which I have to do separately. One way to think of this is that with an inductive step of P(n) P(n+5), I need five base cases. If my sum proving P(n) had at least two \$12’s, I could replace them with five \$5’s and get the inductive step for an ordinary induction.

This preview has intentionally blurred sections. Sign up to view the full version.

The Semiring of the Naturals The natural numbers form an algebraic structure called a semiring , obeying these axioms: 1. There are two binary operations called + and × . 2. Both operations are commutative . 3. Both operations are associative . 4. There is an additive identity called 0 and a multiplicative identity called 1. 5. Multiplication distributes over addition, so that u: v: w: u × (v + w) = (u × v) + (u × w).
Details of the Semiring Axioms Commutativity means u: v: (u + v) = (v + u) and u: v: (u × v) = (v × u). Associativity means u: v: w:(u + (v + w)) = ((u + v) + w) and u: v: w: (u × (v × w)) = ((u × v) × w). Identity rules are u: (0 + u) = (u + 0) = u, u:(1 × u) = (u × 1) = u, and u: (0 × u) = (u × 0) = 0.

This preview has intentionally blurred sections. Sign up to view the full version.

Clicker Question #1 Consider the operator on boolean values. Which of the following statements is true? (a) is commutative but not associative (b) is both commutative and associative (c) is neither commutative nor associative (d) is associative but not commutative
is Associative?

This preview has intentionally blurred sections. Sign up to view the full version.

This is the end of the preview. Sign up to access the rest of the document.
• Fall '09
• Addition, base case, Commutativity, Associativity, successor

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern