1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Anika [276]
3 years ago
7

Isabel has an interesting way of summing up the values in a sequence A ofn integers, where n is a power of two. She creates a ne

w sequence B of halfthe size of A and sets B[i] = A[2i]+A[2i+1], for i = 0,1, . . . , (n/2)−1. IfB has size 1, then she outputs B[0]. Otherwise, she replaces A with B, andrepeats the process. What is the running time of her algorithm?
Computers and Technology
1 answer:
olganol [36]3 years ago
6 0

Answer:

Running time of algorithm is O(n).

Explanation:

n is power of 2

n =2,4,8,16,32,...................................

A is an array having n elements

B is an array of size 0 to (n/2)-1

if n=4 B then (4/2)-1 =1 So B has size 2

for(i=0;i<=(n/2)-1;++)

{

B[i]=A[2i]+A[2i+1];

}

This for loop will run n/2 times so complexity in terms of Big Oh is O(n/2) =O(n)

Running time of algorithm is O(n).

You might be interested in
An optimal solution to a linear programming problem MUST lie A. somewere on the line between two corner points. B. somewhere out
g100num [7]

Answer:

D. at the intersection of at least two constraints.

Explanation:

Linear programming is an optimization technique which is fine for the purpose of getting the best solution such as maximizing profit or certain o 4th era quantities. It is fine by modelling real life problems into mathematical models that have linear relationships or constraints such as in the form of objective functions. In linear programming, an objective function defines the formula for quantity optimization and the goal from this is to determine variable values that maximize or minimize the objective function depending on the problem robbery solved.

8 0
3 years ago
In understanding "controlling for" a third variable, which of the following is a similar concept? a. Conducting a replication b.
nordsb [41]

Answer:

D) Identifying Subgroups

Explanation:

In data Analytics, a third variable also known as a confounding variable, is a variable that "sits in-between", it has influence on both the independent variable and dependent variable. If this "third variable" is not properly handled, the result of the anlysis will yeild incorrect values. identifying subgroups in a dataset is important for undertanding it

7 0
3 years ago
Your boss asks you to send her the documents she needs for a critical meeting with important clients
Kaylis [27]

Answer:

O Walk them. After all, she is right down the hall.

3 0
3 years ago
____ a program means writing down in a prescribed manner the instructions for using the program, the way in which the program pe
Vlada [557]
The answer is d labeling
7 0
3 years ago
Which three elements form a well-dimensioned drawing?
laiz [17]

Answer:

I think its D

lines graphics and symbols

8 0
3 years ago
Other questions:
  • Stan is looking at cloud computing options for his business needs. He wants a model that helps his business customers and client
    12·2 answers
  • Which statement about UML class diagrams is true?
    8·1 answer
  • What are the tasks of a doc file
    15·1 answer
  • Xavier would like to change the sort options for his contacts. In which tab will he find the Arrangement command group?
    6·1 answer
  • Accepted identifier for a variable in PHP except:
    8·1 answer
  • Someone say crackhead
    15·2 answers
  • In a contract, what is consideration
    5·1 answer
  • Im lonnnelllly........................who want to date
    11·1 answer
  • In order to communicate between devices inside a computer?
    9·1 answer
  • Verizon's implementation of a web-based digital dashboard to provide managers with real-time information such as customer compla
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!