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
Firlakuza [10]
2 years ago
8

Which concept allows the computer to repeat a group of steps in an

Computers and Technology
1 answer:
allochka39001 [22]2 years ago
7 0

Answer:

A

Explanation:

I was gonna say 'loop' from my computing days. but it is now called iteration

You might be interested in
My friend Leo wants to have an emergency plan for his final exams on University of Southern Algorithmville. He has N subjects to
leonid [27]

Answer:

Greedy is an algorithmic paradigm that builds up a solution piece by piece, always choosing the next piece that offers the most obvious and immediate benefit. Greedy algorithms are used for optimization problems. An optimization problem can be solved using Greedy if the problem has the following property: At every step, we can make a choice that looks best at the moment, and we get the optimal solution of the complete problem.

If a Greedy Algorithm can solve a problem, then it generally becomes the best method to solve that problem as the Greedy algorithms are in general more efficient than other techniques like Dynamic Programming. But Greedy algorithms cannot always be applied. For example, the Fractional Knapsack problem (See this) can be solved using Greedy, but 0-1 Knapsack cannot be solved using Greedy.

The following are some standard algorithms that are Greedy algorithms.

1) Kruskal’s Minimum Spanning Tree (MST): In Kruskal’s algorithm, we create an MST by picking edges one by one. The Greedy Choice is to pick the smallest weight edge that doesn’t cause a cycle in the MST constructed so far.

2) Prim’s Minimum Spanning Tree: In Prim’s algorithm also, we create an MST by picking edges one by one. We maintain two sets: a set of the vertices already included in MST and the set of the vertices not yet included. The Greedy Choice is to pick the smallest weight edge that connects the two sets.

3) Dijkstra’s Shortest Path: Dijkstra’s algorithm is very similar to Prim’s algorithm. The shortest-path tree is built up, edge by edge. We maintain two sets: a set of the vertices already included in the tree and the set of the vertices not yet included. The Greedy Choice is to pick the edge that connects the two sets and is on the smallest weight path from source to the set that contains not yet included vertices.

4) Huffman Coding: Huffman Coding is a loss-less compression technique. It assigns variable-length bit codes to different characters. The Greedy Choice is to assign the least bit length code to the most frequent character. The greedy algorithms are sometimes also used to get an approximation for Hard optimization problems. For example, the Traveling Salesman Problem is an NP-Hard problem. A Greedy choice for this problem is to pick the nearest unvisited city from the current city at every step. These solutions don’t always produce the best optimal solution but can be used to get an approximately optimal solution.

6 0
3 years ago
Caleb is working in an Excel spreadsheet and realizes that he incorrectly spelled a word he used in multiple cells. Which can Ca
Irina18 [472]
Given the situation above regarding the error that Caleb made in the spelling of a particular word which was repeated in multiple cells, the steps that he can do in order to correct this are the following:
1. G<span>o to Review, Spelling, and select Change each time the error is found.
2. G</span><span>o to Home, Editing, Find, search for the incorrect spelling, and Replace to replace it with the correctly spelled word.
Hope this helps.</span>
5 0
3 years ago
Write a program that uses while loops to perform the following steps:
Vladimir79 [104]

Answer:

Explanation:

//Include the required header files.

#include<iostream>

using namespace std;

//Define the main function.

int main()

{

//Define the variables.

int i, sum = 0, sqSum = 0, firstNum = 1, secondNum = 0;

char ch;

//Check for valid input.

while (!(firstNum < secondNum))

{

cout << "Enter starting number: ";

cin >> firstNum;

cout<<"Enter ending number(must be > startingNumber): ";

cin >> secondNum;

}

//Store first number in i

i = firstNum;

//Dispaly the number.

cout << "The odd numbers between " << firstNum

<< " and " << secondNum << " are:\n";

//Iterate between first and second number.

while (i <= secondNum)

{

//Check for even numbers.

//Store the sum

if (i % 2 == 0)

sum = sum + i;

//Print the odd numbers

//Evaluate the square of sum of odd number.

else

{

cout << i << " ";

sqSum = sqSum + i * i;

}

//Increase the value of i.

i++;

}

//Dispaly the sum of even numbers.

cout << "\n\nThe sum of the even numbers is:"

<< sum << endl << endl;

//Dispaly the sum of square of odd number.

cout << "The sum of squares the odd numbers is:"

<< sqSum << endl;

//Set i to 1.

i = 1;

//Dispaly the message.

cout << "\nNumber Square\n";

//Iterate and print number between 1 andd 10

//along with the sum.

while (i <= 10)

{

cout << " " << i << "\t " << i * i << endl;

i++;

}

//USe for visual studio.

system("pause");

//Return the value 0.

return 0;

}

Explanation:

The program code will perform the function listed below using loop.

Prompt the user to input two integers: firstNum and secondNum (firstNum must be less than secondNum). Output all odd numbers between firstNum and secondNum. Output the sum of all even numbers between firstNum and secondNum. Output the numbers and their squares between 1 and 10. Separate the numbers using any amount of spaces. Output the sum of the square of the odd numbers between firstNum and secondNum. Output all uppercase letters.

Hope this helps!

3 0
3 years ago
An engineer is performing the ip subnet design for an organization and needs to find the best mask that should be used. the orga
Elan Coil [88]
<span>The Answer to this is None</span>
3 0
3 years ago
Convert (520)10 into base 16​
kakasveta [241]
The base-10 value of 52010 is equal to base-16 value of 20816.
3 0
3 years ago
Read 2 more answers
Other questions:
  • Kylee needs to ensure that if a particular client sends her an email while she is on vacation, the email is forwarded to a
    10·1 answer
  • On a network, a(n) ________ helps prevent data packets from colliding with each other.
    9·1 answer
  • What are the three business writing formats
    12·1 answer
  • How to find determinant of ​
    15·1 answer
  • Cable television, as well as some networks, uses ________ cable.
    10·1 answer
  • When a member function is defined outside of the class declaration, the function name must be qualified with theWhen a member fu
    14·1 answer
  • Jin needs to add a row into his spreadsheet, but he does not want to remove any existing data. Which combination of options shou
    6·2 answers
  • Provide 50000 customers with internet service, however it is only given a pool of 256 ip addresses. suggest an address allocatio
    14·1 answer
  • Write a program that takes a point (x,y) from theuser and find where does the point lies. The pointcan
    8·1 answer
  • With _________, it is easy to target a specific geographic location. Which answer completes the blank in the sentence?
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!