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
eimsori [14]
3 years ago
11

In a List of Positive Integers, Set MINIMUM to 1. For each number X in the list L, compare it to MINIMUM. If X is smaller, set M

INIMUM to X.” Read this STATEMENT very carefully and Answer the below Questions.
A. Will this Algorithm RUN?? Yes or No with a justification

B. Will X Replace Any Value or Not?
Computers and Technology
1 answer:
Dvinal [7]3 years ago
4 0

Answer:

The answer to this question is given below in the explanation section.

Explanation:

The given problem scenario is:

In a List of Positive Integers, Set MINIMUM to 1. For each number X in the list L, compare it to MINIMUM. If X is smaller, set MINIMUM to X.

The answer to question A is: this algorithm will not run because:

If you a list of a positive number and you have already set it MINIMUM to 1, the comparison result with MINIMUM will not obtain. For example, lets suppose a list of numbers L. L={1,2,3,1,1,5,4,3,2}. You have already set the Minimum to 1. When you compare each number X in the list, if X >MINIMUM, then set MINIMUM to X.  

This will not work, because there are positive numbers in the list and the minimum positive number is 1. So the algorithm, will not execute the if-part.

In short, the pseudo-code of this problem is given below:

<em>L={list of positive number e.g. 1,2,3,.......Xn}</em>

<em>MINIMUM=1</em>

<em>foreach ( X in L)</em>

<em>{</em>

<em>(if X<MINIMUM)</em>

<em>    { </em>

<em>        MINIMUM=X</em>

<em>    }</em>

<em>}</em>

The answer to question B is X will not be replaced because X  replaced with MINIMUM only when if-part of this algorithm get executed. However, it is noted that X will not replace any value, if if-part will get executed, the Variable MINIMUM will get replaced with any value.

You might be interested in
A DFA is equivalent in power to an NFA. True False
sattari [20]

Answer: True

Explanation:

  Yes, the given statement is true that a DFA is equivalent to NFA in terms of power. For any type of NFA we can easily build an equal DFA so, the NFA are not much powerful as compared to DFA. Both NFA and DFA are characterized by a similar type of class.

DFA is a special case of NFA and They both defined in the same class of language. Each condition in the DFA get summarized by all the condition that the NFA has itself.

4 0
2 years ago
A(n) ______ is a type of collaborative website that allows users to create, add, modify, or delete website content.
andrey2020 [161]
<span>A wiki is this type of site. The users can, anonymously or with a profile, add to or delete content already posted. This gives the community the ability to add to the overall knowledge base on a specific subject. The site tracks changes through IP addresses to make sure that changes are not done maliciously.</span>
8 0
3 years ago
16.50. Suppose we have a sequential (ordered) file of 100,000 records where each record is 240 bytes. Assume that B = 2,400 byte
Nat2105 [25]

Answer and Explanation:

Given that total number of records in a file = 100000

Each record consists of= 240 bytes

Given that B= 2400 bytes.

Then total blocks in file = 100000 records * 240 / 2400

= 10000 blocks.

Time that will take for exhaustive read

= s + r + b.btt

= 16 + 8.3 + (10000) * 0.8

= 8024.3 msec

Now as per given X be the number of records that are searched randomly and it takes more than exhaustive read time.

Hence, X (s + r + btt) > 8024.3

X (16+8.3+0.8) > 8024.3

X > 8024.3/25.1

So that, X > 319.69

Hence, atleast 320 random reads should be made to search the file

8 0
3 years ago
Kathleen has written this paragraph:
yarga [219]

Answer:

Positive media attention can transform communities in unexpected ways.

Explanation:

According to the given excerpt, it is narrated that Kathleen wrote about a town called Abbston that was recently overwhelmed by tourists as a result of the news article by a TV travel editor who wrote about the town.

Therefore, the best concluding sentence for the paragraph would be that positive media attention can transform communities in unexpected ways.

8 0
3 years ago
Read 2 more answers
Not everything is a success all of the time! So do you know which version of Windows was the least popular?
mario62 [17]

Answer:

windows xp

Explanation:

I think because it is not fast and don't play the games and programs which have higher requirements

7 0
3 years ago
Other questions:
  • Ajay wants to read a brief overview about early settlers in the United States. Which type of online text source should he most l
    9·2 answers
  • What are interpersonal skills?
    12·2 answers
  • Which renewable resources are available at any time?​
    15·1 answer
  • One key to success in a career is to be an accomplished
    15·1 answer
  • What is the final value for X ?<br><br> x= 1<br><br> x=13<br><br> x= x+3<br><br> x=0
    9·1 answer
  • Answer the queston...........​
    7·2 answers
  • Lily obtained data from five trails 50 kcal 72 kcal 12 kcal and 50 kcal which best decribes her data
    11·1 answer
  • Can anyone figure this out???? I need help ASAP!
    8·1 answer
  • Which option identifies the programming paradigm selected in thr following scenario? A student is writing a science fiction stor
    12·1 answer
  • balance exercises used for introducing balance training should initially involve little joint motion and improve what type of co
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!