Computer Science: An Overview (12th Edition)
12th Edition
ISBN: 9780133760064
Author: Glenn Brookshear, Dennis Brylow
Publisher: PEARSON
expand_more
expand_more
format_list_bulleted
Concept explainers
Question
Chapter 12, Problem 46CRP
Program Plan Intro
Knapsack problem:
The problem of knapsack is that we want a feasible packing of knapsack that maximizes the total value of the packed items, because there are many items that we like to pack and there are not enough room inside the knapsack for everything.
Travelling salesman problem:
The travelling salesman problem is to minimize the travelling cost. The travelling cost between any two cities are different and the aim is to spend less as much as we can and for that we need to determine the sequence of the transversal of the cities so as to minimize the total travel cost.
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
Problem 2. The two problems below can be solved using graph coloring. For each problem, represent the
situation with a graph, say whether you should be coloring vertices or edges and why, and use the
coloring to solve the problem.
a. Your Quidditch league has 5 teams. You will play a tournament next week in which every team
will play every other team once. Each team can play at most one match each day, but there is
plenty of time in the day for multiple matches. What is the fewest number of days over which the
tournament can take place?
b. Ten members of Math Club are driving to a math conference in a neighboring state. However,
some of these students have dated in the past, and things are still a little awkward. Each student
lists which other students they refuse to share a car with; these conflicts are recorded in the table
below. What is the fewest number of cars the club needs to make the trip? Do not worry about
running out of seats, just avoid the conflicts.
Student: A B C D E F…
7. The two problems below can be solved using graph coloring. For each
problem, represent the situation with a graph, say whether you should be
coloring vertices or edges and why, and use the coloring to solve the problem.
a. Your Quidditch league has 5 teams. You will play a tournament next week
in which every team will play every other team once. Each team can play
at most one match each day, but there is plenty of time in the day for
multiple matches. What is the fewest number of days over which the
tournament can take place? FE
b. Ten members of Math Club are driving to a math conference in a
neighboring state. However, some of these students have dated in the
past, and things are still a little awkward. Each student lists which other
students they refuse to share a car with; these conflicts are recored in the
table below. What is the fewest number of cars the club needs to make
the trip? Do not worry about running out of seats, Just avoid the conflicts.
Student:
B CDEFIG H…
Examples of the Triangle Problem, and Create CFG, CC, TT for it.
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
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- Please give a step-by-step solution to the following problem on Computer Graphics. Topic: Phong's Lighting Modelarrow_forward4. Königsberg bridges The Königsberg bridge puzzle is universally accepted as the problem that gave birth to graph theory. It was solved by the great Swiss-born mathematician Leonhard Euler (1707–1783). The problem asked whether one could, in a single stroll, cross all seven bridges of the city of Königsberg exactly once and return to a starting point. Following is a sketch of the river with its two islands and seven bridges: a. State the problem as a graph problem. b. Does this problem have a solution? If you believe it does, draw such a stroll; if you believe it does not, explain why and indicate the smallest number of new bridges that would be required to make such a stroll possible.arrow_forwardWrite/modify MATLAB code and create a properly labeled graph. Add 2 additional lines to your plot, “Cannon Range”, for v3 = 25 m/s and v4= 75 m/sarrow_forward
- Solve the problem below (E9) AND use the photo of the five steps to solve it.arrow_forward(a)Find an appropriate algorithm for the given problem. (b)Draw the graph. (c)Find the maximum speed. (You need to show the necessary steps of the simulations)arrow_forwardAnd I don't find any difference between your WRITTEN solution and the other!arrow_forward
- 5. Icosian Game A century after Euler's discovery (see Problem 4), another famous puzzle-this one invented by the renowned Irish mathematician Sir William Hamilton (1805–1865)-was presented to the world under the name of the Icosian Game. The game's board was a circular wooden board on which the following graph was carved: Find a Hamiltonian circuit-a path that visits all the graph's vertices exactly once before returning to the starting vertex-for this graph.arrow_forwardA damper (or dashpot) is connected to the mass M of the previous problem. This could represent air resistance. The entire system could be a simple model of an automobile wheel suspension system (assuming the automobile body immobile in a vertical direction). Then the damper acts as a shock absorber. As before, the system is displaced and released and x(tg) = x, and v(to) = vo - It can be shown that the motion of the system Is described by the following differential equation: Mx + Dx + Kx(t) = 0 where D is the damping factor of the dashpot and x = v(t) = velocity at time t. Model and simulate the motion of the system from timet= to to t= tf, using a digital computer program, FIG. 1 DAMPER 3 SPRING FIG.I M MASSarrow_forwardAnswer the given question with a proper explanation and step-by-step solution. On a roulette wheel, the pockets are numbered 0 through 36. Each pocket has a color: - Pocket 0 is green - From pocket 1 to 10, the odd pockets are red and the even pockets are black. - From pocket 11 to 18, the odd pockets are black and the even pockets are red. - From pocket 19 to 28, the odd pockets are red and the even pockets are black. - From pocket 29 to 36, the odd pockets are black and the even pockets are red. Write a program that: 1. Ask the user for the number of one of the pockets. 2. If the user entered a number between 0 and 36, it displays the color of the selected pocket. 3. If the user enters a number that is **not** between 0 and 36, the screen should display the message: "Error: the selection was incorrect.". **DO NOT** ask the user for the number again. The program should terminate with the error message displayed in this case.arrow_forward
- iii) Determine if the graph below is flattenable and determine its chromatic number. Note: Justify your answer and if it is possible to flatten it, draw it and indicate the assignment of corresponding colors in the drawing of the graph.....arrow_forwardprovide a MATLAB code only. Please solve both the parts a) and b). In part a) please show all the steps in detail. Provide screenshots of the code and graph wherever necessary.arrow_forwardSelect three graph types. Discuss when each may be used for machine learning.arrow_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