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
- C PROGRAMMING Implement dijkstras alorithm Check that the Graph graph, and starting node, id, are valid• Create the set S containing all the networks (vertices) except the source node (you might wantto use an array for this.• Create an array to represent the table D and initialise it with the weights of the edges from thesource node, or infinity if no edge exists. You should use the constant DBL_MAX to representinfinity.• Create an array to represent the table R and initialise it with the next hops if an edge existsfrom the source, or 0 otherwise.• Then repeatedly follow the remaining rules of Dijkstra’s algorithm, updating the values in D andR until S is empty.• Each of the values required to complete the above can be found by calling the variousfunctions (get_vertices(), get_edge(), edge_destination(), edge_weight(), etc.)in the supplied graph library.• Once Dijkstra’s algorithm has run, you will need to create the routing table to be returned byallocating enough memory for the…InfoProcessorTest.java import java.util.*; /** * * Class to process and extract information from a list of lines. * */ public class InfoProcessorTest { /** * * List of lines to process. * */ private ArrayList<String> lines =new ArrayList<String>(); /** * * Creates InfoProcessor with given list of lines. * * @param lines to process * */ public InfoProcessorTest(ArrayList<String> lines) { this.lines = lines; } /** * * Gets the course name from the list of lines. * * First, finds the line that starts with "Course:". * * Second, gets the String on the very next line, which should be the course * name. * * Third, returns the String from the method. * * * * Hint(s): * * - Use the getNextStringStartsWith(String str) method to find the course name * * * * Example(s): * * - If the ArrayList<String> lines contains: "Course:" and "CIT590", and we * call * * getCourseName(), we'll get "CIT590". * * * * - If the ArrayList<String> lines contains: "Course:"…Programming assignments1) Waiting line simulation in an Indian post office:In an Indian post office that not only delivers mail but also functions as a savingsbank carrying out specific transactions, a lone postal worker serves a single queue ofcustomers. Every customer receives a token # (serial number) as soon as they enterthe queue. After service, the token is returned to the postal worker, and the customerleaves the queue. At any point in time, the worker may want to know how manycustomers are yet to be served.i) Implement the system using an appropriate queue data structure, simulating arandom arrival and departure of customers after service completion.ii) If a customer arrives to operate their savings account at the post office, thenthey are attended to first by permitting them to join a special queue. In such a case,the postal worker attends to them immediately before resuming their normal serviceof mail delivery. Modify the system to implement this addition in service
- Create the following graph. Implement the following functions. 1. addEdge() that takes two vertices as two parameters and creates an Edge between them. 2. nonAdjacentVertices() that takes a single vertex as parameter, and returns an array of vertices that are NOT adjacent to that vertex. 3. Write a function addUnknownVertices() that takes a vertex as a parameters, and creates an Edge with the vertices that are NOT adjacent to it. 4. Write a method searchVertex() which takes an array of Vertices as parameters. The first member of the array will be the starting vertex and the last member will be the Vertex you want to reach. For example searchVertex(Vertex 0, Vertex 4, Vertex 3) will output “Vertex cannot be reached” since you can reach from 0 to 4, but cannot from 4 to 3. Again, searchVertex(Vertex 0, Vertex 1, Vertex 2, Node 3) will output “Vertex can be reached” since you can reach from 0 to 1, 1 to 2, 2 to 3.Recursive function tracing: drawing Recursion Tree for Smallest(a, 0, 6), where vector a contains the following numbers: a = {4, 5, 10, 1, 20, 23, 2}. • clearly label each recursive call’s parameters• clearly label what each call returns to its caller //Return smallest element in sublist a[first...last] int Smallest (vector<int> a, int first, int last){ if (first==last) return a[first]; mid = (first+last)/2; //integer division l1 = Smallest(a, first, mid); l2 = Smallest (a, mid+1, last); if (l1>l2) return l2; else return l1; }neural networks Program to generate random numbers from 11 to 21 as class 1 and generate random numbers from 9 to 55 as class append them to the lists. Take 8 data in each list and plot it.
- You will be given a square chess board with one queen and a number of obstacles placed on it. Determine how many squares the queen can attack. A queen is standing on an chessboard. The chess board's rows are numbered from to , going from bottom to top. Its columns are numbered from to , going from left to right. Each square is referenced by a tuple, , describing the row, , and column, , where the square is located. The queen is standing at position . In a single move, she can attack any square in any of the eight directions (left, right, up, down, and the four diagonals). In the diagram below, the green circles denote all the cells the queen can attack from : There are obstacles on the chessboard, each preventing the queen from attacking any square beyond it on that path. For example, an obstacle at location in the diagram above prevents the queen from attacking cells , , and : Given the queen's position and the locations of all the obstacles, find and print the number of…Need help solving this issue. ShoppingList Class import java.util.Scanner;import java.util.LinkedList; public class ShoppingList {public static void main (String[] args) {Scanner scnr = new Scanner(System.in); // TODO: Declare a LinkedList called shoppingList of type ListItemLinkedList<String> shoppingList = new LinkedList<String>(); String item;// TODO: Scan inputs (items) and add them to the shoppingList LinkedList// Read inputs until a -1 is inputitem = scnr.next();while (!item.equals("-1")) {shoppingList.add(item);item = scnr.next();}// TODO: Print the shoppingList LinkedList using the printNodeData() methodfor (int i = 0; i < shoppingList.size(); i ++) {ListItem list = new ListItem();list.listItem();list.printNodeData();} }} ListItem Class public class ListItem {private String item; public ListItem() {item = "";} public ListItem(String itemInit) {this.item = itemInit;} // Print this node public void printNodeData() {System.out.println(this.item);}}…Artificial intelligence, i need it python code please not algorithm Develop a Word2Vec Language Model Use a corpus , to build a Word2Vec Language Model, using Python. Each student should learn what is Word2Vec by him/herself. The language model will be a set of words and a vector of numbers (called Word Embeddings) for each word. The language model can be easily used in Python. After building the language model, each student should demonstrate it by: (1) finding similar words to a given word, and (2) Finding the cosine similarity between two words. i need it python code please
- Write a Graph class in Java. This class should represent undirected graphs. You can choose one of the representationsfrom our graph exercises, eg object model, sets of nodes and edges, adjacency matrix, or soon, whichever you feel most comfortable with.● Include comments in your Java file to explain how nodes and edges are represented.● Assume that only one edge can exist between two nodes.● Assume that it is possible to have an edge connecting a node to itself, ie that a nodecan be connected to itself via an edge.● Because edges are undirected, an edge between v and w is also one between w and v.● Your constructor method should take one parameter: the number of nodes of thegraph. Add a method to your class: boolean addEdge that takes two parameters, v andw (representing two modes v and w which are connected together by the edgebeing added). If successful, the method should return true. The method should return false when it isunsuccessful, which is in the following cases: the edge is…In Java code: In Java code: In a game of Tic Tac Toe, two players take turns making an available cell in a 3 x 3 grid with their respective tokens (either X or O). When one player has placed three tokens in a horizontal, vertical, or diagonal row on the grid, the game is over and that player has won. A stalemate occurs when all the cells on the grid have been filled with tokens and neither player has achieved a win. Code a program that emulates a Tic Tac Toe game. When you are done, a typical session will look like this: Welcome to tic-tac-toe. Enter coordinates for your move following the X and O prompts. 1 2 3A | | -----B | | -----C | |X:A2 1 2 3A |X| -----B | | -----C | |O:B3 1 2 3A |X| -----B | |O -----C | | And so on. Illegal moves will prompt the user again for a new move. A win or a stalemate will be announced, mentioning the winning side if any. The program will terminate whenever a single game is complete. For this lab, you will be…write python program 10x10 grid, agent top right corner, traversing terrain = 1 time unit, rough terrain = 5 time units, and others terain = cannot be reached An A* based search function that takes a list of lists as argument and generates as a result a list of grid cell coordinates starting at the upper right and ending at the lower left and representing the fastest path for the agent to travel. E.g., path = aStarSearch(map). The path can be empty if there is no route.