answersLogoWhite

0


Best Answer

IN COMPUTER SCIENCE, A SPACE-TIME OR TIME-MEMORY TRADEOFF IS A SITUATION WHERE THE MEMORY USE CAN BE REDUCED AT THE COST OF SLOWER PROGRAM EXECUTION (OR, VICE VERSA, THE COMPUTATION TIME CAN BE REDUCED AT THE COST OF INCREASED MEMORY USE). AS THE RELATIVE COSTS OF CPU CYCLES, RAM SPACE, AND HARD DRIVE SPACE CHANGE HARD DRIVE SPACE HAS FOR SOME TIME BEEN GETTING CHEAPER AT A MUCH FASTER RATE THAN OTHER COMPONENTS OF COMPUTERS. THE APPROPRIATE CHOICES FOR SPACE-TIME TRADEOFFS HAVE CHANGED RADICALLY. OFTEN, BY EXPLOITING A SPACE-TIME TRADEOFF, A PROGRAM CAN BE MADE TO RUN MUCH FASTER.

THE MOST COMMON SITUATION IS AN ALGORITHM INVOLVING A LOOKUP TABLE: AN IMPLEMENTATION CAN INCLUDE THE ENTIRE TABLE, WHICH REDUCES COMPUTING TIME, BUT INCREASES THE AMOUNT OF MEMORY NEEDED, OR IT CAN COMPUTE TABLE ENTRIES AS NEEDED, INCREASING COMPUTING TIME, BUT REDUCING MEMORY REQUIREMENTS. A SPACE-TIME TRADEOFF CAN BE APPLIED TO THE PROBLEM OF DATA STORAGE. IF DATA IS STORED UNCOMPRESSED, IT TAKES MORE SPACE BUT LESS TIME THAN IF THE DATA WERE STORED COMPRESSED (SINCE COMPRESSING THE DATA REDUCES THE AMOUNT OF SPACE IT TAKES, BUT IT TAKES TIME TO RUN THECOMPRESSION ALGORITHM). DEPENDING ON THE PARTICULAR INSTANCE OF THE PROBLEM, EITHER WAY IS PRACTICAL. ANOTHER EXAMPLE IS DISPLAYING MATHEMATICAL FORMULAE ON PRIMARILY TEXT-BASED WEBSITES, SUCH AS WIKIPEDIA.

Storing only the LaTeX source and rendering it as an image every time the page is requested would be trading time for space - more time used, but less space. Rendering the image when the page is changed and storing the rendered images would be trading space for time - more space used, but less time. Note that there are also rare instances where it is possible to directly work with compressed data, such as in the case of compressed bitmap indices, where it is faster to work with compression than without compression. Larger code size can be traded for higher program speed when applying loop unrolling. This technique makes the code longer for each iteration of a loop, but saves the computation time required for jumping back to the beginning of the loop at the end of each iteration. Algorithms that also make use of space-time tradeoffs include:

BABY-STEP GIANT-STEP ALGORITHM FOR CALCULATING DISCRETE LOGARITHMS.

RAINBOW TABLES IN CRYPTOGRAPHY, WHERE THE ADVERSARY IS TRYING TO DO BETTER THAN THE EXPONENTIAL TIME REQUIRED FOR A BRUTE FORCE ATTACK. RAINBOW TABLES USE PARTIALLY PRECOMPUTED VALUES IN THE HASH SPACE OF A CRYPTOGRAPHIC HASH FUNCTION TO CRACK PASSWORDS IN MINUTES INSTEAD OF WEEKS. DECREASING THE SIZE OF THE RAINBOW TABLE INCREASES THE TIME REQUIRED TO ITERATE OVER THE HASH SPACE.

THE MEET-IN-THE-MIDDLE ATTACK USES A SPACE-TIME TRADEOFF TO FIND THE CRYPTOGRAPHIC KEY IN ONLY 2N + 1 ENCRYPTIONS (AND O(2N) SPACE) VERSUS THE EXPECTED 22N ENCRYPTIONS (BUT ONLY O(1) SPACE) OF THE NAIVE ATTACK.

DYNAMIC PROGRAMMING, WHERE THE TIME COMPLEXITY OF A PROBLEM CAN BE REDUCED SIGNIFICANTLY BY USING MORE MEMORY.

User Avatar

Wiki User

13y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

14y ago

Generally, a faster algorithm will take up more memory, whereas a slower algorithm will use less memory.

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Time space trade off in data structure?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Every data structure in data warehouse contains time element?

Every data structure in the data warehouse contains the time element. Why?


Case complexity in data structure algorithms?

The complexity of an algorithm is the function which gives the running time and/or space in terms of the input size.


What are the subject-matters of data structure?

types of data structure types of data structure


What is the main purpose of the structure?

To arrange data in a particular manner.these manner or set of rules is defined in the data structure so that the data used in computer systems can properly used at necessary time.


How do you amend a data structure?

How do you amend a data structure?


What are the goals of data structure?

To arrange data in a particular manner.these manner or set of rules is defined in the data structure so that the data used in computer systems can properly used at necessary time.


What is the difference between allocation and search data structure?

difference between serch data structure and allocation data structure


What is homogeneous data structure?

collection of dissimilar type of data is called non homogeneous data structure as for example structure .


What is the weakness of Data structure diagram?

weakness of data structure diagrams


What is a homogeneous data structure and why is this a weakness for RDBMS?

in homogeneous data structure all the elements of same data types known as homogeneous data structure. example:- array


Which data structure used in database?

You create your own data structure in database.


What does DATA stand for?

The acronym DATA can stand for many things. One such is the Debt Aids Trade Africa and another is Do As Time Allows.