Question

In: Computer Science

What is the pre-condition for x, if the post-condition is -30 <= y <= 0 for...

What is the pre-condition for x, if the post-condition is -30 <= y <= 0 for the following program segment?

y = x * x - 5 *x - 24

Solutions

Expert Solution

for y = -30

x = 3 or 2

Therefore pre condition for x will be

2 <= x <= 3


Related Solutions

Given the following pre-condition and program segment, what is the post-condition for y? // Pre-condition: -2...
Given the following pre-condition and program segment, what is the post-condition for y? // Pre-condition: -2 <= x < 4 y = 2*x*x - x +3
? ′′ − 8? ′ − 20? = xe^(x) initial condition is ?(0) = 0 y'(0)=0....
? ′′ − 8? ′ − 20? = xe^(x) initial condition is ?(0) = 0 y'(0)=0. laplace/inverse/partialfract. show all work please!
f(x,y)=30(1-y)^2*x*e^(-x/y). x>0. 0<y<1. a). show that f(y) the marginal density function of Y is a Beta...
f(x,y)=30(1-y)^2*x*e^(-x/y). x>0. 0<y<1. a). show that f(y) the marginal density function of Y is a Beta random variable with parameters alfa=3 and Beta=3. b). show that f(x|y) the conditional density function of X given Y=y is a Gamma random variable with parameters alfa=2 and beta=y. c). set up how would you find P(1<X<3|Y=.5). you do not have to do any calculations
Solve the equation y'=5-8y with initial condition y'(0)=0
Solve the equation y'=5-8y with initial condition y'(0)=0
1.y''+y=5.8x^2. 2.y''-4y=0, (x=0, y=4.9; x=0, y' =6.4) *What is the value of the coefficient of the...
1.y''+y=5.8x^2. 2.y''-4y=0, (x=0, y=4.9; x=0, y' =6.4) *What is the value of the coefficient of the term e^2x? ode
Find y as a function of x if y′′′+25y′=0 y(0)=2,  y′(0)=20,  y′′(0)=−100 y(x)=
Find y as a function of x if y′′′+25y′=0 y(0)=2,  y′(0)=20,  y′′(0)=−100 y(x)=
static int product(int x,int y){ if(x==0||y==0){//checking if x or y is 0 return 0;//if x or...
static int product(int x,int y){ if(x==0||y==0){//checking if x or y is 0 return 0;//if x or y is 0, then the return value and x*y will be zero. }else if(y<0&&x<0){ x=-x;//Changing the sign of x y=-y;//Changing the sign of y }else if(x>=1){ return (y+product(x-1,y)); } return (x+product(x,y-1)); } find the space complexity and the time complexity of the above algorithm.
A lamina occupies the part of the rectangle 0≤x≤40≤x≤4, 0≤y≤30≤y≤3 and the density at each point...
A lamina occupies the part of the rectangle 0≤x≤40≤x≤4, 0≤y≤30≤y≤3 and the density at each point is given by the function ρ(x,y)=3x+7y+4ρ(x,y)=3x+7y+4. A. What is the total mass? B. Where is the center of mass?
Solve y''-y=e^t(2cos(t)-sin(t)) with initial condition y(0)=y'(0)=0
Solve y''-y=e^t(2cos(t)-sin(t)) with initial condition y(0)=y'(0)=0
y''(t)+(x+y)^2*y(t)=sin(x*t+y*t)-sin(x*t-y*t), y(0)=0, y'(0)=0, x and y are real numbers
y''(t)+(x+y)^2*y(t)=sin(x*t+y*t)-sin(x*t-y*t), y(0)=0, y'(0)=0, x and y are real numbers
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT