Profiling Egypt algorithm