A python program to calculate the core number of each node in the graph.
This task was part of the assignment in the course SDSC 3002 (Data Mining) taught by Dr.Yu Yang at City University of Hong Kong. In the second assignment, we were asked to write a python program to calculate the core number of each node in the graph. The task was as follows:
Download the file "DBLP.txt" where the first line describes how many nodes and edges are in the DBLP graph, and each line starting from the second line is in the form "u v" which means there is an edge between the node u and the node v. Write a program to calculate the core number of each node for the DBLP graph. Output your results in a txt file where every line is in the form "u:c_u" indicating that the core number of node u is c_u.