Homework 3 參考解答 1. First, let’s clarify what the function max( ( ), ( )) is. Let’s define the function ℎ( ) = max( ( ), ( )). Then ℎ( ) =

( ) if ( ) ≥ ( ), ( ) if ( ) < ( ).

Since ( ) and ( that ( ) ≥ 0 and Thus for ≥ , ( (

) are asymptotically nonnegative, there exists ( ) ≥ 0 for all ≥ . ) + ( ) ≥ ( ) ≥ 0 and ) + ( ) ≥ ( ) ≥ 0. Since for any particular , ℎ( ) is either ( ) or ( ), we have ( ) + ( ) ≥ ℎ( ) ≥ 0, which shows that ℎ( ) = max( ( ), ( )) ≤ ( ( ) + ( )) for all (with

such



= 1 in the definition of Θ).

Similarly, since for any particular , ℎ( ) is the larger of ( ) and have for all ≥ , 0 ≤ ( ) ≤ ℎ( ) and 0 ≤ ( ) ≤ ℎ( ). Adding these two inequalities yields 0 ≤ ( ) + ( ) ≤ 2ℎ( ), or

( ), we

equivalently 0 ≤ ( ( ) + ( )) ≤ ℎ( ), which shows that ℎ( ) = max( ( ), ( )) ≥ (with

=

in the definition of Θ).

( ( ) + ( )) for all



2. To show that ( + ) = Θ(

), we want to find constants

that 0 ≤ ≤( + ) ≤ for all Note that + ≤ +| | ≤2 when | | ≤ , and + ≥ −| | when | | ≤

≥ Thus, when



,

,

> 0 such

.

.

≥ 2| |,

0≤



Since

> 0, the inequality still holds when all parts are raised to the power

0≤(

) ≤ ( + ) ≤ (2 ) ,

0≤( ) Thus,

+

≤2 .

≤( + ) ≤2 =( ) ,

=2 ,

. = 2| | satisfy the definition.

:

3. (a) ( )=

−2 +1≤

exists one solution: Thus,

( )= (

, for all

>

,

>

,

= .

= 1, ).

(b) ( )=

−2 +1≥

= ,

exists one solution: Thus,

( ) = Ω(

, for all = 2.

).

(c) Let the running time be ( ). ( ) ≥ ( ) means that ( ) ≥ ( ) for some function ( ) in the set ( ). This statement holds for any running time ( ), since the function ( ) = 0 for all is in ( ), and running times are always nonnegative. Thus, the statement tells us nothing about the running time.

Homework 3.pdf

Page 1 of 3. Homework 3 參考解答. 1. First, let's clarify what the function max (݂(݊), ݃(݊)) is. Let's define the. function h(݊) = max (݂(݊), ݃(݊)). Then. h(݊) = ൜݂(݊) if ݂(݊) ≥ ݃(݊),. ݃(݊) if ݃(݊) < ݂(݊). Since ݂(݊) and ݃(݊) are asymptotically nonnegative, there exists ݊଴ such. that ݂(݊) ≥ 0 and ݃(݊) ≥ 0 for all ݊ ≥ ݊଴. Thus for ݊ ≥ ݊଴, ݂(݊) ...

71KB Sizes 0 Downloads 235 Views

Recommend Documents

HOMEWORK
Homework​​is one​​of​​the​​options​​parents/legal​​guardians​​have​​to​​support​​their​​child's learning.

Homework 1
Question 3. As you have learnt, a number of hosts using Ethernet, share a single channel and each collision decreases throughput. If hosts on a 6-host 10Mbps 80m Ethernet LAN send frames 64byte long, a. what is the scenario that maximizes throughput

Homework 3
Lecture 6: Programming in R. 1) Load the warpbreaks data set and attach it.* This data set gives the number of warp breaks per loom, where a loom corresponds ...

Homework #1 - GitHub
Please select either bus 2 or 3 as reference bus, calculate the line flows, and check if the results are the same. 2. Come up with a case study of LP, and solve it in ...

Homework Hotline.pdf
Whoops! There was a problem loading more pages. Whoops! There was a problem previewing this document. Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item. Homework Hotline.pdf. Homework Hotline.pdf. Open. Ex

Homework 12 - Magnetism - GitHub
region containing a constant magnetic field B = 2.6T aligned with the positive ... With what speed v did the particle enter the region containing the magnetic field?

Homework Practice - WinningWithLinningMath
of the girls have blue eyes, what fraction of the girls in class have neither blue or brown eyes? 16. PIE Ubi made a banana cream pie. His brother ate. 1. −. 3.

homework
ventus and I was in San Siro Stadium when Inter won the. 'scudetto' with a 5-0 win. 2003 was the first year Valletta qualified for the UEFA. Champions League and the fist game was Valletta versus AC. Milan. Ta' Qali was in a craze when Massimo scored

Homework #4
Returned: Friday, March 25, 2016. 1. Growth of structure with neutrinos. [30 points; 5 points each]. In most of our studies of the matter-dominated era in class, we ...

homework-help.pdf
Page 1 of 22. Alternative Homework Ideas. We compiled this list from ideas collected from the Love and Logic Insider Club. members. Thank you to everyone ...

Homework 2
Recall the unitary group U1 = {z ∈ C | |z| = 1}. Find all the one dimensional continuous complex representations of U1. 5. Let G be a finite group. Let ρ : G −→ GLn(R) be an n-dimensional real representation. Prove that there exists a matrix Ï

Gr5M5 Homework Helper.pdf
Gr5M5 Homework Helper.pdf. Gr5M5 Homework Helper.pdf. Open. Extract. Open with. Sign In. Main menu. Displaying Gr5M5 Homework Helper.pdf. Page 1 of ...

Operating Systems Homework #3 - GitHub
May 14, 2015 - (Integer) Number indicating scheduling algorithm. 27 int policy;. 28. // Enum values for policy. 29 const short FCFS=0, SJF=1, PRIOR=2, RR=3;.

Homework 2.pdf
Self-checkout lines at grocery stores are fairly commonplace these days. Describe what happened to. the demand for cashiers when these devices became ...

CSCI 305 Homework 1 - GitHub
Feb 9, 2018 - 2. What is the name of the paradigm that treats computation as the evaluation of mathematical functions and avoids changing-state and mutable data? (1 pt) a. event-driven b. concurrent c. scripting d. object-oriented e. logic f. imperat

12_09 Homework Solutions
r F. F. F.. AA 15-18 Use a table of values to estimate the limit. Then use a 17. lim 8x-s/e-cx graphing device to confirm your result graphically, i. e." S-. Wr + 41. 's.

Practice Homework Helper
apple. 150 cantaloupe. 1 potato. 1. 6. 7. 8. 9. Problem Solving. 10. The mass of a pen cap is 1 unit. What metric unit, gram or kilogram, was used to measure the ...

CSCI 305 Homework 5 - GitHub
Apr 16, 2018 - The following code fragment uses arrays in Java. The first line declares and allocates an array of two integers. The next two lines initialize it. int[] A = new int[2];. A[0] = 0;. A[1] = 2; f(A[0], A[A[0]]);. Function f is defined as: