If you have one solution with a problem domain model and a c

If you have one solution with a problem domain model and a colleague has a different one, can they both be correct? How can you tell if it is a correct model? How would you choose which might be a better solution?

Solution

Ans.

Yes, both can be correct as many solutions may exist for a single problem which tend to solve the problem in different ways.

To find out the correctness of the model, run the model for all the possible scenarios. Cover all the boundary cases and run each model independently. If the solution is the expected output, then we know tthat we have used a correct model to solve the situtaion.

There are many criteria which evaluate the model performance:

a. Time: Measure the time taken by each model to run in exactly same situation. (Identical dataset, identical iterations etc.)

b. Space: If one model uses more space (by using more data structures) than the other, then it is surely not a great model on the basis of space complexity.

c. Problem Coverage: If a model covers more scenarios and gives correct output for more cases, then it is a better model.

d. Combination: We can also have a combination of above factors and give weights to form a eval function which decides upon the model efficiency as a whole.

If you have one solution with a problem domain model and a colleague has a different one, can they both be correct? How can you tell if it is a correct model? H

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site