answer.
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
xenn [34]
2 years ago
7

Identify the best big-O estimate for the number of comparisons used by the algorithm that determines the number of 1s in a bit s

tring by examining each bit of the string to determine whether it is a 1 bit.
Mathematics
1 answer:
Westkost [7]2 years ago
5 0

Answer:

0(n)

Step-by-step explanation:

Result previous exercise:  

procedure count(a1a2...an : string with n > 1)

i:=0

for k:=1 to n

if ak =1 then i:=i + I

return i  

<em>Note</em><em>: If you use a different algorithm, then you could possible get different results.  </em>

<u>SOLUTION  </u>

There is only one part of the code that contains an operation (comparison), namely if a_k =1  

This comparison is executed in every iteration of the for-loop  

k can take on the values from 1 to n (for k:=I to n), thus k can take on n values.  

Thus in total there are then n comparisons, while n is 0(n).

You might be interested in
5. What is the area of the figure to the nearest square centimeter? It is composed of a symmetric hexagonand a semicircle 4 cm6
Nookie1986 [14]
=100.2743338823 which is 100
6 0
2 years ago
The pizza has an area of 78.5 in². What is the minimum width of a placemat that can be placed underneath it so that the pizza do
xz_007 [3.2K]

Answer:

The minimum width of the placemat is 10 inches.

Step-by-step explanation:

Let suppose that placemat has a square form, whose width must be at least equal to the diameter of the pizza, so that pizza does not touch the table. Hence, the following relationship is obtained:

w = D

Where:

w - Width of the placemat, measured in inches.

D - Diameter of pizza, measured in inches.

The area of the pizza, measured in square inches, is determined by this formula:

A = \frac{\pi}{4} \cdot D^{2}

The diameter is cleared afterwards:

D = \sqrt{\frac{4\cdot A}{\pi} }

If A = 78.5\,in^{2} and \pi = 3.14, then:

D = \sqrt{\frac{4\cdot (78.5\,in^{2})}{3.14} }

D = 10\,in

The minimum width of the placemat is 10 inches.

4 0
2 years ago
Read 2 more answers
A shipment of ball bearings with a mean diameter of 25 mm and a standard deviation of 0.2 mm is normally distributed. By how man
Svetach [21]
You need to calculate how many times the required difference is of the standard deviation, i.e. the ratio difference / standard deviation.


These are the calculations:


Standard deviation = 0.2 mm


Difference between 25.6mm and the mean = 25.6mm - 25mm = 0.6 mm


Ratio difference / standard deviation = 0.6mm / 0.2 mm = 3.


Then, the answer is that a ball with a diameter of 25.6 mm differs 3 standard deviations from the mean.
6 0
2 years ago
2.5.3 Journal: Proofs of Congruence
nexus9112 [7]
I am doing this on apex aswell and i am stuck for the last few ones. I know that the answer to #1 is: Natalie- SAS and Emma- SSS the other ones im not so sure about. sorry for the lack of help, just thought one answer is better than none lol
8 0
2 years ago
Read 2 more answers
Mindy and Daisy are making necklaces using beads. Mindy uses 4 red beads for every 5 white beads. Daisy uses 6 red beads for eve
makvit [3.9K]

Answer:

Daisy

Step-by-step explanation:

Daisy:

12/4=3

3*5=15 white beads

Mindy:

12/6=2

2*7=14 white beads

7 0
2 years ago
Other questions:
  • Trisha Long wants to buy a boat in five years. She estimates the boat will cost $15,000 at that time. What must Trisha deposit t
    8·2 answers
  • In a school election, 3/4 of the students vote. There are 1464 ballots. Write and solve and equation to find the number of stude
    15·1 answer
  • You earn $1,166 gross taxable income every week, and have claimed no exemptions. Assuming that you have no other sources of inco
    15·2 answers
  • Which statements are true for the functions g(x) = x2 and h(x) = -x2? Check all that apply.
    10·1 answer
  • A frequency distribution lists the _________ of occurrences of each category of​ data, while a relative frequency distribution l
    12·1 answer
  • If a first experiment can be performed in 5 distinct ways and a second experiment can be performed in 9 distinct​ ways, the two
    8·1 answer
  • Maci made $170 grooming dogs one day with her mobile dog grooming business. She charges $60 per appointment and earned $50 in ti
    10·2 answers
  • What integers are between /8 and /27?
    15·1 answer
  • If Eric Sanchez saves $60 a month by using coupons and doing comparison shopping, (a) what is the amount for a year? (b) What wo
    9·1 answer
  • John bought a new game system for $529 how much is he in debt
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!