Computer Science: An Overview (12th Edition)
12th Edition
ISBN: 9780133760064
Author: Glenn Brookshear, Dennis Brylow
Publisher: PEARSON
expand_more
expand_more
format_list_bulleted
Question
Chapter 12.5, Problem 2QE
Program Plan Intro
Complexity of problems:
Whether the practical solution of any solvable problem is complex or not is investigated by the solvability of problems. Some problems that are theoretically solvable are so complex means from a practical point of view they are unsolvable called as complexity of problems.
The step by step instructions that are written in an organized manner to solve a problem in computer science is called algorithm.
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
Jacobi method is an iterative algorithm for determining the
solutions of a strictly diagonally dominant system of linear
equations. Each diagonal element is solved for, and an
approximate value is plugged in. The process is then iterated until it
converges.
Further details of the method can be found at Jacobi Method with a
formal algorithm and examples of solving a system of 2/3 linear
equations. This also includes a python implementation of the
algorithm using numpy. But, in this assignment, you are required to
write python implementation using list/nested list data structure
without using any of the built-in python libraries for matrix
operations.
Write a python function Jacobi(A, b, x_init) where A is a
diagonal dominant matrix, b is list of constants (right-hand side of
the equations), and x_init (a list) is an initial guess to the
solution. The function returns the solution as a list (each value of
the list is rounded off to two decimal places).
>>> Jacobi([[2, 1, 1], [0, 2, 1],…
2. Algorithm A has a running time described by the recurrence T(n) = 7T(n/2) + n². A
competing algorithm B has a running time described by the recurrence T(n) =
aT (n/4) + n². What is the largest integer value for a such that B is asymptotically faster
than A? Explain your answer.
Show Let f(.) be a computable, strictly monotonic function, that is, f(n+ 1) > f(n) for all n. Show B = {f(n) | n ∈ N} is recursive.
Chapter 12 Solutions
Computer Science: An Overview (12th Edition)
Ch. 12.1 - Prob. 1QECh. 12.1 - Prob. 2QECh. 12.1 - Prob. 3QECh. 12.1 - Prob. 4QECh. 12.2 - Prob. 1QECh. 12.2 - Prob. 2QECh. 12.2 - Prob. 3QECh. 12.2 - Prob. 4QECh. 12.2 - Prob. 5QECh. 12.3 - Prob. 1QE
Ch. 12.3 - Prob. 3QECh. 12.3 - Prob. 5QECh. 12.3 - Prob. 6QECh. 12.4 - Prob. 1QECh. 12.4 - Prob. 2QECh. 12.4 - Prob. 3QECh. 12.5 - Prob. 1QECh. 12.5 - Prob. 2QECh. 12.5 - Prob. 4QECh. 12.5 - Prob. 5QECh. 12.6 - Prob. 1QECh. 12.6 - Prob. 2QECh. 12.6 - Prob. 3QECh. 12.6 - Prob. 4QECh. 12 - Prob. 1CRPCh. 12 - Prob. 2CRPCh. 12 - Prob. 3CRPCh. 12 - In each of the following cases, write a program...Ch. 12 - Prob. 5CRPCh. 12 - Describe the function computed by the following...Ch. 12 - Describe the function computed by the following...Ch. 12 - Write a Bare Bones program that computes the...Ch. 12 - Prob. 9CRPCh. 12 - In this chapter we saw how the statement copy...Ch. 12 - Prob. 11CRPCh. 12 - Prob. 12CRPCh. 12 - Prob. 13CRPCh. 12 - Prob. 14CRPCh. 12 - Prob. 15CRPCh. 12 - Prob. 16CRPCh. 12 - Prob. 17CRPCh. 12 - Prob. 18CRPCh. 12 - Prob. 19CRPCh. 12 - Analyze the validity of the following pair of...Ch. 12 - Analyze the validity of the statement The cook on...Ch. 12 - Suppose you were in a country where each person...Ch. 12 - Prob. 23CRPCh. 12 - Prob. 24CRPCh. 12 - Suppose you needed to find out if anyone in a...Ch. 12 - Prob. 26CRPCh. 12 - Prob. 27CRPCh. 12 - Prob. 28CRPCh. 12 - Prob. 29CRPCh. 12 - Prob. 30CRPCh. 12 - Prob. 31CRPCh. 12 - Suppose a lottery is based on correctly picking...Ch. 12 - Is the following algorithm deterministic? Explain...Ch. 12 - Prob. 34CRPCh. 12 - Prob. 35CRPCh. 12 - Does the following algorithm have a polynomial or...Ch. 12 - Prob. 37CRPCh. 12 - Summarize the distinction between stating that a...Ch. 12 - Prob. 39CRPCh. 12 - Prob. 40CRPCh. 12 - Prob. 41CRPCh. 12 - Prob. 42CRPCh. 12 - Prob. 43CRPCh. 12 - Prob. 44CRPCh. 12 - Prob. 46CRPCh. 12 - Prob. 48CRPCh. 12 - Prob. 49CRPCh. 12 - Prob. 50CRPCh. 12 - Prob. 51CRPCh. 12 - Prob. 52CRPCh. 12 - Prob. 1SICh. 12 - Prob. 2SICh. 12 - Prob. 3SICh. 12 - Prob. 4SICh. 12 - Prob. 5SICh. 12 - Prob. 6SICh. 12 - Prob. 7SICh. 12 - Prob. 8SI
Knowledge Booster
Similar questions
- 2. For a problem we have come up with three algorithms: A, B, and C. Running time of Algorithm A is O(n¹000), Algorithm B runs in 0(2¹) and Algorithm C runs in O(n!). How do these algorithms compare in terms of speed, for large input? Explain why.arrow_forwardGiven an n-element array X of integers, Algorithm A executes an O(n) time computation for each even number in X and an O(log-n) time computation for each odd number in X. What are the best case and worst case for running time of algorithm C?arrow_forwardWrite the following as proposition: For every integer n, there exists an integerm such that m > n?arrow_forward
- Given is a strictly increasing function, f(x). Strictly increasing meaning: f(x)< f(x+1). (Refer to the example graph of functions for a visualization.) Now, define an algorithm that finds the smallest positive integer, n, at which the function, f(n), becomes positive. The things left to do is to: Describe the algorithm you came up with and make it O(log n).arrow_forwardI need help with this pleasearrow_forwardThe algorithm of Euclid computes the greatest common divisor (GCD) of two integer numbers a and b. The following pseudo-code is the original version of this algorithm. Algorithm Euclid(a,b)Require: a, b ≥ 0Ensure: a = GCD(a, b) while b ̸= 0 do t ← b b ← a mod b a ← tend whilereturn a What is the maximum number of iterations of the While loop the algorithm will do?arrow_forward
- Consider the definition h(0) = 1 h(n) h(n-1)+h(floor(n/2)) + 1 For example, h(2) = h(1) + h(1) + 1 = 3, h(3) = h(2) + h(1) + 1 = 5, etc. An obvious algorithm to compute h is a recursive one, based directly on the defining equations. Is that algorithm efficient? Why or why not? If not, how can the algorithm be improved? Justify your answer.arrow_forwardNote: For all integers k,n it is true that kn, k+n, and k-n are integers. An integer k is even if and only if there exists an integer r such that k=2r. An integer k is odd if and only if there exists an integer r such that k=2r+1. For every integer k it is true that if k is even then k is not odd. For every integer k it is true that if k is odd then k is not even. For every integer k it is true that if k is not even then k is odd. For every integer k it is true that if k is not odd then k is even. If P then Q means the same thing as P → Q (P implies Q). 3. Consider the argument form pvr .. p→r Is this argument form valid? Prove that your answer is correct. 4. Prove that for every integer d, if d³ is odd then d is odd.arrow_forwardIf five integers are chosen from the set {1, 2, 3, 4, 5, 6, 7, 8}, must there be at least two integers with the property that the larger minus the smaller is 2? Write an answer that would convince a good but skeptical fellow student who has learned the statement of the pigeonhole principle but not seen an application like this one. Describe the pigeons, the pigeonholes, and how the pigeons get to the pigeonholes.arrow_forward
- A problem called S reduces to a problem called T if a T solver can be used as a subroutine to solve S. In pseudocode: Solves(...): ... SolveT(...) ... Assuming that this reduction is correct, answer the following questions regarding what the reduction tells us. If we know that an algorithm exists for solving Problem S, what does that tell us about Problem T? [ Select ] If we know that an algorithm cannot exist for solving Problem S, what does that tell us about Problem T? [Select ] [ Select ] An algorithm cannot exist for solving Problem TT. what does that tell us about Problem S? If we know An algorithm exists for solving Problem T Nothing [ Select] If we know that an algorithm cannot exist for solving Problem T, what does that tell us about Problem S? [ Select ]arrow_forwardA problem called S reduces to a problem called T if a T solver can be used as a subroutine to solve S. In pseudocode: Solves(...): ... SolveT(...) ... Assuming that this reduction is correct, answer the following questions regarding what the reduction tells us. If we know that an algorithm exists for solving Problem S, what does that tell us about Problem T? [ Select] If we know that an algorithm cannot exist for solving Problem S, what does that tell us about Problem T? [ Select] If we know that an algorithm exists for solving Problem T, what does that tell us about Problem S? [ Select ] [ Select ] An algorithm cannot exist for solving Problem S,r solving Problem T, what does that tell us about Nothing An algorithm exists for solving Problem Sarrow_forward4 points Given an n-element array X of integers, Algorithm A executes an O(n3.4)-time computation for each even positive number in X, an Oin2.3-time computation for each odd positive number in X, and an O(n2.5)-time computation for each negative number in X. What are the best-case and worst-case running times of Algorithm A? Justify your answer. For the toolbar, press ALT+F10 (PC) or ALT+FN+F10 (Mac) BIUS Paragraph V Arial 10pt EVE 2 IXO QFS3Earrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- 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
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education