Let fand g be functions from the set of integers or thes We say that f ( x ) is 0 ( g (x )), read as "f(x ) is big-c such that | f( x )|sC[g(x)|whenever x>k. (a) Show that f(x) = x² + 2x + 1 is 0(x) Solution:

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
1. Big-O Notation
Let fand g be functions from the set of integers or the set of real numbers to the set of real numbers.
We say that f ( x ) is 0 ( g ( x ) ), read as "f(x)is big-oh of g ( x )", if there are constants C and k
such that | f(x )|sC[g(x)|whenever x > k.
(a) Show that f(x) = x² + 2x + 1 is O(x²)
Solution:
When x>1;
x2
x2
= 4x2
So, for x > 1, x² + 2x + 1 < 4x?
From the definition 0 s f(x) s cg(x) for x21
Hence, for No = 1; c=4; and g(x)=x²
for No = 2; c=3; and g(x)=x²
for No = 3; c=2; and g(x)=x²
Therefore, x² + 2x + 1 = 0(x²)
O(g(x)) = {f(x)|there exist positive constant c and No such that 0 s f(x) s cg(x) for all x2No}
2. Show that 7x2 is 0(x³).
3. Suppose there are x number of boxes to be delivered to x number of household that is 2km
apart, what is the distance travelled by the transport delivery service?
4. In number 3, suppose that each boxes must be coming from the Warehouse and the transport
delivery service must need to back-and-port to pick-up each box. What is the distance
travelled by the transport delivery service?
5. Evaluate the methods used in number 3 and number 4 method of delivery. If the function x² is
considered as the dominant term for each method used.
6. What will happen to the term 2x + 5 of the original function x² + 2x + 5 when compared to the
dominant term which is x². Show a simple analysis for this function.
Transcribed Image Text:1. Big-O Notation Let fand g be functions from the set of integers or the set of real numbers to the set of real numbers. We say that f ( x ) is 0 ( g ( x ) ), read as "f(x)is big-oh of g ( x )", if there are constants C and k such that | f(x )|sC[g(x)|whenever x > k. (a) Show that f(x) = x² + 2x + 1 is O(x²) Solution: When x>1; x2 x2 = 4x2 So, for x > 1, x² + 2x + 1 < 4x? From the definition 0 s f(x) s cg(x) for x21 Hence, for No = 1; c=4; and g(x)=x² for No = 2; c=3; and g(x)=x² for No = 3; c=2; and g(x)=x² Therefore, x² + 2x + 1 = 0(x²) O(g(x)) = {f(x)|there exist positive constant c and No such that 0 s f(x) s cg(x) for all x2No} 2. Show that 7x2 is 0(x³). 3. Suppose there are x number of boxes to be delivered to x number of household that is 2km apart, what is the distance travelled by the transport delivery service? 4. In number 3, suppose that each boxes must be coming from the Warehouse and the transport delivery service must need to back-and-port to pick-up each box. What is the distance travelled by the transport delivery service? 5. Evaluate the methods used in number 3 and number 4 method of delivery. If the function x² is considered as the dominant term for each method used. 6. What will happen to the term 2x + 5 of the original function x² + 2x + 5 when compared to the dominant term which is x². Show a simple analysis for this function.
Expert Solution
steps

Step by step

Solved in 2 steps with 3 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY