I've got an exercise from one of my coruse.
The question is about homeworks allocation. We have N students, they summit N homeworks.
Now is the time for the students review their homeworks, each student should have two assignments which done by another two students, and one more condition is one assignments can not be reviewed by more than two students.
For example, 4 students 1, 2, 3, 4.
Can have this allocation: 12, 13, 24, 34.
My job is to write a program that can solve thic problem automatically.
I've got a half-solution(half because it need to be proof).
If the solution is correctly, the programming part just writting the code. Using programming language to imitate human's work because the solution is the procedures of human's work original. That's call the programming abstraction.
We use the computer to solve problems. The problems is still solve by humans but through computer's calculate. The computer is a machine which can generate some outputs according to the inputs. It imitate the nature evnironment. Inside should be some instructions abstraction the nature problem. We use programming language abstraction the nature problem and through the compiler conver it into instructions which computer can understand.
We use programming to abstraction the nature world, Mathematic also the same.
Human use mathematic to abstraction the nature world, using mathematic to solve the nature problem. Therefore I think a smart gay should good in mathematic, and I study hard in mathematic although my mathematic still very poor.
Come back to the problem, I'd better to find a proof Now.