Partition, rational partitions and characterization of complexity