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
UkoKoshka [18]
2 years ago
10

Mustafa wants to cross a dungeon. The dungeon has n cells, and in every cell, there are m monsters. To cross each cell he has to

kill one monster, on killing the monster, he loses the strength equal to that of the monster and gains some confidence which adds up to his strength and he proceeds to the next cell. Mustafa can only kill a monster if his strength is greater than or equal to the strength of the monster. Help him find the minimum strength he must have in the beginning so that he can cross n cells.
Mathematics
1 answer:
VladimirAG [237]2 years ago
4 0

The minimum strength he must have in the beginning so that he can cross n cells is gotten from; Strength[n - 1] = min_i Energy[n-1] [i]

How to create an Algorithm?

Let us call Energy [N][M]) the energy needed to kill each monster, and Conf [N][M] the associated confidence.

Let us call Stren[N] the minimum energy that you will need to pass each cell.

We need to select the good monster at each step. The issue is that at first cell for example, you cannot make the good decision without considering all the next cells. A DP solution or a DFS one will certainly work. However, the complexity would be quite high.

Thus using a greedy solution at the condition to start from the end would be the best thing to do.

At the last cell, the needed strength is easily calculated:

Strength[n - 1] = min_i Energy[n-1] [i]

The next strengths are then iteratively calculated, from back to the top:

​ Strength[j] = min_i (Energy[j][i], Energy[j][i] - Conf[j][i] + Strength[j+1]) For all j

Final result: Strength[0]

Complexity: linear O(NM). Impossible to do better as you have to consider each monster.

Read more about Creating Algorithms at; brainly.com/question/13800096

#SPJ1

You might be interested in
What time would be written as 17:45 on the 24-hour clock?
cestrela7 [59]

Answer:

5:45

Step-by-step explanation:

4 0
4 years ago
Read 2 more answers
Please help me on this
Lana71 [14]
It may be the last one......................................... but i'm not sure.
5 0
3 years ago
A football player makes an annual salary of 2,100,000.
Lostsunrise [7]

For a year, 1750 students were able to donate to the school.

<h3>What is meant by percentage?</h3>

A % in mathematics is a quantity or ratio that is stated as a fraction of 100 (from the Latin per centum, "by a hundred"). Although the abbreviations "pct.", "pct.", and occasionally "pc" are also used, the percent sign, "%," is frequently used to indicate it  by % lacks dimensions and has no associated unit of measurement.

The Latin word per centum, which means "hundred" or "by the hundred," is where the word "percent" originates. The % calculator computes a variety of percentage-based numbers, such as the percentage difference between two provided values.

Given,

The annual salary of a football player is 210000

1 student ----------$120

x  ------------$210000$

x=(210000/120)

x=1750 students

1750 students could send their donation to the school for 1 year.

To know more about percentage, visit:

brainly.com/question/16797504

#SPJ1

6 0
1 year ago
Information from a sample of 157 restaurant bills collected at the First Crush bistro is available in RestaurantTips. Two interv
wolverine [178]

Answer:

a) The 99% confidence interval is interval B: 3.35 to 4.35

The 90% confidence interval is interval A: 3.55 to 4.15.

b) Check Explanation.

Step-by-step explanation:

Confidence Interval for the population mean is basically an interval of range of values where the true population mean can be found with a certain level of confidence.

Mathematically,

Confidence Interval = (Sample mean) ± (Margin of error)

Margin of Error is the width of the confidence interval about the mean.

It is given mathematically as,

Margin of Error = (Critical value) × (standard Error of the mean)

Critical value is obtained from either the t-distribution or the z-distribution tables. It depends on sample size and for smaller sample sizes, whether there is information provided for the population mean and standard deviation.

But whether z-distribution or t-distribution, the critical value increases as the confidence level increases.

Hence, the critical value for the 99% confidence level will be higher than the critical value for the 90% confidence level.

And since all the other parameters that determine the confidence interval and it's width (sample mean and the standard error of the mean) are the same for the 90% and the 99% confidence interval, the larger critical value for the 99% confidence interval means that it has the bigger width.

Hence, of the two intervals given,

Interval A: 3.55 to 4.15

Interval B: 3.35 to 4.35

The larger interval, (3.35, 4.35) is the 99% confidence interval and the smaller interval, (3.55, 4.15) is the 90% confidence interval.

b) The data required for this second part isn't available, but the answer for the confidence interval can be obtained using the steps I have given above and below.

Like I have given above,

Confidence Interval = (Sample mean) ± (Margin of error)

Margin of Error = (Critical value) × (standard Error of the mean)

The sample mean and the standard error of the mean are obtained from the sample data (which is missing).

Sample mean = (Σx)/N

x = each variable

N = number of variables = 20

Standard error of the mean = σₓ = (σ/√n)

σ = standard deviation (obtained from the sample data)

90% critical value for sample size of 20 = 1.73

99% critical value for sample size of 20 = 2.86

Hope this Helps!!!

4 0
4 years ago
On a​ zip-line course, you are harnessed to a cable that travels through the treetops. You start at platform A and zip to each o
Shalnov [3]

Answer:

We have to travel 26.93 units from platform B to C.

Step-by-step explanation:

Length of a segment having coordinates (x_1,y_1) and (x_2,y_2) is determined by the formula,

d=\sqrt{(x_2-x_1)^2+(y_2-y_1)^2}

From the graph attached,

Coordinates of the points B and C are (-25, -20) and (-15, 5) respectively.

Distance between these points B and C Or length of BC will be,

BC = \sqrt{(-25+15)^2+(-20-5)^2}

     = \sqrt{100+625}

     = \sqrt{725}

     = 5\sqrt{29}

     = 26.93 units

Therefore, we have to travel 26.93 units from platform B to C.

7 0
4 years ago
Read 2 more answers
Other questions:
  • 8/20 greater than or less than 2/10
    6·2 answers
  • Jack and Jill are collecting canned foods for the homeless. They hope to collect 10 cans per day to reach their goal. They have
    15·1 answer
  • 1. What is the factored form of 4x2 + 12x + 5? (1 point) (2x + 4)(2x + 3) (4x + 5)(x + 1) (2x + 1)(2x + 5) (4x + 1)(x + 5) 2. Wh
    12·2 answers
  • Convert to pints 7 quarts
    13·2 answers
  • When Alice spends the day with the babysitter, there is a 0.6 probability that she turns on the TV and watches a show. Her littl
    14·1 answer
  • A car travels from City A to City B at
    12·1 answer
  • Write an expression for “the quotient of y and 8”.
    9·1 answer
  • Plz help me......................................​
    8·1 answer
  • please help me please please please please please please please please please please please please please please please please p
    5·1 answer
  • It takes 4/7 of an hour to paint 2/7 of a room. How long does it take to paint one room?
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!