Добавил:
Fragga
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз:
Предмет:
Файл:Программа для решения задачи о назначении (с сырцами) / Debug / ouput
.txt Distribution v1.0, copyright (c) 2006 Lord Ruslan Nightmare
Distribution v1.0 comes with ABSOLUTELY NO WARRANTY; for details see license.txt
This is free software, and you are welcome to redistribute it
under certain conditions; for details see license.txt
Beginning calculations...
Base matrix
1 4 6 3| 1 0
9 7 10 9| 1 0
4 5 11 7| 1 0
8 7 8 5| 1 0
------------+
1 1 1 1
0 0 0 0
Base matrix with nullified rows
0 3 5 2| 1 1
2 0 3 2| 1 7
0 1 7 3| 1 4
3 2 3 0| 1 5
------------+
1 1 1 1
0 0 0 0
Base matrix with nullified columns
0 3 2 2| 1 1
2 0 0 2| 1 7
0 1 4 3| 1 4
3 2 0 0| 1 5
------------+
1 1 1 1
0 0 3 0
'No alternatives' matrix marks
. |
. - |
- |
- .|
------------+
'No alternatives' matrix
0. 3 2 2 | 1 1
|
2 0. 0- 2 | 1 7
|
0- 1 4 3 | 1 4
|
3 2 0- 0.| 1 5
|
----------------+
1 1 1 1
0 0 3 0
Matrix marks
. |
. - |
- |
- .|
------------+
Marked matrix contents
0. 3 2 2 | 1 1
|
2 0. 0- 2 | 1 7
|
0- 1 4 3 | 1 4
|
3 2 0- 0.| 1 5
|
----------------+
1 1 1 1
0 0 3 0
Marks of matrix with marked rows/colums
. | .
. - | .
- |
- .| .
------------+
. . .
Matrix with marked rows/colums
0. 3 2 2 | 1. 1
|
2 0. 0- 2 | 1. 7
|
0- 1 4 3 | 1 4
|
3 2 0- 0.| 1. 5
|
----------------+
1. 1. 1 1.
0 0 3 0
Paired matrix marks
. | .
. - | .
- |
- .| .
------------+
. . .
Paired matrix
0. 3 2 2 | 1. 1
|
2 0. 0- 2 | 1. 7
|
0- 1 4 3 | 1 4
|
3 2 0- 0.| 1. 5
|
----------------+
1. 1. 1 1.
0 0 3 0
There's 3 marked nulls
It's not enough, we should modify matrix
Marks of matrix with pre-punctured rows/columns
. | .
. - |
- | .
- .|
------------+
.
Matrix with pre-punctured rows/columns
0. 3 2 2 | 1. 1
|
2 0. 0- 2 | 1 7
|
0- 1 4 3 | 1. 4
|
3 2 0- 0.| 1 5
|
----------------+
1. 1 1 1
0 0 3 0
Marks of matrix with punctured rows/columns
. | .
. - | -
- | .
- .| -
------------+
-
Matrix with punctured rows/columns
0. 3 2 2 | 1. 1
|
2 0. 0- 2 | 1- 7
|
0- 1 4 3 | 1. 4
|
3 2 0- 0.| 1- 5
|
----------------+
1- 1 1 1
0 0 3 0
Before modification
0 3 2 2| 1 1
2 0 0 2| 1 7
0 1 4 3| 1 4
3 2 0 0| 1 5
------------+
1 1 1 1
0 0 3 0
Min unpunctured submatrix element = 1
Modified matrix
0 2 1 1| 1 1
3 0 0 2| 1 7
0 0 3 2| 1 4
4 2 0 0| 1 5
------------+
1 1 1 1
0 0 3 0
'No alternatives' matrix marks
. |
|
- |
- .|
------------+
'No alternatives' matrix
0. 2 1 1 | 1 1
|
3 0 0 2 | 1 7
|
0- 0 3 2 | 1 4
|
4 2 0- 0.| 1 5
|
----------------+
1 1 1 1
0 0 3 0
Matrix marks
. |
. - |
- - |
- .|
------------+
Marked matrix contents
0. 2 1 1 | 1 1
|
3 0. 0- 2 | 1 7
|
0- 0- 3 2 | 1 4
|
4 2 0- 0.| 1 5
|
----------------+
1 1 1 1
0 0 3 0
Marks of matrix with marked rows/colums
. | .
. - | .
- - |
- .| .
------------+
. . .
Matrix with marked rows/colums
0. 2 1 1 | 1. 1
|
3 0. 0- 2 | 1. 7
|
0- 0- 3 2 | 1 4
|
4 2 0- 0.| 1. 5
|
----------------+
1. 1. 1 1.
0 0 3 0
Paired matrix marks
. | .
- . | .
- . |
- .| .
------------+
. . .
Paired matrix
0. 2 1 1 | 1. 1
|
3 0- 0. 2 | 1. 7
|
0- 0. 3 2 | 1 4
|
4 2 0- 0.| 1. 5
|
----------------+
1. 1. 1 1.
0 0 3 0
There's 4 marked nulls
Success! Elements marked with '.' is the solution
1. 4 6 3 | 0. 0
|
9 7- 10. 9 | 0. 0
|
4- 5. 11 7 | 0 0
|
8 7 8- 5.| 0. 0
|
----------------+
0. 0. 0 0.
0 0 0 0
Distribution v1.0 comes with ABSOLUTELY NO WARRANTY; for details see license.txt
This is free software, and you are welcome to redistribute it
under certain conditions; for details see license.txt
Beginning calculations...
Base matrix
1 4 6 3| 1 0
9 7 10 9| 1 0
4 5 11 7| 1 0
8 7 8 5| 1 0
------------+
1 1 1 1
0 0 0 0
Base matrix with nullified rows
0 3 5 2| 1 1
2 0 3 2| 1 7
0 1 7 3| 1 4
3 2 3 0| 1 5
------------+
1 1 1 1
0 0 0 0
Base matrix with nullified columns
0 3 2 2| 1 1
2 0 0 2| 1 7
0 1 4 3| 1 4
3 2 0 0| 1 5
------------+
1 1 1 1
0 0 3 0
'No alternatives' matrix marks
. |
. - |
- |
- .|
------------+
'No alternatives' matrix
0. 3 2 2 | 1 1
|
2 0. 0- 2 | 1 7
|
0- 1 4 3 | 1 4
|
3 2 0- 0.| 1 5
|
----------------+
1 1 1 1
0 0 3 0
Matrix marks
. |
. - |
- |
- .|
------------+
Marked matrix contents
0. 3 2 2 | 1 1
|
2 0. 0- 2 | 1 7
|
0- 1 4 3 | 1 4
|
3 2 0- 0.| 1 5
|
----------------+
1 1 1 1
0 0 3 0
Marks of matrix with marked rows/colums
. | .
. - | .
- |
- .| .
------------+
. . .
Matrix with marked rows/colums
0. 3 2 2 | 1. 1
|
2 0. 0- 2 | 1. 7
|
0- 1 4 3 | 1 4
|
3 2 0- 0.| 1. 5
|
----------------+
1. 1. 1 1.
0 0 3 0
Paired matrix marks
. | .
. - | .
- |
- .| .
------------+
. . .
Paired matrix
0. 3 2 2 | 1. 1
|
2 0. 0- 2 | 1. 7
|
0- 1 4 3 | 1 4
|
3 2 0- 0.| 1. 5
|
----------------+
1. 1. 1 1.
0 0 3 0
There's 3 marked nulls
It's not enough, we should modify matrix
Marks of matrix with pre-punctured rows/columns
. | .
. - |
- | .
- .|
------------+
.
Matrix with pre-punctured rows/columns
0. 3 2 2 | 1. 1
|
2 0. 0- 2 | 1 7
|
0- 1 4 3 | 1. 4
|
3 2 0- 0.| 1 5
|
----------------+
1. 1 1 1
0 0 3 0
Marks of matrix with punctured rows/columns
. | .
. - | -
- | .
- .| -
------------+
-
Matrix with punctured rows/columns
0. 3 2 2 | 1. 1
|
2 0. 0- 2 | 1- 7
|
0- 1 4 3 | 1. 4
|
3 2 0- 0.| 1- 5
|
----------------+
1- 1 1 1
0 0 3 0
Before modification
0 3 2 2| 1 1
2 0 0 2| 1 7
0 1 4 3| 1 4
3 2 0 0| 1 5
------------+
1 1 1 1
0 0 3 0
Min unpunctured submatrix element = 1
Modified matrix
0 2 1 1| 1 1
3 0 0 2| 1 7
0 0 3 2| 1 4
4 2 0 0| 1 5
------------+
1 1 1 1
0 0 3 0
'No alternatives' matrix marks
. |
|
- |
- .|
------------+
'No alternatives' matrix
0. 2 1 1 | 1 1
|
3 0 0 2 | 1 7
|
0- 0 3 2 | 1 4
|
4 2 0- 0.| 1 5
|
----------------+
1 1 1 1
0 0 3 0
Matrix marks
. |
. - |
- - |
- .|
------------+
Marked matrix contents
0. 2 1 1 | 1 1
|
3 0. 0- 2 | 1 7
|
0- 0- 3 2 | 1 4
|
4 2 0- 0.| 1 5
|
----------------+
1 1 1 1
0 0 3 0
Marks of matrix with marked rows/colums
. | .
. - | .
- - |
- .| .
------------+
. . .
Matrix with marked rows/colums
0. 2 1 1 | 1. 1
|
3 0. 0- 2 | 1. 7
|
0- 0- 3 2 | 1 4
|
4 2 0- 0.| 1. 5
|
----------------+
1. 1. 1 1.
0 0 3 0
Paired matrix marks
. | .
- . | .
- . |
- .| .
------------+
. . .
Paired matrix
0. 2 1 1 | 1. 1
|
3 0- 0. 2 | 1. 7
|
0- 0. 3 2 | 1 4
|
4 2 0- 0.| 1. 5
|
----------------+
1. 1. 1 1.
0 0 3 0
There's 4 marked nulls
Success! Elements marked with '.' is the solution
1. 4 6 3 | 0. 0
|
9 7- 10. 9 | 0. 0
|
4- 5. 11 7 | 0 0
|
8 7 8- 5.| 0. 0
|
----------------+
0. 0. 0 0.
0 0 0 0