A computer can process 100 records of data in 200 milliseconds. If a millisecond is 1/1000 of a second, how many seconds does it take to process a file of 1000 records?

What will be an ideal response?


Solution 1 (using step-by-step reasoning):
• If it takes 200 milliseconds to process 100 records, it will take 10 times longer (2000 milliseconds) to process a file of 1000 records
• 2000 milliseconds is the same as 2 seconds, because it takes 1000 of the little 1/1000 second parts to make one second.
Thus, it takes 2 seconds to process the file.
Notice: The above reasoning used reciprocals of the information provided as input.
• If 100 records are processed in 200 milliseconds,
then it takes 200 milliseconds to process 100 records.
• If a millisecond is 1/1000 second, then one second is 1000 milliseconds.
Thinking in reciprocal terms makes the reasoning easier.

Solution 2 (using unit analysis)
Use unit conversion technique presented later in this chapter.
• One millisecond is 1/1000 second gives two reciprocal conversion factors: 1 / 1000 (seconds / millisecond) 1000 (milliseconds / second)
• 100 records processed in 200 milliseconds gives two reciprocal factors: 100 / 200 (records / millisecond) 200 / 100 (milliseconds / record)
• 1000 records in the file gives two reciprocal factors: 1000 (records / file) 1/1000 (file / record)
• Now, select the appropriate factors to find number of seconds to process the file:
x (seconds / file) = 1 / 1000 (seconds / milliseeertd)
* 200 / 100 (frtilliseeerids / reeefd)
* 1000 (records / file)
x (seconds / file) = (1 / -IOW) * (200 / * -1-000 (seconds / file)
= 2 (seconds / file)
Thus, it takes 2 seconds to process the file.

Computer Science & Information Technology

You might also like to view...

More unintentional errors occur in applications when the variables are declared using the minimum scope needed.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

Which GUI text editor is included with GNOME?

A. Gedit B. TextPad C. vi D. Emacs

Computer Science & Information Technology

Keyword _______ is used to create a synonym for a previously defined data type.

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology

Windows Power Shell allows scripts and snippets to run

Indicate whether the statement is true or false

Computer Science & Information Technology