answersLogoWhite

0

Algorithm characteristics- input

Updated: 12/6/2022
User Avatar

Wiki User

14y ago

Want this question answered?

Be notified when an answer is posted

Add your answer:

Earn +20 pts
Q: Algorithm characteristics- input
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

What are the characteristics of a good algorithm?

Every algorithm should have the following five characteristics: 1. Input 2. Output 3. Definiteness 4. Effectiveness 5. Termination


How do you explain characteristics of algorithm?

Characteristics of algorithms are: Finiteness: terminates after a finite number of steps Definiteness: rigorously and unambiguously specified Input: valid inputs are clearly specified Output: can be proved to produce the correct output given a valid input Effectiveness: steps are sufficiently simple and basic.


What is polynomail time algorithm?

That means, roughly speaking, that for any input of size "x", the algorithm will take no longer than xn for some constant "n".


What type of error in an algorithm will produce unexpected results depending on the number that the user inputs?

Algorithms do not accept user input; they are not computer programs. All input to an algorithm is specified at the start of the algorithm along with any required preconditions and postconditions. If a required precondition is not specified or is specified incorrectly, then this could result in unexpected results (or undefined behaviour in programming terminology). The type of error in the algorithm is simply that the precondition was not specified.


What is recursive algorithm and write a recursive algorithm to reverse a string also trace it for any string data?

A recursive algorithm is an algorithm which calls itself with "smaller (or simpler)" input values, and which obtains the result for the current input by applying simple operations to the returned value for the smaller (or simpler) input. Heres a recursive algorithm to reverse a string char *rev(char str[],int pos1,int pos2) { if(pos1<pos2) { char temp=str[pos1]; str[pos1]=str[pos2]; str[pos2]=temp; return rev(str,pos1+1,pos2-1); } return str; } You can call this function like this char *r=rev("reverse it",0,9);

Related questions

What are the characteristics of a good algorithm?

Every algorithm should have the following five characteristics: 1. Input 2. Output 3. Definiteness 4. Effectiveness 5. Termination


How do you explain characteristics of algorithm?

Characteristics of algorithms are: Finiteness: terminates after a finite number of steps Definiteness: rigorously and unambiguously specified Input: valid inputs are clearly specified Output: can be proved to produce the correct output given a valid input Effectiveness: steps are sufficiently simple and basic.


Why do you have a monitor and what are the uses?

A monitor is the "gateway" to your computer. It is the output of your computer. E.g. a mathematical formula has an input, an output and an algorithm. The keyboard & mouse is the input, the computer is the algorithm, and the monitor is the output.


In term of computer science what is deterministic algorithm?

In computer science, deterministic algorithm is an algorithm which, given a particular input, always produces the same result. This is used to increase the efficiency of machines.


How do you write a structured algorithm an a flowchart to calculate and the average of ten scores?

how to write a structured algorithm that input the name and price of an item and quantity and amount


What is polynomail time algorithm?

That means, roughly speaking, that for any input of size "x", the algorithm will take no longer than xn for some constant "n".


What is time complexity of an algorithm?

Time complexity is a function which value depend on the input and algorithm of a program and give us idea about how long it would take to execute the program


How do you check a user's text input in C plus plus?

Use an SLR parser algorithm.


What are the main characteristics of algorithm explain with suitable example?

1. Finiteness : An algorithm must terminate after a finite number of steps and further each steps must be executable in finite amount of time. 2. Each step of an algorithm must be precisely defined; the action to be carried out must be rigorously and unambiguously specified for each case. 3. Input: An algorithm has zero or more, but only finite number of inputs. zero input example: ASCII chart of 0-255 4. Output: An algorithm has one or more output. 5. Effectiveness: Should be effective that means each of the operation to be performed in an algorithm must be sufficiently basic that it can, in principle, be done exactly and in a finite length of time, by a person using pencil and paper and should be computer programming language independent


What type of error in an algorithm will produce unexpected results depending on the number that the user inputs?

Algorithms do not accept user input; they are not computer programs. All input to an algorithm is specified at the start of the algorithm along with any required preconditions and postconditions. If a required precondition is not specified or is specified incorrectly, then this could result in unexpected results (or undefined behaviour in programming terminology). The type of error in the algorithm is simply that the precondition was not specified.


Write an algorithm in c to convert an infix expression to a postfix expressionexecute your algorithm with the following infix expression as your input. m nk pgh a bc?

An algorithm can not be written with the following infix expression without knowing what the expression is. Once this information is included a person will be able to know how to write the algorithm.


What are the disadvantages of z source inverter?

1. more passive elements are required 2. input current ripple is high. Input current is not smooth 3. complex control algorithm