Explanation of Solution
Example of algorithm:
The algorithm is unceremoniously defined as the set of statement or steps being performed to achieve a desired result. Figure 5.1 states: “An algorithm is an ordered set of unambiguous, executable steps that defines a terminating process”.
Take the example of the process for making tea.
- Pour water in vessel.
- Add tea leaves in the vessel.
- Put the vessel to boil.
The above set of statements conform an informal statement that describes the steps to complete a particular task. But these statements have no relation or don’t conform to the formal definition of the algorithm. The above statements are not conforming because there is ambiguity in each step, which means there is no perfect ending point for the particular set of statements.
Want to see more full solutions like this?
Chapter 5 Solutions
Computer Science: An Overview (13th Edition) (What's New in Computer Science)
- Suppose that we reach a point in algorithm where we then to decide to execute one of set of steps if the variable x has a value greater than or equal to zero or another set of steps if x has a value less than 0. In pseudo-code, show how one would address this situation in an algorithm.arrow_forwardWrite an algorithm as following:arrow_forwardWhat is the leading term for the following expressions and specify the lowest Big O Complexity for each algorithm?arrow_forward
- Perform a descriptive algorithm for the process of buying clothes in a warehouse where there is a variety for women, men and children, describe the income, the request for a garment, the proof and the payment of the samearrow_forwardConsider the following algorithm. What does this algorithm compute? What is its basic operation? How many times is the basic operation executed? What is the efficiency class of this algorithm? Suggest an improvement of the given algorithm, and indicate its efficiency class. If you cannot do it, try to prove that, in fact, it cannot be done.arrow_forwardCould you please explain and compare time complexity for each algorithm ClustalW, ClustalOmega, MAFFT, MUSCLE, TCOFFE?arrow_forward
- Read each sentence and identify if it is True or False. 1. Can an instruction or rule in an algorithm have more than one meaning? 2. Can an algorithm be specified in an infinite number of steps?arrow_forwardIf an algorithm A is in the complexity class P, is it necessarily in the complexity class NP? Explain why or why notarrow_forwardThe example on page 190 of the textbook shows the restoring division of dividing 7 by 2. Redo the same example by now dividing 15 by 2. Confirm that the quotient is 7 and the remainder is 1 at the end of the algorithm's execution. Write down the answer similar to the table in Figure 3.10 page 192 of the textbook.arrow_forward
- Create an algorithm for the example belowarrow_forwardCompute for the time complexity (in milliseconds) of each letter of the given program segment below, then get the total time complexity. int main( ) { int a, b, c, d; for (a=0;a<10;a++) for (b=0;b<10;b++) for (c=0;c<10;c++) for (d=0;d<10;d++) { If ((a==0)&&(b==0)&&(c==0)&&(d==0)) { a=1, b=2,c=3,d=4; } cout<<a<<b<<c<<d; } }arrow_forward
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education