Write the class MultiDimList according to the following requirements:
The List will have the following:
Implement and test the following methods:
Input File:
Number of students
Name, ID, Mark separated by space
Testing:
Marking Scheme:
5 Marks/method.
5 Marks for the main method.
5 Marks creativity.
Total out of 40.
In: Advanced Math
Use Newton's method to find all solutions of the equation correct to eight decimal places. Start by drawing a graph to find initial approximations. (Enter your answers as a comma-separated list.)
4e-x2 sin(x) = x2 − x + 1
In: Advanced Math
In: Advanced Math
The neighborhood of a vertex in a graph consists of the vertex itself, together with all vertices that are connected to it by an edge. Each graph has a variable xi associated with the i-th vertex, and the vertex has a known value that is equal to the sum of the variables for all neighborhood vertices. Start with a graph with 5 vertices forming a pentagon, with edges joining vertices 1 and 2, 2 and 3, 3 and 4, 4 and 5, and 5 and 1. Then draw an edge joining vertices 2 and 4, and an edge joining vertices 2 and 5. The known values at vertices 1 through 5 are, respectively, 2, 1, −1, 3, and 5.
(a) Find the augmented matrix for the system of equations satisfied by x1, x2, x3, x4, x5.
In: Advanced Math
Box-Jenkins : For each of the non-seasonal models presented
below, indicate whether or not it complies with the Box-Jenkins
approach, ie is it stationary and invertible? Justify your
answers.
a) Yt = et − 0,67 Yt−1
b) Yt = et + 0,43 Yt−1 − 0,37 Yt−2
c) Yt = et + 0,25 et−1
d) Yt = et + 0,9 Yt−1 + 0,3 Yt−2
e) Yt = et + 0,9 Yt−1 + 0,3 et−1
In: Advanced Math
MATLAB question!
4. (a) Modify the code, to compute and plot the quantity E = 1/2mv^2 + 1/2ky^2 as a function of time. What do you observe? Is the energy conserved in this case?
(b) Show analytically that dE/dt < 0 for c > 0 while dE/dt > 0 for c < 0.
(c) Modify the code to plot v vs y (phase plot). Comment on the behavior of the curve in the context of the motion of the spring. Does the graph ever get close to the origin? Why or why not?
given code
---------------------------------------------------------------
clear all;
m = 4; % mass [kg]
k = 9; % spring constant [N/m]
c = 4; % friction coefficient [Ns/m]
omega0 = sqrt(k/m); p = c/(2*m);
y0 =-0.8; v0 = 0.3; % initial conditions
[t,Y] = ode45(@f,[0,15],[y0,v0],[],omega0, p); % solve for
0<t<15
y = Y(:,1); v = Y(:,2); % retrieve y, v from Y
figure(1); plot(t,y,'ro-',t,v,'b+-');% time series for y and
v
grid on; axis tight;
%---------------------------------------------------
function dYdt = f(t,Y,omega0,p); % function defining the DE
y = Y(1); v = Y(2);
dYdt=[ v ; -omega0^2*y-2*p*v]; % fill-in dv/dt
end
-----------------------------------------------------------------------------------------
In: Advanced Math
In: Advanced Math
Differential Equations
Use a series solution to solve the IVP .
y′′−4y= 0
y(0) = 3
y′(0) = 5.
(Your answer will use one or more series.)
In: Advanced Math
lambda calculus: what does the following expression evaluate
to?
fst (snd (fst (pair (pair (pair 2 3) (pair 4 5)) (pair (pair 6 7) (pair 8 9))) ))
In: Advanced Math
Discuss the importance of budgets in enhancing the financial and non-financial performances of an organisation. Explain how participative budgeting may assist the budgetary process in a decentralised organisation.
Your discussion should include the role of budgets:
◦ in communicating and coordinating across the organisation;
In: Advanced Math
Solve the following differential equations.
i) y'''-6y''+10y'=0
ii) dy/dx= x2/(1+y2) with y(1)=3
iii) (x2-2y)y'+2x+2xy=0
iv) Use substitution to solve t2y'+2ty=y5 for t>0
In: Advanced Math
Let y(t) = (1 + t)^2 solution of the differential equation y´´ (t) + p (t) y´ (t) + q (t) y (t) = 0 (*)
If the Wronskian of two solutions of (*) equals three.
(a) ffind p(t) and q(t)
(b) Solve y´´ (t) + p (t) y´ (t) + q (t) y (t) = 1 + t
In: Advanced Math
Consider the following linear programming problem
Maximize | $1 X1 + $2 X2 | |
Subject To | 2 X1 + X2 ≤ 8 |
Constraint A |
X1 + X2 ≤ 5 |
Constraint B |
|
X1, X2 ≥ 0 |
Constraint C |
Note: Report two digits after the decimal point. Do NOT use thousands-separators (,)
1 - Which of the following is the correct standard maximization form for the above linear programming problem
AnswerCorrectNot Correct |
AnswerCorrectNot Correct |
AnswerCorrectNot Correct |
AnswerCorrectNot Correct |
Z -X1 - 2 X2 = 0 2 X1 + X2 ≤ 8 X1 + X2 ≤ 5 X1, X2 ≥ 0 |
Z - X1 - 2 X2 - 0 S1 - 0 S2 = 0 2 X1 + X2 + S1 + 0 S2 = 8 X1 + X2 + 0 S1 + S2 = 5 X1, X2, S1, S2 ≥ 0 |
Z - X1 - 2 X2 = 0 2 X1 + X2 + S1 = 8 X1 + X2 + S2 = 5 X1, X2, S1, S2 ≥ 0 |
Z - X1 - 2 X2 - S1 - S2 = 0 2 X1 + X2 = 8 X1 + X2 = 5 X1, X2, S1, S2 ≥ 0 |
2- Fill out the following blanks with Final Simplex Tableau information
Basic Variables |
X1 |
X2 |
S1 |
S2 |
Z |
Right Hand Side |
AnswerX1X2S1S2 |
Answer |
Answer |
Answer |
Answer |
Answer |
Answer |
AnswerX1X2S1S2 |
Answer |
Answer |
Answer |
Answer |
Answer |
Answer |
P |
Answer |
Answer |
Answer |
Answer |
Answer |
Answer |
3- The optimal is
Z = Answer
When
X1 = Answer
X2 = Answer
In: Advanced Math
Combined, there are 207 Asians, Africans, Europeans, and Americans in a village. The number of Asians exceeds the number of Africans and Europeans by 65. The difference between the number of Europeans and Americans is 16. If the number of Africans is doubled, their population exceeds the number of Europeans and Americans by 24. Determine the number of Asians, Africans, Europeans, and Americans in this village
In: Advanced Math
Question: What is the central ethical conflict in this case? How would you have responded to the conflict in question? What complications or "gray areas" do you identify?
Focus on Ethics CISCO SYSTEMS, WALMART, TACO BELL, STARBUCKS, U-HAUL, GENERAL DYNAMICS, AND FARMERS INSURANCE: IS DIRECT LABOR A VARIABLE COST? The question as to whether direct labor is a variable cost is interesting from a cost estimation perspective, but it also presents an interesting ethical issue. Direct material is always a variable cost. At the other extreme, depreciation on fixed facilities and infrastructure typically is not. What about direct labor? Here it depends on the ability and willingness of management to adjust the labor force to current needs. If management is able and willing to hire workers as needed and lay them off when activity declines, direct labor would be a variable cost. The contemporary trend at many companies seems to be in this direction. "Companies are looking first to bring in contract workers that they can quickly tap and zap without paying any benefits or severance." In fact, the temps have recently been the fastest-growing sector of employment. "And they aren't accounted for as regular employees. This helps companies that use a lot of them, like Cisco Systems Inc., to drive up revenue per employee." "The growing use of the just-in-time workforce is not the only means by which companies are priming the productivity pump. Workers complain that many employers are taking advantage of outdated labor laws by misclassifying them as salaried-exempt so they can skirt overtime pay. Walmart, Taco Bell, Starbucks, and U-Haul, among others, have been slapped with class actions. In the case of General Dynamics Corp., this resulted in a $100 million award that is now on appeal. At Farmers Insurance, employees got $90 million. Some employers are so worried about the issue that they are now doing wage-and-hour audits." Is it ethical to "tap and zap" employees? What do you think? (For more on this issue, see Management Accounting Prac tice: Is Direct Labora Variable or a Fixed Cost?, page 240.) Related to this issue is the ongoing debate about raising the U.S. federal minimum wage. Some have suggested that $15 per hour is an appropriate level, citing the need for a "living wage." Others argue that raising the minimum wage could actually be detrimental to those it strives to help.
In: Advanced Math