Programming languages question (Please help if you can)
Prove (or disprove) that the following pre-post form is correct
{ x > 0 }
if (x > 0)
y = 2 * x + 1;
else
y = x + 4;
{ y < 3 }
In above problem there is two condition :-
pre
condition :- x > 0 /* it means that given input
which will be x and x>0.*/
post
condition :- y < 3 /* after program will finish
it's execution if it is correct then it will meet the condition
*/
{ x > 0 }
if(x>0)
y=2*x+1;
else
y=x+4;
{ y < 3 }
-> in above example we will give some input and check wether the
program is correct or not.
input :- 1 (x=1>0)
output :- 3 (y=3!<3)
here we give input (1) which satisfy the pre condition then y will become 3 which will not satisfy post condition. so, we can say that this problem is not correct. so it is disproved that above form is correct.
Programming languages question (Please help if you can) Prove (or disprove) that the following pre-post form...
Prove or Disprove #3
(d) For each of the following, prove or disprove: iii) There is an element of X × Y with the form (a, 3a)
(d) For each of the following, prove or disprove: iii) There is an element of X × Y with the form (a, 3a)
Which of the following languages are regular. Prove (by providing a regular expression) or disprove. a. L1 = {ai bj ck dl | (i + j)mod 2 = (k + l)mod 2 , i, j, k, l ≥ 0} b. L2 = {ai bj ck dl | (i + j) = (k + l), i, j, k, l ≥ 0}
disprove that the given lan 4. [20 Points For each of the following languages, prove or guage is regular (a) L1www e {a,b}*} {w w E {a, b}* and no two b's in w have odd number of a's in between}. (b) L2 (c) L3 a" (d) L4 vw n = 3k, for k > 0}. a, b}*}
disprove that the given lan 4. [20 Points For each of the following languages, prove or guage is regular (a) L1www e...
please help in detail
1. Prove or disprove the following statements: a. For any matrix A € Rmxn with Rank(A) = r, A and AT have the same set of singular values. b. For any matrix A ER"X", the set of singular values is the set of eigenvalues.
Prove that the following are not regular languages. Just B and F
please
Prove that the following are not regular languages. {0^n1^n | n Greaterthanorequalto 1}. This language, consisting of a string of 0's followed by an equal-length string of l's, is the language L_01 we considered informally at the beginning of the section. Here, you should apply the pumping lemma in the proof. The set of strings of balanced parentheses. These are the strings of characters "(" and ")"...
Hey, could someone help me check my answers with these please :)
Thank you
Which of the following does the choice rule not allow you to do? Take any pre-condition of the if: construction as a pre-condition of the if: and else: blocks Take the condition of the if statement a a pre-condition of the if: block Take (P) as a post-condition of the whole if: construction if (Py is a post-condition of both the if: and else: blocks Take...
discrete math question using proofs to determine to prove the
following equation or disprove it
4. Prove or disprove. Let A, B, C, and D be sets. Then (Ax B)n (CxD) (Ancx (B nD) 5. Prove or disprove: {2k 1 k E Q} {4" | k E Q) F6 7 Prove or disprove. Let A be a set and let I be an arbitrary index set for a collection of sets {Be l α E 1). Then, 6. An(UP)-a αΕΙ
Need help answering this java programming question. Thank you in
advance!
g. Re-code the following as a do-while loop with a switch statement for the if-elses, Assume goingToMovies is declared and has been set to true, so it can enter the loop. Assume choice, movie, Cont and input are already declared. while(goingToMavies) Sustem.aut printf("%nChoose a number from 1 through 5 for the movie" + "you want to watch: ") choice inputnextint) iffchoice 1) movie "Shazam!" else iffchoice 2) movie "A...
can y'all help with with these 3 please!! Thank you!! Question 1 Find the volume beneath z = f(x,y) and above the region described by the triangle with vertices (0,0), (4,0), and (0,4). f(x,y)= -x-y+c ; use c = 7. Hint: compute the double integral required to find the volume under f(x,y) using the limits of integration given by the region on the x-y plane. Question 2 Prove that F is a gradient field and determine the work of F...
Would ypu please help me with this question? Can you prove it the
green relation is a stress function. Additional notes are in the
attached photo. Thank you
Show that the following is a stress function C (-4, B , cs 1, 2, 3). ml Notes To be a stress function it has to satisfy ® A and ç might need to be zero. If so, why?