subject

Analysis of Algorithms Class Problem Statement
Sort (in ascending order) the items in a file of size 2x KIB using limited memory.
Note that x is a unsigned integer where x > 0.
(a) Rules:
i. The file is located in disk (not in memory)
ii. Memory is limited to 2 input buffers and 1 output buffer (4KIB each) Total memory capacity 12 KIB
iii. Assume that the contents of the file are unsigned integers separated by a comma delimiter. (i. e 3,1,3,100,99...)
iv. The unsigned integers are not sorted
v. The file can contain duplicated integers
vi. When in a file, a digit from an integer is 1 byte (datatype is char). When in a buffer, an integer is 4 bytes (data type is integer).
vii. Pass number 0 can only use the output buffer. All the remaining passes can use all the available buffers in memory
viii. All the buffers in memory support ±4 bytes of additional memory allocation.
ix. The merging process must be done using Merge Sort algorithm.
x. Temporary files, in disk, can only hold a max size of ((#pass + 1) ∗ 4)KIB
(b) Input and Output
i. Input: A file containing unsorted unsigned integers in the range of 0 and 100 (both inclusive). For example: 100,67,99,99,1,1,3,24,88,96,37,10,1 0,88,100,99,99
ii. Output: A file containing the sorted integers from the input file. For example: 1,1,3,10,10,24,37,67,88,88,96,99,99 ,99,99,100,100
Describe the algorithm to solve the problem for a given file of size 2^5 and 2^x (any given x). Note that x is a unsigned integer where x > 0. You can use tables, diagrams, pics, paragraph description to describe the algorithm. Be as clear as possible, and define clearly each step taken during the process.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 16:30
You have inserted new slides based on a word outline. how do you format these new slides to match the powerpoint presentation formatting? a. select all slides in the presentation and click format on the home tab. b. select the new slides and click reset on the home tab. c. select all slides in the presentation and click reset on the home tab. d. select the new slides and click format on the home tab.
Answers: 2
question
Computers and Technology, 23.06.2019 01:30
How do you set up a slide show to play continuously, advancing through all the slides without requiring your interaction? a. click set up slide show, and then select the loop continuously until ‘esc' and show without narration options. b. click set up slide show, and then select the loop continuously until ‘esc' and use timings, if present options. c. click set up slide show, and then select the show presenter view and use timings, if present options. d. click set up slide show, and then select the show without animation and browsed at a kiosk (full screen) options.
Answers: 3
question
Computers and Technology, 23.06.2019 04:00
Laire writes a letter to her grandmother, in which she describes an amusement park she visited last week. she adds pictures of that place in her letter. which feature of a word processing program will claire to remove unwanted parts of the pictures?
Answers: 3
question
Computers and Technology, 23.06.2019 20:00
How much current flows through the alternator brushes? a. 2–5 a b. 25–35 a, depending on the vehicle c. 5–10 a d. 10–15 a
Answers: 2
You know the right answer?
Analysis of Algorithms Class Problem Statement
Sort (in ascending order) the items in a file...
Questions
question
Computers and Technology, 22.05.2020 04:10
question
Mathematics, 22.05.2020 04:10
question
Mathematics, 22.05.2020 04:10
question
English, 22.05.2020 04:10
question
Mathematics, 22.05.2020 04:10
Questions on the website: 13722361