Give the name of the
- a. Local beam search with k = 1.
- b. Local beam search with one initial state and no limit on the number of states retained.
- c. Simulated annealing with T = 0 at all times (and omitting the termination test).
- d. Simulated annealing with T = ∞ at all times.
- e. Genetic algorithm with population size N = 1.
Explanation of Solution
a.
The local beam search with “k=1” is hill-climbing search.
b.
- Local beam search with one initial state and no limit on the number of states retained resembles with Breadth-First search.
- In breadth first search, before adding the next layer it adds one complete layer nodes.
- Starting from one state, the algorithm would be essentially identical to breadth-first search except that each layer is generated all at once.
c.
Simulated annealing with “T=0” at all time:
- There is a fact that termination step would be triggered immediately. Ignoring this fact, the search would be identical to first choice hill climbing.
- This is because; every downward successor would be rejected with probability 1.
d.
Simulated annealing with “T = ∞” at all times is a random-walk search, it always accepts a new state.
e.
Generic algorithm with population size “N=1”:
- The two selected parents will be same individual, if the population size is “1”.
- The crossover yields an exact copy of individuals. Here, the mutation chance occurs.
- Thus, the algorithm executes a random walk in the space of individuals.
Want to see more full solutions like this?
Chapter 4 Solutions
Artificial Intelligence: A Modern Approach
Additional Engineering Textbook Solutions
Starting Out with Python (4th Edition)
Java How to Program, Early Objects (11th Edition) (Deitel: How to Program)
Web Development and Design Foundations with HTML5 (8th Edition)
Starting Out with Java: From Control Structures through Objects (7th Edition) (What's New in Computer Science)
Problem Solving with C++ (10th Edition)
Management Information Systems: Managing The Digital Firm (16th Edition)
- In practical life, the employees get salaries and pay taxes honestly. Sometimes, the process of drawing salariesand payment of taxes may lead to some interesting situation. Suppose, a person draws salary of Rs. 10,000 permonth. A certain percentage of tax is charged on that amount, which is deducted every month. But if the salaryof the person is more than Rs. 10,000 per month, then the tax rate is different. Similarly if a person is getting Rs.20,000 per month, he/she would be charged more under a different tax rate slab. The interesting situationdevelops if there is an anomaly in the tax rates i.e. a person who is getting higher salary takes home lesser moneyas compared to the other person with less gross salary.To further elaborate it, we suppose that there is company 'C' where 100 or less than 100persons are employed. The salaries of the employees and their tax rates are known to us.We are required to list those unlucky persons, who are getting lesser take-home salary(net salary)…arrow_forwardvvvHarry has a big wall clock, that got hit while he was playing. Now, the minute hand doesn't rotate by the angle 2π/3600 each second, but now it moves according to different angle x. You can assume that coordinates of the centre of the clock are (0, 0) and the length of the minute hand is l. One endpoint of the minute hand is always located at the clock centre; the other endpoint is initially located at the point (0, l). One second later, Harry observes that this endpoint is at distance d above the x-axis, i.e., the y-coordinate of this endpoint is equal to d. Harry is curious about where the minute hand will be (specifically, its y-coordinate) after t seconds. Because t can be very large, Harry can't wait for that moment. Please help him to write a python code that prints a single line containing the output.Input: 4 2 2Output4Harry has a big wall clock, that got hit while he was playing. Now, the minute hand doesn't rotate by the angle 2π/3600 each second, but now it moves according…arrow_forwardQuestion 4. In a jar, there are n nuts and n matching bolts. All the bolts (and of course all the nuts) have different sizes, but the sizes are very close to each other. The only type of operation that you are allowed to do is the compare-nut-bolt operation in which the input is a bolt and a nut and you can check if the bolt enters into the nut or not. Present in plain English a method that only uses the compare-nut-bolt operation to sort the nuts and separately the bolts in increasing order of their sizes. (HINT: you can use the idea of Quicksort.)arrow_forward
- You are a computer research scientist at Tesla, and your task is to create a computer vision application for self-driving cars to detect object and avoid collision. You know that Graham's scan is a method of computing the convex hull of a finite set of points in the plane. You decide to apply this algorithm to achieve the goal of your task. a) Suppose Graham's scan executes n points, where n >= 3. Prove that, at the end of the program, the stack S consists of, from bottom to top, exactly the vertices of convex hull in counter-clockwise order.arrow_forwardQ2. The following algorithm returns the product of two numbers, a and b. The parameters x and y are natural numbers. First, prove the correctness of the algorithm. Then, analyze the time complexity of the algorithm in the worst case scenario. function mult (a, b) if b = 0: return 0 else if b is odd: return (mult (2a, b/2 ) +a) else: return (mult (2a, b/2 ) )arrow_forwardYou are given the task of analyzing how joyful a person is. If you are given a list of numbers that represent the emotional value of an individual on each day, design a divide and conquer algorithm to find the most joyous interval of the person. The measure of joy is given as sum of the values in interval multiplied by the smallest integer in the interval.arrow_forward
- "Solve this problem with 3 different algorithms with Python and please tell me which is the most efficient algorithm and why."arrow_forwardCorrect answer will be upvoted else downvoted. Computer science. stage is a succession of n integers from 1 to n, in which every one of the numbers happen precisely once. For instance, [1], [3,5,2,1,4], [1,3,2] are stages, and [2,3,2], [4,3,1], [0] are not. Polycarp was given four integers n, l, r (1≤l≤r≤n) and s (1≤s≤n(n+1)2) and requested to find a stage p of numbers from 1 to n that fulfills the accompanying condition: s=pl+pl+1+… +pr. For instance, for n=5, l=3, r=5, and s=8, the accompanying stages are reasonable (not all choices are recorded): p=[3,4,5,2,1]; p=[5,2,4,3,1]; p=[5,2,1,3,4]. However, for instance, there is no change reasonable for the condition above for n=4, l=1, r=1, and s=5. Help Polycarp, for the given n, l, r, and s, find a stage of numbers from 1 to n that fits the condition above. In case there are a few appropriate changes, print any of them. Input The primary line contains a solitary integer t (1≤t≤500). Then, at that point,…arrow_forwardCan you do the code in MATLABarrow_forward
- Algorithms Question Three points P, Q, and R are said to be collinear if they are on a single line. To check whether the 3 points lie on the same line, we use the distance formula. If P, Q and R are three collinear points, then: Distance from P to Q + Distance from Q to R = Distance from P to R PQ + QR = PR The distance between two points (x1, y1) and (x2, y2) is given by Hence, we can easily find the distance between the points P, Q and R, with the help of this formula. Design an algorithm (pseudocode) to check whether three points are collinear. In your solution include the input and the output.arrow_forwardApply gaussian random walk(walking in a random direction with each step of length 1. i.e. each time at random theta it will walk cos(theta) at x, sin(theta) at y). What is the probability that the walk starting at (0,0) will end at (5,5)? How to simulate it in python?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