Question

In: Computer Science

1. Find the big−O, big−Ω estimate for x7y3+x5y5+x3y7. [Hint: Big-O, big- Θ, and big-Omega notation can...

1. Find the big−O, big−Ω estimate for x7y3+x5y5+x3y7. [Hint: Big-O, big- Θ, and big-Omega notation can be extended to functions in more than one variable. For example, the statement f(x, y) is O(g(x, y)) means that there exist constants C, k1, and k2 such that|f(x, y)|≤C|g(x, y)|whenever x > k1 and y > k2]

2. Find a div b and a mod b when:

(a) a = 30303, b = 333

(b) a = −765432, b = 3827

3. Convert each of the following to their respective Decimal, Octal, Hexadecimal and binary representation

(a) 742)8

(b) (1011)2

(c) (47)10

(d) (3EAC)16

Solutions

Expert Solution

Solution

3)

(a) 742)8

Convert to decimal

To convert octal number 742 to decimal, follow these two steps:

Start from one's place in 742 : multiply ones place with 8^0, tens place with 8^1, hundreds place with 8^2 and so on from right to left

Add all the product we got from step 1 to get the decimal equivalent of 742.

Using the above steps, here is the work involved in the solution for converting 742 to decimal number (Don't forget that we start from ones place to so on...)

Decimal equivalent of "2" = 2 × 8^0 = 2
Decimal equivalent of "4" = 4 × 8^1 = 32
Decimal equivalent of "7" = 7 × 8^2 = 448
Decimal equivalent of "742" = 2+32+448
742 = 482

Here is the final answer, The octal number 742 converted to decimal is therefore equal to:

482

---

Convert to Hexadecimal

First write 742 in binary

7 is 111

4 is 100

2 is 010

742 is 111100010

that is

1 1110 0010

convert back to hexadecimal

1 is 1

1110 is E

0010 is 2

Therefore Answer is

1E2

---

Convert to binary

7 is 111

4 is 100

2 is 010

742 is 111100010

Therefore

Answer is

111100010

---

(b) (1011)2

Convert to decimal

To convert binary number 1011 to decimal, follow these two steps:

Start from one's place in 1011 : multiply ones place with 2^0, tens place with 2^1, hundreds place with 2^2 and so on from right to left

Add all the product we got from step 1 to get the decimal equivalent of 1011.

Using the above steps, here is the work involved in the solution for converting 1011 to decimal number (Don't forget that we start from ones place to so on...)

Decimal equivalent of "1" = 1 × 2^0 = 1
Decimal equivalent of "1" = 1 × 2^1 = 2
Decimal equivalent of "0" = 0 × 2^2 = 0
Decimal equivalent of "1" = 1 × 2^3 = 8
Decimal equivalent of "1011" = 1+2+0+8
1011 = 11

Here is the final answer, The binary number 1011 converted to decimal is therefore equal to:

11

---

Convert to octal

1011

divide into 3bits from the left

1 011

001 011

001 is 1

011 is 3

therefore answer is

13

---

1011 is

B in Hexadecimal

therefore answer is

B

---

(c) (47)10

Convert to Octal

To convert decimal number 47 to octal, follow these steps:

Divide 47 by 8 keeping notice of the quotient and the remainder.

Continue dividing the quotient by 8 until you get a quotient of zero.

Then just write out the remainders in the reverse order to get octal equivalent of decimal number 47.

Using the above steps, here is the work involved in the solution for converting 47 to octal number:

47 / 8 = 5 with remainder 7
5 / 8 = 0 with remainder 5

Then just write down the remainders in the reverse order to get the answer, The decimal number 47 converted to octal is therefore equal to :

57

----

Convert to Hexadecimal

To convert decimal number 47 to hexadecimal, follow these steps:

Divide 47 by 16 keeping notice of the quotient and the remainder.

Continue dividing the quotient by 16 until you get a quotient of zero.

Then just write out the remainders in the reverse order to get hexadecimal equivalent of decimal number 47.

Using the above steps, here is the work involved in the solution for converting 47 to hexadecimal number:

47 / 16 = 2 with remainder 15 (F)
2 / 16 = 0 with remainder 2

Then just write down the remainders in the reverse order to get the answer, The decimal number 47 converted to hexadecimal is therefore equal to :

2F

----

Convert to binary

To convert decimal number 47 to binary, follow these steps:

Divide 47 by 2 keeping notice of the quotient and the remainder.

Continue dividing the quotient by 2 until you get a quotient of zero.

Then just write out the remainders in the reverse order to get binary equivalent of decimal number 47.

Using the above steps, here is the work involved in the solution for converting 47 to binary number:

47 / 2 = 23 with remainder 1
23 / 2 = 11 with remainder 1
11 / 2 = 5 with remainder 1
5 / 2 = 2 with remainder 1
2 / 2 = 1 with remainder 0
1 / 2 = 0 with remainder 1

Then just write down the remainders in the reverse order to get the answer, The decimal number 47 converted to binary is therefore equal to :

101111

---

(d) (3EAC)16

Convert to Decimal

To convert hexadecimal number 3EAC to decimal, follow these two steps:

Start from one's place in 3EAC : multiply ones place with 16^0, tens place with 16^1, hundreds place with 16^2 and so on from right to left

Add all the product we got from step 1 to get the decimal equivalent of 3EAC.

Using the above steps, here is the work involved in the solution for converting 3EAC to decimal number (Don't forget that we start from ones place to so on...)

Decimal equivalent of "C" = (C) 12 × 16^0 = 12
Decimal equivalent of "A" = (A) 10 × 16^1 = 160
Decimal equivalent of "E" = (E) 14 × 16^2 = 3584
Decimal equivalent of "3" = 3 × 16^3 = 12288
Decimal equivalent of "3EAC" = 12+160+3584+12288
3EAC = 16044

Here is the final answer, The hexadecimal number 3EAC converted to decimal is therefore equal to:

16044

---

Convert to Octal

3EAC

First convert to binary

3 is 0011

E is 1110

A is 1010

C is 1100

now write

3EAC is 0011111010101100

now divide into 3 bits from the left

0 011 111 010 101 100

37254

---

Convert to Binary

3 is 0011

E is 1110

A is 1010

C is 1100

3EAC16 = 111110101011002

---

Answered part 3 completely with detailed explanation

all the best


Related Solutions

Find the best possible relationship using one of the notations: O, Ω, Θ, o, ω, for...
Find the best possible relationship using one of the notations: O, Ω, Θ, o, ω, for the following pairs of functions: n 3 + 6n 1.5 + 3100 and n lg8 − 10n 1.6 − 9000; nlgn and n 1.01; 3n and (3.01)n ; 7n and n!. Justify each answer.
I have a function and I was tild to give the big o notation of it...
I have a function and I was tild to give the big o notation of it Analyze the worst-case run-time complexity of the member function reverse() of the List. Give the complexity in the form of Big-O. Your analysis can be informal; however, it must be clearly understandable template <typename T> void List<T>::reverse() { auto current = head; // starting from head node   while(current != nullptr) // till current node is not last (next after last)   {     std::swap(current->next, current->prev); //...
Match the following functions to their respective big-O notation 1. 5 + 0.001n3 + 0.025n 2....
Match the following functions to their respective big-O notation 1. 5 + 0.001n3 + 0.025n 2. 100nlog n + n5 + 100n 3. n2log n + nlog n 4. 2n + n5 + 5n 5. 100n + 0.01n2 A. O(n3) B. O(5n) C. O(n2) D. O(n5) E. O(n2log n)
Let f(x; θ) = θxθ−1 for 0 < x < 1 and θ ∈ Ω =...
Let f(x; θ) = θxθ−1 for 0 < x < 1 and θ ∈ Ω = {θ : 0 < θ < ∞}. Let X1, . . . , Xn denote a random sample of size n from this distribution. (a) Sketch the pdf of X for (i) θ = 1/2, (ii) θ = 1 and (iii) θ = 2. (b) Show that ˆθ = −n/ ln (Qn i=1 Xi) is the maximum likelihood estimator of θ. (c) Determine the...
a. Define Ω(g(n)). b. Express 6n2 + 4n2 logn + 2n3/ 2 + 35 in O-notation....
a. Define Ω(g(n)). b. Express 6n2 + 4n2 logn + 2n3/ 2 + 35 in O-notation. c. Express 4log n + 5n1.63 + 3n in Ω-notation.
How to determine whether the following statements about big-O notation are true or false? (a) Let...
How to determine whether the following statements about big-O notation are true or false? (a) Let f(n) = √ n log n − 4, then f(n) = O(n^ 2) (b) Let f(n) = 4 n + 2 log^ 2 (n), then f(n) = O(log^ 2 (n)) (c) Let f(n) = 5 √ n + 2, then f(n) = Ω(log^ 4 (n)) (d) Let f(n) = 5 n^ 2 + 5 n log n + 4, then f(n) = O(n^3 )...
Please explain what the Big O Notation is in plain English. Please include the logic behind...
Please explain what the Big O Notation is in plain English. Please include the logic behind it and calculations if necessary. I have trouble understanding it, I will be taking a test soon so I will need an easier way to remember it. I use Python btw.
PYTHON Write the time complexity of the code snippets in Big O notation. Also, add one/two...
PYTHON Write the time complexity of the code snippets in Big O notation. Also, add one/two lines to explain your answer. 1a int a = 0, b = 0; for (int i = 0; i< N; i++) {     a = a + i; } for (int j = 0; j < N; j++) {     b = b + j; } 1b bool isPrime(int N) { if (N == 1) return false; for (x = 2; x <= sqrt(N);...
1) Find the critical numbers of the function. f(θ) = 16 cos θ + 8 sin^2 θ
1) Find the critical numbers of the function.  f(θ) = 16 cos θ + 8 sin^2 θ θ=? 2) Find the absolute maximum and absolute minimum values of f on the given interval. f(x) = x/(x^2 − x + 9), [0, 9] 3) f(x) = 3x3 + 4x2 + 7x + 5,    a = 5 (f −1)'(a) = ?
Please find a solution to the following: Δu=0, 1<r<4, 0≤θ<2π u(1,θ)=cos5*θ, 0<θ<2π u(4,θ)=sin4*θ, 0<θ<2π
Please find a solution to the following: Δu=0, 1<r<4, 0≤θ<2π u(1,θ)=cos5*θ, 0<θ<2π u(4,θ)=sin4*θ, 0<θ<2π
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT