The recursion tree is log2m and has log2m nodes .
A recursive algorithm calls itself with smaller input values and returns the result for the current input by carrying out basic operations on the returned value for the smaller input.
A iterative method is a mathematical procedure that uses an initial value to generate a sequence of improving approximate solutions for a class of problems, in which the n-th approximation is derived from the previous ones.
In the analysis of algorithms, the master theorem for divide-and-conquer recurrences provides an asymptotic analysis for recurrence relations of types that occur in the analysis of many divide and conquer algorithms.
Two integers x and y are given. x and y require n bit and m bit respectively. Two algorithms to compute x y need to be analyzed.
Iterative: The pseudocode for this algorithm is as follows.
product = x;
for i = 2 to y do
product = product * x
The result after the multiplication of two integers, one p bits long and another one q bits long requires p q bits to to store. Therefore, for a given i , we are multiplying one ( i − 1)n bits long integer with an n bit long integer. This multiplication cost is ( i − 1)n2 .
The resulting number after the multiplication is i.n bits long. Thus
adding up all the multiplication cost we get
n2 + 2n2 + 3n2 + . . . + (y − 1)n2. Thus the complexity of the iterative algorithm is O(n2y2) which exponential in
the input length of y which is m = log2 y.
Recursive: The pseudocode for this algorithm is as follows:
function recursive (x ,y)
if y is even then return (x(by2c))2
if y is odd then return x ∗ (x(by2)c)2.
Computing (x(by2c))2
requires a multiplication involving two y2
n bits integers. The cost of this operation is y24.n2 which is O(y2n2). The recurrence relation for this
recursive routine is
T(y) = O(n) when y is 1-bit long.
T(y) = T(y2) + O(y2n2) otherwise.
Applying the Master Theorem we can conclude that T(y) ∈ O(y2n2). The height
of the recursion tree is log2m and has log2m nodes.
Thus both the algorithms have the same worst case complexity.
To know more about integers visit:
brainly.com/question/15276410
#SPJ4
Two integers x and y are given. x and y require n bit and m bit respectively. Two algorithms to compute x y need to be analyzed.
product = x;
for i = 2 to y do
product = product * x
The result after the multiplication of two integers, one p bits long and another one q bits long requires p q bits to to store. Therefore, for a given i , we are multiplying one ( i − 1)n bits long integer with an n bit long integer. This multiplication cost is ( i − 1)n2 .
n2 + 2n2 + 3n2 + . . . + (y − 1)n2. Thus the complexity of the iterative algorithm is O(n2y2) which exponential in
the input length of y which is m = log2 y.
function recursive (x ,y)
if y is even then return (x(by2c))2
if y is odd then return x ∗ (x(by2)c)2.
Computing (x(by2c))2
requires a multiplication involving two y2
n bits integers. The cost of this operation is y24.n2 which is O(y2n2). The recurrence relation for this
recursive routine is
T(y) = O(n) when y is 1-bit long.
T(y) = T(y2) + O(y2n2) otherwise.
Thus both the algorithms have the same worst case complexity.
The graph of a function is shown on the coordinate plane below.
Which statement correctly describes the function on a given interval?
Answer: D
Step-by-step explanation:
I did it
The statement that correctly describes the function is:
The function is decreasing and nonlinear from x = 4 to x = 11.
Option D is the correct answer.
What is a function?A function has an input and an output.
A function can be one-to-one or onto one.
It simply indicated the relationships between the input and the output.
Example:
f(x) = 2x + 1
f(1) = 2 + 1 = 3
f(2) = 2 x 2 + 1 = 4 + 1 = 5
The outputs of the functions are 3 and 5
The inputs of the function are 1 and 2.
We have,
From the graph,
We see that,
The function is increasing and nonlinear from x = -7 to x = -4.
The function is constant and linear from x = -4 to x = 1.
The function is increasing and nonlinear from x = 1 to x = 4.
The function is decreasing and nonlinear from x = 4 to x = 11.
Thus,
The function is decreasing and nonlinear from x = 4 to x = 11.
Learn more about functions here:
https://brainly.com/question/28533782
#SPJ2
Courtney made a 5.5 foot ramp
to help her dog get in her minivan.
If the back of her van is 3 feet
from the ground, what will be the
angle of elevation from the base of
the ramp to the van?
9514 1404 393
Answer:
33°
Step-by-step explanation:
We assume the 5.5 foot measurement is the length of the ramp surface. It will be the hypotenuse of a right triangle with the 3 ft side opposite the angle of interest. The applicable relationship is ...
Sin = Opposite/Hypotenuse
sin(angle) = (3 ft)/(5.5 ft)
angle = arcsin(3/5.5) ≈ 33.0°
The angle of elevation of the ramp is about 33°.
Find the volume of the cylinder to the nearest tenth
Answer:
1131 m^3
Step-by-step explanation:
Formula is π r^2h
then substitute the values r=6,h=10
1130.97
then round the number by nearest tenth.
which is 1131.
Evaluate the following for f(x) = 3(2)^x
1. f (2) =
2. f (-1) =
3. f (10) =
Answer:
1. f (2) = 3 x 2^x-1
2. f (-1) = -3 x 2^x
3. f (10) = 3 x 2^x/10
Step-by-step explanation:
A box of chocolates was shared evenly between 5 people. Each person received 4 chocolates.
How many chocolates were in the box?
Answer:
20
Step-by-step explanation:
5x4=20
plz give me a thx! IF I HELPED :)
Determine if the representation below is an example of a function or not a function (1,3), (3,3), (4,5), (6,5), (7,7), (9,7)
Answer:
Yes.
Step-by-step explanation:
No x value is used twice.
Class intervals in a grouped frequency distribution are given as 4−11, 12−19, 20−27, 28−35, 36−43. Write the next two class intervals.
i) what is the each class interval?
ii) write the class boundaries of all classes?
iii) what are the class marks of each class?
Answer:
{44-55}{52- 59 } are the last two interval sStep-by-step explanation:
To get the class boundaries deduct 0.5 from the first number and add 0.5 to the second number = 4-0.5 = 3.5 = 11.5 + 0.5 = 11.5 = 3.5 -11.5 as in the fish class boundary .same for all other boundariesPls help need help with answer b
Answer:
Field hockey has a higher variation of heights.
There is more of a difference between the different heights in field hockey.
For positive acute angles A and B, it is known that sin A = 8/17 and cos B = 24/25
Find the value of sin(A + B) in simplest form.
Answer:
Step-by-step explanation:
Here we use the SUM FORMULA: sin(a + b) = sin a cos b + cos a sin b
sin(A + B) = sin A*cos B + cos A*sin B. We are not given cos A or sin B and so must find them using the Pythagorean Theorem x^2 + y^2 = z^2.
Looking at sin A = 8/17, we see that the "opposite side" is 8 and the "hypotenuse" is 17. Then (adjacent side) = √(17² - 8²) = 15; that is, the side adjacent to Angle A is 15. Thus, cos A = 15/17 and sin A = 8/17.
We find sin B similarly. cos B = (side adjacent to B)/25 = 24/25. Therefore the side opposite B is √(25² - 24²) = 7. Thus, sin B = 7/25 and cos B = 24/25.
Then sin (A + B) = sin A*cos B + cos A*sin B
= (8/17)*(24/25) + (15/17)(7/25)
Here there are two products of fractions. This product (above) can be rewritten as
8(24) + 15(7) (3)(64) + (3)(5)(7)
= sin A*cos B + cos A*sin B = --------------------------- = --------------------------
17(25) 17(25)
What is the Area of the right angle
Answer:
141.96
Step-by-step explanation:
The area or solution for the area of a triangle is base* height divided by 2 so what I did was 31.2cm as the base and 9.1 as the height and I multiplied them together and then I divided by 2! Hope this helped!
Please Help!, Brainliest to whoever helps
how much greater is 620,000 than 62?
Answer:
10,000
Step-by-step explanation:
620,000/62 = 10,000
Jeremiah wants to send some of his shirts to a dry cleaner. he usually takes his clothes to Spot-Less Dry cleaners, where he pays $4.50 per shirt. He sees a sign at No Mess or Stress Dry Cleaners that says it's $21.00 to have 4 shirts cleaned. Which is the better deal?
answer:spot-less
Step-by-step explanation:
21.00 divided by 4 is 5.25 so you'd be payingmore at "no mess or stress dry"
PLEASE HELP ASAP!!!! GOING TO GIVE 30 POINTS
Answer:
The second answer option
Step-by-step explanation:
Lmk if you need explanation
Let A = {a, b, c}, B = {b, c, d}, and C = {b, c, e}. (a) Find A ∪ (B ∩ C), (A ∪ B) ∩ C, and (A ∪ B) ∩ (A ∪ C). (Enter your answer in set-roster notation.) A ∪ (B ∩ C) = (A ∪ B) ∩ C = (A ∪ B) ∩ (A ∪ C) = Which of these sets are equal? A ∪ (B ∩ C) = (A ∪ B) ∩ (A ∪ C) (A ∪ B) ∩ C = (A ∪ B) ∩ (A ∪ C) A ∪ (B ∩ C) = (A ∪ B) ∩ C (b) Find A ∩ (B ∪ C), (A ∩ B) ∪ C, and (A ∩ B) ∪ (A ∩ C). (Enter your answer in set-roster notation.) A ∩ (B ∪ C) = (A ∩ B) ∪ C = (A ∩ B) ∪ (A ∩ C) = Which of these sets are equal? A ∩ (B ∪ C) = (A ∩ B) ∪ C (A ∩ B) ∪ C = (A ∩ B) ∪ (A ∩ C) A ∩ (B ∪ C) = (A ∩ B) ∪ (A ∩ C) (c) Find (A − B) − C and A − (B − C). (Enter your answer in set-roster notation.) (A − B) − C = A − (B − C) = Are these sets equal? Yes No
Answer:
(a)
[tex]A\ u\ (B\ n\ C) = \{a,b,c\}[/tex]
[tex](A\ u\ B)\ n\ C = \{b,c\}[/tex]
[tex](A\ u\ B)\ n\ (A\ u\ C) = \{b,c\}[/tex]
[tex](A\ u\ B)\ n\ C = (A\ u\ B)\ n\ (A\ u\ C)[/tex]
(b)
[tex]A\ n\ (B\ u\ C) = \{b,c\}[/tex]
[tex](A\ n\ B)\ u\ C = \{b,c,e\}[/tex]
[tex](A\ n\ B)\ u\ (A\ n\ C) = \{b,c\}[/tex]
[tex]A\ n\ (B\ u\ C) = (A\ n\ B)\ u\ (A\ n\ C)[/tex]
(c)
[tex](A - B) - C = \{a\}[/tex]
[tex]A - (B - C) = \{a,b,c\}[/tex]
They are not equal
Step-by-step explanation:
Given
[tex]A= \{a,b,c\}[/tex]
[tex]B =\{b,c,d\}[/tex]
[tex]C = \{b,c,e\}[/tex]
Solving (a):
[tex]A\ u\ (B\ n\ C)[/tex]
[tex](A\ u\ B)\ n\ C[/tex]
[tex](A\ u\ B)\ n\ (A\ u\ C)[/tex]
[tex]A\ u\ (B\ n\ C)[/tex]
B n C means common elements between B and C;
So:
[tex]B\ n\ C = \{b,c,d\}\ n\ \{b,c,e\}[/tex]
[tex]B\ n\ C = \{b,c\}[/tex]
So:
[tex]A\ u\ (B\ n\ C) = \{a,b,c\}\ u\ \{b,c\}[/tex]
u means union (without repetition)
So:
[tex]A\ u\ (B\ n\ C) = \{a,b,c\}[/tex]
Using the illustrations of u and n, we have:
[tex](A\ u\ B)\ n\ C[/tex]
[tex](A\ u\ B)\ n\ C = (\{a,b,c\}\ u\ \{b,c,d\})\ n\ C[/tex]
Solve the bracket
[tex](A\ u\ B)\ n\ C = (\{a,b,c,d\})\ n\ C[/tex]
Substitute the value of set C
[tex](A\ u\ B)\ n\ C = \{a,b,c,d\}\ n\ \{b,c,e\}[/tex]
Apply intersection rule
[tex](A\ u\ B)\ n\ C = \{b,c\}[/tex]
[tex](A\ u\ B)\ n\ (A\ u\ C)[/tex]
In above:
[tex]A\ u\ B = \{a,b,c,d\}[/tex]
Solving A u C, we have:
[tex]A\ u\ C = \{a,b,c\}\ u\ \{b,c,e\}[/tex]
Apply union rule
[tex]A\ u\ C = \{b,c\}[/tex]
So:
[tex](A\ u\ B)\ n\ (A\ u\ C) = \{a,b,c,d\}\ n\ \{b,c\}[/tex]
[tex](A\ u\ B)\ n\ (A\ u\ C) = \{b,c\}[/tex]
The equal sets
We have:
[tex]A\ u\ (B\ n\ C) = \{a,b,c\}[/tex]
[tex](A\ u\ B)\ n\ C = \{b,c\}[/tex]
[tex](A\ u\ B)\ n\ (A\ u\ C) = \{b,c\}[/tex]
So, the equal sets are:
[tex](A\ u\ B)\ n\ C[/tex] and [tex](A\ u\ B)\ n\ (A\ u\ C)[/tex]
They both equal to [tex]\{b,c\}[/tex]
So:
[tex](A\ u\ B)\ n\ C = (A\ u\ B)\ n\ (A\ u\ C)[/tex]
Solving (b):
[tex]A\ n\ (B\ u\ C)[/tex]
[tex](A\ n\ B)\ u\ C[/tex]
[tex](A\ n\ B)\ u\ (A\ n\ C)[/tex]
So, we have:
[tex]A\ n\ (B\ u\ C) = \{a,b,c\}\ n\ (\{b,c,d\}\ u\ \{b,c,e\})[/tex]
Solve the bracket
[tex]A\ n\ (B\ u\ C) = \{a,b,c\}\ n\ (\{b,c,d,e\})[/tex]
Apply intersection rule
[tex]A\ n\ (B\ u\ C) = \{b,c\}[/tex]
[tex](A\ n\ B)\ u\ C = (\{a,b,c\}\ n\ \{b,c,d\})\ u\ \{b,c,e\}[/tex]
Solve the bracket
[tex](A\ n\ B)\ u\ C = \{b,c\}\ u\ \{b,c,e\}[/tex]
Apply union rule
[tex](A\ n\ B)\ u\ C = \{b,c,e\}[/tex]
[tex](A\ n\ B)\ u\ (A\ n\ C) = (\{a,b,c\}\ n\ \{b,c,d\})\ u\ (\{a,b,c\}\ n\ \{b,c,e\})[/tex]
Solve each bracket
[tex](A\ n\ B)\ u\ (A\ n\ C) = \{b,c\}\ u\ \{b,c\}[/tex]
Apply union rule
[tex](A\ n\ B)\ u\ (A\ n\ C) = \{b,c\}[/tex]
The equal set
We have:
[tex]A\ n\ (B\ u\ C) = \{b,c\}[/tex]
[tex](A\ n\ B)\ u\ C = \{b,c,e\}[/tex]
[tex](A\ n\ B)\ u\ (A\ n\ C) = \{b,c\}[/tex]
So, the equal sets are:
[tex]A\ n\ (B\ u\ C)[/tex] and [tex](A\ n\ B)\ u\ (A\ n\ C)[/tex]
They both equal to [tex]\{b,c\}[/tex]
So:
[tex]A\ n\ (B\ u\ C) = (A\ n\ B)\ u\ (A\ n\ C)[/tex]
Solving (c):
[tex](A - B) - C[/tex]
[tex]A - (B - C)[/tex]
This illustrates difference.
[tex]A - B[/tex] returns the elements in A and not B
Using that illustration, we have:
[tex](A - B) - C = (\{a,b,c\} - \{b,c,d\}) - \{b,c,e\}[/tex]
Solve the bracket
[tex](A - B) - C = \{a\} - \{b,c,e\}[/tex]
[tex](A - B) - C = \{a\}[/tex]
Similarly:
[tex]A - (B - C) = \{a,b,c\} - (\{b,c,d\} - \{b,c,e\})[/tex]
[tex]A - (B - C) = \{a,b,c\} - \{d\}[/tex]
[tex]A - (B - C) = \{a,b,c\}[/tex]
They are not equal
how can I subtract 9 2/5 - 8 4/5
Answer:
0.6
Step-by-step explanation:
First make them into decimals so.
9.4 - 8.8 = 0.6
Step-by-step explanation:
okay so let's convert this from mixed to improper fraction
9 2/5= 47/5
8 4/5= 44/5
47/5-44/5= 3/5
What does not contribute to the destruction of the rainforest in Brazil? farming and ranching cutting down trees to sell the wood constructing a highway having heavy rains
Answer:
heavy rains
Step-by-step explanation:
it makes the forest grow!!1!!1!!!!11111!1!!
What are the next 4 multiples of 4/8 in a fraction
Answer:
8/16, 12/24, 16/32, and 20/45
Step-by-step explanation:
write an exponential formula of the form f (t)= a×b^t to represent the following situation. assume t is in years. The beginning population is 27, 000, decreasing by 3.5% annually. f(t)=__________
Answer:
[tex]f(t)= 27000 * 0.965^t[/tex]
Step-by-step explanation:
Given
[tex]a = 27000[/tex] -- initial
[tex]r = 3.5\%[/tex]
Required
The exponential equation
The exponential equation is
[tex]y =ab^t[/tex]
Where
[tex]b=1 -r[/tex]
We used minus, because the rate decreases..
So, we have:
[tex]b=1 -3.5\%[/tex]
[tex]b=1 -0.035[/tex]
[tex]b=0.965[/tex]
So:
[tex]y =ab^t[/tex]
[tex]y = 27000 * 0.965^t[/tex]
Hence:
[tex]f(t)= 27000 * 0.965^t[/tex]
LM is 3x, MN is 2x+2. M is the midpoint of LN. What is LM?
Answer:
1/2
Step-by-step explanation:
3x=(1/2)(2x+2)
3x=x+1
3x-x=x-x+1
2x=1
x=1/2
SOMEONE PLEASE HELP ME
There are 72 items on Ginny's bookshelf. of the items are hardcover books, 3 Imtia of the items are softcover books. 9 • The remaining items are DVDs. How many DVDs are on Ginny's shelf?
Answer:
There are 60 dvds.
Step-by-step explanation:
72 - 3 - 9 = 60
4. Find PQ
N
Р
5x + 16
S
R.
9x - 32
Q
Answer on= 12
Step-by-step explanation:
The value of PQ in rhombus NPQR is 76 units.
The figure above is a rhombus.
Properties of a rhombus:All the sides are equal opposite angles are equalThe diagonal are perpendicular bisector of each other.Therefore,
PQ = NR = NP = RQ
5x + 16 = 9x - 32
5x - 9x = -32 - 16
-4x = -48
x = -48 / -4
x = 12
PQ = 5(12) + 16 = 60 + 16 = 76 units
learn more on rhombus here: https://brainly.com/question/25278931?referrer=searchResults
The chemical element einsteinium -253 naturally loses its mass over time . A sample of einsteinium-253 had an initial mass of 320 grams when we measured it. The relationship between the elapsed t, in days, and the mass,m(t), in grams left in the sample is modeled by the following function: M(t)=320•(0.125)^t/61.4 complete the sentence: the sample loses 87.5% of its mass every ___ days.
Answer: 61.4
Step-by-step explanation:
One bar of candy A and two bars of candy B
have 767 calories. Two bars of candy A and
one bar of candy B contain 775 calories. Find
the caloric content of each candy bar.
I'm not 100% sure, but imma have a go.
Answer:
a = 261; b = 253
Step-by-step explanation:
label candy bar A as a
label candy bar B as b
Make 2 equations.
2b + a = 767 (1)
b + 2a = 775 (2)
Solve for a in (1)
2b + a = 767 (-2b)
a = -2b + 767
Substitute for into (2)
b + 2( -2b + 767 ) = 775 (flip)
2( -2b + 767 ) + b = 775 (solve)
−4b + 1534 + b = 775 (add b)
-3b + 1534 = 775 (subtract 1534 from both sides)
−3b = −759 (divide both sides by 3)
b = 253
Substitute b into (1)
a = -2b + 767 (substitute)
a = -2 (253) + 767 (solve)
a = -506 + 767 (add)
a = 261
Sara uses 9.3 pints of white paint and blue paint to paint her bedroom walls.
3/5 of this amount is white paint, and the rest is blue paint. How many pints of blue paint did she use to paint her bedroom walls?
Answer:2.65
Step-by-step explanation:
The answer is 2.65
Find the value of x in the triangle shown below 8 10
Answer:
x = 6
Step-by-step explanation:
pythagorean theorem
a^2 = c^2 - b^2
a^2 = 10^2 - 8^2
a^2 = 100 - 64
a^2 = 36
sqrt a^2 = sqrt 36
a = 6
CHECK:
6^2 + 8^2 = 10^2
36 + 64 = 100
yes.
which of the following is a example of a proportional relationship
*photo is down there
show proof for brainliest
Answer:
The third one
Step-by-step explanation:
You multiply x by 6 to get y. 1x6=6, 2x6=12, 3x6=18.
Find the sum of these
Step-by-step explanation:
5x² - 8x + 2 + x² - 6x +3
= 6x²- 14x + 5
pls help me and I will mark u as brainliest plsssss plsssss please answer momoo anyone
true or false
1) m<1=50 degrees
2) m<2=130 degrees
3) y=26 degrees
4) x=4 degrees
5) m<1+m<3=180 degrees
Answer:
1. true
2. false
3. false
4. false
5. false
Step-by-step explanation: