cs70 hw1

7
Ryan Ma cs70-ade hw1 Section 101 No partners Number 1 A bell curve around 0.

Upload: ryan-ma

Post on 20-Nov-2015

212 views

Category:

Documents


0 download

DESCRIPTION

hw

TRANSCRIPT

Ryan Macs70-adehw1Section 101No partners

Number 1 A bell curve around 0.

Number 2 Sahai's second favorite mathematician? A human named Gauss.

Number 31, 2, and 4 are true. The only way for an implication to be false is if our hypothesis of the implication is true while the conclusion is false. For number 1, both the hypothesis and conclusion are both true because both 30 and 40 are divisible by 10. The hypothesis of number 2 (30 is divisible by 9) is false but 40 is divisible by 10. This turns out to be not only true but vacuously true. Another way to say this is 30 is not divisible by 9 or 40 is divisible by 10, making the statement true. Number 4 is also vacuously true because the hypothesis is false. But if we put it in another way, we can say that 30 is not divisible by 9, making this statement true. Number 3 is false because 30 is divisible by 10 but 40 is not divisible by 9, making the statement become false.

Number 4A. A BCDZ

1 1110

11100

11000

10001

11010

10110

10101

10010

00001

00010

00110

01110

01010

00101

01000

01010

B. 00011110

001001

010000

110000

101001

C. (B D)

D. (A B C D)(A BC D)(A B C D)(A BC D) = (A BD) (A B D)= (B D)

Number 5. A. We assume that n is any natural number and that n^2 is even. By definition, n^5 = n^2 * n^2 * n = 2n^2 * n = 2n^3. Therefore by definition, n^5 is an even number. We used a direct proof.

B. We assume that n is any natural number. Using a direct proof, we can simplify the equation from n^2 - n + 3 to n(n-1)+3. Since n(n+1) is always an even number, adding 3 to an even number will always produce an odd number. Thus n^2 - n + 3 is odd. C. We assume that x and y are real numbers. In order for x and y to have a sum greater than 20, at least x or y will need to be greater than 10. Let's prove this through a case. Suppose we have x+y = 30 > 20. In order for this to be true, x has to be at least 15 and y has to be at least 15. Either x or y can be less than 15, but at least one of them has to be greater than 15 in order for this to be true. Since these cases are true, we can conclude that at least x or y has to be greater than 10 so that x+y 20.

D. Lets prove this by a case. Let r equal an irrational number 2. When square, r2 = (2)2 = 2. However this means that r2 is rational. Here we have shown through a case that if r is irrational, it doesnt always mean that r2 is irrational.

Number 6A. For any A in a group of n=5, A has four connections. A can have be strangers to all 4 connections, have 1 friend, two friends, three friends, or four friends. But in the case where A has 2 friends, A also has 2 strangers. If A has friends B and C, then A has two connections that are strangers. So this means that not all cases with groups of 5 will have 3 people that are all friends or strangers.

B. For any A in a group of n=6, A has five connections, either friends or strangers. But at least 3 connections to A must be friends (or strangers but let's stick with friends here). Let's say that B, C, and D are friends with A. As of now, we don't know if B, C, and D are friends. But if there exists BC, CD, or BD (let's say B and C are also friends), that means there is a cycle between A, B, C and thus a group of 3 people that are friends. But if BC, CD, or BD are strangers to each other, then that means that there exists a cycle that B, C, and D are a group of 3 that are strangers.

Number 7 A. You take one coin from the first bag and label it 1. Take two coins from the second bag and label each 2. Keep going until we reach 10 coins from 10 bags each labeld with 10. Then we weigh them all together. Let's call this total the observed total. The expected total for all these coins would be (1x10) + (2x10) + (3x10) + ... + (10x10) = 550 grams. Now we subtract the expected total from the observed total to get the difference. To determine which bag has the fake coins, we take the difference and multiply it by 100 to get the bag number that is bad.

B. Let's first assume that we the third bag is the bag with fake coins. Take one coin from the first bag, then two from the second bag, three from the third, four from the fourth, and so on until we get ten coins from the tenth bag. Keeping in mind that there is three coins in this pile that are bad, we add them up, which gives us a total of 550.003 grams. The expected total is the sum of all the coins in this sequence without any variance, which is 550 grams. Now we take the difference of the expected total from the observed total: 550.003 - 550 = 0.003. To make this into an integer, we multiply this difference by 100 to get 0.003 x 100 = 3, thus we proved by case that the third bag is the bad bag.

Number 8Our base case is that n = 3. 2^3 = 8 > 2(3) + 1 = 7. 8 > 7 thus the base case is true. Now let's assume true for some k where k > 2. Now let's try to prove the next number k+1: 2^(k+1) > 2(k+1) + 1.2(2^k) > 2k + 3Since we know that 2^k is greater than 2(k+1), we can substitute 2^k to make:2(2k+1) > 2k + 34k + 2 > 2k + 32k > 1 k > 1/2Since we assumed that k > 2, when k > 1/2, all the possible outcomes for k > 2 is in k > 1/2.

B. For our base case, let n = 0. When n=0, 0 = 0. Let n = 1. For n = 1 is also true because (2*1 - 1)^3 = 1 = 1(1). Suppose 1^3 + 3^3 + 5^3 + ...+ (2k-1)^3 = k^2(2k^2-1) is true for some k. Now we prove that this is true for n = k+1: (2(k+1)-1)^3 = (k+1)^2(2(k+1)^2-1)(2k + 2 -1)^3 = (k^2 + 2k + 1)(2(k^2+2k+1) - 1)(2k+1)^3 = (k^2+2k+1)(2k^2+4k+1)8k^3 + 12k^2 + 6k + 1 = 2k^4 + 8k^3 + 11k^2 + 6k + 112k^2 = 2k^4 + 11k^20 = 2k^4 - k^21^3+3^3 + 5^3 + ...(2k-1)^3 = k^2(2k^2 - 1)0 = 0We see that the this equation is equal to our assumption.

C. For n=0, the equation is true, since 19/12 can be divided by 19. Suppose (5/4)8^k +3^(3k1) is divisible by 19 for some k. Now we prove that this is true for n = k+1:(5/4)8^(k+1) +3^(3(k+1)1) = (5/4)*8^(k+1) + 3^(3k+2)= (5/4)*8k*8+ (33k-1)27= (8)(5/4)(8k) + (8+19)(33k-1)= (8)(5/4)(8k) + 8(33k-1) + 19(33k-1)= 8((5/4)(8k) + (33k-1)) + 19(33k-1)At this point, we see that (5/4)(8k) + (33k-1)) can be substituted by 19k because we know that (5/4)(8k) + (33k-1)) is divisible by 19, making (5/4)(8k) + (33k-1)) = 19k. Now we have:= 8(19k) + 19(33k-1)= 19(8k + 33k-1)

Number 9Prove by induction that for all natural numbers n, n^3 n is divisible by 3.

Solution:Base case: Let n = 0. 0^3 0 / 3 = 0, which is clearly true. Now suppose that k^3 k is divisible by 3 for some k is true.Now we must prove that this is true for k+1:(k+1)^3 (k+1) = k^3 + 3k^2 + 3k + 1 k 1= (k^3 k) + 3k^2 + 3k By the inductive hypothesis, we can substitute some integer divisible by 3 (say 3x) for (k^3 k). = 3x + 3k^2 + 3k= 3(x + k^2 + k)Thus by the principle of induction, n^3 n is divisible by 3.

Number 10I have verified that the registration information for my EECS 70 instructional account cs70-ade is complete and correct.