Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed
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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

The Database Experts Guide To Database 2

Authors: Bruce L. Larson

1st Edition

0070232679, 978-0070232679

More Books

Students also viewed these Databases questions