Question: Write a program to test this out. Create sets D and E. Create a function P1(x,y) that is likely to be true and another P2(x,y)

Write a program to test this out. Create sets D and E. Create a function P1(x,y) that is likely to be true and another P2(x,y) that is likely to be false. Run the same and any functions using both P functions. Count the number of times the P function is called. Perform analysis and determine where same and where any have better performances. Turn in your code, results, and analysis of the results. Thanks.

this is the example for same and any code:

Same needle code: for(int i=0; i bool same = true; for(int j=0; j< B.size; j++){ same = same & m(B[j], T[i]); } if(same) return true; } return false;

Any needle code: for(int i=0; i bool exists = false; for(int j=0; j if(m(B[i], T[j])){ exists = true; break; } } if(!exists) return false; } return true;

Please help me as soon as possible and write down what kind of code used also write down the analysis for the code. Thanks.You can use any kind of program to do this such as c++, matlab or python. You can create sets D and E .This is the course for discrete structure.

This is the sets exampke:

All of my piercings, 16 places in my body, all of them done with a needle Jody (Rosanna Arquette) in Pulp Fiction.

Set of 16 piercings (B)

Set of things that pierce (T)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!