structural algorithms