Given
Want to see the full answer?
Check out a sample textbook solutionChapter 7 Solutions
Differential Equations: Computing and Modeling (5th Edition), Edwards, Penney & Calvis
Additional Engineering Textbook Solutions
Computer Science: An Overview (12th Edition)
C Programming Language
Java How to Program, Early Objects (11th Edition) (Deitel: How to Program)
Programming in C
Objects First with Java: A Practical Introduction Using BlueJ (6th Edition)
Web Development and Design Foundations with HTML5 (8th Edition)
- Create a curve that uses a quadratic parametric approach with three interpolated control points. The equations which describe the curve are: $$f_x(u) = c_0 u^2 + c_1 u + c_2 $$ and $$f_y(u) = c_3 u^2 + c_4 u + c_5 $$ where $u$ ranges from 0.0 to 1.0. The first control point $$p_0$$ is for $u=0$, the second $p_1$ for $u=0.5$, and the third for $p_2$ and at $u=1.0$. Modify the code to implement your solution. It is sufficient for this task to get the program working with three control points, but you are most welcome to attempt a solution that works on four or more. Code: import java.awt.Graphics2D; import java.awt.geom.Ellipse2D; import java.awt.geom.Path2D; import java.awt.geom.Point2D; import javax.swing.JFrame; import javax.swing.JTabbedPane; import javax.swing.SwingUtilities; public class DotToDotDemo implements Runnable { /** * DotToDotDemo - A demo which draws dots between points to form a curve. * Eric McCreath 2015, 2019 - GPL * Modified by Matthew Aitchison 2022. */ JFrame…arrow_forwardConstruct a support vector machine SVM (by hand calculating it’s hyperparameters Wi and b) that computes the AND function. Use values +1 and -1 (instead of 1 and 0) for the target output, so that the four input points and the corresponding target outputs look like ([0, 0], -1); ([1, 0], -1); ([0, 1], - 1); and ([1, 1], 1]. Draw those four input points along with the decision boundary function (W*X +b) in the Euclidean space. What is the margin?. Check also the correctness of your SVM model with the test input points [1.5, 0.2] and [0.8, 02]. Please consult to AIMA 3rd Edition pp.744-748.arrow_forwardPlease help me with these question. SHow all you work. Thank you 1. Prove that∀k ∈ N, 1k + 2k + · · · + nk ∈ Θ(nk+1). 2. Suppose that the functions f1, f2, g1, g2 : N → R≥0 are such that f1 ∈ Θ(g1) and f2 ∈ Θ(g2).Prove that (f1 + f2) ∈ Θ(max{g1, g2}).Here (f1 + f2)(n) = f1(n) + f2(n) and max{g1, g2}(n) = max{g1(n), g2(n)}arrow_forward
- Using c++ Apply both breadth-first search and best-first search to a modified version of MC problem. In the modified MC, a state can contain any number of M’s and any number of C’s on either side of the river. Assume the goal is always to move all the persons on the left side to the right side. The Initial state should be a parameter given to the program at beginning of execution. As in the original problem, boat capacity =2, the boat cannot move by itself, and on either side C’s should not outnumber M’s. For best-first search, you need to come up with an appropriate heuristic. In addition to solving the problem, your grade will also be based on th effectiveness of the heuristic. As an example, the program should execute as follows. Initial state… Enter number of M’s on left side of the river: 3 Enter number of C’s on left side of the river: 1 Enter number of M’s on right side of the river: 0 Enter number of C’s on right side of the river: 0 Enter location of the boat: L The output…arrow_forwardLet A = {1, 2, 3, 4, 5} and B = {2, 3, 4, 5, 6, 7} and C = {a, b, c, d, e} 15. Give an example of f: A -> B that is not 1-1.arrow_forwardPlease answer the following question in depth with full detail. Suppose that we are given an admissible heuristic function h. Consider the following function: 1-h'(n) = h(n) if n is the initial state s. 2-h'(n) = max{h(n),h'(n')−c(n',n)} where n' is the predecessor node of n. where c(n',n) min_a c(n',a,n). Prove that h' is consistent.arrow_forward
- Compute the gradient with respect to all parameters of f(w0 + w1a1 + w2a2) when w0 = 3, w1 = −2, a1 = 2, w2 = −1, a2 = 4, and β = 0.25 using backpropagationarrow_forwardexplain how the following function works step by stepFunction: computeFa Parameters: a - Dimension a of the scrapper num steps number of steps for determining h Description: Computes the value of TA(a) for the dimension ac by applying the Trapezoidal rule for integrating f(x) from a to ta double computeFa (double a, int num_steps) int i=0; double integral = 0; double interval = (a+a)/num steps: double XL = -a; // left hand side of trapezoid double XR = -a interval; // right hand side of trapezoid while (i<num_steps) integral = integral + ((pow (a, 2) - pow((-XL), 2)) pow (M_E, -((XL) /a)) + (pow (a, 2) pow((-XL), 2)) pow (M_E, -((XL)/a))) interval/2; XL = XR; XR = XR + interval; return (integral);arrow_forwardThe language for coding must be in python Neural Network Units Implement a single sigmoid neural network unit with weights of [-1.2, -1.1, 3.3, -2.1] Calculate the outputs for two training examples:Example 1: [0.9, 10.0, 3.1, 1]Example 2: [0.9, 2.1, 3.7, 1] Note that you don't have to explicitly include a threshold or bias since the examples include a last element of 1 which means that the last weight effectively operates as a threshold. Assuming that a sigmoid unit response >0.5 denotes a positive class and <0.5 is negative class, is example 1 positive or negative? is example 2 positive or negative? Create a single ReLU unit and provide the outputs for those examples. Calculate the derivative of the sigmoid with respect to net input for both examples Calculate the derivative of the ReLU with respect to net input for both examplesarrow_forward
- Please answer the following question in depth with full detail. Consider the 8-puzzle that we discussed in class. Suppose we define a new heuristic function h3 which is the average of h1 and h2, and another heuristic function h4 which is the sum of h1 and h2. That is, for every state s ∈ S: h3(s) =h1(s) + h2(s) 2 h4(s) =h1(s) + h2(s) where h1 and h2 are defined as “the number of misplaced tiles”, and “the sum of the distances of the tiles from their goal positions”, respectively. Are h3 and h4 admissible? If admissible, compare their dominance with respect to h1 and h2, if not, provide a counterexample, i.e. a puzzle configuration where dominance does not hold.arrow_forwardA wave is modeled by the wave function: y (x, t) = A sin [ 2π/0.1 m (x - 12 m/s*t)] Construct on the computer, in the same graph, the dependence of y (x, t) from x on t = 0 and t = 5 s and the value of amplitude A=1.3m. How much is the wave displaced during the time interval from t = 0 to t = 5 s? Does it match this with the graph results?arrow_forwardimplement program to Finding the Longest Common Substringproblem that lends itself to a dynamic programming solution is finding the longest common substring in two strings. For example, in the words “raven” and “havoc”, the longest common substring is “av”.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