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
katovenus [111]
2 years ago
6

Describe an algorithm for finding the smallest integer in a finite sequence of natural numbers.

Mathematics
2 answers:
Crazy boy [7]2 years ago
5 0

Answer:

min = a_1

for i:= 2 to n:

      if a_i < min then min = a_i

return min

Step-by-step explanation:

We call the algorithm "minimum" and a list of natural numbers a_1, a_2, \cdot\cdot\cdot, a_n.

So lets first set the minimum to a_1

min = a_1

now we want to check all the other numbers.

We can use a simple for loop, to find the minimum

min = a_1

for i:= 2 to n:

      if a_i < min then min = a_i

return min

Aliun [14]2 years ago
3 0

Answer:

The sequence of natural numbers is a_1, a_2, a_3, ..., a_n.

Use min as the variable that will contain the minimum value.

Set min = a_1

In a loop, compare min to each number from a_2 to an.

If min > a_i, then let min = a_i

min = a_1

for i = 2 to n

  if min > a_i, then min = a_i

You might be interested in
Please help<br><br> In which table does y vary directly with x?
grigory [225]

Answer:

Table D

Step-by-step explanation:

we know that

A relationship between two variables, x, and y, represent a proportional variation if it can be expressed in the form y/x=k or y=kx

In a proportional relationship the constant of proportionality k is equal to the slope m of the line and the line passes through the origin

<u><em>Verify each case</em></u>

<em>Table A</em>

For x=1, y=3

Find the value of k

k=y/x -----> k=3/1=3

For x=2, y=9

Find the value of k

k=y/x -----> k=9/2=4.5

the values of k are different

therefore

The table A not represent a direct variation

<em>Table B</em>

For x=1, y=-5

Find the value of k

k=y/x -----> k=-5/1=-5

For x=2, y=5

Find the value of k

k=y/x -----> k=5/2=2.5

the values of k are different

therefore

The table B not represent a direct variation

<em>Table C</em>

For x=1, y=-18

Find the value of k

k=y/x -----> k=-18/1=-18

For x=2, y=-9

Find the value of k

k=y/x -----> k=-9/2=-4.5

the values of k are different

therefore

The table A not represent a direct variation

<em>Table D</em>

For x=1, y=4

Find the value of k

k=y/x -----> k=4/1=4

For x=2, y=8

Find the value of k

k=y/x -----> k=8/2=4

For x=3, y=12

Find the value of k

k=y/x -----> k=12/3=4

All the values of k are equal

therefore

The table D represent a direct variation or proportional relationship

The linear equation is y=4x

6 0
3 years ago
Read 2 more answers
Martene got a small aquarium for her birthday. The aquarium is a right rectangular prism 18.5cm long by 15cm wide. Martene put 3
natita [175]

Equation for this problem:            Total 3 cubed / (L x W)

So 18.5cm x 15cm = 277.5 is the product of L and W. Now you need to devide the total by 277.5 which is 14. So the aquarium is 14 cm deep.

7 0
3 years ago
The island has 600 bikes and 900 people. What is the bike to person ratio
jasenka [17]

Answer:

2:3 (2 bikes for every 3 people)

Step-by-step explanation:

hope this helps

8 0
3 years ago
What is the area of the figure?
RUDIKE [14]
The area formula for rectangles is lxw. To solve, I would divide the figure up into 3 rectangles- top,middle and bottom, then find the areas and add them together.

Top: 4x13=52 cm^2
Middle: 5x8=40 cm^2
Bottom: 21x10=210 cm^2

(5 is the width of the middle piece. You get it from subtracting. 21-8-8=5. 13 is the width of the top piece. 5+8=13)

52+40+210
=302 cm^2
So your answer is 302 square centimetres.
6 0
3 years ago
Estimate 815-281 to get the answer
Damm [24]

Answer:800-300

Step-by-step explanation:

since there is a 1 after the 8 it would go down to 800 and there is a 8 after the 2 so it would go up to 300

4 0
4 years ago
Read 2 more answers
Other questions:
  • Change the following linear equation in standered form to slope- intercepts form: 2x-y=9
    12·2 answers
  • Find the area of the shape shown below. I NEED HELP NOWWWWWW
    13·1 answer
  • In a 45°- 45°- 90° right triangle, the length of the hypotenuse is 15. How long are the legs?
    13·2 answers
  • An office supply store carriers a all-in-one printer with a regular price of $240. The printer is on sale at 15% off. In additio
    12·1 answer
  • Help<br><br><br> I really need help pls
    11·1 answer
  • Solve for x given the lines are parallel.<br> (7x - 8)<br> 62°
    9·1 answer
  • Help me por favor...
    12·1 answer
  • Y=4 times 1/2 to the power of x<br> i need help putting it into a table
    14·1 answer
  • |1/2- x/3|=5/6. Solve for x. There is (most likely) 2 answers
    7·1 answer
  • Micheal was asked to give examples of the identity property of addition and the identity property of multiplication. Below are h
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!