Computer Science

In multivariable calculus and in statistics courses it is shown that Loover –e-(1/2)(0/0)2 dx = 1, -20 o 25 for any positive o. The function 1 f(x) ,-(1/2)6/0)2 021 is the normal density function with mean y = 0 and standard deviation o. The probability that a randomly chosen value described by this distribution lies in [a, b] is given by so f (x) dx. Approximate to within 10-5 the probability that a randomly chosen value described by this distribution will lie in a. (-0, 0] b. [-20, 20] c. [-30, 30]

EXPERT ANSWER

Write a C program to compute the value of the mathematical constant e to the power of x (ex) using the following infinite series: e* = 1 + x/1! + x2/2! + x3/3! + x4/4! + . Your program should include at least one function called compute_ex that receives any value of x as a parameter and returns the value of ex for the given value x. The computation should stop when the new term added (term = xw/n! where n=0,1,2,3,…) is less than 0.0001 Your program should also NOT use the already predefined system function pow. Items that should be submitted: 1. The C-program (main.c). 2. A softcopy of one program run showing the value your program calculates for ex in a word document. Example of a Sample Run: Enter the value of x: 2.5 e to the power 2.5 = 12.18

EXPERT ANSWER #include <stdio.h> int main(){int n = 10;printf(“Enter the value of x”);float x = scanf(“%f”,&x);printf(“e^x = %f”, compute_ex(n, x));return 0;} float compute_ex(int n, float x){ //The function potentially has a singular point at zero as 𝑒0=1 float sum = 1.0; // initialize sum of series for (int i = n – 1; i > …

Write a C program to compute the value of the mathematical constant e to the power of x (ex) using the following infinite series: e* = 1 + x/1! + x2/2! + x3/3! + x4/4! + . Your program should include at least one function called compute_ex that receives any value of x as a parameter and returns the value of ex for the given value x. The computation should stop when the new term added (term = xw/n! where n=0,1,2,3,…) is less than 0.0001 Your program should also NOT use the already predefined system function pow. Items that should be submitted: 1. The C-program (main.c). 2. A softcopy of one program run showing the value your program calculates for ex in a word document. Example of a Sample Run: Enter the value of x: 2.5 e to the power 2.5 = 12.18 Read More »

Exercises . For the following, which could be considered to be technical writing, nontechnical writing, or both? An email to a friend about your new computer. A complaint letter to the manufacturer of a robot vacuum cleaner. A letter to your insurance company explaining how a disease affects you. A letter to a government taxing agency in response to their inquiry about your tax return. A written request to your work supervisor for a salary increase. A letter to your local government authority requesting a zoning variance for a new pool. . . .

EXPERT ANSWER Technical and Non-technical writing Introduction: 1. Technical writing is a formal writing where set of predefined standards and rules are to be followed and the writer will remain technical toward the issue to be addressed in the writing. The writer uses the suitable contents that are official purpose oriented and used in official communications. Example of …

Exercises . For the following, which could be considered to be technical writing, nontechnical writing, or both? An email to a friend about your new computer. A complaint letter to the manufacturer of a robot vacuum cleaner. A letter to your insurance company explaining how a disease affects you. A letter to a government taxing agency in response to their inquiry about your tax return. A written request to your work supervisor for a salary increase. A letter to your local government authority requesting a zoning variance for a new pool. . . . Read More »

Assume you have the following search graph, where S is the start node and G1 and G2 are goal nodes. Arcs are labeled with the cost of traversing them and the estimated cost to a goal is reported inside nodes (i.e. h-value).

Assume you have the following search graph, where S is the start node and G1 and G2 are goal nodes. Arcs are labeled with the cost of traversing them and the estimated cost to a goal is reported inside nodes (i.e. h-value). For each of the search strategies listed below,(a) indicate which goal state is …

Assume you have the following search graph, where S is the start node and G1 and G2 are goal nodes. Arcs are labeled with the cost of traversing them and the estimated cost to a goal is reported inside nodes (i.e. h-value). Read More »

a) Given the following search graph, how many states will be visited until reaching the goal state using breadth-first search? Trace the states inside the search agenda until reaching the goal state assume the goal state is 30. S 2. 6 6 V 8 10 11 12 13 1415161718 303732333435 b) If we assumed depth-first search what will be the change in the number of visited states and the states inside the search agenda? c) Comment on the result from a) and b)

EXPERT ANSWER answered this Ans a. Traversal of the graph to reach goal state using Breadth first search 1 5 2 3 4 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 so as per traversal 29 states are visited until …

