in java write code for particle swarm optimization which has adds a forth force closer to nest. calculate the direction the particles must move to be in the centre
Q: What are the most effective ways to guarantee the availability and resilience of a LAN network
A: Local Area Network:- In a building, business, or house, for example, a local area network (LAN) is a…
Q: You are tasked with writing a c++ program that computes a slightly complex formula. The formula is…
A: Solution: Given, Write a c++ program that prompts the user to input the values for n and x. The…
Q: Use induction to prove that any line map can be colored with 2 colors. Use induction to prove that…
A: Introduction A prime number or a product of its prime components can be written for any integer…
Q: Create the data structures for a standard deck of cards. Describe how you would To implement…
A: HashSet is faster (as far as I know), but if you want to make a card game, you might want to sort…
Q: When writing a detailed tutorial, how can I best assemble the necessary data? If you were to search…
A: Introduction: Sequential Search is a searching method that checks a the search item with each item…
Q: Realize the distinctions between parallel and serial programming.
A: Complete Regression All potential models or all potential regressions are other names for it. Once…
Q: For the final project, you address some questions that interest you with the statistical methodology…
A: Ggh
Q: When faced with a problem in Computational Geometry, why do experts turn MATLAB?
A: Computational Geometry Computational geometry is a mathematical field that involves the…
Q: Please explain dynamic scoping, when it is used, and how to get the most out of it.
A: ANSWER: dynamism in scoping The dynamic is a reference to change. The concept of dynamic scoping…
Q: his program we are going to find the factorial * of a user entered number. * A factorial is a…
A: Dear Student, The complete source code along with code implementation and expected output is given…
Q: The eight most important ideas in computer architecture should be listed and explained.
A: The following are the Eight Great Ideas in Computer Architecture: Moore's law designTo simplify the…
Q: Analogies between software and web development
A: Following are some distinctions between web engineering and software engineering: Web Development:…
Q: Using cloud computing and social networking blogs may be a fantastic resource for anyone who want to…
A: Introduction: Cloud computing refers to the delivery of a service to a consumer over the internet.…
Q: Question 10 One of you company's applications has been performing poorly lately, often taking more…
A: The servers issue will come if more no of people use the application at the same time which will…
Q: Which graph representation allows the most efficient determination of the existence of a particular…
A: Answer
Q: 1. Write a recursive function that returns the nth Fibonacci number from the Fibonacci series. int…
A: As per guidelines we are supposed to answer only 3 question at a time. Kindly repost other questions…
Q: If ICMPv6 Neighbor Solicitation is sent, why does it seem like it's being sent in a multicast group…
A: Solution: The stations that are connected to the network will all pick up any messages that are sent…
Q: lled myGraph and a node class (if necessary) using composition. #include #incl
A: Dear Student, The source code, implementation and expected output using classes is given below -
Q: (17) ( data transmission method shown in class. We assume the data bits are transmitted starting…
A: 1) In RS232 Serial Interface Idle state of serial interface is typically logic high HIGH Start bit…
Q: For a computer with a limited instruction set, what does the word "reduced" signify?
A: RISC: Reduced Instruction Set Computer. When compared to computers with complicated instruction…
Q: Write a program that computes the sum of all prime numbers between two other numbers. in C and C++…
A: - We need to code sum of prime numbers between two provided numbers. - We have to code in C and…
Q: explain
A: Dear Student, The answer to your question is given below -
Q: This is Java Programming! We are working with MaxHeap Instructions: Don't modify the two codes…
A: Solution: Given, Driver.java code: /** A driver that demonstrates the class BstMaxHeap.…
Q: How can you convert all the rows in a Geodataframe into a in-memory list of list elements,
A: Dear Student, The answer to your question is given below -
Q: TRANSFORM | A) Data Access Tools B) Data Staging Area a. If item above is related only to A b. If…
A: As per our company guidelines, only 3 sub parts will be answered. So, please repost the remaining…
Q: essage MAXLJGTEAX which was encrypted using the affine cipher:
A: The answer is
Q: How does one go about tracking down a PKES network?
A: Passive key entry strategy (PKES) is the name of this system. This method requires the keys to be…
Q: Language: C Find the maximal value of an array using pointers. To this end define the function that…
A: Answer: Algorithms: Step1: we have create a function find and passing the arguments as array and n…
Q: 3 9 10 11 12 det verity(number): # do not change this line! # write your code here so that it…
A: Below is the code:
Q: In java just add code between the comments public class A6 { /** * In this Java file, you will…
A: Dear Student, The completed source code, implementation and expected output is given below -
Q: When negotiating, you must offer something _____ than the other person can accomplish _____ you. a)…
A: Solution: Given, When negotiating, you must offer something _____ than the other person can…
Q: What is the time complexity of basic operations of insertion and deletion in the HashMap class? O(1)…
A: Inserting and retrieving a HashMap requires O(1) time complexity. A HashMap stores values in…
Q: If you want to improve your network, when is the best time to do it?
A: Definition: When applying for a service provider shift in such a large organisation or business, you…
Q: If all the edge weights are positive, then the shortest weighted path contains at most n − 1 edges.…
A: solution is given below for asked statement:
Q: When each object in a collection has a priority, how should you organize several objects that have…
A: A priority queue is a special type of queue in which each element is assigned a priority value. And…
Q: 4. Write a regular expression that matches all strings over the alphabet (a, b, c) that contain: i)…
A: Here is DFA of the above problem. See below steps.
Q: Imagine a stack of dishes, literally. The stack may collapse if it becomes too tall. Therefore, when…
A: We have been given the following instructions for our data structure in this problem: class…
Q: In what ways does the SSTF disc scheduling algorithm put data at risk?
A: These question answer is as follows,
Q: e 30-bit address stored in an 8K I
A: The answer is
Q: Which action is more appropriate, reloading, or restarting, and why?
A: Answer:
Q: It is assumed that the sender is aware of the current round-trip delay. Since packet loss is…
A: In protocol, a timer is required.The roundtrip latency between the sender and recipient is constant…
Q: Given the availability of on-chip L3 caches, please discuss the benefits and drawbacks of using…
A: Answer: We need to write the what will be the difference between the shared and private cache so we…
Q: What would happen if you made reboot.target (or runlevel 6) the default for your system?
A: On Unix-like systems such as Linux, the current operating system level is referred to as the…
Q: Write a complete method(method header and body) that will accept purchase price and tax code as…
A: - we have to work on the tax problem. - We are using C++ here.
Q: What are the components of and the process for distributed data processing?
A: The answer to the question is given below:
Q: DVD Rental • DVD: Title, Director, Serial, Genre, Year Published • Customers: Customer ID, Name,…
A: syntax to create table:- create table tableName (columnName1 dataType1, columnName2…
Q: Do you know what the three most important parts of a computer are?
A: Certain essential parts make up a machine. These include hardware, applications, programmers, data,…
Q: The solution must be neat and clear to understand. ****YOU MUST DRAW THE COMPLETE DIAGRAM****…
A: A data-flow diagram is the way of representing a flow of data through a process and a system.
Q: Define Soft-Margin explaining how much Bias and Variance each tend to have. You could contrasted to…
A: Dear Student, The answer to your question is given below -
Q: What is a virtual machine?
A: What is a virtual machine?
1
in java write code:
Step by step
Solved in 2 steps
- Random walk. A Java programmer begins walking aimlessly. At each time step, she takes one step in a random direction (either north, east, south, or west), each with probability 25%. She stops once she is at Manhattan distance r from the starting point. How many steps will the random walker take? This process is known as a two- dimensional random walk.Random walk. A Java programmer begins walking aimlessly. At each time step, she takes one step in a random direction (either north, east, south, or west), each with probability 25%. She stops once she is at Manhattan distance r from the starting point. How many steps will the random walker take? This process is known as a two-dimensional random walk.Artificial Intelligence - Local Search Starting from a randomly generated state of the 15-puzzle game (https://en.wikipedia.org/wiki/15_puzzle), steepest-ascent hill-climbing (the vanilla version of hill-climbing search) gets stuck 76% of the time, i.e., solving only 24% of problem instances. But it works very quickly, i.e., it takes just 6 steps on average when it succeeds and 5 steps when it gets stuck. In contrast, if sideways moves are allowed, this raises the percentage of problem instances solved by hill-climbing from 24% to 81%, with the success at a cost: the algorithm averages roughly 7 steps for each successful instance and 32 steps for each failure. Now suppose that we are implementing random-restart hill climbing (i.e., if a search fails, it keeps to try, and try, until it gets a success) by the following two versions: one uses vanilla steepest-ascent hill climbing, and the other one uses hill climbing with sideways moves. Can you please tell which version of…
- Weighted Job Scheduling in C language only please Problem statement: You are given a list of jobs where each job has a start time, finish time, and the profit associated with that job, find the maximum profit subset of non-overlapping jobs. Problem description: The problem wants you to find the maximum profit that you can make after performing a certain number of jobs such that each job has a certain condition that you can start a job only if the start time of the current job is greater than the finish time of the previous job. You are required to develop some algorithm such that the job start time and the finish time does not coincide with other jobs. Output: (Attached photo)Problem Description Learn Clojure In this problem, each person in the social network takes a specific time to send the message(time is an integer). A specific newbie in react(let's call him NB) wants to post a question to a ninja(let's call him NJ) on the network. Find out how long a specific message takes to reach NJ from NB. The social network is given as the input as follows. The first line is a number which is the number of people in the social network. The next following lines are the actual members of the social network whose names are written in separate lines. Following that is the number of connections, followed by a new line separated list of connections given as . Then on the next line is the person who wants to send the message(NB's id in our case) and on the next line is the person who is the intended recipient(NJ's id). The output should be a single line consisting of the time it takes to send the message through or -1 if the message can't be sent. INPUT FORMAT total…public class CustomLinkedList { public static int findMax(IntNode headObj) { /* Type your code here */ } public static void main(String[] args) { IntNode headObj; IntNode currObj; IntNode lastObj; int i; int max; // Create head node headObj = new IntNode(-1); lastObj = headObj; // Add nodes to the list for (i = 0; i < 20; ++i) { currObj = new IntNode(i); lastObj.insertAfter(currObj); lastObj = currObj; } max = findMax(headObj); System.out.println(max); }}
- Artificial intelligence (Question - 6) ======================= One variation on the game of nim is described in Luger. The game begins with a single pile of stones. The move by a player consists of dividing a pile into two piles that contain an unequal number of stones. For example, if one pile contains six stones, it could be subdivided into piles of five and one, or four and two, but not three and three. The first player who cannot make a move loses the game.(6.1) Draw the complete game tree for this version of Nim if the start state consists of six stones.(6.2) Perform a minimax evaluation for this game. Let 1 denote a win and 0 a loss.Python Language Q2: Ginormous Campus The campus is pretty big. There are n buildings scattered around it, numbered from 0 to n-1. These buildings are so far away from each other that the only way to get from one to another is to take a campus bus. There are m campus bus routes. The i-th one (0 <= i < m) takes you from building u_i to building v_i (but not the other way around). These buses run very frequently. Professor Zingaro is deciding where to hold his CS lectures. He believes a building x is accessible from a building y if you can get from y to x taking at most two buses. For his students’ convenience, he wants to hold his lectures in the most accessible building. Help him out by telling him how many buildings the most accessible building is accessible from. In addition, list all buildings that are the most accessible. Input The first line of the input contains two space-separated integers n and m, denoting the number of buildings and bus routes, respectively. m lines…Course: Data Structure and Algorithims Language: Java Kindly make the program in 2 hours. Task is well explained. You have to make the proogram properly in Java and attach output screen with program: Restriction: Prototype cannot be change you have to make program by using given prototype. TAsk: classBSTNode { Node left; Node right; int data; publicBSTNode(int _data);// assign data to_data and assign left and right node to null } class BST { BSTNoderoot; public BST();// assign root to null void insert(int data);// this function insert the data in tree which maintain property of BST boolean Search(int key); this function search the data in bst and return true if key is found else return false public void EvenPrint(Node n)// this function only print the data which are even, make this function resursive public void OddPrint(Node n)// this function only print the data which are odd, make this function resursive public void PrimePrint(Node n)// this function only…
- JAVA CODE PLEASE Functions With No Parameters and Return Values Quiz by CodeChum Admin Create a function named banner that prints “CodyChum” with a newline. In the main function, write a program that accepts an integer input which would serve as an inclusive stopping point of a loop iteration that starts at the value of 1. If the number that loops through the range is divisible by either 2 or 3, then call the banner function, otherwise just print the number. Input 1. One line containing an integer Output First line is the integer user input. Succeeding multiple lines containing an integer or “CodyChum” 10 1 CodyChum CodyChum CodyChum 5 CodyChum 7 CodyChum CodyChum CodyChumWeighted Job Scheduling in C language Problem statement: You are given a list of jobs where each job has a start time, finish time, and the profit associated with that job, find the maximum profit subset of non-overlapping jobs. Problem description: The problem wants you to find the maximum profit that you can make after performing a certain number of jobs such that each job has a certain condition that you can start a job only if the start time of the current job is greater than the finish time of the previous job. You are required to develop some algorithm such that the job start time and the finish time does not coincide with other jobs.C++ A robot is initially located at position (0; 0) in a grid [?5; 5] [?5; 5]. The robot can move randomly in any of the directions: up, down, left, right. The robot can only move one step at a time. For each move, print the direction of the move and the current position of the robot. If the robot makes a circle, which means it moves back to the original place, print "Back to the origin!" to the console and stop the program. If it reaches the boundary of the grid, print \Hit the boundary!" to the console and stop the program. A successful run of your code may look like:Down (0,-1)Down (0,-2)Up (0,-1)Left (-1,-1)Left (-2,-1)Up (-2,0)Left (-3,0)Left (-4,0)Left (-5,0)Hit the boundary! or Left (-1,0)Down (-1,-1)Right (0,-1)Up (0,0)Back to the origin! About: This program is to give you practice using the control ow, the random number generator, and output formatting. You may use <iomanip> to format your output. You may NOT use #include "stdafx.h".