Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Exam (elaborations)

EECS 1028 Final Exam York University EECS 1028

Rating
-
Sold
-
Pages
3
Grade
A+
Uploaded on
11-04-2023
Written in
2022/2023

MATH/CSE 1019 Final Examination Fall 2011 December 17, 2011 Instructor: S. Datta 1. (2 points) Evaluate the infinite geometric series 9 10 + 9 100 + 9 1000 + . . . Note that the left hand side is 0.99 . . .. Use the answer above to fill in the blank below Solution: This is a geometric series with a = 0.9 and r = 0.1. So the infinite sum is a 1−r = 0.9 1−0.1 = 1. 0.99 . . . = 1. 2. (2 points) Express the following statement in predicate logic: “given any 2 distinct rational numbers, there exists a rational number between them in value”. Solution: Make the domain Q, the set of rational numbers. Then, the given statement is ∀x∀y[(x 6= y) → (∃z(x z y) ∨ (x z y))]. 3. (2 points) Prove that if f : Z + → Z, f(n) = n 2 − 100n then f(n) ∈ Ω(n 2 ). Solution: Note that n 2 − 100n ≥ n 2/2 if n ≥ 200. So we use n0 = 200, c = 0.5 in the definition of Ω(n 2 ) and thus f(n) ∈ Ω(n 2 ). 4. (2 points) What is the negation of ∀x∃yP(x) → Q(y). Your answer should not have negation symbols before quantifiers and no implication symbols. Solution: First we rewrite the given statement as ∀x∃y(¬P(x) ∨ Q(y)). Then we can negate this in the usual way and get ∃x∀y(P(x) ∧ ¬Q(y)) 5. (2 points) Write down the function that the following recursive algorithm computes and give a 1-sentence justification for your answer. Assume that n is a positive integer. Mystery(n) 1 if n = 1 2 then return 1 3 else return (n + Mystery(n − 1)) Solution: The program computes Pn i=1 = n(n+1) 2 . Each recursive call adds the previous number, stopping at 1, so it computes the sum n+ (n−1)+. . .+ 2+ 1. 6. (3 points) Prove using induction the inequality n 2 n for all n = 0, n ∈ Z. Solution: We check that it is true for n = 0, 1 and then prove the rest using induction. It holds for n = 0, 1 because 0 2 0 = 1 and 1 2 1 = 2. Base Case (n = 2): True because 2 2 2 = 4. Inductive Step: Assume the statement is true for n = k. So k 2 k . Now for n = k + 1 we have RHS = 2k+1 = 2 ∗ 2 k 2k k + 1 for al

Show more Read less
Institution
Course

Content preview

MATH/CSE 1019 Final Examination
Fall 2011
December 17, 2011
Instructor: S. Datta
1. (2 points) Evaluate the infinite geometric series
9 9 9
+ + + ...
10 100 1000
Note that the left hand side is 0.99 . . .. Use the answer above to fill in the blank below
a 0.9
Solution: This is a geometric series with a = 0.9 and r = 0.1. So the infinite sum is 1−r = 1−0.1 = 1.
0.99 . . . = 1.

2. (2 points) Express the following statement in predicate logic: “given any 2 distinct rational numbers, there
exists a rational number between them in value”.
Solution: Make the domain Q, the set of rational numbers. Then, the given statement is
∀x∀y[(x 6= y) → (∃z(x < z < y) ∨ (x > z > y))].


3. (2 points) Prove that if f : Z+ → Z, f (n) = n2 − 100n then f (n) ∈ Ω(n2 ).
Solution: Note that n2 − 100n ≥ n2 /2 if n ≥ 200. So we use n0 = 200, c = 0.5 in the definition of Ω(n2 )
and thus f (n) ∈ Ω(n2 ).

4. (2 points) What is the negation of ∀x∃yP (x) → Q(y). Your answer should not have negation symbols
before quantifiers and no implication symbols.
Solution: First we rewrite the given statement as ∀x∃y(¬P (x) ∨ Q(y)). Then we can negate this in the
usual way and get
∃x∀y(P (x) ∧ ¬Q(y))



5. (2 points) Write down the function that the following recursive algorithm computes and give a 1-sentence
justification for your answer. Assume that n is a positive integer.
Mystery(n)
1 if n = 1
2 then return 1
3 else return (n + Mystery(n − 1))

Pn n(n+1)
Solution: The program computes i=1 = 2 .
Each recursive call adds the previous number, stopping at 1, so it computes the sum n + (n − 1) + . . . + 2 + 1.

6. (3 points) Prove using induction the inequality n < 2n for all n >= 0, n ∈ Z.
Solution: We check that it is true for n = 0, 1 and then prove the rest using induction. It holds for n = 0, 1
because 0 < 20 = 1 and 1 < 21 = 2.
Base Case (n = 2): True because 2 < 22 = 4.
Inductive Step: Assume the statement is true for n = k. So k < 2k . Now for n = k + 1 we have
RHS = 2k+1
= 2 ∗ 2k
> 2k
> k + 1 for all k > 1.




This study source was downloaded by 100000850872992 from CourseHero.com on 04-10-2023 23:40:20 GMT -05:00


https://www.coursehero.com/file/11940534/EECS-1028-Final-Exam/

Written for

Course

Document information

Uploaded on
April 11, 2023
Number of pages
3
Written in
2022/2023
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

$8.49
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
ExamsConnoisseur Self
Follow You need to be logged in order to follow users or courses
Sold
587
Member since
3 year
Number of followers
344
Documents
1492
Last sold
1 week ago

4.2

68 reviews

5
40
4
11
3
13
2
1
1
3

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions