blems 1. Design a Monte Carlo simulation to estimate the probability of a random walk reaching the top a of the given interval [-b, a]. Carry out n = 10000 random walks. Calculate the error by comparing with the correct answer. (a) [-2, 5] (b) [-5, 3] (c) [–8, 3] 2. Calculate the mean escape time for the random walks in Computer Problem 1. Carry out n = 10000 random walks. Calculate the error by comparing with the correct answer.
Q: inport unittest def Highestkapeat (dice,nintapeats): unique- set(dice) repeats- [x for x in unique i...
A: import unittest #helpersdef Count(dice, number): return len([y for y in dice if y == number]) def...
Q: Practicing Loops. Einstein Private Elementary school has three classes in each of its 9 grades. 27 ...
A: python code grade = range(9) classroom = range(1,4) month = range(1,10) tuition = [90,50,100,150,2...
Q: Create an algorithm for finding the average of any five given numbers using a flow chart. The algori...
A: Start Initialize count and sum to 0 Loop if there is input and count<5 Add the input to sum Incr...
Q: Which statement regarding OSPF protocol is not true? a. Uses the hello protocol to discover other r...
A: Given: To choose the correct option.
Q: What is the meaning of .Com
A: Defined the meaning of.Com
Q: Finding subtotals is a three-step process that begins with spell-checking. True False
A: Finding subtotals is a three-step process that begins with spell-checking. True False
Q: ncoding technique solves the loss of synchronization because of long 0’s and 1’s? A. Manchester B....
A: given - Which encoding technique solves the loss of synchronization because of long 0’s and 1’s?
Q: As a student, Is it important to memorize the number of the connection or the contacts? Why?
A: It is important to memorize the number of the connection or the contacts for the students because it...
Q: Sites like Zillow get input about house prices from a database and provide nice summaries for reader...
A: Since no programming language is mentioned, I am using python. Algorithm: Start Read current_price,...
Q: Consider the following C-ish fragment: for (k=m; k > 2*m; k--) { if (k is even) { s += k; k++; } els...
A: I have modified your code a bit and took it inside a function to test it: void calculate(void) { ...
Q: Java Virtual Machine is a platform independent tool in Java that can be circulated through various m...
A: Java is a platform independent language. Every Java program is compiled into bytecode which is an in...
Q: Create an ERD with the following Entities and Attributes. Entity: USERS - Attributes: Name of User,...
A: Create an ERD with the following Entities and Attributes. Entity: USERS - Attributes: Name of User, ...
Q: Instruction: Write a VB.Net Program that will use a function to identify the highest value based on ...
A: Start Take the three numbers as input. Find the largest number Print the result Stop
Q: 12345 246810 3691113 48121620 510152025
A: Code: Module Module1 Sub Main() For j As Integer = 1 To 5 For i As Integer = 1 To 5 Co...
Q: Consider the 8-puzzle problem. Trace out the A* algorithm given the initial and goal states below. Y...
A: The solution to the 8 puzzle problem is discussed in this puzzle.A 33 board with 8 tiles (each tile ...
Q: 5.a. A link with an optical budget of 8 dB has a remaining margin of 3 dB. What's the total loss in ...
A: According to the information given:- We have to choose the correct option to satisfy the statement.
Q: Provide a description for the readString function.
A:
Q: Fast Food Restaurant Make a program that has several food items on the menu with prices. The use...
A: Note: Code runs successfully as the above problem describe. I am using the c++ language to do this p...
Q: List the five jobs that the records and information manager must do, in order.
A: Introduction: => Information managers(IM) oversee and implement organization-wide information ...
Q: Write a mini forensics tool to collect identifying information from PDF metadata. please explain the...
A: In order to extract PDF metadata, we’ll use Aspose.PDF for C++ API which is a feature-rich, powerf...
Q: Write the shortest condition in the if-statement below that will make the unshaded values of row ten...
A: From the given figure,For row ten, the unshaded values are 3 and 13For row ten the value is valid if...
Q: Provide both flowchart and pseudo-code for below C program code please? #include #include #include...
A:
Q: Write a java program that enables the user to enter a string and an index,then cuts the letter in th...
A: Introduction: Write a java program that enables the user to enter a string and an index,then cuts th...
Q: 5. My Sincere Apologies (C PROGRAMMING ONLY) by CodeChum Admin Okay, I don't know what got into me ...
A: The code is given below #include <stdio.h>void sendApology(char , int );int temp =1;int mai...
Q: validation. a zero parameter constructor and a fully parameterized constructor for the class. le the...
A: Given Tractors Pretend we work for a company that leases tractors. Let us create a class for tract...
Q: Which of the following is not a problem that could be caused by disabling STP in a switched network?...
A: We are going to understand which problem can not arise if we disable STP in a switched network.
Q: Use nested loops (loops within other loops) to complete the following. You can use the System.out.pr...
A: Note :- As per our guidelines we are supposed to answer only one question. Kindly repost other quest...
Q: What is the difference between an argument and a return value? How many arguments can a method c...
A: Argument in JAVA: An Argument is a value passed to a function when the function is called . Return v...
Q: Using logical equivalence (not the table), show that the following propositions are equivalent and s...
A: Please upvote me Please. I need it badly. Please. 1. Given, ¬p ∧ (p V q) => (¬p ∧ p) V (¬p ∧ q)...
Q: The following pseudocode works, but it performs a case-sensitive validation of the user’s input. How...
A: the answer is given below:-
Q: lement and demonstrate the 1-bit full adder on the Nexys A7 board with the following switch/LED conf...
A: // VERILOG CODE// module fulladder1bit(a,b,cin,s,co); input a,b,cin; output s,co; assign s=a^b^cin; ...
Q: Give a detailed account of how cdma permits data to be transmitted simultaneously over a single chan...
A: Introduction: Here we are required to give a detailed account of how CDMA permits data to be transmi...
Q: What is the difference between a heuristic and an algorithm ?
A: Introduction: Heuristic - It is a technique for determining the best path based on a heuristic value...
Q: Give Description for ReadKey
A: Description for ReadKey
Q: t d,f,k,m
A: Bubble sort is a type of sorting. It is stepping through lists that is to be sorted, comparing each ...
Q: Q1) Gram-Schmidt Algorithm and QR decomposition ii) Write python code (without numpy) to decide if ...
A: “Since you have asked multiple questions, we will solve the first question for you. If you want a...
Q: What is cold booting? Which is better cold booting or warm booting?
A: Cold Booting When you start your PC or switch on your PC from the OFF state, it is referred to as c...
Q: Which of the following is a link state protocol? a. BGP b. EIGRP c. RIP d. OSPF
A: Given: To choose the correct option.
Q: 8. Explain the difference between 0; if (x > 0) { s++; } if (y > 0) { s++; } S = and S = 0; if (x > ...
A: In case 1st) s=0; if(x>0){s++}; if(y>0){s++}; The above code when executed the control will go...
Q: for the following: (Use the for..next, do..loop and while..loop for the solution) In VB.Net Program ...
A: Input : Input the string Output : Change the case of every character except e and x.
Q: TV, Fan etc), an animal, a person, a vehicle, etc. In our class, we have already seen example classe...
A: According to the information given:- We have to follow the instruction
Q: Create a link element that loads the myprint.css style sheet file but only for printed output.
A: Create a link element that loads the myprint.css style sheet file but only for printed output.
Q: The CreateConsoleScreenBuffer method should be described in detail.
A: Introduction: CreateConsoleScreenBuffer is a function that allows you to create a screen buffer for ...
Q: public Boolean insertBefore(String newItem, String itemToInsertBefore)
A: class link { Node h; static class Node { String str; Node next; Node(String a) { str= a; } } pub...
Q: Design a code converter that converts a decimal digit from the 8, 4, -2, -1 code to BCD
A:
Q: 1. Write a Python function called add_daily_temp that is given a (possibly empty) dictionary meant t...
A: 1) Below is program that defines a function add_daily_temp which accept a dictionary containing daya...
Q: 5OL Sample E..
A: Use an array to store individual digits of each number and then compare these two arrays bit by bit ...
Q: Q2 answer needed 1.1. Write a permutation of 9 integers which is not in sorted order. Sort the inte...
A: The answer is given below.
Q: Question 39 OneDrive lets you keep your files in your home B. the cloud your USB Rash.arve. yourhard...
A: OneDrive is the Microsoft cloud service that connects a person to all his/her files. Using OneDrive ...
Q: Explain why database design is critical in the educational setting.
A: Answer: A well-designed database aids in Adapting to the needs of the user. Produce high-performanc...
USE EITHER PYTHON OR MAPLE FOR THESE (or matlab if you know it)
DO NOT SOLVE THESE BY HAND. If you solve these by hand I will thumbs down your answer.
Trending now
This is a popular solution!
Step by step
Solved in 2 steps
- Modeling the spread of a virus like COVID-19 using recursion. Let N = total population (assumed constant, disregarding deaths, births, immigration, and emigration). S n = number who are susceptible to the disease at time n (n is in weeks). I n = number who are infected (and contagious) at time n. R n = number who are recovered (and not contagiuous) at time n. The total population is divided between these three groups: N = S n + I n + R n There are several hidden assumptions here that may or may not apply to COVID-19, such as a recovered person is assumed to not be able to get the disease a second time, at least within the time window being examined. On week 0 (the start), you assume a certain small number of people have the infection (just to get things going). Everyone else is initially susceptible, and no one is recovered. There are two constants of interest: Let period = time period that it takes for an infected person to recover (recover meaning they become not infectious to…In computer science and mathematics, the Josephus Problem (or Josephus permutation) is a theoretical problem. Following is the problem statement: There are n people standing in a circle waiting to be executed. The counting out begins at some point (rear) in the circle and proceeds around the circle in a fixed direction. In each step, a certain number (k) of people are skipped and the next person is executed. The elimination proceeds around the circle (which is becoming smaller and smaller as the executed people are removed), until only the last person remains, who is given freedom. Given the total number of persons n and a number k which indicates that k-1 persons are skipped and kth person is killed in circle. The task is to choose the place in the initial circle so that you are the last one remaining and so survive. For example, if n = 5 and k = 2, then the safe position is 3. Firstly, the person at position 2 is killed, then person at position 4 is killed, then person at position 1…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
- 7. The American Museum of Natural History in New York City contains more than 32 million specimens and artifacts in its various collections, including the world’s largest collection of dinosaur fossils. Many of these are in storage away from public view, but all must be carefully inventoried. a) Suppose the inventory is unordered (!) and a sequential search is done to locate a specific artifact. Given that the search is executed on a computer that can do 12,000 comparisons per second, about how much time on the average would the search require? b) Assuming the inventory is sorted, about how much time would a binary search require?Answer the given question with a proper explanation and step-by-step solution. C++ 11.12 LAB: Fibonacci sequence (recursion) The Fibonacci sequence begins with 0 and then 1 follows. All subsequent values are the sum of the previous two, for example: 0, 1, 1, 2, 3, 5, 8, 13. Complete the Fibonacci() function, which takes in an index, n, and returns the nth value in the sequence. Any negative index values should return -1. Ex: If the input is: 7 the output is: Fibonacci(7) is 13 Note: Use recursion and DO NOT use any loops. main.cpp #include <iostream>using namespace std; int Fibonacci(int n) {/* Type your code here. */ } int main() {int startNum;cin >> startNum;cout << "Fibonacci(" << startNum << ") is " << Fibonacci(startNum) << endl;return 0;}Assume that you were given N cents (N is an integer) and you were asked to break up the N cents into coins consisting of 1 cent, 2 cents and 5 cents. Write a dynamicprogramming based recursive algorithm, which returns the smallest (optimal) number of coins needed to solve this problem. For example, if your algorithm is called A, and N = 13, then A(N) = A(13) returns 4, since 5+5+2+1 = 13 used the smallest (optimal) number of coins. In contrast, 5+5+1+1+1 is not an optimal answer.
- Construct a memoized algorithm for this algorithm and and derive its time complexity: Assume that you were given N cents (N is an integer) and you were asked to break up the N cents into coins consisting of 1 cent, 2 cents and 5 cents. Write a dynamicprogramming based recursive algorithm, which returns the smallest (optimal) number of coins needed to solve this problem. For example, if your algorithm is called A, and N = 13, then A(N) = A(13) returns 4, since 5+5+2+1 = 13 used the smallest (optimal) number of coins. In contrast, 5+5+1+1+1 is not an optimal answer. You do not need to prove the complexity bound formally, just derive it by analyzing each component in your algorithm.Downvote incorrectly done. _A pure full Implement c/c++ to evaluate round robin algorithm. You must use the job list given here: Job (1) arrive at CPU cycle1 Job (2) arrive at CPU cycle2 Job (3) arrive at CPU cycle36 I/O (32) CPU (54) I/O (45) CPU (20) I/O (40) CPU (48) CPU (39) CPU (48) I/O (55) Your job list must contain CPU bust and I/O bust as above. Quantum time = [5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60] The evaluation of the most suitable quantum time needs to consider the followingperformance metrics, but not limited to:(i) Turnaround time of the jobs;(ii) Waiting time of the jobs; and(iii) Number of interrupts incurred The code must able to read csv file format of the job list as input file. The code must able for user to input time quantum.. .Hippity hoppity, abolish loopity def frog_collision_time(frog1, frog2): A frog hopping along on the infinite two-dimensional lattice grid of integers is represented as a 4- tuple of the form (sx, sy, dx, dy) where (sx, sy) is its starting position at time zero, and (dx, dy) is its constant direction vector for each hop. Time advances in discrete integer steps 0, 1, 2, 3, ... so that each frog makes one hop at every tick of the clock. At time t, the position of that frog is given by the formula (sx+t*dx, sy+t*dy) that can be nimbly evaluated for any t. Given two frogs frog1 and frog2 that are guaranteed to initially stand on different squares, return the time when both frogs hop into the same square. If these two frogs never simultaneously arrive at the same square, return None. This function should not contain any loops whatsoever. The result should be calculated using conditional statements and integer arithmetic. Perhaps the best way to get cracking is to first solve a simpler…
- 3. Consider a hospital information system using which patients can take appointment with a doctor on first come first serve basis and their appointments are maintained in a queue. a. Discuss by giving reasons on which of the following data structures is most suitable for implementing such appointment queue, when considering that there is no limit on how many patients a doctor can see in any given day. *One dimensional array Linked list b. Write and execute a java program to create an object of class appointment queue, and perform operations such as insert, remove, and display. Give your reflection on each of these operationIn C Every budding computer scientist must grapple with certain classic problems, and the Towers of Hanoi (see Figure below) is one of the most famous of these. Legend has it that in a temple in the Far East, priests are attempting to move a stack of disks fromone peg to another. The initial stack had 64 disks threaded onto one peg and arranged from bottom to top by decreasing size. The priests are attempting to move the stack from this peg to a second peg under the constraints that exactly one disk is moved ata time, and at no time may a larger disk be placed above a smaller disk. A third peg is available for temporarily holding the disks. Supposedly the world will end when the priests complete their task, so there is little incentive for us to facilitate their efforts.Let’sassume that the priests are attempting to move the disks from peg 1 to peg 3. We wish to develop an algorithm that will print the precise sequence of disk-to-disk peg transfers. If we were to approach this…Recall that histograms are used for constructing load-balanced range partitions. Suppose you have a histogram where values are between 1 and 100, and are partitioned into 10 ranges, 1–10, 11–20,...,91–100, with frequencies 15, 5, 20, 10, 10, 5, 5, 20, 5, and 5, respectively. Give a load-balanced range partitioning function to divide the values into 5 partitions. Write an algorithm for computing a balanced range partition with p partitions, given a histogram of frequency distributions containing n ranges.