New User Special Price Expires in

Let's log you in.

Sign in with Facebook


Don't have a StudySoup account? Create one here!


Create a StudySoup account

Be part of our community, it's free to join!

Sign up with Facebook


Create your account
By creating an account you agree to StudySoup's terms and conditions and privacy policy

Already have a StudySoup account? Login here

CS 2100 Class notes Week 3

by: Nick

CS 2100 Class notes Week 3 CS 2100

Marketplace > University of Utah > Computer science > CS 2100 > CS 2100 Class notes Week 3
The U
GPA 3.78

Preview These Notes for FREE

Get a free preview of these Notes, just enter your email below.

Unlock Preview
Unlock Preview

Preview these materials now for free

Why put in your email? Get access to more of this material and other relevant free materials for your school

View Preview

About this Document

Proofs: Direct proof, Proof by contrapositive, Proof by cases, Proof by contradiction
Discrete Structures
Zvonimir Rakamaric
Class Notes
Math, Discrete math, logic
25 ?




Popular in Discrete Structures

Popular in Computer science

This 6 page Class Notes was uploaded by Nick on Friday September 9, 2016. The Class Notes belongs to CS 2100 at University of Utah taught by Zvonimir Rakamaric in Winter 2016. Since its upload, it has received 9 views. For similar materials see Discrete Structures in Computer science at University of Utah.


Reviews for CS 2100 Class notes Week 3


Report this Material


What is Karma?


Karma is the currency of StudySoup.

You can buy or earn more Karma at anytime and redeem it for class notes, study guides, flashcards, and more!

Date Created: 09/09/16
CS 2100 9­6­16 Announcements Quiz 1 is sep 20  the quiz from last year has been posted answers will be in the review session most students would not need the entire class period no lecture that day, only the quiz Sept 17 is review session Proofs about numbers properties of integers: (should know these) even: there exists m element of Z, such that m=2n odd: there exists m element of Z, such that m=2n+1 m divisible by n if E k e Z, m=n*k closed under * + ­ (always produce an integer) NOT / = n divides m Implication if (hypothesis){p} then (conclusion){q} Need to show that hypothesis is true and conclusion is true.  keep the goal of the proof in mind assume hypothesis, and show conclusion holds Prove:  if x is even AND y is odd then x+y is odd: Given: x is even and y is odd x=2*n  [from definition of even] y=2*m+1 [from definition of odd] [should use m because if use n then will only get consecutive integers, would have restricted it  too much. We would rather generate any even and odd number, even the same numbers. So,  pick a new letter.] x+y = 2*n + 2*m+1 = 2(n+m) +1  k=n+m [closure property of + , means that k is an integer] x+y= 2*k+1 [this is the definition of odd] done=QED[latin]=check don’t prove the reverse to q­­>p p→ q != q→ p Practice: pg96 #4b if n is even then n+8 is even given n is even  n=2*k [definition of even] n+8=2*k+8 [+8 to both sides] n+8=2*(k+4) l=k+4 [closure] n+8=2*l [definition of even] done can’t prove this by enumeration because this is an infinite set could try every element of a small set this is what proving with truth tables is always need to denote the definitions you are using. Other than that, should do proofs in steps, but no other guidelines.  on quiz will be told which method to use. it can be hard to determine which method is the best.  Contrapositive: p→ q = -,q→ -,p proof by contrapositive if n^2 is even then n is even n^2=2*k [cannot use this because integers are not closed under sqrt] Contrapositive: if n is odd then n^2 is odd given n is odd n=2*k+1  [definition of odd] n^2=(2*k+1)^2[square both sides] n^2=4*k^2+4*k+1 n^2=4*k(k+1)+1 i=2*k(k+1) [closure of * +] {don’t need to expand this} n^2=2*i+1 [definition of odd] this is the contrapositive  done they are not looking for the shortest proof on the quiz.  page 108 #7e if 9 divides 10^(n­1)­1, then 9 divides 10^(n)­1 10^(n­1)­1=9*k  [definition of divides] 10^(n)/10­1=9*k 10^(n)­10=9*10*k 10^(n)­1=90*k­9=9*(10*k­1) j=10*k­1 [closure] 10^(n)­1=9*j [definition of divides] done He chose to solve problems in class that are not in the book. ­­ 9­8­16 if want feedback for homework go to TA hours.  There are office hours today after class.  Need to put UID on Homeworks!  he will put the practice quiz solutions online Common errors on HW: ­(x < n < y) = ­(x < n ^ n < y) =x >= n V n >= y not: x >= n >= y  =x >= n ^ n >= y [which is a contradiction! unless x=y] use a number line to see it A x e Z , x*2 = 0 is equivalent to  A x e Z, x>0 → x*2=0 Proof by induction is the most important method Proof by cases: example: if n e Z then n^2+n is even every integer is either even or odd case 1: n is even [the solve each case individually] n=2*k n*(n+1) = 2k(2k+1) =2(2k^2+2) p=2k^2+2 n(n+1) = 2p case 2: n is odd n=2*k+1 n*(n+1) = (2k+1)(2k+2) =4k^2+4k+2k+2 =2(2k^2+3k+1) p=2k^2+3k+1  n(n+1) = 2p For quizzes, we need to memorize the definition of odd and even. Division theorem: A a e Z, A b e Z+, E q, r e Z, a=b*q+r ^ 0<=r<b [r is the remainder] [q is quotient] [a is dividend] [b is divisor] example: 23=4*5+3 page 109 # 19 if n^2 is divisible by 5 then n is divisible by 5 CP: if n is not divisible by 5 then n^2 is not divisible by 5 case 1: n=5k+1 n^2=(5k+1)^2 =25k^2+10k+1 =5(5k^2+2k)+1 =5L+1 remainder = 1 not 0 case 2: n=5k+2 n^2=(5k+2)^2 =25k^2+2*5*2k+4 =5(5k^2+4k)+4 =5L+4 remainder = 4 not 0 case 3: n=5k+3 n^2=(5k+3)^2 =25k^2+2*5*3k+9 =5(5k^2+6k+1)+4 =5L+4 remainder = 4 not 0 case 4: n=5k+4 n^2=(5k+4)^2 =25k^2+2*5*4k+16 =5(5k^2+8k+3)+1 =5L+1 Remainder = 1 not 0 will not need to prove something that is not true. Proof by contradiction: show no counterexamples start by assuming a counterexample exists then derive a contradiction.  example: x>0 → n-10>0 counterexample: n=5 contradictions: 0=1 n=2k ^ n is odd example: if n^2 is odd then n is odd CEX: n^2 is odd AND n is even n=2k n^2=4k^2=2(2k^2) n^2=2L  [closed under *] n^2 is even != n^2 is odd done if n^2 is odd then a+b=5 CEX: n^2 = 2k+1 ^ a+b != 5 cannot prove a contradiction Need to show: first part T AND second part F Two things that can derive can be a contradiction, don’t need to contradict the CEX.  Simplest way is to plug in numbers that disprove it. Disproving is often easier.  Proving requires a formal proof. 


