Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

SAMPLE: ICS 141 1. Given the following: f ( x) 3 x 2 g ( x) x 2 2 x 1 (0.5) a. Is (x)

SAMPLE: ICS 141 1. Given the following: f ( x) 3 x 2 g ( x) x 2 2 x 1 (0.5) a. Is (x) an onto function from R to R? _______ (0.5) b. Is (x) an one-to-one function from R to R? _______ (0.5) c. Is g(x) an onto function from R to R? _______ (0.5) d. Is g(x) an one-to-one function from R to R? _______ (1) e. Evaluate: f(2) + g(2). Show your work. The correct answer without showing how you found it is worth zero points. (1) f. Evaluate: (f+g)(2). Show your work. The correct answer without showing how you found it is worth zero points. (1) g. Evaluate: (f g)(2). (1) h. Evaluate: (g f)(2). 2. Suppose a network connection can upload at a constant rate of 38kbps and download at a constant rate of 56kbps, where kbps stands for kilobits per second and one kilobit = 1000 bits. Assume that you want to transfer a 39.6 MB file, where MB stands for megabytes and there are 1,000,000 bytes in a megabyte and 8 bits in one byte. (1) a. How many complete seconds are required to download the file? (1) b. How many complete seconds are required to upload the file? (6)3. Evaluate: 2 i 3i 2 6 i 4 3 i i 1 3 2i 4 4 i 3 j 2 3i 2 j (2) 4. Find terms a1, a2 of the sequence an = 3n2 + 1 (1) 5. Find c,k to show f(n) = 4n + 3 is O(n). (1) 6. Find c,k to show f(n) = 6n2 + 3 is O(n2). (1) 7. Find the Order of Growth of the algorithm. Procedure Foo(a1, a2, ..., an: distinct integers) even := 0; odd := 0; for x:=1 to n for y:= n downto 1 begin sum := ax + ay if (sum mod 2 = 0) even := even + 1; else odd := odd + 1; end end if (even > odd) return even; else return odd; (1) 8. Find the Order of Growth of the Algorithm. Procedure Foo(x: integer; a1, a2, ..., an: distinct integers) Low := 0; High := n; mid := (low + high) / 2; while (amid != x) begin if (x > amid) low := mid; else high := mid - 1; mid := (low + high) / 2; end return mid

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Statistical Inference

Authors: George Casella, Roger L. Berger

2nd edition

0534243126, 978-0534243128

More Books

Students also viewed these Mathematics questions