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
Step: 1
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started