Thomas algorithm validation