인공지능
알고리즘 - Sorting Networks 예제
멋인러닝
2023. 3. 21. 05:21
지난 시간에 소팅 네트워크를 공부하고
간단한 이해도 테스트 예제를 풀어보았다.
* zero one principle 참고
http://www.euroinformatica.ro/documentation/programming/!!!Algorithms_CORMEN!!!/DDU0170.html
27.2 The zero-one principle
Prove that a comparison network with n inputs correctly sorts the input sequence <n, n - 1,..., 1> if and only if it correctly sorts the n - 1 zero-one sequences <1, 0, 0,..., 0, 0>, <1, 1, 0,..., 0, 0>,..., <1, 1, 1,..., 1, 0>.
www.euroinformatica.ro
.
.
.
정답!