a) Given the following search graph, how many states will be visited until reaching the goal state using breadth-first search? Trace the states inside the search agenda until reaching the goal state assume the goal state is 30. S 2. 6 6 V 8 10 11 12 13 1415161718 303732333435 b) If we assumed depth-first search what will be the change in the number of visited states and the states inside the search agenda? c) Comment on the result from a) and b) Read More »

What is JINI technology?

What is JINI technology? EXPERT ANSWER JINI technology is the Sun’s distributed, federated object system based on Java technology. It provides a mechanism for locating services on the network that conform to a particular (Java) interface, or that have certain attributes associated with them. Once a service is located, the client can download an implementation …

What is JINI technology? Read More »

Question 1 Angela and Bob Ray keep a large garden in which they grow cabbage, tomatoes, and onions to make two kinds of relish—chow-chow and tomato. The chow-chow is made primarily of cabbage, whereas the tomato relish has more tomatoes than does the chow-chow. Both relishes include onions, and negligible amounts of bell peppers and spices. A jar of chow-chow contains 8 ounces of cabbage, 3 ounces of tomatoes, and 3 ounces of onions, whereas a jar of tomato relish contains 6 ounces of tomatoes, 6 ounces of cabbage, and 2 ounces of onions. The Rays grow 120 pounds of cabbage, 90 pounds of tomatoes, and 45 pounds of onions each summer. The Rays can produce no more than 24 dozen jars of relish. They make $2.25 in profit from a jar of chow-chow and $1.95 in profit from a jar of tomato relish. The Rays want to know how many jars of each kind of relish to produce to generate the most profit. a. Formulate a linear programming model for this problem. b. Solve this model graphically. a) Formulate the linear programming the Rays (10 marks) b) Convert the LP model into standard form (5 marks) c) Solve the linear programming model graphically (10 marks)

Question 1Angela and Bob Ray keep a large garden in which they grow cabbage, tomatoes, and onions to make two kinds of relish—chow-chow and tomato. The chow-chow is made primarily of cabbage, whereas the tomato relish has more tomatoes than does the chow-chow. Both relishes include onions, and negligible amounts of bell peppers and spices. …

Question 1 Angela and Bob Ray keep a large garden in which they grow cabbage, tomatoes, and onions to make two kinds of relish—chow-chow and tomato. The chow-chow is made primarily of cabbage, whereas the tomato relish has more tomatoes than does the chow-chow. Both relishes include onions, and negligible amounts of bell peppers and spices. A jar of chow-chow contains 8 ounces of cabbage, 3 ounces of tomatoes, and 3 ounces of onions, whereas a jar of tomato relish contains 6 ounces of tomatoes, 6 ounces of cabbage, and 2 ounces of onions. The Rays grow 120 pounds of cabbage, 90 pounds of tomatoes, and 45 pounds of onions each summer. The Rays can produce no more than 24 dozen jars of relish. They make $2.25 in profit from a jar of chow-chow and $1.95 in profit from a jar of tomato relish. The Rays want to know how many jars of each kind of relish to produce to generate the most profit. a. Formulate a linear programming model for this problem. b. Solve this model graphically. a) Formulate the linear programming the Rays (10 marks) b) Convert the LP model into standard form (5 marks) c) Solve the linear programming model graphically (10 marks) Read More »

Create a program named parentheses.java that reads in a string of various parentheses, brackets, and braces from standard input. Using a stack, verify whether or not the parentheses, brackets, and braces are balanced by type (e.g. {] is not balanced).

Create a program named parentheses.java that reads in a string of various parentheses, brackets, and braces from standard input. Using a stack, verify whether or not the parentheses, brackets, and braces are balanced by type (e.g. {] is not balanced). Extra Credit: Modify your program so that it can solve an infix equation. E.g. (2 …

Create a program named parentheses.java that reads in a string of various parentheses, brackets, and braces from standard input. Using a stack, verify whether or not the parentheses, brackets, and braces are balanced by type (e.g. {] is not balanced). Read More »

Use this image as the guide for rooms in this code. No weapons needed in this part.

You will be working with the same text-based game scenario from Projects One and Two. In this milestone, you will develop code for a simplified version of the sample dragon-themed game. The simplified version involves moving between a few rooms and being able to exit the game with an “exit” command. In the simplified version, …

Use this image as the guide for rooms in this code. No weapons needed in this part. Read More »