EBK DATA STRUCTURES AND ALGORITHMS IN C
4th Edition
ISBN: 9781285415017
Author: DROZDEK
Publisher: YUZU
expand_more
expand_more
format_list_bulleted
Question
Chapter 4, Problem 10E
Program Plan Intro
Path from Exit to Mouse in Maze:
Backtracking:
- Back tracking is a form of recursion.
- It is possible to backtrack if traversal reaches a node which has no other way from that to find solution.
- It can used to solve problems like eight queens puzzle and maze problem.
Expert Solution & Answer
Trending nowThis is a popular solution!
Students have asked these similar questions
Use a computer programming language of your choice to implement the dynamic programming that allows the change of edge weights and compute the shortest path from 1 to 14, and also shows the shortest route. For example, what is the shortest path and its route from node 1 to node 14 if the distance from node 4 to node 7 is 9?
The 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 examples
Write a python program based on the discussion we had on the last day of class, to train a network with two hidden layers each with 5 neurons. Finish the gradient computation we did in class, and implement a steepest decent search for a network which minimizes the cost function. Once you believe that your network is trained, compute the value of n(1, 1) and see what you get. Bonus: If you easily get this to work, then try to generalize to K neurons in each of the two hidden layers. Does the training work better with more neurons?
Chapter 4 Solutions
EBK DATA STRUCTURES AND ALGORITHMS IN C
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
- There is a cube and an ant is performing a random walk on its vertices,every step it will start from one vertex and walk to another along the connected edge, it willrandomly select any of the 3 adjoining vertices with equal probability. If it starts at one vertex,what is the expected number of steps it needs to reach the diagonally opposite vertex? Write a c++ program for the samearrow_forwardThe language must be in python. Neural Network Units weights of [-1.2, -1.1, 3.3, -2.1] 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. 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_forwardWrite a pseudocode and draw a timeline diagram for the sliding window algorithm with SWA = RWS = 4 and SWS = 3 and RWS = 1 frames in the following two situations. Assume the receiver sends a duplicate acknowledgment if it does not receive the expected frame. For example, it sends DUPACK[2] when it expects to see Frame[2) but receives Frame[3] instead. Also, the receiver sends a cumulative acknowledgment after it receives all the outstanding frames. For example, it sends ACK (5) when it receives the lost frame Frame(2) after it already received Frame(3), Frame(4), and Frame[5]. Show the start timer and stop timer wherever necessary. Use a timeout interval of about 2 x RTT.arrow_forward
- Write codes to implement particle swarm algorithm with population size of 3 (set initial positions and velocities to x-[3.3],x-[8,8].x [6,6],[1,1]') and = = @=0.9,₁ =c₂=2.arrow_forwardImplement the winnow algorithm and use it learn weight for w0 (for bias), w1 and w2 and w3 for x1 , x2 and x3 for the following Boolean function: Please include all steps for using the algoritm X1 X2 X3 Y 0 0 0 0 1 1 0 1 0 1 0 0 0 0 1 0 0 1 1 1 1 0 1 1 1 1 1 0arrow_forwardGive an NFA over a single letter alphabet that rejects some string, but the length of the shortest rejected string is strictly more than the number of states. (Hint: Build an NFA with seven states arranged in loops of length two and five. Assign start and final states so that the shortest rejected string is of length 9 = 2 * 5 − 1.)arrow_forward
- Write a C++ program to calculate the fair price of the butterfly spread using path-dependent simulation and path-independent simulation of the stock prices.Using the following dynamics for the stock price and strike prices with the constant values:dSt = rStdt + x*StdWtS0 = 100K1 = 95K2 = 100K3 = 105r = 0:02x = 0:05T = 10arrow_forwardConsider the case when several persons play the wireless phone game. They send a message from the first person until the last one and the message gets distorted. Simulate this process according to your own distortion rules.arrow_forwardSuppose a train was supposed to start at station A, pause at stationsB, C, D, ... , Y, and finish at station Z. However, it did not arrive at Z. Suppose in yourfactory the piece of equipment or process labeled A makes part B work, which in turnmakes C, D, ... , and Z work. However, Z is not working. You want to find out why.What algorithm do you use? Think of other applications of this technique.arrow_forward
- Suppose a Genetic Algorithm uses chromosomes of the form x=abcdef with a fixed length of six genes.Each gene can be any digit between 0 and 9 . Let the fitness of individual x be calculated as : f(x) =(a+b)-(c+d)-(e+f) And let the initial population consist of four individuals x1, ... ,x4 with the following chromosomes : x1 = 3 5 3 2 6 5, x2 = 9 8 0 1 2 2, x3 = 1 2 2 1 2 3, x4 = 7 9 2 3 1 1 1. 1.Evaluate the fitness of each individual, showing all your workings, and arrange them in order with the fittest first and the least fit last. 2. calculate the average fitness. 3. Perform the following crossover operations:a- Cross the fittest two individuals using one point crossover at the middle point.b- Cross the second and third fittest individuals using a two point crossover (points b and e). Suppose the new population consists of the four offspring individuals received by the crossover operations in the above question. Evaluate the fitness of the new population, showing all your…arrow_forwardAlthough the plot function is designed primarily for plotting standard xy graphs, it can be adapted for other kinds of plotting as well. b. Make a plot of the curve, which is defined parametrically by the equations x = 2cosθ + cos2θ, y = 2sinθ - sin2θ, where 0 < θ < 2π. Take a set of values of θ between zero and 2π and calculate x and y for each from the equations above, then plot y as a function of x. b. Taking this approach a step further, one can make a polar plot r = f(θ) for some function f by calculating r for a range of values of θ and then converting r and θ to Cartesian coordinates using the standard equations x = r cosθ, y = r sinθ. Use this method to make a plot of the function r = ecosθ – 2 cos(4θ) + sin5 (θ/12) in the range 0 <= θ <= 24π. use python code to answer the highlight onearrow_forwardComputer Science A way to avoid overfitting in Deep Neural Networks is to add an additional term R to the loss function L (for example L can be the cross entropy loss) as follows: L(w) + λR(w). (1) You know that one choice for R is the L2 norm, i.e. R(w) = ||w||2 2 . One friend of yours from the School of Maths told you however that there’s no need to use squares (i.e. powers of two) and that you can achieve the same effect by using absolute values, i.e. the L1 norm: R(w) = ||w||1. Would you agree with him? i.e. is the use of the L2 norm equivalent to using the L1 norm for regularization purposes? Justify your answerarrow_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
Introduction to Big O Notation and Time Complexity (Data Structures & Algorithms #7); Author: CS Dojo;https://www.youtube.com/watch?v=D6xkbGLQesk;License: Standard YouTube License, CC-BY