In this project, you will implement virtual bitmap.
Input: a given file, project4input.txt, where the first line is the number n of flows, which is followed by n lines, each for a flow, containing its flow id (source address) and the number of distinct elements in the flow — for demo, n = 8,507, m = 500,000, l = 500 Function: record the elements of all flows in bitmap B of 500,000 bits; you may create elements as random numbers and you may record each element once or multiple times, which won’t make a difference. After recording, estimate the spread of each flow and plot a figure, where x-axis is the true spread and y-axis is the estimated spread. Each flow is represented by a point in the figure, whose x-coordinate is the flow’s actual spread and y-coordinate is the flow’s estimated spread. Set the range of x-axis to [0, 500].
Output for submission: a pdf figure as described above. An example is given below.
3. Programming Environment
Programming language: Java, C, C++, C#, Python
Operating System: Windows, Mac OS or Linux
Programming Tool: Eclipse, IntelliJ, Jcreator, Kawa, Netbeans, … whatever you like.
To use Eclipse, please go through the following list:
- Download JDK from: https://www.oracle.com/technetwork/java/javase/downloads/jdk8downloads–html
- Download Eclipse from: http://www.eclipse.org/downloads/
- Here is a link for eclipse tutorial:
- Here is a tutorial for socket programming in Java:
4. Code Submission
You must submit the source code and one output file in pdf with the demo input parameters given earlier. Name the output file should be virtualbitmap.pdf.
Include readme.txt to explain your files.