What are blended inheritance theory and one parent inheritance theory state? How were these theories disproved by mendel? explain
In: Biology
Write a C++ program to perform various calculations related to the fuel economy of a vehicle where the fuel economy is modeling using a polynomial of the form y = Ax2 + Bx + C, where
y = fuel economy in miles per gallon (mpg)
x = speed in miles per hour (mph)
In particular:
Inputs: The user should be prompted to input the following information.
The values for coefficients A, B, and C used to model the fuel efficiency
The capacity of the fuel tank (in gallons).
The current amount of fuel in the tank (in gallons).
The current speed of the vehicle (in mpg)
The distance to be travelled on the current trip (in miles)
The cost per gallon for gasoline
The minimum speed, Smin, to be used in the table of Fuel Economy vs Speed
The maximum speed, Smax, to be used in the table of Fuel Economy vs Speed
The speed increment, Sinc, to be used in the table of Fuel Economy vs Speed
Functions: The program should use at least 4 user-defined functions (in addition to main) as described below.
MPG(A, B, C, Speed) – This function returns the fuel economy in mpg for a given speed in mph.
PrintTable(Smin, Smax, Sinc A, B, C) – This function will print a table of Speed (in mpg) and Fuel Economy (in mpg).
Use the range of speeds indicated with the speed increment indicated.
This function should call the function MPG above.
Fuel economy should be calculated using the coefficients A, B, and C provided.
Include a table heading with units.
Display speeds as integers and fuel economy with 2 digits after the decimal point (include trailing zeros).
MaxEconomy(Smin, Smax, Sinc A, B, C, MaxMPG, MaxMPH) – This function will return the maximum mpg and the corresponding speed value using the speed range and increment specified. This function should call the function MPG above.
Use at least one more useful (user-defined) function to calculate one or more of the program outputs.
Outputs: The program output should include the following:
Neatly summarize the input values
A table of Speed and Fuel Economy values (created by the PrintTable function above).
The maximum fuel economy (in mpg) and the corresponding speed (determined by the MaxEconomy function above).
The fuel economy (in mpg) at the current speed
The minimum fuel economy (in mph) and the corresponding speed. Note: This does not always occur at the minimum speed.
For the current speed, trip distance, number of gallons currently in the tank, and cost per gallon for fuel (show the value of each), display the following:
The fuel economy (in mpg)
Speed for the trip (in mph)
The fuel cost for the trip.
The number of gallons that will be used for the trip.
The time to reach the destination.
State how many times you will need to stop for gas. Assume that the tank must be filled when it is 10% full.
State the number of gallons of gas will be left in the tank at the end of the trip.
State the number of miles until the next time the tank must be filled (after the trip).
Repeat the above if you drive at the speed for maximum fuel economy. Also state how many gallons of gas were saved and how much money was saved by driving at the speed for maximum fuel efficiency.
Use a suitable number of digits for all numeric outputs and include units when appropriate.
Error Checks: The program should check for appropriate ranges for inputs and allow the user to re-enter any incorrect inputs, including:
Fuel tank capacity: 0 to 20 gallons
Current amount of fuel in tank: 20% - 100% of fuel tank capacity
Current speed of vehicle: 20 to 80 mph
Distance to be travelled: Must be > 0
Cost per gasoline: Must be > 0
Minimum speed for table (Smin): Integer value where 20 < Smin < 50
Maximum speed for table (Smax): Integer value where (Smin + 10) < Smax < 80
Speed increment for table (Sinc): Integer value where 0 < Sinc < (Smax – Smin)/5
Re-running the Program: Include a loop that will give the user the option of re-running the program.
In: Computer Science
Question 1
The GCD is the greatest common denominator. Euclid found that if A=Bx +R then GCD(A,B)=GCD(A,R). Prove this is true. Show working
Question 2
The approach Euclid in calculating the GCD used was novel as it was an ________process to solve a complex problem, hence formed the first _______.
Question 3
The difference between a breadth first search (BFS) and a depth first search (DFS) is that in the DFS you traverse all the first branch before proceeding to the next branch.
a) True
b) False
The first definition as graphs need axes
The second definition as more general so covers all graphs
Neither as they are too vague
Question 5
Find a c such that f(n) is O(n2) when f(n) = 1/4 n2 + 15 n + 115. Justify this answer.
Question 6
If f(n)= 10* log n then Big-O of f(n) is O(n)
a) True
b) False
In: Computer Science
Suppose we are given an arbitrary digraph G = (V, E) that may or may not be a DAG. Modify the topological ordering algorithm so that given an input G, it outputs one of the two things:
a. A topological ordering thus establishing that G is a DAG.
b. A cycle in G thus establishing that it is not a DAG.
The runtime of your algorithm should be O(m+n) where m = |E| and n = |V|
In: Computer Science
Which of the following statements is (are) correct?
(x) A choice by Molly to buy more muffins at $2 per muffin than at
the price of $3 per muffin is an example of
the law of demand and it is illustrated as a movement along Molly’s
demand curve for muffins.
(y) A choice by Albert to buy more Tony’s pizza because of a recent
increase in the price of Polly’s pizza is
illustrated as a shift to the right of Albert’s demand curve for
Tony’s pizza and reflects an increase in
demand for Tony’s pizza.
(z) If George has a change in behavior and is now willing to buy
less apple pie at every price, then his
demand curve for apple pie will shift to the left.
A. (x), (y) and (z)
B. (x) and (y) only
C. (x) and (z) only
D. (y) and (z) only
E. (y) only
Which of the following statements is (are) correct?
(x) Assume pizza and soda are complements. If the price of pizza
decreases, then both the demand for soda
will increase and the demand curve for pizza will shift to the
right.
(y) Assume Lipton green tea and Arizona green tea are close
substitutes. If the price of Lipton tea decreases,
then the quantity demanded of Lipton tea will increase and the
demand for Arizona tea will decrease.
(z) Assume Hershey chocolate bars and Mars chocolate bars are
substitutes. If the price of Hershey chocolate
bars decreases, then the demand curve for Mars chocolate bars will
shift to the left.
A. (x), (y) and (z)
B. (x) and (y) only
C. (x) and (z) only
D. (y) and (z) only
E. (y) only
Which of the following is NOT a determinant of demand?
A. the expected price of the good next month
B. the price of a resource that is used to produce the good
C. the price of a complementary good
D. the price of a substitute good
E. A and B, only
In: Economics
R PROGRAMMING QUESTION
- Below I have code. For each double hashtag (##) can you comment on the code below it (Describe what is happening in the code below it next to each ##)
- Run the code and compare the confidence intervals
- I have to submit the confidence intervals, comments, and the code with the ## filled out
Leaps.then.press.plot.2<-function(xmat0,yvec,xpred,ncheck=20)
{
#
#input quadratic matrix with less than 30 columns eg. the result of x.auto2a<-matrix.2ndorder.make(xmat[,-7],F)
#also, no need for plotting, just pull out best, xpred is one of the row vectors from x.auto2a, but all terms with weight are divided by 2
#
##
leaps.str<-leaps(xmat,yvec)
##
z1<-leaps.str$Cp-leaps.str$size
##
o1<-order(z1)
matwhich<-(leaps.str$which[o1,])[1:ncheck,]
MPSEvec<-NULL
##
for(i in 1:ncheck){
ls.str0<-regpluspress(xmat[,matwhich[i,]],yvec)
##
parvec<-matwhich[i,]
npar<-sum(parvec)
## (WHY npar+1)
MPSE<-ls.str0$press/(length(yvec)-(npar+1))
MPSEvec<-c(MPSEvec,MPSE)
}
##
I1<-(MPSEvec==min(MPSEvec))
##
i<-c(1:ncheck)[I1]
##
xmat.out<-xmat[,matwhich[i,]]
##
xpred.out<-xpred[matwhich[i,]]
##
list(xmatout=xmat.out,yvec=yvec,xpredout=xpred.out)
}
Bootreg<-function(xmat,yvec,xpred,nboot=10000,alpha=0.05)
{
##
lstr0<-leaps.then.press.plot2(xmat,yvec,xpred)
xmat0<-lstr0$xmat.out
yvec0<-lstr0$yvec
xpred0<-lsstr0$xpredout
##
rprd.list<-regpred(xpred0,xmat0,yvec0)
ypred0<-rprd.list$pred
sdpred0<-rprd.list$sd
df<-rprd.list$df
##
bootvec<-NULL
nobs<-length(yvec0)
for(i in 1:nboot){
##
vboot<-sample(c(1:nobs),replace=T)
xmatb<-xmat0[vboot,]
yvecb<-yvec0[vboot]
##
lstrb<-leaps.then.press.plot2(xmatb,yvecb,xpred)
##
xmatb0<-lstrb$xmat.out
yvecb0<-lstrb$yvec
xpredb0<-lsstrb$xpredout
##
rprd.list<-regpred(xpred0,xmat0,yvec0)
ypredb<-rprd.list$pred
sdpredb<-rprd.list$sd
dfb<-rprd.list$df
##
bootvec<-c(bootvec,(ypredb-ypred0)/sdpredb)
}
##
lq<-quantile(bootvec,alpha/2)
uq<-quantile(bootvec,1-alpha/2)
##
LB<-ypred0-(sdpred0)*uq
UB<-ypred0-(sdpred0)*lq
##
NLB<-ypred0-(sdpred0)*qt(1-alpha/2,df0)
NUB<-ypred0+(sdpred0)*qt(1-alpha/2,df0)
list(bootstrap.confidence.interval=c(LB,UB),normal.confidence.interval=c(NLB,NUB))
}
> regpred<-
function(xpred,xmat,y){
##
ls.str<-lsfit(xmat,y)
#calculate prediction
ypred<-ls.str$coef%*%c(1,xpred)
#use ls.diag to extract covariance matrix
ycov<-ls.diag(ls.str)$cov.unscaled
#use ls.diag to extract std deviation
std.dev<-ls.diag(ls.str)$std.dev
#variance of data around line
v1<-std.dev^2
#variance of prediction
vpred<-v1*c(1,xpred)%*%ycov%*%c(1,xpred)
df=length(y)-length(diag(ycov))
list(pred=ypred,sd=sqrt(vpred),df=df)
}
In: Computer Science
On January 1, Pulse Recording Studio (PRS) had the following account balances.
| Accounts Payable | $ | 8,500 |
| Accounts Receivable | 6,700 | |
| Accumulated Depreciation—Equipment | 6,500 | |
| Cash | 3,760 | |
| Cash Equivalents | 1,620 | |
| Common Stock | 10,700 | |
| Deferred Revenue | 3,900 | |
| Equipment | 30,000 | |
| Notes Payable (long-term) | 12,700 | |
| Prepaid Rent | 2,430 | |
| Retained Earnings | 2,730 | |
| Supplies | 520 | |
The following transactions occurred during January.
Required:
REQUIREMENTS:
1. General Journal tab - Prepare the journal entries to record the transactions that occurred from January 1-31. Review the accounts as shown in the General Ledger and Trial Balance tabs. Then prepare the necessary adjusting entries at January 31 to correctly report net income for the period.
2. General Ledger tab - Each journal entry is posted automatically to the general ledger. Use the drop-down button to view the unadjusted and adjusted balances in the General Ledger.
3. Trial Balance tab - You may view either the unadjusted and adjusted trial balance by choosing from the drop-down.
4. Income Statement tab - Use the drop-down to select the accounts properly included on the income statement. The unadjusted and adjusted balances will appear for each account based on your selection.
5. Statement of Retained Earnings tab - Prepare the bank reconcilation for the year ended January 31.
6. Balance Sheet tab - Use the drop-down to select the accounts to properly included on the balance sheet. The unadjusted and adjusted balances will appear for each account, based on your selection.
7. Analysis tab - Using the information from the requirements above, complete the 'Analysis' tab.
In: Accounting
Discuss how x-inefficiencies arise and how they explain why the measure of the deadweight loss of a monopoly (i.e., Harberger’s) may be too low? Include a graph in your answer that shows the increase in deadweight welfare loss due to x-inefficiencies.
In: Economics
4. Suppose from our class (with 25 students), we find the
average GPA is 2.7, with standard deviation
0.4. Regard our class as a random sample from the whole university.
Based on the information from our
class, can we believe at significance level 0.05, that the average
GPA for all students can be at least 2.8?
In: Math
2D Car Collision
Car Collision in 2D (c7p50) A 900- kg car collides with a 1400- kg car that was initially at rest at the origin of an x-y coordinate system. After the collision, the lighter car moves at 10.0 km/h in a direction of 35 degrees with respect to the positive x axis. The heavier car moves at 13 km/h at -41 degrees with respect to the positive x axis.
A) What was the initial speed of the lighter car (in km/h)? ____Tries 0/7
B) What was the initial direction (as measured counterclockwise from the x-axis)? ___Tries 0/7
In: Physics
Biochemical Tests crossword puzzle:
Across
5 Anaerobic metabolism
6 Crusty growth on broth
8 Cloudy growth in broth
10 Smooth growth on slant
11 Another name for glucose
13 Hydrolyzed collagen
15 Possible sole carbon source
16 Bacterial movement
17 Test use of milk nutrients (2wds)
20 Hydrolyzes starch
22 Bacteria settled to bottom of broth
23 Milk sugar
27 Test for acetoin
28 Produces clear zones in skim milk agar
29 pH indicator in sugar fermentation tubes (2wds)
Down
1 Produced from tryptophan 2 Group of 4 tests
3 Red when acidic (2wds)
4 Turns SIM black
7 Catalysts secreted by the cell
9 Inverted tube to trap gas
12 Tests for lipase
14 Common liquid medium (2wds)
16 Sticky surface growth on broth
18 Breaking macromolecules with addition of water 19 Snowy
appearance in broth culture
21 E. coli produces this from glucose (3wds)
24 Spiky growth on slant
25 Breaks down hydrogen peroxide
26 Product of amino acid degradation
In: Biology
what are legal requirements and ethical issues in capturing and analyzing digital images in health sector
In: Nursing
Consider a monopolist with a linear demand curve: q = a − bp,
where a;b > 0. It produces at constant marginal cost c and has
no fixed cost. Assume that 0 < c < a b.
(a) Find the monopoly price, quantity, and profits. (b) Derive the
inverse demand curve P(q). Draw P(q), the MRcurve, and the MC-curve
in a diagram. Explain why we need the assumption c < a b. (c)
Does it matter that the monopolist sets price instead of quantity?
(d) Calculate the deadweight loss of monopoly. (e) A change in b
results in two opposing effects on the deadweight loss. Calculate
the effect of a change in b on the deadweight loss. (f) Derive the
price elasticity of demand η for any price. How does η change with
p? (g) Show mathematically as well as graphically that the price
elasticity of demand η > 1 at the monopoly price.
In: Economics
At t=0 a grinding wheel has an angular velocity of 27.0 rad/s . It has a constant angular acceleration of 25.0 rad/s2 until a circuit breaker trips at time t = 2.00 s . From then on, it turns through an angle 430 rad as it coasts to a stop at constant angular acceleration.
Through what total angle did the wheel turn between t=0 and the time it stopped?At what time did it stopWhat was its acceleration as it slowed down?
In: Physics
Independent Sample T Test (Student Height)
Open College Student Data
Research Question: Is there a significant difference between genders on average student height?
Record the following:
1)What test will you run to answer this research question? Why?
2)Is Assumption One: Equal Variances met? How do you know?
3)Is Assumption Two: Normality met? How do you know?
4)Is Assumption Three: Independency met? How do you know?
5)What are the means? (Male and Female)
6)Answer the research question. How do you know?
7)Which gender is statistically taller? How do you know?
8)Is there an effect size (Cohen’s D)? If so what is it? How did you arrive at the effect size? Is it small, medium, large or very large? How do you know?
DATA SET
height gender (1 - male, 2 - female)
67.00 2
72.00 1
61.00 2
71.00 1
65.00 2
67.00 1
69.00 1
75.00 1
62.00 2
61.00 2
64.00 2
64.00 1
70.00 1
63.00 2
64.00 2
63.00 2
65.00 2
71.00 1
72.00 1
68.00 2
75.00 1
67.00 2
69.00 1
67.00 1
64.00 2
64.00 2
70.00 1
64.00 1
70.00 1
72.00 1
64.00 2
71.00 1
67.00 2
63.00 2
69.00 1
68.00 1
64.00 2
70.00 1
71.00 1
72.00 1
60.00 2
65.00 2
72.00 1
63.00 2
75.00 1
71.00 1
65.00 2
69.00 1
63.00 2
67.00 2
In: Math