Buy Material

Are you sure you want to buy this material for

25 Karma

Buy Material

BOOM! Enjoy Your Free Notes!

We've added these Notes to your profile, click here to view them now.


You're already Subscribed!

Looks like you've already subscribed to StudySoup, you won't need to purchase another subscription to get this material. To access this material simply click 'View Full Document'

Why people love StudySoup

Jim McGreen Ohio University

"Knowing I can count on the Elite Notetaker in my class allows me to focus on what the professor is saying instead of just scribbling notes the whole time and falling behind."

Anthony Lee UC Santa Barbara

"I bought an awesome study guide, which helped me get an A in my Math 34B class this quarter!"

Bentley McCaw University of Florida

"I was shooting for a perfect 4.0 GPA this semester. Having StudySoup as a study aid was critical to helping me achieve my goal...and I nailed it!"


"Their 'Elite Notetakers' are making over $1,200/month in sales by creating high quality content that helps their classmates in a time of need."

Become an Elite Notetaker and start selling your notes online!

Refund Policy


All subscriptions to StudySoup are paid in full at the time of subscribing. To change your credit card information or to cancel your subscription, go to "Edit Settings". All credit card information will be available there. If you should decide to cancel your subscription, it will continue to be valid until the next payment period, as all payments for the current period were made in advance. For special circumstances, please email


StudySoup has more than 1 million course-specific study resources to help students study smarter. If you’re having trouble finding what you’re looking for, our customer support team can help you find what you need! Feel free to contact them here:

Recurring Subscriptions: If you have canceled your recurring subscription on the day of renewal and have not downloaded any documents, you may request a refund by submitting an email to

Satisfaction Guarantee: If you’re not satisfied with your subscription, you can contact us for further help. Contact must be made within 3 business days of your subscription purchase and your refund request will be subject for review.

Please Note: Refunds can never be provided more than 30 days after the initial purchase date regardless of your activity on the site.