Skip to main content

Section 17.4 Result

As the picture shows, the program successfully terminated with 252 objects in total in the hash table, which is expected for question 1. However, when trying to change the comparing condition in check-monochromatic function to let a=b, the program ends up running an infinite loop at around 140 elements in the hash table, which indicates that the algorithm determined that 140 elements successfully yields a monochromatic set where as 139 does not, which the algorithm checks repeatedly around these two numbers.