Question: Problem-1: Find two algorithms to solve problems and analyze their tradeoffs performances Explanation: Some problems can be solved in different ways-sometimes taking less time-but others

 Problem-1: Find two algorithms to solve problems and analyze their tradeoffs

Problem-1: Find two algorithms to solve problems and analyze their tradeoffs performances Explanation: Some problems can be solved in different ways-sometimes taking less time-but others taking more time- but less storage space. Sorting a deck of cards into order: If you were physically wedged in a very small space, with no way to lay out the cards-you might try taking a card off the top of the deck and moving it to roughly the right place in the stack-then going through the deck fixing up mistakes, over and over until it was all in the right order. It would take a lot of time-but if you were in a tight space, it would work. If you had a nice large table to work on - you might try spreading all of the cards out then just picking them up in the right order. MUCH faster - but needing a large amount of space. Computer algorithms (inclading those for sorting cards into order) have simalar "trade-offs". You can easily end up with two algorithms, one faster than the other-but also needing more memory. In that case, there is no one Best" algorithm It all depends on your context. In a tiny "embedded computer with not much memory that only has to solve the problem once-you maybe don't care if it takes half a second to do the job. But in a video game that has to do absolutely everything 60 times per second- and your algorithm isn't allowed to use more than 1% ofthe available time-then maybe you dn't mind wasting some memory if it gets the job done in the 1/6,000 of a second you have to do it

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!