You are on page 1of 282

22-0203 ANAPTIXI EFARMOGON.

indb 1

7/5/13 12:59 PM

22-0203 ANAPTIXI EFARMOGON.indb 2

7/5/13 12:59 PM

22-0203 ANAPTIXI EFARMOGON.indb 3

7/5/13 12:59 PM



 ,

,
 ,

 ,

/ , M.Sc. ,

 ,

 , . ,
19

 ,
.. ( )
 . , ..



/ , 19

, 19
 ,


/ ,
 ,


-
-

 ,
49, 106 82, , . 38.45.594

 /
(),
16, , .: 3645274,
e.mail: epy@epy.gr



. , ..

. , ..

1.1.:
 . ,
,
No 15: /

 ,

 I.



&
, /
& / .
.

22-0203 ANAPTIXI EFARMOGON 001-136.indd 4

3/31/14 1:46 PM


IN

. , . , . , . ,
. , . , .




'
( )

22-0203 ANAPTIXI EFARMOGON 001-136.indd 5

7/10/2014 9:13:43

22-0203 ANAPTIXI EFARMOGON.indb 6

7/5/13 12:59 PM

' , "
" .
" "
,
.
.
14 , .
( 1-5) ,
.

.
.
.
.
.

, .

, ,
. .
( ). ,
.
,
, .
,
.

22-0203 ANAPTIXI EFARMOGON.indb 7

7/5/13 12:59 PM

, , ,
. :




,

.


_...
_
.

22-0203 ANAPTIXI EFARMOGON.indb 8

7/5/13 12:59 PM

1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
1.1

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

1.2

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

1.3

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

1.4

.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

1.5

.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25

1.6

.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
2.1

.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

2.2

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34

2.3

.. . . . . . . . . . . . . . . . . . . 35

2.4

 / . . . . . . . . . . . . . . . . 35
2.4.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
2.4.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
2.4.3 .. . . . . . . . . . . . . . . . . . . . . . . . 40
2.4.4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
2.4.5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44

3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
3.1

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55

3.2

+ = . . . . . . . . . . . . 56

3.3

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58

3.4

.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60

3.5

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61

3.6

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63

3.7

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65

3.8

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
3.8.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
3.8.2 . . . . . . . . . . . 68
3.8.3 Fibonacci.. . . . . . . . 70

3.9

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
3.9.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
3.9.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
3.9.3 .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73

4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
4.1

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77

22-0203 ANAPTIXI EFARMOGON.indb 9

7/5/13 12:59 PM

4.2

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79

4.3

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80

4.4

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82

4.5

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84

5. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
5.1

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
5.1.1 . . . . . . . . . . . . . . . 89
5.1.2 .. . . . . . . . . . . . . . . . . . . . . 90
5.1.3

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
5.1.4 .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91

5.2

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92

5.3

.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95

5.4

5.3.1

. . . . . . . . . . . . . . . . . . . . . . . . . 97

5.3.2

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97

.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98

6. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
6.1

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105

6.2

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
6.2.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
6.2.2


. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106

6.2.3

.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107

6.2.4 4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
6.3
6.4

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
6.4.1 . . . . . . . . . . . . . . . . . . . . 116
6.4.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
6.4.3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117

6.5

. . . . . . . . . . . . . . . . . . . . . . . . . 119

6.6

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120

6.7

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120

7. .. . . . . . . . . . . . . . . . . . . . . . . . . . . 125

10

7.1

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127

7.2

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128

7.3

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128

7.4

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129

7.5

.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131

7.6

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131

22-0203 ANAPTIXI EFARMOGON.indb 10

7/5/13 12:59 PM

7.7

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131

7.8

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132

7.9

-.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133

7.10 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134

8. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
8.1

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139
8.1.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140
8.1.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144

8.2

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145
8.2.1 .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145
8.2.2 _. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147
8.2.3 .. ..... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149

9. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153
9.1

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155

9.2

.. . . . . . . . . . . . . . . . . . . . . 160

9.3

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160

9.4

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165

10. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169
10.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171
10.2 . . . . . . . . . . . . . . . . . . . . . . . 173
10.3  . . . . . . . . 173
10.4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174
10.5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175
10.5.1 . . . . . . . . . . . . . . . . . . . . . . . 177
10.5.2 . . . . . . . . . . . . . . . . . . . . . . . . . 178
10.5.3 . . . . . . . . . . . . . . . . . . 180
10.6 -. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182
10.7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184

11. . . . . . . . . . . . . . . 191
11.1 . . . . . . . . . . . . . . . . . . . . . . . . . 193
11.1.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194
11.1.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196
11.1.3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196
11.1.4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198
11.2 . . . . . . . . . . . . . . 198
11.2.1 .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199
11.2.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200

22-0203 ANAPTIXI EFARMOGON.indb 11

11

7/5/13 12:59 PM

11.3

.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201
11.4
.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207
11.4.1 .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208
11.4.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209
11.5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210

12. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215
12.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217
12.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218
12.3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221
12.4 . . . . . . . . . . . . . . . . . . . . . . . . . . 224
12.4.1 .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225
12.4.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227
12.5 .. . . . . . . . . . . . . . . . . . . . . . . . 227

13. .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231
13.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233
13.2 .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235
13.3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235
13.4 .. . . . . . . . . . . . . . . . . . . . 237

14. - . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241
14.1 .. . . . . . . . . . . . . . . . . . . . . . . . . . . 243
14.1.1 - . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243
14.1.2 .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246
14.1.3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249
14.1.4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253
14.2  .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255
14.2.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 256
14.2.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 256
14.2.3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 260
14.3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 260

: ASCII. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 268
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273
.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277

12

22-0203 ANAPTIXI EFARMOGON.indb 12

7/5/13 12:59 PM


'
( )

22-0203 ANAPTIXI EFARMOGON.indb 13

+
=

+
=


'
( )

+
=

+
=

+
=

7/5/13 12:59 PM



, .
, ,
, ,
.
, ,
,
.


:
,

,
,
,

,

.

3
;
3 " 2000";
3
;
3 ,
;

14

22-0203 ANAPTIXI EFARMOGON.indb 14

7/5/13 12:59 PM

1.1 |

,
. , ,
.
,
, , , .

,
.

, , , .
, ,
, .
, .

.
.
l


,
.

, ,
.


Robin Wood
Nottingham.

, ,
,
, Pasteur Fleming, .

1 .

22-0203 ANAPTIXI EFARMOGON.indb 15

15

7/5/13 12:59 PM


2000 (millennium bug). . ,
15 1999 150499.
,
,
. 21 010100,
.
2000 "" . (ATM)
.

. , ,
, .. , 2000.
,
. 2000
. ,
, .

16

,
, ,
, .

, ' ,


.

, , , ,
,
,
.

, ,
, , .

22-0203 ANAPTIXI EFARMOGON.indb 16

7/5/13 12:59 PM

, ,
, , ,
, .

1.2 |


.
,
.


.


.
,
, ,
.

. , , ,
.

. ,
.
.
. . ,
.


. , ,
.
.
.

1 .

22-0203 ANAPTIXI EFARMOGON.indb 17

17

7/5/13 12:59 PM

1

,
. ,
.
, :
. .
.
,
.
.
, . ,
.
.
. .

.
. ,
, .
.
: .
: .


. , ( ) ( ).

.
. .

.

18

22-0203 ANAPTIXI EFARMOGON.indb 18

7/5/13 12:59 PM

I

.

.

"" , .
""
. ,
"" .

1.3 |

.
. ,
.

.


,
.
.
,
.

2


.

.
" ". , :
(1)
(2)
(3)

1 .

22-0203 ANAPTIXI EFARMOGON.indb 19

19

7/5/13 12:59 PM

.
.
(1) , :
(1.1)
(1.2)  ,

(1.3)  ""
(2) ,
:
(2.1)
(2.2)
(2.3)
(3) ,
:
(3.1) 
(3.2)
(1.1) :
(1.1.1) 

(1.1.2) 
(1.1.3) 
(1.2),
:
(1.2.1)
(1.2.2) 

(1.2.3) 
,
.
.

, .
.

. :

20

22-0203 ANAPTIXI EFARMOGON.indb 20

7/5/13 12:59 PM


. , .


1.1.
A

1.1

1.1.1
1.1.2
1.1.3

1.2

1.3

2.1

2.2

2.3

3.1

3.2

1.2.1
1.2.2
1.2.3

. 1.1. " "



.
,
.

1.4 |
.
.

. -

1 .

22-0203 ANAPTIXI EFARMOGON.indb 21

21

7/5/13 12:59 PM

. ""
. ,
.
,
.

.
.

, , .. , .

3
, .

.
:
.

, .
:
, ,
, .
.
.

.
;
.
,
;
. ,
, .
.

22

22-0203 ANAPTIXI EFARMOGON.indb 22

7/5/13 12:59 PM

1.1.
: 9
:

: 2

:
/

10

17

15

.
100 , .
.

" " 1.1.
,
. ,
.
.
:
100 ; , " ",
. , ,
.
.
:
, ;
.
" " 92 8.
, , .., 5809 , 5287 522
. A
. , ,
.
,
.
.
,
10 13 ..

1 .

22-0203 ANAPTIXI EFARMOGON.indb 23

23

7/5/13 12:59 PM

,
. ,
1.2.
1.2. "
" 1999-2000

522

9,0

10

13

1211

20,8

14

15

2120

36,5

16

17

1180

20,3

18

20

776

13,4

5809

100

1.2 , ( )
( ).
, , .
, 1.2,
,
. " 1000 ".


2500
2000
1500
1000
500

. 1.2.
.

24

22-0203 ANAPTIXI EFARMOGON.indb 24

7/5/13 12:59 PM

,
.
, .


, .

, . . ,
, , . , (
), .
( 1.3):
l

, ,
.

. 1.3.

1.5 |

, ,
. ,


. .
1. , :


.
, ,
.


,
, .

1 .

22-0203 ANAPTIXI EFARMOGON.indb 25

25

7/5/13 12:59 PM

,
.

, .
. , .
2. , :


.
,
,
.


,

.


. ,
,
.



. .
, .

.


,
""


,

.

26

3. , .
, :

,
, "" "".


.

22-0203 ANAPTIXI EFARMOGON.indb 26

7/5/13 12:59 PM

:

.

, ,
.

.

:

.

,
.
.

:
.

1.6 |

, .


.
, ,
.
,
.
,
, ,
, ;
"" . .

.
"".
, .
, , -

1 .

22-0203 ANAPTIXI EFARMOGON.indb 27

27

7/5/13 12:59 PM


.
.
, , .
""
.
.
,
, . ,
.
,

.
.
,
3 .


l

,
:

, , , ,

,
,

, .
,
.

.

. .

.

28

22-0203 ANAPTIXI EFARMOGON.indb 28

7/5/13 12:59 PM

,
, ""
.

.


.
' .
,
.
.
.
,
.

,
,
,
,
,

-
1.
.
2.
.
3.

.
4. , ,
.
5. 1.4.
6. .
7. ;
8. .

1 .

22-0203 ANAPTIXI EFARMOGON.indb 29

29

7/5/13 12:59 PM


1. Jacques Arsac, Les machines penser Des ordinateurs et des hommes,
Seuil, Paris, 1987.
2. Emanuel Falkenauer, Genetic algorithms and grouping problems,
Wiley, 1998.
3. Les Goldschlager & Andrew Lister: Computer Science A modern
introduction, Prentice Hall, 1990.
4. R. Kadesch, Problem Solving-Across the Disciplines, Prentice Hall En
gineering, Science & Math, 1996.
5. Nicholas Negroponte, Being digital, Alfred Knopf Inc, 1995.
6. G. Polya, How to solve it A new aspect of mathematical method, Prin
ceton University Press (second edition renewed), 1985.

http://www.awesomelibrary.org/Classroom/
Science/Problem_Solving/Problem_Solving.html

, .

,
.
http://www.hawaii.edu/suremath/click.html

,
,
,

(, , )
.

30

22-0203 ANAPTIXI EFARMOGON.indb 30

7/5/13 12:59 PM

+
=

22-0203 ANAPTIXI EFARMOGON.indb 31

+
=

+
=


'
( )

+
=

+
=

7/5/13 12:59 PM



. ,
.
,
, . ,

. , , . ,
, , , . ,
.
,
, .


:
,
,

,
,

.

3 ;
3 ;
3
;
3 3+6+9+...+ 999;

32

22-0203 ANAPTIXI EFARMOGON.indb 32

7/5/13 12:59 PM

2.1 |

,


1 n.
. ,
.
25
,
.
, ,
. , .

, ,
.

(input). ,
. ,

.

(output).

.

(definiteness).
. ,

.



(algorithm)

Abu Jafar
Mohammed ibn Musa al
Khowarizmi,
825 ..



Algoritmi dixit...
( ...).
al Khowarizmi

(

aljabr=),



.


,

.


20



.

(finiteness). .

,
(computational procedure).

(effectiveness).
.
, .
. , , -

2.

22-0203 ANAPTIXI EFARMOGON.indb 33

33

7/5/13 12:59 PM


:
l
l
l
l
l
l
l
l

,
,
,
,
,
,
,
.


. ,
, , ,
,

. ,

( ) .

2.2 |
. ,
, ,
.
, ,
:

(hardware). ,

( ,
...).

(programming languages).
(, )
. ( assembly C)
( Basic
Pascal). ,
. ,
( ).

(theoretical).

.

34

22-0203 ANAPTIXI EFARMOGON.indb 34

7/5/13 12:59 PM

, .
,
.

(analytical). (computer
resources) , ,
CPU / .. 5.

2.3 |



:
l

(free text),
.
, .

(diagramming techniques), . ,
, (flow chart).
,
.

(natural language) .
, , , .

(coding),

.

,

.

2.4 |
 /


,
. ,

2.

22-0203 ANAPTIXI EFARMOGON.indb 35

35

7/5/13 12:59 PM

, , ,

. ( ),
.


, .
, .
:
l

, ,

, ,

, ,

, .

.

2.4.1
( )
, .
.
. .

36

22-0203 ANAPTIXI EFARMOGON.indb 36

7/5/13 12:59 PM

1.
,
.

_1
a
b
c a + b
c
_1

a, b


.
.
.
,
a ,
a .
,
, .

.
a b : c a + b. . :

=
=

ca+b

. 2.1.
1

(constants).
.
l

, .. 123, +5, -1,25

.. ,

(variables). ,
. ,
. ,
, .
(operators). . , .
(expressions). (operands),
.
.
.
.

2.

22-0203 ANAPTIXI EFARMOGON.indb 37

37

7/5/13 12:59 PM

, , .
,
. ,

= .
.
, .
. , .
a b
, c , . ,
(),
(),
().
, 2.1.

2.4.2

/ .

. ,
.
. ,

. , , ,
. ,
.
( )

.
.
,
.

2.
.

|+5| = 5 |-5| = 5

38

, ,
, .
, ,

22-0203 ANAPTIXI EFARMOGON.indb 38

7/5/13 12:59 PM

, .
.
_2
a

a < 0 a a*(-l)
a

_2

.... :

: ( ),
. , .
... , ,
. ,
_. ..



_1
_2
..............
_
_
,
a
. ,
(),
(),
().
2.1.

a<0

a a* (-1)

. 2.2. 2

2.

22-0203 ANAPTIXI EFARMOGON.indb 39

39

7/5/13 12:59 PM

3.

,
, .
_3
a, b
a
 < b
c a + b

c a * b
_
c
_3
, :

a, b

ca*b

a<b

ca+b

. 2.3.
3

2.4.3


. ,

40

22-0203 ANAPTIXI EFARMOGON.indb 40

7/5/13 12:59 PM

1
24, .
.

4.

1 2 3, .
_4
a
a = 1 ""
_ a = 2 ""
_ a = 3 ""
""
_
_4

a=1

a=2

a=3

. 2.4. 4

, ... (select
case), .

2.

22-0203 ANAPTIXI EFARMOGON 001-136.indd 41

41

4/23/14 4:51 PM


...
_,

,

(
, age).




.



,
-

(
).

,


.
,

,
_

42

5.

.
5.
"
;"
age
age
< 0
" ..."
< 5
" !!"
< 60
""
< 100
" "

" "
_
_5

2.4.4
.
...
, ( )
.... ,
...

6.

. , 80 , . 1.70,
.
_6
,
< 80
< 1.70
"-"

"-"
_

< 1.70
"-"

"-"
_
_
_6

22-0203 ANAPTIXI EFARMOGON.indb 42

7/5/13 12:59 PM

<1,7

<80

<1,7

. 2.5. 6

,
.
.
. ,

,
,
.

.
.
(
)
.
.

2.

22-0203 ANAPTIXI EFARMOGON.indb 43

43

7/5/13 12:59 PM

2.4.5
, .
, . , .

,
= *
.
(
). .

7.
: ...
1 100.
i i + 1
i

.
,
.
, , .. 5, 207, -32 ...

, 1.
, i, 1 100 1.

ii+1
i i 1.
100 i i + 1. .... :



_
:
, . ,
_
. :

44

22-0203 ANAPTIXI EFARMOGON.indb 44

7/5/13 12:59 PM

_7
i 1
i 100
i
i i + 1
_
_7


,


_
.

8.

.
:
,
. , , , ,
. :
1.
2.
3. 1.
,
( ). ,
. ,
.
, 3 :
3.  ,
1, .

. :
... ... ...,
,
.

, ....
:
_8
x
x > 0
x
x
_
_8




,

.

,
. ,
. ,
-

2.

22-0203 ANAPTIXI EFARMOGON.indb 45

45

7/5/13 12:59 PM

, , ..
999999. .
... :
x 999999

9. :
_..._


. , .


_...
_

_9
_
x
x
_ x < 0
_9
,
x .

,
.

10.
: ......
100 1
100.
, ....... .

Sum Sum + i
Sum
i

_10
Sum 0
i 1 100
Sum Sum + i
_
Sum
_10
, ......
, i ( = 1) ( = 100). i 1, , 1.
Sum ,
0, . Sum .

46

22-0203 ANAPTIXI EFARMOGON.indb 46

7/5/13 12:59 PM

i1
sum 0

sum sum + 1
ii+1

i 100

sum

. 2.6.
10

11.
: ......... _

1 100.
.
, i.
_11
0
i 2 100 _ 2
+ i
_

_11

.......
, . , .
,
, :
k 100 0 _ -1
, . . ,
f(x) x
0 1, :
x 0 1 _ 0,01

O
k 5 5

O
k 5 1

2.

22-0203 ANAPTIXI EFARMOGON.indb 47

47

7/5/13 12:59 PM

12.

45
x 19
405
+ 45
855
. 2.7.

45

19

45

90

90

180

360

720

720

= 855
. 2.8.

,
.
. , ,

. ,
,

,
, ..
,
2.7.
, . ,
. ( ),
,
. ,
,
.
, , , 45
19. - ,
.
2.8 , . ,
, .
, .

(shift)
, 0 1,
, , .. 17
00010001 , byte.
, 0
0, 00100010 , 34 . , , ,
1 0, 00001000
, 8 .
,
.

48

22-0203 ANAPTIXI EFARMOGON.indb 48

7/5/13 12:59 PM


1.
: , +,
,
: ,
: , .

2.
, , _ (underscore).
, .

3.
: +, , *, /, ^, div, mod
: , <, =, , >,
: (), (), ().

4.
, , , .

5.

6.
<> <>

<>
<_1>

<_2>
_


1
_1
............

_

_
_

<_1>
<_1>
_ <_2>
<_2>
......
_ <_>
<_>

<_>
_

2.

22-0203 ANAPTIXI EFARMOGON 001-136.indd 49

49

4/23/14 4:50 PM

7.


<>

_


_

_ <>

 1 2 _

8.
, , , ..

9.
,
, , ..

10.
- ,
!, !.

11. 
<_> <_>

12.
( )
//... //.
//... //.

,
,
. , ,
.

. , ,
(shift),
.

50

22-0203 ANAPTIXI EFARMOGON.indb 50

7/5/13 12:59 PM

, .

.
: ( )
: 1 2, 1, 2 1
: =1*2
1
2
3
4
5
6
7

=0
2>0, 3, 7
2 , =+1
1=1*2
2=2/2 ( )
2

.
__
// M1,M2 //
0
M2 > 0
M2 mod 2 = 1 +1

M1 1*2

M2 M2 div 2
_
// , M1,M2 //
__

-
,

. . . ,
.
,
, , .

,
,
,
,
,

2.

22-0203 ANAPTIXI EFARMOGON 001-136.indd 51

51

3/31/14 1:50 PM

-
1. .
2. ;
3. ;
4.
;
5. .
6. / ;
7.
.
8. .

http://www.nist.gov/dads/

,

(Algorithms,
Data Structures, and
Problems Terms and
Definitions for the CRC
Dictionary of Computer
Science, Engineering and
Technology)

9.
.
10.
.
11.
.
12. .
13.
; ;

1. . , . , . ,
, , 1991.
2. , ,
, 1993, .
3. , -
Pascal, Art of Text, , 1998.
4. .., , , , 1990.
5. D. Brunskill and J. Turner, Understanding Algorithms and Data
Structures, McGraw-Hill, 1996.
6. D. E. Knuth, The Art of Computer Programming: Fundamental
Algorithms, Vol.1, 3rd edition, Addison Wesley, 1997.
7. M.A. Weiss, Data Structures and Algorithm Analysis, 2nd edition,
Benjamin/Cummings, 1995.

52

22-0203 ANAPTIXI EFARMOGON 001-136.indd 52

3/31/14 1:53 PM

+
=

+
=

+
=

22-0203 ANAPTIXI EFARMOGON.indb 53

+
=

+
=

7/5/13 12:59 PM


,
"".
" ".
.

, ,
, .


:

,

,
,
,

,
.

3 FIFO;
3 , ;
3 ;
3
;

54

22-0203 ANAPTIXI EFARMOGON 001-136.indd 54

4/23/14 4:50 PM

3.1 |
(data) . ,
. , , , , ..,
, .. , ,
,
. (information).
,

.
.
, , , ... , ,
,
(Information Theory),
.
,
. ,
:

. (hardware), ,
(representations). ,
ASCII (. ), EBCDIC, 1
2 ..

. (high level programming languages)


(types) (variables) .
, ,
.

. (data structure)

. , (record),
, ..
(fields)
(attributes) , ,
..
.
.

(byte)
11110001.
:
l

_ ASCII 437

928

1 EBCDIC

241
( )

-14
( 1)

-15
( 2)



2 4 bytes,

.

,
,

,

,
,

.

.

.
(Databases), (Data Modelling)

3.

22-0203 ANAPTIXI EFARMOGON.indb 55

55

7/5/13 12:59 PM

(Knowledge Representation)
.

3.2 |
 + =

,
.
, . (data structure)
.


.

(nodes). ( ) :
l

(access), .

(insertion), .

(deletion), , .

(searching),
,
.

(sorting),
.

(copying),
.

(merging),
.

(separation),
.


.
,
,
, .
' , '
.
-

56

22-0203 ANAPTIXI EFARMOGON.indb 56

7/5/13 12:59 PM

. ,
. ,
.
1976 Wirth ( Pascal)
+ =

.


.

: (1,1), (2,2), ..., (On,n),
i i
i- , i = 1,2,...,n.
: Ok Tk.
,
.

:
, .
(,n1), (,n2), ..., (,n24). ni ( i = 1, 2, ..., 24)

.
: .
: (static) (dynamic). (dynamic memory
allocation). , ,

.
. ,
.

3.

22-0203 ANAPTIXI EFARMOGON.indb 57

57

7/5/13 12:59 PM

3.3 |

,
.

.
,
. ( , .).

. ,

(indexes) .
, , - .
, ,
(square) n x n.
,
. ,
.

1.

table 100 . .
. 3.1.
(,
,
)

_
// table //
Min table[1]

i 2 100

table[i] < Min Min table[i]

//Min//
_


Min. , Min , . Min
table.

58

22-0203 ANAPTIXI EFARMOGON.indb 58

7/5/13 12:59 PM

2.

table m n . , .
. ,
.

.
_
// m, n, table //
sum 0
i 1 m
row[i] 0
_
j 1 n
col[j] 0
_
i 1 m
j 1 n
sum sum + table[i,j]
row[i] row[i] + table[i,j]
col[j] col[j] + table[i,j]
_
_
// row, col, sum //
_

, . ,
, . , i
1 j 1,2,...,n. , i 2,
j 1,2,...,n.
i m.
5x5. ,
row
, col
. sum - .

3.

22-0203 ANAPTIXI EFARMOGON.indb 59

59

7/5/13 12:59 PM


row

table

col

16

21

53

28

38

13

51

139

17

67

22

40

30

176

20

40

10

13

86

21

34

48

29

26

158

90

166

123

106

127

612

Sum

, (stack) (queue), , .

3.4 |
. ,
(top)
, . ,
,
. , LIFO

Stack
n
n-1

C
B

D
C
B

C
B



D
(
)



D
(
)

. 3.2.
4
3
2
1

Top

. 3.3

60

(Last-In-First-Out).
,
.
:

(push) ,
(pop) .

22-0203 ANAPTIXI EFARMOGON.indb 60

7/5/13 12:59 PM

,
, (overflow)
. , ,
,
(underflow) .
, 3.3. ( top)
.
()
top .
()
top top
.

3.5 |
. , , , , .. .
, , (Operations Research),
(Queueing Theory), . ,

(
). ,

FIFO (First-In-First-Out).
:

(enqueue) ,
(dequeue) .
, ,
: (front) (rear) ,

.
3.4 (),
() .
5 12 7 4

(front)

(rear)

)
4

5 12 7 4 8

(front)

(rear)

)

8

12 7 4 8

(front)

(rear)

)

5

. 3.4.

3.

22-0203 ANAPTIXI EFARMOGON.indb 61

61

7/5/13 12:59 PM

, 3.5.
rear . ,
front,
, .
, ,
.
1

9 10 11

n-1 n

(front)

(rear)

. 3.5

FIFO LIFO
FIFO.
. .
, ,
. , , .. ,
.
.

.
, , ;
.
, .
(.. ),
. FIFO
.
,
. .

62

1/1/02

10

40

15/1/02

12

72

10

112

22-0203 ANAPTIXI EFARMOGON.indb 62

7/5/13 12:59 PM

30/1/02

20

100

1/1/02

40

40

15/1/02

10

72

112

30/1/02

.
, .

) LIFO
30/1/02 5 6
, 12. = 5 x 12 = 60 = 112 52 = 60. ,
100 60 = 40.

) FIFO
30/1/02 5 , 4 1/1/02 1
15/1/02. = 4 x 10 + 1 x 12 = 52 = 112 52 = 60. ,
100 52 = 48.

)
,
.
112/10 = 11,2. = 5 x 11,2 = 56 = 112 56
= 56. 100 56 = 44.

3.6 |
(searching)
.
.

. .

(sequential) (linear) .
Sequential Search key table.
position 0, ,

3.

22-0203 ANAPTIXI EFARMOGON.indb 63

63

7/5/13 12:59 PM

,
(, 1 n).
Sequential_Search
// n, table, key //
done
position 0
i 1
(done=) (i<=n)
table[i]=key
done
position i

i i+1
_
_
//done, position //
Sequential_Search
, table
. ,
.
,
:
done i n. ,
, , .
1

52

12

71

56

10

19

90

45

, . ,
56 4 . ,
() 11 9
, . . 11
12.
1

10

12

19

45

52

56

71

90

,
. ,
:

64

( , n 20),

22-0203 ANAPTIXI EFARMOGON.indb 64

7/5/13 12:59 PM

1
2
3
4
5

key table[1]
key table[2]
key table[3]
key table[4]
key = table[5]

. 3.6.

, .

3.7 |

(sorting) (ordering). (ascending
sequence) .
.
, , ,
,
.
.

a1, a2, ..., an


(permutation) , ak1, ak2, ..., akn ,
(ordering function), f, :
f(ak1) f(ak2) ... f(akn)

,
(descending sequence) .

3.

22-0203 ANAPTIXI EFARMOGON.indb 65

65

7/5/13 12:59 PM


(straight exchange sort)

, .

.
(bubbles)
,
.
(bubblesort).


/ , .
, .
(files).
, , . ,
,
, , .
(records),
(fields), , . , : , , , , .
(primary key) .
' (secondary keys), . (searching)
, '
( , ,
, ..), ( , ,
, , ..), (,
..).

, :
52, 12, 71, 56, 5, 10, 19, 90 45.
.
,
.
(i).

66

22-0203 ANAPTIXI EFARMOGON.indb 66

7/5/13 12:59 PM

i=2

i=3

i=4

i=5

i=6

i=7

i=8

i=9

52

12

52

10

10

10

10

10

10

10

71

12

52

12

12

12

12

12

12

56

71

12 52

19

19

19

19

19

19 52

45

45

45

45

45 52

52

52

52

71

56

56

56

56

5 56

71

10

10 56

71

19

19

19 56

90

45

45

45 56 71

71

71

71

45 90

90

90

90

90

90

90

90

. 3.7.
.

// table, n //
i 2 n
j n i _ -1
table[j-1] > table[j]
table[j1], table[j]
_
_
_
// table //

table n .
, , ,
.
" table[j-1], table[j]"
. :
temp table[j1]
table[j-1] table[j]
table[j] temp




.



.

"
" (quicksort).



.

3.8 |
(recursion),
.
.

3.

22-0203 ANAPTIXI EFARMOGON.indb 67

67

7/5/13 12:59 PM

, ,
.

3.8.1
. , n, n , n!,
:
n! = 1 x 2 x 3 x ... x (n 1) x n

n! =

n (n 1)!

n > 0

n = 0


.
. n .

// n //
n = 0
product 1

product n * (n1)
_
// product //

, n! ,
2.
2
// n //
product 1
i 2 n
product product * i
_
// product //
2
, n ,
. , .

3.8.2

() .
.

68

22-0203 ANAPTIXI EFARMOGON 001-136.indd 68

3/31/14 1:55 PM

. x y.
( ),
.
, z,
z
, x y, z.
__
// x,y //
x < y
z x

z y
_
(x mod z 0) (y mod z 0)
z z-1
_
// z //
__
,
,
.

// x,y //
z y
z 0
z x mod y
x y
y z
_
// x //

,
150 35.
z, x y,
. , x y 150 35 (
). 0
z, x, 5.
z
35
10
5
0

x
150
35
10
5

y
35
10
5
0

3.

22-0203 ANAPTIXI EFARMOGON 001-136.indd 69

69

3/31/14 1:56 PM

, . .

// x, y //
y = 0
z x

z (y, x mod y)
_
// z //

3.8.3 Fibonacci
, , Fibonacci ,
:
Fi =

i = 0

i = 1

Fi = Fi-1 + Fi-2
i > 1
Fibonacci :
0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55 ..
.
Fibonacci
Fn .
n.
Fibonacci1
// n //
n 1 Fib n
f0 0
f1 1
i 2 n

fib f0+f1

f0 f1

f1 fib
_
// Fib //
Fibonacci1
Fibonacci2
// n //
n 1

Fib n


Fib Fibonacci2(n-1) + Fibonacci2(n-2)
_
// Fib //
Fibonacci2

70

22-0203 ANAPTIXI EFARMOGON 001-136.indd 70

3/31/14 1:58 PM

. ,
.
.
. . ,
,
.
Fibonacci
,
,
. ,
.

F5.
Fibonacci .

3.9 |

. ,
. ,
.

3.9.1

. (pointer) .
, ..,

,
. , 3.8.

.

. 3.8

3.9 ,
,
.

. 3.9.

. 3.10 -

3.

22-0203 ANAPTIXI EFARMOGON.indb 71

71

7/5/13 12:59 PM

index
pointer
.

,
.

. 3.10.
, ()

(
).
, .

. 3.11.
'

, 3.11.
( ) " " , .

3.9.2




(dynamic),

,


.


,



.

72

(trees) ,
. ,
( ). ,
, . , ,
. 3.12.
. .
, ...
,
.
A

. 3.12.

22-0203 ANAPTIXI EFARMOGON.indb 72

7/5/13 12:59 PM

3.9.3
(graph) (
) ( )
.
,
.

. 3.13.

. ,
. , ,
, .

-
, ,


, , .

. ( ),
, .
,
.
.
. /

.

. ,
, .


,
, , ,
FIFO LIFO,
,
,
, ,
, .

3.

22-0203 ANAPTIXI EFARMOGON.indb 73

73

7/5/13 12:59 PM

-
1. ; .
2.
;
3. .
4. ;
5. ;
6. .
7. .
8. .
9. ;
10. .

http://www.nist.gov/dads/

,

(Algorithms,
Data Structures, and
Problems Terms and
Definitions for the CRC
Dictionary of Computer
Science, Engineering and
Technology).

11. ;
12. .
13. .
14. .
15.
.
16. .
17.
.

1. , , , 1996.
2. , .
, , 1993.
3. , -
Pascal, Art of Text, , 1998.
4. , , , 1993.
5. D. Brunskill and J. Turner: "Understanding Algorithms and Data
Structures", McGraw-Hill, 1996.
6. D. E. Knuth: "The Art of Computer Programming: Fundamental
Algorithms", Vol.1, 3rd edition, Addison Wesley, 1997.
7. M.A. Weiss: "Data Structures and Algorithm Analysis", 2nd edition,
Benjamin/Cummings, 1995.

74

22-0203 ANAPTIXI EFARMOGON.indb 74

7/5/13 12:59 PM

+
=

+
=

+
=

22-0203 ANAPTIXI EFARMOGON.indb 75

10

7/5/13 12:59 PM


, ,
. ,

. ,
.
.


:

,
,
,

,
.

3 ;
3
;
3 ;

76

22-0203 ANAPTIXI EFARMOGON 001-136.indd 76

3/31/14 1:59 PM

4.1 |
, .
. ,
, . ,

.
.
:
,
,
l
l
l

:
l
l

,
.

,
:

,

,
( ),
(.. ),


(.. ).

,
,
,
,
.
,
.
1

13

4
. 4.1.

10

8
2

4.

22-0203 ANAPTIXI EFARMOGON.indb 77

77

7/5/13 12:59 PM

4 4
, 6 . ,
. ,
1, , 2, 3 4. .

) :

,
,


.

:
1

36 .

) :

,

.

:
1

30 .
, ,
. ,

. "" , . ,
:

78

22-0203 ANAPTIXI EFARMOGON.indb 78

7/5/13 12:59 PM

( ),
l

""
, .

4.2 |


, .
, . ,

.

. , . ( ).
, :
l


.
, .

. ,
:
l


.
'
,
.
. ,
.

4.

22-0203 ANAPTIXI EFARMOGON.indb 79

79

7/5/13 12:59 PM

4.3 |
" " (divide and conquer)
,
. , ...

,
. (top-down).
, :

.
-
.

-.
-, .

: .
1

> i

> i

= i

< i


,
n .
. n
: names[1 ..n] phones[1 ..n] . , ,
(
).

, , 3 :

. 4.2.

names,

names,

names.

80

.
(,
names).
" ",
.

22-0203 ANAPTIXI EFARMOGON.indb 80

7/5/13 12:59 PM

_
// names, phones, onoma, arxi, telos //
meso [arhi + telos]/2
Av onoma = names[meso]
Tel phones[meso]

Av onoma < names[meso]


_(names, phones, onoma, arhi, meso-1)

_(names, phones, onoma, meso+1, telos)
_
_
// Tel //
_


.
. , , .


. ,
,
.
, - . , .

3
. 4.3. -

. (
Bolzano) f(x)=0
[a, b]. , , f(a).f(b)<0 (
).
x1 ( = (a+b)/2) [a, b] ,
v f(a).f(x1)<0. , [a, x1],

4.

22-0203 ANAPTIXI EFARMOGON.indb 81

81

7/5/13 12:59 PM

[x1, b]. x2
.

x1, x2,... . , .

f(x)

x
x1

x3

x2

. 4.4.

4.4 |
, .
. , (bottom
- up). ,
. ,
,
. ..

.

, .

,
- .
:

,
,

.
82

22-0203 ANAPTIXI EFARMOGON.indb 82

7/5/13 12:59 PM



. ,
,
.
, , , ab.
1,
.
1
//a, b //
power 1
i 1 b
power power * a
_
// power //
1
1
, , b
b- . a16
: (((2)2)2)2.
,
b.
power
. ,
2 (, a=2),
0 1, 1 2, 2 4,
3 16 ..., .

0
20 = 1

1
21 = 2

2
22 = 4

3
24 = 16

4
28 = 256

...

0-

...

. 4.5. 2
, ,
. , 27, 4 2, 27 = 24 *22 *21.
ab
, .

4.

22-0203 ANAPTIXI EFARMOGON.indb 83

83

7/5/13 12:59 PM

2
// a, b //
!:
power[1] a
i 1
pow 1
pow < b
i i+1
pow 2* pow

power[i] power[i-1] * power[i-1]
_
!:
used 0
result 1
used < b

used + pow <= b
result result * power[i]
used used + pow

_

pow pow / 2
i i - 1
_
// result //
2

4.5 |
, , ,
, . ,
, .

. , 4.1,
. " " (greedy
method), :



(
).

,
, .


1/1/2002 1, 2, 5, 10, 20, 50 , 1 2 ,

84

22-0203 ANAPTIXI EFARMOGON.indb 84

7/5/13 12:59 PM

5, 10, 20, 50, 100, 200 500 .


, ,
. , 789,
1 500, 1 200, 1 50, 1 20,
1 10, 1 5 2 2, 8 .
"" ,
.
,
.

// C, n, poso //
find poso
coins 0
choice n
(choice>0) (find > 0)
C[choice]<= find
coins coins + 1
find find - C[choice]

choice choice - 1
_
_
// coins //

C n .
( coins). ,
.


. .
:
,
.
.

.
. ,

,
,
,

4.

22-0203 ANAPTIXI EFARMOGON.indb 85

85

7/5/13 12:59 PM

,

.


1. ;
2. ;
3. ;
4.
.
5. .
6.
.
7.
,
.
8.
.

http://www.
cs.pitt.edu/~kirk/
algorithmcourses/index.
html



.

.

86

1. : , , , 1993.
2. : ,
, , 1993.
3. : , , , 1988.
4. : -
Pascal, Art of Text, , 1998.
5. , ,
, , 1996.
6. , , , 1995.
7. Niklaus Wirth: , , ,
1990.
8. G. Brassard and P. Bratley: "Fundamentals of Algorithms", Prentice Hall,
1996.
9. T. Cormen, C. Leiserson and R. Rivest: "Introduction to Algorithms" MIT
Press, 1990.
10. E. Horowitz, S. Sahni and S. Rajasekaran: "Computer Algorithms", Com
puter Science Press, 1998.
11. I. Oliver: "Programming Classics: Implementing the World's Best
Algorithms", Prentice Hall, 1993.

22-0203 ANAPTIXI EFARMOGON.indb 86

7/5/13 12:59 PM

+
=

22-0203 ANAPTIXI EFARMOGON.indb 87

10

10

11

7/5/13 12:59 PM



.
,
(, ). , ,
() . , ,
, .


:
,
,

,
,
,
.

3
;
3 ;

88

22-0203 ANAPTIXI EFARMOGON.indb 88

7/5/13 12:59 PM

5.1 |
,
. (performance) (efficiency) .
. :

;
;
"";

.

.

5.1.1

, .
. ,
.
. , :
l

, , ,
.

: :
1
n 10
_
m
n n - 1
_ (m=0) (n=0)
m
1
10 ( n=0).

5 .

22-0203 ANAPTIXI EFARMOGON 001-136.indd 89

89

4/23/14 4:50 PM

5.1.2

(size) .

. , . , ,
n,
.
5.1
,
:
. 5.1.


(n)

5.1.3


:
2
x 123
y 234
i 0 4
i
z x * y
_
x
y
z
2

. 5 , :

90

22-0203 ANAPTIXI EFARMOGON.indb 90

7/5/13 12:59 PM

x y


i
i
i
i
z (2X5)

1
6
5
5
10

x, y, z

32

. n , n. 5.2
n, -:
. 5.2.
n

32 -

10

57 -

100

507 -

1.000.000

5 ()

5.1.4
,
. ,
, , .
,
,
. , .
,
:
l

-,

5 .

22-0203 ANAPTIXI EFARMOGON.indb 91

91

7/5/13 12:59 PM

, .

,
, :

,

.

5.2 |

.
.
.

. , , .
,
.


.
, "" , , .. .
. ;
, .
:


10 .
:

92

22-0203 ANAPTIXI EFARMOGON.indb 92

7/5/13 12:59 PM

3
// a //
low a[1]
i 2
i < 10
a[i] < low low a [i]
i i+1
_
// low //
3

. 10 ,
. 3 :
11

56

32

69

81

90

222

444

65

51

51

99

98

90

11

333

38

224

61

73

80

59

,
.
:
6

3, 2. , .
,
.
, , , .
(i < 10), .
, . ,
,
.

, ,
.
1/10, 10 .
0,9.
, -

5 .

22-0203 ANAPTIXI EFARMOGON.indb 93

93

7/5/13 12:59 PM

0,9*0,9=0,81.

:

0,1

0,9

0,19

0,81

0,271

0,729

0,344

0,656

0,410

0,590

0,469

0,531

0,522

0,478

, 7 0,5 .
. , .

.

:
l

, . .
a b
.
, .
, :
a b b a, .
,
a0 b0 . ,
: a=b0 b=a0.
. , ,

. :
t a, a b b t

94

22-0203 ANAPTIXI EFARMOGON.indb 94

7/5/13 12:59 PM

, .

5.3 |

(empirical) (a posteriori).
, ,
(processing time) (memory space).
:
l

,
.


.
(theoretical) (a priori).
n,
(size) ,
, . ,
. , k n=k.
f(n) (time complexity)
(space complexity).
,
.
(O-notation), order " ".
.

f(n),
O(g(n)), c n0 ,
n n0 :
|f(n)| c | g(n)|


f(n) = 2n3 + 5n2 4n + 3.
, x (

5 .

22-0203 ANAPTIXI EFARMOGON.indb 95

95

7/5/13 12:59 PM

)
, . , 2
g(n) = n3. ,
O(n3). ,
.
f(n) = 5 2n + 4n2 4logn, g(n)=2n,
f(n) 5
2n. ,
f(n), 1, 2,
3 .. n
. ( ,
n = 10),
2n.
, ,
. ,
,
.

, :
l

(1).
.
.

O(logn). . "log" , "In"


. ,
.

O(n). . n .

(n logn). (n logn),
( ). .

(n2). .
.

(n3). . .

(2n). .

5.3

(n). .
(n3) ,
(23) . -

96

22-0203 ANAPTIXI EFARMOGON.indb 96

7/5/13 12:59 PM


.
. 5.3.


n = 20

n = 40

n = 60

(n)

0.00002 0.00004 0.00006

O(n2)

0.0004

0.0016

0.0036

O(n3)

0.008

0.064

216

O(2 )

1.0

2.7

366

(n!)

771

3 1032

3 1066


.
, , . 3,
.

5.3.1
C, (key
comparisons), .
(moves)
. C n , .
,
,
. :
C = 1 + 2 + ... + (n 1)

n (n 1)
C=
2

(n2).

5.3.2
3.6 , .
, (successful). ,
(unsuccessful).
.

5 .

22-0203 ANAPTIXI EFARMOGON.indb 97

97

7/5/13 12:59 PM

, .

n .
,
, , ,
. , n- ,
. , :
E=

(1 + 2 + ... + n)
n (n + 1)
n+1
=
=
n
2n
2

, (n),
.
(n).
,
,
. ,
,
.
. 5.4.

(1)

O(1)

Fibonacci

O(n)

O(n2)

(n)

O(logn)

5.4 |
, ,
,
. , ,
. ,

. .
/ .

98

22-0203 ANAPTIXI EFARMOGON.indb 98

7/5/13 12:59 PM

, , ,
, ( ).
, .
,
, , .
(parallel) ,
,
,
. ,

.
,
2 ,
, .
. ,
.

,
.
, . , ,
, ,
,
..
,
,
(Computational Complexity),
. , . (optimal),
, .
(polynomial)
. , O(n), (n3/2), (n2) .. -

5 .

22-0203 ANAPTIXI EFARMOGON.indb 99

99

7/5/13 12:59 PM


O(2n), O(n2 2n) O(nn),
.
, .
, :

x1, x2, ..., xn (

n ). n/2 ,
n .

x1, x2, ..., xn (


n ). n/2 ,
n .

,
. , n ,
. O(n2),
.
. , . .
O(2n).

( ) ,
.
(intractable). ,
.
.
.
, , .

,
.
, , - Nondeterministic
Polynomial. .

,
(approximate)

100

22-0203 ANAPTIXI EFARMOGON.indb 100

7/5/13 12:59 PM

, .
, ,
.
E
, ,

, , . .
,
.

-
/
,

,
.
,
.
. ()
.

.


,
,
,

,
,
,
,

, (, , ).

5 .

22-0203 ANAPTIXI EFARMOGON.indb 101

101

7/5/13 12:59 PM

-
1. ;
2.
;
3.
.
4.
;
5. ;
6. .
7.
;
8.
.
9. .
10. , .
11. ;
12. ;
13. ;

1. ,
, , ,
1993.
2. , ,
, , 1993.
3. , , , , 1988.
4. , -
Pascal, Art of Text, , 1998.
5. . , , , , 1993.
6. Niklaus Wirth, , , ,
1990.

7. G. Brassard and P. Bratley, Fundamentals of Algorithms, Prentice Hall,


1996.

http://www.ioinformatics.
org/

8. T. Cormen, C. Leiserson and R. Rivest, Introduction to Algorithms, MIT


Press, 1990.

9. . Horowitz, S. Sahni and S. Rajasekaran, Computer Algorithms,


Computer Science Press, 1998.

102

10. I. Oliver, Programming Classics: Implementing the World's Best


Algorithms, Prentice Hall, 1993.

22-0203 ANAPTIXI EFARMOGON.indb 102

7/5/13 12:59 PM

22-0203 ANAPTIXI EFARMOGON.indb 103

10

10

11

10

11

12

7/5/13 12:59 PM



.
, ,
.
. , ,
.
, .
.


:

,
,
,
,
.

3
;
3 ;
3 ;
3 ;
3
;

104

22-0203 ANAPTIXI EFARMOGON.indb 104

7/5/13 12:59 PM

6.1 |
,
, .

.
.
.
,
,
. ,
, ,

. .
.
. ,
, ,
, , .
,
.
, ,
.




()
().

6.2 |
. ,


.
(hardware) , ,
1945
, . , ,
,
.

6 .

22-0203 ANAPTIXI EFARMOGON.indb 105

105

7/5/13 12:59 PM



,


.

6.2.1
, 0
1,
. ,
.
, ENIAC, "", ,

, . "" ,
. ,
, .

0 1, ,
, .

6.2.2







.



.

106

, , ,
0 1. ADD () ,
.

. , (assembler).
,
,
.
.
,
.
, .
,
.

22-0203 ANAPTIXI EFARMOGON.indb 106

7/5/13 12:59 PM

10101000 00001010
10001100 00000001
00111100
01010001 00000001
01000011 00000001
11000000 11111010
10001100 00000010
11111111

LOOP

INDEX=$01
SUM=$02
LDA #10
STA INDEX
CLA
ADD INDEX
DEC INDEX
BNE LOOP
STA SUM
BRK

sum =
FOR index=1 TO 10
sum=sum+index
NEXT index
END

. 6.1. ,
1 10

6.2.3

-
50 .
1957 IBM ,
FORTRAN. FORTRAN FORmula
TRANslation, . FORTRAN
. FORTRAN , , .
FORTRAN ,
.
FORTRAN ,
.
C
1

2
20
3
4
50

PROGRAM EQUATION
READ(*,1) A,B
FORMAT(F5.1)
IF (A.EQ.0) GO TO 20
X=(-1.)*B/A
WRITE(*,2) X
FORMAT('X=',F10.2)
GO TO 50
IF (B.EQ.0) WRITE(*,3)
IF (B.NE.0) WRITE(*,4)
FORMAT('')
FORMAT('')
STOP
END

. 6.2. FORTRAN

.
,


.

4, 77, 90/95
Visual FORTRAN.

' .

6 .

22-0203 ANAPTIXI EFARMOGON.indb 107

107

7/5/13 12:59 PM

FORTRAN, ,
,
. .
1960 , ,
COBOL. COBOL (COmmon
Business Oriented Language -
) ,
, FORTRAN . COBOL
.
.

. 6.3. COBOL
Grace
Marray Hopper,
,
1960. COBOL




. COBOL

(divisions).


, ADD,
MULTIPLY, MOVE ..

.
.

' .

108

IDENTIFICATION DIVISION.
PROGRAM-ID. EQUATION.
ENVIRONMENT DIVISION.
CONFIGURATION SECTION.
SOURCE-COMPUTER. IBM-PC.
OBJECT-COMPUTER. IBM-PC.
SPECIAL-NAMES. DECIMAL-POINT IS COMMA.
DATA DIVISION.
WORKING-STORAGE SECTION.
77 X
PIC S9(6)V9.
77 A
PIC S9(6).
77 B
PIC S9(6).
77 W-X
PIC -(6),-.
PROCEDURE DIVISION.
ARXH.
DISPLAY A.
ACCEPT A.
DISPLAY B.
ACCEPT B.
DISPLAY .
IF A = 0
GO TO ROYT-1.
COMPUTE X = B * (-1) / A.
MOVE X TO W-X.
DISPLAY : W-X.
STOP RUN.
ROYT-1.
IF B = 0
DISPLAY
ELSE
DISPLAY .
STOP RUN.

22-0203 ANAPTIXI EFARMOGON.indb 108

7/5/13 12:59 PM


,
, ALGOL (ALGOrithmic Language - ). ,
1960,
.
10 REM
20 INPUT =,A
30 INPUT =,
40 IF =0 THEN 100
50 =-/
60 PRINT =;X
70 END
100 IF =0 THEN PRINT ELSE PRINT
110 END
. 6.4. BASIC 1964 Dartmouth College
Kemeny Kurtz.
. BASIC
(1975).
8 ROM Bill Gates
Paul Allen. Microsoft Bill Gates
. GWBASIC
1981 IBM PC.
,
.
QuickBASIC Visual BASIC.
' .
60 PL/1 (Pro
gramming Language/1 ' 1)
, , , ,
FORTRAN COBOL.

. 60
LISP (LISt Processor ), , PROLOG (PROgramming
LOGic ) 70. ( , , ..).
,
60 ,
BASIC PASCAL.
BASIC (Beginner's All Purpose Symbolic
Instruction Code ) , , -

6 .

22-0203 ANAPTIXI EFARMOGON.indb 109

109

7/5/13 12:59 PM

. 6.5. LOGO
1967
Seymoyr Papert.
"".

.


.

TO KYBOS :A
REPEAT 4 [FD :A RT 90]
PU SETPOS [20 20] PD
REPEAT 4 [FD :A RT 90]
PU HOME PD
REPEAT 2 [FD :A RT 45 FD 29 RT 135]
PU SETX :A SETY 0 PD
REPEAT 2 [FD :A RT 45 FD 29 RT 135]
HOME
END

.
,
(interpreter).
, . Microsoft
QuickBasic Visual Basic, .
PASCAL ( Niklaus Wirth) . 1970 ALGOL. ,
.
. PASCAL


ADA Modula-2.
1960 .


. .
. 6.6. LISP
1959 .

.
,
, .

, ' .

.. (a-exisosi 2 5).

110

(DEFUN a-exisosi (a b)
(setf apot (- (/ b a)))
(princ )
(princ a)
(princ x + )
(princ b)
(princ = 0 = )
(princ apot))

22-0203 ANAPTIXI EFARMOGON.indb 110

7/5/13 12:59 PM

C. C
BELL
Unix,
, Pascal
. C C++, . 70
.

.
#include <stdio.h>
int main(int argc, char* argv[])
{
float a, b;
printf(A = );
scanf(%f, &a);
printf(B = );
scanf(%f, &b);
if (a == 0) {
if (b == 0) {

printf(\n);
}
else {
printf(\n);
}
}
else {
printf(X = %f\n, -b/a);
}

}

return 0;

. 6.7. C
Bell
& 1972
Dennis Ritchie. C



. UNIX,
C

.
' .

, (Internet), JAVA. JAVA SUN , ,



. ,
.

-.

6 .

22-0203 ANAPTIXI EFARMOGON.indb 111

111

7/5/13 12:59 PM

,
,
.

CLEAR
? 1.
? 2.
? 3.
? 4.
INPUT [1..4] : TO CHOICE
DO CASE
CASE CHOICE=1
APPEND
CASE CHOICE=2
LABEL FORM PELATES
CASE CHOICE=3
BROWSE
OTHERWISE
QUIT
END CASE
. 6.8. dBASE 70
Ashton-Tate 8-bit
. dBASE

() . dBASE

,
.
. dBASE III Plus.
Clipper ,
. ,
xBASE,
Access.
.







,



.

112


(event driven programming) (visual
programming).

,
.

,
.

Visual Basic, Visual C+ + Java.

22-0203 ANAPTIXI EFARMOGON.indb 112

7/5/13 12:59 PM



:
l

"" .
.

.
.
.


, .

6.2.4 4
( 3 )
. .
,
.


.
4 .
,
,

,
.
SELECT , JOB, SAL
FROM EMPLOYES
WHERE DEPTNO=20
AND SAL > 3000;
SQL
EMPLOYES ,
20 3.000.

6 .

22-0203 ANAPTIXI EFARMOGON.indb 113

113

7/5/13 12:59 PM



.
(procedural) . ,
.
:
l

(object-oriented languages)

(functional languages) .. LISP

(non procedural languages) .. PROLOG.


.

(query languages) .. SQL.

. :
l

.
.
. :
l

(science-oriented languages) .. FORTRAN

(business-oriented languages) .. COBOL.


.. BASIC, Pascal.
l

(system programming languages) .. C.

(artificial intelligence languages) .. LISP, PROLOG.

. .. , , , , ..

n
.
. .
.
.
"" .

, .
,
, . ,

.

114

22-0203 ANAPTIXI EFARMOGON.indb 114

7/5/13 12:59 PM

6.3 |
.

,
. ,
,
, .
, ,
.


.
, : 48 (-
-), 10 (0-9) .
(-
a-z) .



, . ,
,
, .


(accidence)
(syntax).

. ,
, , ,
.

.

, .


(Semantics)

.
, .



,
,

.

6 .

22-0203 ANAPTIXI EFARMOGON.indb 115

115

7/5/13 12:59 PM


. ,
,

,
.
,
.
,

.
( GW-Basic QuickBasic) ( Basic Visual Basic).

6.4 |
,
,
.

6.4.1

" " (top-down


program design)
, ,
, ,
.
,
.
,
6.9.

6.4.2

.
,
(module), .

116

22-0203 ANAPTIXI EFARMOGON.indb 116

7/5/13 12:59 PM

.
,
, .

. 6.9.

6.4.3


(structured programming). 1960.
1964
Bohm Jacopini
.
, 1968 Edsger Dijkstra

. "GO TO Statement Considered
Harmful - GOTO " . ,
.
,

.

6 .

22-0203 ANAPTIXI EFARMOGON.indb 117

117

7/5/13 12:59 PM

,
GOTO .


GOTO .

GOTO:

GOTO (). GOTO ,
.
. GOTO,

, .
GOTO.
, , .

>0 TOTE GOTO 1


AN A=0 TOTE GOTO 2

GOTO 4
1:
GOTO 4
2:
GOTO 4
4:! ,
,,,,
>0
_ =0

_
,,,
GOTO
.

GOTO .
,
.
GOTO .

118

22-0203 ANAPTIXI EFARMOGON.indb 118

7/5/13 12:59 PM

,
, , .

, ,
.

. .
2 .
GOTO,
.

,
.

.
.
.
.
.
.

6.5 |
'70
.
(object-oriented) .

.
.
"" ()

6 .

22-0203 ANAPTIXI EFARMOGON.indb 119

119

7/5/13 12:59 PM

. ,
"" . .

,
(objects).
, . , ,
" ;", " ;", " ;" " ;".
11.
,
.

6.6 |





OCCAM.



.

.
.
, .
,
.
5,
,
.

6.7 |

, .

. , (compilers) (interpreters).

120

22-0203 ANAPTIXI EFARMOGON.indb 120

7/5/13 12:59 PM



.
.


.
(source), (object).
, .
, (libraries) .
(linker- loader).
(executable), .
.
. .
, .
,
.

.

, ,
,
.

. 6.10.

. . -

6 .

22-0203 ANAPTIXI EFARMOGON.indb 121

121

7/5/13 12:59 PM

,
.
,
,
. .
, ,
.
,
.

-
-
1

-
-
2

-
-
n

.
.
.
n

. 6.11.




.




,

.

122


(editor).
,
.
,
: , .
.
. , (visual)
( ,
, , )
.

22-0203 ANAPTIXI EFARMOGON.indb 122

7/5/13 12:59 PM

.
,
.
, ,
.

, , , .
.
.
, , .
, ,

.

,
,
,

,

,
,
,

-
1. ;
2. ;
3. ;
4. ;
5.
;
6. ;
7. ;
8. ;
9. ;
10. ;
11. ;
12. ;
13. ;
14. ;

6 .

22-0203 ANAPTIXI EFARMOGON.indb 123

123

7/5/13 12:59 PM


1. Ph. Breton, , , .
2. . , , , 1986.
3. . -. , ,
, , 1992.
4. ,
, , 1986.
5. . -. , FORTRAN 77 FORTRAN
90, , , 1995.
6. . -. , COBOL , , , 1992.
7. . -. , Structure & Advanced COBOL,
, , 1992.
8. . -. , CWBASIC ,
, , 1992.
9. . -. -. , PRO
LOG, , , 1991.
10. . , LOGO , , , 1991.
11. . , C , , , 1995.
12. . , SQL 4 ,
, , 1995.
13. . Horowitz, , ,
, 1995.
14. R. Shackelford, Introduction to Computing and Algorithms, AddisonWesley, USA, 1998.
15. W. Hutching-H. Somers, An Introduction to Machine Translation,
Academic Press, London, 1992.

124

22-0203 ANAPTIXI EFARMOGON.indb 124

7/5/13 12:59 PM

10

10

22-0203 ANAPTIXI EFARMOGON.indb 125

10

11

10

11

12

10

11

12

13

7/5/13 12:59 PM


, ,
.
.
.
,
, .
,
,
.


:
.
.
.
.
, ,
.

3 ;
3 ;
3 ;
3
;

126

22-0203 ANAPTIXI EFARMOGON.indb 126

7/5/13 12:59 PM

,
. ,

.
.
:
l

,
. , .


.
,
.

, .

, ,
.


,
. ,
Pascal, Visual Basic, C, C+ +, Java ,
.

.

,
. .

7.1 |

, , ,
,
.

(-)

7 .

22-0203 ANAPTIXI EFARMOGON.indb 127

127

7/5/13 12:59 PM

(-)
(-)
(a-z)

0-9


+ - * / = ( ) . , ! & ^

7.2 |




(bytes).



bytes

.




.



(integer)
1, 2 4 bytes
(real) 4
8 bytes.

,
.
,
, .
.
. , . 1, 3409, 0, -980.
.
. 3.14159,
2.71828, -112.45, 0.45 . , .
.
.
.
'', '', ' ', '
15 '.
, ' '. ,
, .
. : .
.

7.3 |
(constants) .
, , , .


, (
, ).

128

22-0203 ANAPTIXI EFARMOGON.indb 128

7/5/13 12:59 PM

-1 = --1
-2 = --2
.
.
.
- = --

=3.14159
=0.19
=

.
,

.

.

, ( )
, .
(-, -), (0-9)
(underscore) ( _ ), .
,
, , , .., . .
: , , , _, 100, , , _.
: 100, , $.

7.4 |
(variable) .

=
() , . ,
.

.

7 .

22-0203 ANAPTIXI EFARMOGON.indb 129

129

7/5/13 12:59 PM


.


.

,

.

,
.

, , , ,
.
, ,
_, .

-1: --1
-2: --2
.
.
.
-: --

: , A
: ,
:
:


.
,
, ,
.



.

130

,
,

.

22-0203 ANAPTIXI EFARMOGON.indb 130

7/5/13 12:59 PM

7.5 |

: , , ,
,
.
:

DIV

div



,
mod .
..

MOD

7 div 2 = 3 7 mod 2 = 1

7.6 |
. :

()

()

()

_()

()

()

ex

_()

_()

7.7 |
, (expressions). , , , .
.
,
. '
, .

7 .

22-0203 ANAPTIXI EFARMOGON.indb 131

131

7/5/13 12:59 PM

I


1.
2.
3.

a+1

a+1
3

.




.

1/2 a

1/2*a^3

3x + 2y
ab

(3*x+2*y)/(a b)

2*()

, '
. . .
, . ..
2 + 3*4 14, (2 + 3)*4 20,
.

7.8 |
.

- <-

A <- 132
<-
<- *


, .

132


. ,
, , .
<-
( = ). , ,

.

22-0203 ANAPTIXI EFARMOGON.indb 132

7/5/13 12:59 PM

7.9 | -
,
, .
, ,
,
.

.

.
. ,
(,).

, . .

, , : ,


.

. ,
,
.
. .

7 .

22-0203 ANAPTIXI EFARMOGON.indb 133

133

7/5/13 12:59 PM

. ,
.

, .

7.10 |
,

. , .
.
, .
,
.
,
.
_.
, (. . 10),
_.
.
,
&.
(!),
.


. ,

. 18%.
_
!

=0.18

: , _,
: _, _

134

22-0203 ANAPTIXI EFARMOGON.indb 134

7/5/13 12:59 PM


_
!
<- * _
_ <- *
_ <- +_
!
,,. ,
, _
, _
_
Pascal Basic.

Pascal
PROGRAM computers;
CONST
fpa=0.18;
VAR
cost, value, quantity:INTEGER;
total,cost_fpa:REAL;
BEGIN
write( );
readln(quantity);
write( );
readln(value);
cost:=quantity*value;
cost_fpa:=cost*fpa;
total:=cost+cost_fpa;
writeln (To , quantity, :, cost);
writeln ( : , cost_fpa:7:0);
writeln (To : , total:7:0)
END.

Basic

fpa = .18
INPUT : , Quantity
INPUT : , Value
Cost = Quantity * Value
CostFpa = Cost * fpa
Total = Cost + CostFpa
PRINT To ; Quantity; :;
Cost
PRINT USING : ######; CostFpa
PRINT USING To : #######; Total
END

7 .

22-0203 ANAPTIXI EFARMOGON.indb 135

135

7/5/13 12:59 PM


-
,
,
,
,
,
,
-


, , , , ,
,
.
:
l

: , ,
, .

,
( )
_ .

-
1. ;
.

2. ;
3. ;

http://qbasic.com/

4. ;


,


Qbasic.

5. ;

www.basicguru.com


Basic.
,

,


.

136

6. ;
7. .

1. . , . , Pascal, ,
1984.
2. . , Basic: , , , 1991.
3. . , QuickBasic , , , 1992.
4. R. Shackelford, Introduction to Computing and Algorithms, AddisonWesley, USA, 1998.
5. S. Leestma-L.Nyhoff, Turbo Pascal, Programming and Solving,
McMillan, New York, 1990.
6. N. Wirth, Systematic Programming: An introduction, Prentice Hall,
1973.

22-0203 ANAPTIXI EFARMOGON.indb 136

7/5/13 12:59 PM

10

11

10

10

11

22-0203 ANAPTIXI EFARMOGON.indb 137

10

11

12

10

11

12

13

10

11

12

13

14

7/5/13 12:59 PM


,
.

, , ,
,
. , , .

.


.


:
, .
() .
.
.
.

.
: , .

3 ;
3
;
3 ;
3 ;
3 ;

138

22-0203 ANAPTIXI EFARMOGON.indb 138

7/5/13 12:59 PM

8.1 |
.

.

. ,
.
, 0.
,
0, ,
0, .



, , ,
, . ,
. .
.

=0

<>

1 <> ''

>

>10000

>=

+ >= (+)/

<

^2-4** < 0

<=

<= 500

, .
.
.
,
'' ''.
, ''
'' .




,

. ,


.

( = )
(<>),
.

8.

22-0203 ANAPTIXI EFARMOGON.indb 139

139

7/5/13 12:59 PM


,
. , , .

0<<5
=123

> 0 < 5
=1 =2 =3

8.1.1
.
. ...
, ..... .....
_. _.

( ), _.

,


>=0
<- _()
_
:


-1
-2
...
-
_

> 0

_ <- _+1
_

,
_,
. _

140

22-0203 ANAPTIXI EFARMOGON.indb 140

7/5/13 12:59 PM

,
,
, ( ).
.......

>=0
< _()

...... :


-1
-2
...
-

-1
-2
...
-
_

> 0

_ <- _+1

0
__ <- __ +1
_

, , _.
_
.
,
,
, .

8.

22-0203 ANAPTIXI EFARMOGON.indb 141

141

7/5/13 12:59 PM


...... .
,
,,,,,,,
,
AN < 80
< 1.70
,
_
_
,,,,,


.
,
... ... _, .

,,,,,,,
,
AN < 80 <1.70
,
_
,,,,,
......_

-1
-1
-2
...
-
_ -2
-1
-2
...
-
...

-1
-2
...
-
_

142

22-0203 ANAPTIXI EFARMOGON.indb 142

7/5/13 12:59 PM

> 0

- <- _+1
_ <0

_ <- _ +1

O 0
_0 <- _0 +1
_

,
.
_

1
( ) . .

1-50

580

51-100

520

101-200

470

200

440

:
<=50
<- *580

<=100
<- *520

<=200
<- *470


<- *440
_
_
_

8.

22-0203 ANAPTIXI EFARMOGON.indb 143

143

7/5/13 12:59 PM

,
,

,





.

......_
:
<=50
<- *580
_ <=100
<- *520
_ <=200
<- *470

<- *440
_

.
.

, :


_

>50
.

<=50
<- *580
_ >50 <=100
<- *520
_ >100 <=200
<- *470

<- *440
_

8.1.2
, , :



__1

_1

__2

_2
......



_
_

144

22-0203 ANAPTIXI EFARMOGON.indb 144

7/5/13 12:59 PM

1,3,5,7,9

2,4,6,8


< 0 >9
_

.
, .



-.
.

8.2 |
, , .
,
.
,

, _

,
.

8.2.1 ...
... . ,

, . ...
.
,
.

8.

22-0203 ANAPTIXI EFARMOGON.indb 145

145

7/5/13 12:59 PM



-1

-2
...

-
_

<0
<1000
A
< +
_

,
_ _. ,
. ,
_.
,
, . .

2

, ,
.
0.

:, ,
:

< -0
<- 0

X
<>0
<- +
<- +1

X
_

146

22-0203 ANAPTIXI EFARMOGON.indb 146

7/5/13 12:59 PM

>0
<- /
: ,
: ,


_
_

,
0,
.

. , , 0
.
" ".

8.2.2 _
_.
.

_

-1

-2
...

-
_ -

_
A
<- + A
_ >= 1000

_ _.
( ),
_ _, . ,
.
,
_.

8.

22-0203 ANAPTIXI EFARMOGON 137-280.indd 147

147

3/31/14 2:03 PM

... _
.
_ .
, _.
_
.

3


. , ( ).
2

:X, ,

<- 0
<-0





_

.


=<0

, ...

! X

_ >0
<- +
<- +1

_ = =
<- /
=,
=,
_

148

22-0203 ANAPTIXI EFARMOGON.indb 148

7/5/13 12:59 PM

Pascal
PROGRAM athroisma2;
VAR
x,sum,count:INTEGER;
avg:REAL;
choice:CHAR;
BEGIN
count:=0;sum:=0;
REPEAT
REPEAT
write( :);
readln (x);
IF x<=0 THEN
writeln ( , ..);
UNTIL x>0;
sum:=sum+x;
count:=count+1;
write( ;);
readln (choice);
UNTIL (choice=o) OR (choice=O);
avg:=sum/count;
writeln(: , sum:5);
writeln( : ,avg:6:2);
END

8.2.3 .. ...

.

, . , .
,
( _).
.
, .
, ,
_.

......






.

, 1, .

8.

22-0203 ANAPTIXI EFARMOGON.indb 149

149

7/5/13 12:59 PM

1 2 3

-1

-2
...

-
_

1 100 2
<- +
_


,
. 1, .

4
100.


....,



..
...

:,

<- 0
1 100 2
<- +
_
: ,
_
.
.


.
:

150

. ,
.

22-0203 ANAPTIXI EFARMOGON.indb 150

7/5/13 12:59 PM

5
.

! 1 10

:, ,
!A:
!:
!:

1 10
1 10
<- *
A,X,,=,
_
!
_
_

Basic

DEFINT -
FOR a = 1 TO 10
FOR b = 1 TO 10
c = a * b
PRINT a; x; b;=; c
NEXT b
PRINT
NEXT a
END

8.

22-0203 ANAPTIXI EFARMOGON.indb 151

151

7/5/13 12:59 PM

-
,
,
,



, , . ... .
: ...
... ...... _.
.
. ...,
_ .
,

. ... , _
.

-
1. ;
2. ; .
3. ;
4. - - _;
5. ;
6. ;
7. ;
8. _;
9. ;
10.
;

1. I. , Pascal, ,
, 1997.
2. . -. , Turbo Pascal,
, 1996.
3. . , QuickBasic , , , 1992.
4. R. Shackelford, Introduction to Computing and Algorithms, AddisonWesley, USA, 1998.
5. S. Leestma-L.Nyhoff, Turbo Pascal, Programming and Solving,
McMillan, New York, 1990.
6. N. Wirth, Systematic Programming: An introduction, Prentice Hall, 1973.

152

22-0203 ANAPTIXI EFARMOGON 137-280.indd 152

4/23/14 4:49 PM

10

11

12

10

11

10

11

12

22-0203 ANAPTIXI EFARMOGON.indb 153

10

11

12

13

10

11

12

13

14

11

12

13

14

ASCII

7/5/13 12:59 PM




. .

.
,
,
, , .


.
.
, .
.
.
.

3 , ;
3 ;
3 ;
3 ;

154

22-0203 ANAPTIXI EFARMOGON.indb 154

7/5/13 12:59 PM

9.1 |

, .
, ,
.
, 30, ,
:
.
<- 0

1 30


<- +

_
<- /30
..

, ,
.
,
. .

, , .
30 , 1, 2,..., 30. ,
.
,
.
,
.
,
.
.
, 9.1.

9.

22-0203 ANAPTIXI EFARMOGON.indb 155

155

7/5/13 12:59 PM


.
.
.
26
27

[1]
[2]

21
25

[29]
[30]

.
.
.
. 9.1.



i, j, k.


,
[ ]. [2]
, 27.
[i] i-
.
,
, , .
.

.

: [30]

, . .

.

156

22-0203 ANAPTIXI EFARMOGON.indb 156

7/5/13 12:59 PM

1
:

: [30], ,
: i,

<- 0
i 1 30

[i]
<- + [i]
_
<- /30
<- 0
i 1 30
[i] <
<- +1
_
_
:,
,
_
,
, . , ,
[i],

, <- + [i].
, ,
. ,
30 .

2

, , , 2 100.

.

,



,


,




.

9.

22-0203 ANAPTIXI EFARMOGON 137-280.indd 157

157

3/31/14 2:08 PM


. ,
.
, , ,
.

, 3.

: i, , [100], ,
_2,
: , _,

A
!
( 100)

i 1
,i,-
X[i]
_
!
<- 0
_2 <- 0
i 1
,i,-
X[i]
<- + X[i]
_2 <- _2 + [i]^2
_

!
<- /
!
_ <- _(_2/ - ^2)
!
i 2
j i _ -1
AN X[j-1] > X[j]
! j j-1
<- X[j 1]
X[j-i] <- X[j]
X[j] <-
_
_ ! j
_ ! i
!

158

22-0203 ANAPTIXI EFARMOGON 137-280.indd 158

3/31/14 2:10 PM

MOD 2 =0
<- (X[/2]+[/2+1])/2

<- [(+1)/2]
_
!

============
=,
= ,
= , _
= ,
_

Basic

DEFINT -
DIM x(100)
CLS
sum = 0: sum2 = 0

INPUT =, n
FOR i = 1 n
PRINT ; i; - : ;
INPUT , x(i)
NEXT i

FOR i = 1 n
sum = sum + x(i)
sum2 = sum2 + x(i) ^ 2
NEXT i
mt! = sum / n
ta! = SQR(sum2 / n - mt! ^ 2) ..

FOR i = 2 TO n
FOR j = n TO i STEP -1
IF x(j - 1) > x(j) THEN SWAP x(j - 1), x(j)
NEXT j
NEXT i

IF n MOD 2 = 0 THEN
median = (x(n / 2) + x(n / 2 + 1)) / 2
ELSE
median = x((n + 1) / 2)
END IF
PRINT
PRINT =======================
PRINT
=; n
PRINT
=; mt!
PRINT =; ta!
PRINT
=; median
END

9.

22-0203 ANAPTIXI EFARMOGON.indb 159

159

7/5/13 12:59 PM

9.2 |



, .
, .
. .
.
. ,
100.

, .

.
,
, . .
.

. ,
. , , .
, .

9.3 |
30 ,
,
30 , .

.
.

1
2
....
30

160

1
25
26

27

2
21
22

23

...

10
32
31

30

22-0203 ANAPTIXI EFARMOGON.indb 160

7/5/13 12:59 PM

30 , 300 .
,
, . , 27.

,
( ) ( ). [30,1] 27.
[i,j] i j , i 1 30 j 1 10.
30X10.

3

( 30 10 ). , ,
.
_2

: [30,10] , [10]
: i, j, ,

!
i 1 30
j 1 10
, i, j
[i,j]
_
_
!
j 1 10
<- 0
i 1 30
<- + [i,j]
_
[j] <- /30
_
j 1 10
<- 0
i 1 30
[i,j] < [j]
<- +1
_
_
, i, :, [j]
,
_
_

,




,



.

9.

22-0203 ANAPTIXI EFARMOGON.indb 161

161

7/5/13 12:59 PM

Pascal
PROGRAM poleis;
VAR
temperature: array[1..30,1..10] OF REAL;
ave:array [1..10] OF REAL;
total:REAL;
i,j,days:INTEGER;
BEGIN
FOR i:=1 TO 30 DO
FOR j:=1 TO 10 DO
BEGIN
write ( :,i,j, );
readln (temperature [i,j])
END;
FOR j:=1 TO 10 DO
BEGIN
total:=0;
FOR i:=1 TO 30 DO
total:=total+temperature[i,j];
ave[j]:=total/30
END;
FOR j:=1 TO 10 DO
BEGIN
days:=0;
FOR i:=1 TO 30 DO
IF temperature[i,j] < ave[j] then
days:=days+1;
,i,
writeln ( 
,ave[i]:4:1);
:,
writeln ( 
days);
END
END.

, ,
, . .

, . . ,
. ,
, 25
[1, 1, 1].

162

22-0203 ANAPTIXI EFARMOGON.indb 162

7/5/13 12:59 PM

2001

...

10

25

21

32

26 22
2
...
2127
23

31

10
32

2000

1
2

1 ....
2530

31

10
32

1 ....
2530

26 22
2
...
2127
23

26

22

31

....

30

27

23

30

1999

30

30

4
:
. 
.
. 
, .
. 
, .
. ,
.
, ,
, .
:

, .

,
.


,
.
.
,
.

9.

22-0203 ANAPTIXI EFARMOGON.indb 163

163

7/5/13 12:59 PM

: [10,7], i,j, , 
,
&
: [10]

!
i 1 10
,i,
[i]
j 1 7
, j,-
[i,j]
_
_
!
!
<- 0
i 1 10
<- 0
j 1 7
<- +[i,j]
_
. ,[i], =,
<
<-
<- i
_
_
.. ,, ,[]
!
!
<- 0
j 1 7
<- 0
i 1 10
<- + [i,j]
_
. ,j,- = ,
<
<-
<- j
_
_
.. ,, ,,-
_

Pascal
PROGRAM cinemas;
VAR
i,j,k,max,sum:INTEGER;
tickets:ARRAY[1..10,1..7] OF INTEGER;
name:ARRAY [1..10] OF STRING;

164

22-0203 ANAPTIXI EFARMOGON 137-280.indd 164

4/23/14 4:48 PM

BEGIN
FOR i:=1 TO 10 do
BEGIN
write ( : );
readln (name[i]);
FOR j:=1 TO 7 DO
BEGIN
write ( , j, : );
readln(tickets[i,j]);
END;
END;
max:=0;
FOR i:=1 TO 10 DO
BEGIN
sum:=0;
FOR j:=1 TO 7 DO
sum:=sum+tickets[i,j];
writeln( , name[i], = , sum);
IF max<sum THEN
BEGIN
max:=sum;
k:=i;
END;
END;
writeln ( , max, , name[k]);
max:=0;
FOR j:=1 TO 7 DO
BEGIN
sum:=0;
FOR i:=1 TO 10 DO
sum:=sum+tickets[i,j];
writeln( ,j, = , sum);
IF max<sum THEN
BEGIN
max:=sum;
k:=j;
END;
END;
writeln ( , max, , k);
END

9.4 |

.
:
l

9.

22-0203 ANAPTIXI EFARMOGON.indb 165

165

7/5/13 12:59 PM

.
, ,
.
:


,
.

.


. , ,
. ,

.


3 , 2.
.
.

, .



,
. . .


.
( )
, .

166

22-0203 ANAPTIXI EFARMOGON.indb 166

7/5/13 12:59 PM


.

.

( ). , .
.
.

-
,
,
,
,
,


, .

.

-
1. ;
2. ;
3. ;
4. ;
5. ;
6. ;
7. ;
8. .

9. ;

http://qbasic.com/

10. ;


,


Qbasic.

11. ;
12. ;
;

1. . , Turbo Pascal 6.0 ,


, , 1993.
2. QuickBASIC: , , , 1991.



(Usenet),

.

3. . , QuickBasic , , , 1992.
4. R. Shackelford, Introduction to Computing and Algorithms, AddisonWesley, USA, 1998.
5. S. Leestma-L.Nyhoff, Turbo Pascal, Programming and Solving,
McMillan, New York, 1990.
6. N. Wirth, Systematic Programming: An introduction, Prentice Hall, 1973.

9.

22-0203 ANAPTIXI EFARMOGON.indb 167

167

7/5/13 12:59 PM

22-0203 ANAPTIXI EFARMOGON.indb 168

7/5/13 12:59 PM

10

10

11

12

13

10

11

12

10

11

12

13

10

11

12

13

14

11

12

13

14

12

ASCII

13

14

ASCII

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
. . . . . . . . . . . . . . . . . . . . . . 58

............................................................................................ 54

........................................................................................ 58
()

................................................................ 69,

223

() ..................................................................... 70, 223

................................................................................. 70

()

() .......................................................... 71

............................................................................................ 89, 90

................................................................................... 91
............................................................................... 175, 177

............................................................................................................ 180

................................................. 188

........................................................................................ 295

............................................................................. 298
......................................................................................... 303

268

22-0203 ANAPTIXI EFARMOGON.indb 169

............................................................. 71

Fibonacci ................................................................................................. 72
.............................................................................................. 86

7/5/13 12:59 PM


.
. , .
, ,
.
.

:
.

.

.
.
.

3
;
3
;
3 ;
3 ;
3 ; ;

170

22-0203 ANAPTIXI EFARMOGON.indb 170

7/5/13 12:59 PM

10.1 |

,
. 6,
, ,
(top-down).

. ,
.
.

, .

1
'
,
' .

.
:
l

. :

l

1 0 .

22-0203 ANAPTIXI EFARMOGON.indb 171

171

7/5/13 12:59 PM


. . ,
,
,
.

10.1.

. ,
( 3)
1 2 .
, (subprogram).

. 10.1.

172

22-0203 ANAPTIXI EFARMOGON.indb 172

7/5/13 12:59 PM

10.2 |



,
.

,
. . ,
, .
:

.

,
,
.

.
,

.
.

.
,
,
. . ,
.

10.3 |



6.
,

:


.

.

1 0 .

22-0203 ANAPTIXI EFARMOGON.indb 173

173

7/5/13 12:59 PM

.


.

.
,
.


. ,
.
,
,
.

.

. ,
,

, ( ).
,
,
. ,
.

10.4 |

.
, ,
,
.
, .
, .
.
-

174

22-0203 ANAPTIXI EFARMOGON.indb 174

7/5/13 12:59 PM

,
.


.
,
, .

10.5 |
, . .
. ,
,
.
.
. , ,
.

.

.
.

, .


(
).

.
.

2

.

1 0 .

22-0203 ANAPTIXI EFARMOGON.indb 175

175

7/5/13 12:59 PM

.
) ,

) (=r2)
) , ,

, .
o . , . , _,
:
_()

_


_ >0
_

. , .
,
.
_(R)
.
, ,
.
_(R) :

=3.14

: R

_ <- *R^2
_
.
,
.
.
()

176

22-0203 ANAPTIXI EFARMOGON.indb 176

7/5/13 12:59 PM

:,
_
:
_2

: R,

_ (R)
<- _ (R)
()
_
. ,
.
10,
:

10
: 314
, .

10.5.1
.
( ):

....
<-
....
_
. , .
.
, , , .
, _<-*R^2.
, .

1 0 .

22-0203 ANAPTIXI EFARMOGON.indb 177

177

7/5/13 12:59 PM

.
<-_ (R).
: R.
R
.
.
,
.

10.5.2
.
( )


_
. , / .
.

.
,
.

- (-)

(A, , )

.
.
.
.

_(R)
()

178

22-0203 ANAPTIXI EFARMOGON.indb 178

7/5/13 12:59 PM


. ,
_ , .
, _ ,
(
) R
.
.
.
,
. ,
.
.
' .
2
Pascal Basic.

Pascal
PROGRAM example2;

VAR

r,e:REAL;
FUNCTION area(r:REAL):REAL;
BEGIN

area:=pi*sqr(r)
END;
PROCEDURE input(var x:REAL);
BEGIN

REPEAT

write ( :);

readln(x)

UNTIL x>0;
END;
PROCEDURE output(result:REAL);
BEGIN
writeln (To :,result:6:2)
END;
BEGIN
input(r);
e:=area(r);
output(e)
END.

1 0 .

22-0203 ANAPTIXI EFARMOGON.indb 179

179

7/5/13 12:59 PM

Basic
3
DECLARE SUB Eisodos (nb!)
DECLARE SUB Ektypwsh (res!)
DECLARE FUNCTION Emvado! (r!)
CLS
CALL Eisodos(r)
e = Emvado(r)
CALL Ektypwsh(e)
END
SUB Eisodos (nb)
DO
INPUT : , nb
LOOP UNTIL nb > 0
END SUB
SUB Ektypwsh (res)
PRINT To :; res
END SUB
FUNCTION Emvado (r)
pi = 3.14
Emvado = pi * r ^ 2
END FUNCTION

10.5.3

.

3

.
_3
...
<-5
<-7
(, , 1, 1)
...
<-9
<-6
(A, , 2, 2)
...

(X, , , )



: X, , ,


<- -


<- +

_

180

22-0203 ANAPTIXI EFARMOGON.indb 180

7/5/13 12:59 PM

, , 1, 1, 2, 2 _3 ,
,, , , .
, , 1 _3
_3. .
,
, .
, ,
,
.

(formal parameter list)



.
(actual parameter
list) .

_3 .
,, 1
1 , ,
, .
5 7.
, 1 1 .
,
_III,
. ( = 5), (= 7),
1 (=-2) 1 ( = 12).

.

()

()

-2

-2

-2

12

12

12

()

()

. 10.2.

()
()

()


()

1 1
.

1 0 .

22-0203 ANAPTIXI EFARMOGON.indb 181

181

7/5/13 12:59 PM


.
, , (return address), (execution time
stack).
.
,
. , a b,
c ... c, b, a. ,
.
LIFO .
!
.
.
.
_1
.
.
.

!_1
.
.
.
_2
.
.
.

!_2
.
.
.

. 10.3.




. ,
...

10.6 | -

.

182

22-0203 ANAPTIXI EFARMOGON.indb 182

7/5/13 12:59 PM

. (
) .



.

: A, ,

...
_

: , , ,

...
_

: , , I

...
_
, , , .
.
, , , ,
.
, , . .
, .
,
, . R
2.
, .
, , .
.



(scope) .

1 0 .

22-0203 ANAPTIXI EFARMOGON.indb 183

183

7/5/13 12:59 PM




, . .

,
,
.


,
. , .
.

,
.


.

.

,
.

10.7 |
.
. .

3,
,
.

,
.
,
.
:

184

22-0203 ANAPTIXI EFARMOGON.indb 184

7/5/13 12:59 PM

:
n! =

n (n 1)!

n > 0

n = 0


,
1 n=0.
n*(n-1)!, ,
.
.
():
!


=0

< 1


< *(-1)

_
_
():
!


: i,


Fact < 1

i 2

Fact <- Fact*i

_
_
, , . ,

, ,
.

.
5!
().
5, 0, (4). ,
, (3)

1 0 .

22-0203 ANAPTIXI EFARMOGON 137-280.indd 185

185

3/31/14 2:11 PM


(0).

(5)

< *

(-1)

< *

(-1)

< *

(-1)

< *

(-1)

< *

(-1)

(4)

(3)

(2)

(1)

(0)

<1

=0 (0) 1,
.
(2)=1*2, (3)=2*3, (4)=6*4 .
(5)=24*5.
120 .

186

22-0203 ANAPTIXI EFARMOGON.indb 186

7/5/13 12:59 PM

(5)

120

< *

(-1)

< *

(-1)

< *

(-1)

< *

(-1)

< *

(-1)

(4)

24

(3)

(2)

(1)

(0)

<1



.




,

( ).



( )



.
,

,
LIF

,


,


.

. 3,
. , ,
,
.

1 0 .

22-0203 ANAPTIXI EFARMOGON.indb 187

187

7/5/13 12:59 PM

Pascal
FUNCTION factorial(n:INTEGER) : INTEGER;
BEGIN

IF n=0 THEN

factorial:=1

ELSE

factorial:=n*factorial(n-1);
END;
FUNCTION factorial(n:INTEGER) : INTEGER;
VAR

i,fact:integer;
BEGIN

fact:=1;

FOR i:=2 TO n DO

fact:=i*fact;

factorial:=fact
END;

Basic
FUNCTION Factorial (n)
IF n = 0 THEN

Factorial = 1
ELSE

Factorial = n * Factorial(n - 1)
END IF
END FUNCTION
FUNCTION Factorial (n)
fact = 1
FOR i = 2 TO n

fact = fact * i
NEXT i
Factorial = fact
END FUNCTION

188

22-0203 ANAPTIXI EFARMOGON.indb 188

7/5/13 12:59 PM

,
. , .
,
.
.
,
.
, .

,
,
,
,

.
.

-
1. ;
2. ;
3. ;
4. ;
5. ;
6. ;
7. ;
8. ; .
9. ;
10. ;
11. ;
.

1 0 .

22-0203 ANAPTIXI EFARMOGON.indb 189

189

7/5/13 12:59 PM


1. . , . , Pascal, ,
1984.
2. . , Basic: , , , 1991.
3. . , QuickBasic , , , 1992.
4. R. Shackelford, Introduction to Computing and Algorithms, AddisonWesley, USA, 1998.
5. S. Leestma-L. Nyhoff, Turbo Pascal, Programming and Solving,
McMillan, New York, 1990.
6. N. Wirth, Systematic Programming: An introduction, Prentice Hall,
1973.

190

22-0203 ANAPTIXI EFARMOGON.indb 190

7/5/13 12:59 PM

11

10

11

12

13

14

10

11

12

13

10

11

12

13

14

11

12

13

14

12

ASCII

13

14

ASCII

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
. . . . . . . . . . . . . . . . . . . . . . 58

13

14

................................................................ 69,

ASCII

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
. . . . . . . . . . . . . . . . . . . . . . 58

()

()

() .......................................................... 71

............................................................. 71

()

Fibonacci ................................................................................................. 72

............................................................................................ 89, 90

................................................................................... 91
............................................................................... 175, 177

............................................................................................................ 180

................................................. 188

........................................................................................ 295

............................................................................. 298
......................................................................................... 303

............................................................. 71

Fibonacci ................................................................................................. 72

.............................................................................................. 86

223

................................................................................. 70

() .......................................................... 71

................................................................ 69,

() ..................................................................... 70, 223

................................................................................. 70

............................................................................................ 54

........................................................................................ 58

223

() ..................................................................... 70, 223

............................................................................................ 54

........................................................................................ 58
()

.............................................................................................. 86

............................................................................................ 89, 90

................................................................................... 91

............................................................................... 175, 177


............................................................................................................ 180

................................................. 188

........................................................................................ 295

............................................................................. 298
......................................................................................... 303

algorithmic languages

.
algorithm


.
alphanumeric
,
.. .
recursion
.
recursive function
,
.
analysis
.
object .
.
object program
.
object
oriented language ,
.
data abstraction
.
loop , .
event
-

268

22-0203 ANAPTIXI EFARMOGON.indb 191

268

.
.
machine language

.
programming language

.
graph ,
,
.
write .
data ,

, .
index ,

.
pointer
.
tree
.
,
, .
, .
read ,
.
procedural language

.
interactive
() .

269

7/5/13 12:59 PM


, ,
.
,
.

.
.
, .


:
, , , ,

,
,
.

3
;
3 ;
3 ;
3
' ;
3 ;
3
;

192

22-0203 ANAPTIXI EFARMOGON.indb 192

7/5/13 12:59 PM

11.1 |



,
, , , .


.


.

. (object
- oriented programming)
,
.
,
"
;". , "",
"" () .
, .
, , .
.
,

,
. ,
.

Visual C++, Java, Visual Basic, Delphi.



Simula Smalltalk.

1 1 .

22-0203 ANAPTIXI EFARMOGON.indb 193

193

7/5/13 12:59 PM

11.1.1

(objects). , ,
. ,
, ,
( 11.1).

. 11.1.
,
. , ,
, . () , , , ..
.
, ,
,
.
,
, ""
.
, ,
( 11.2).

. 11.2.

194

22-0203 ANAPTIXI EFARMOGON.indb 194

7/5/13 12:59 PM


; .
,
, . , (data) (operations)
.
(methods).
""
.
, ,
. ,
. , ,
, , ,
, 11.3.

. 11.3.
,
.

, ,
,
.
. ,
.
,
,
.

1 1 .

22-0203 ANAPTIXI EFARMOGON.indb 195

195

7/5/13 12:59 PM

11.1.2
Smalltalk,

,
,

,
.




(metaclass).

, ,
.

. , ,
.

. (instance) . (class)
.

. .
. , .

11.1.3


. .
,
(attributes properties), .
.

,
,

, , .
,

,
.
,
(properties window),
.
,
,
. -

196

22-0203 ANAPTIXI EFARMOGON 137-280.indd 196

3/31/14 2:11 PM

, Visual C+ + Visual Basic,


:
. =

. .




, , . :
(Data abstraction). . .

.
.
(Encapsulation). ,
() (). .
.
,

.
(Inheritance). .
(subclasses) . ()
. ,
, ,
.. .
(Polymorphism). , ,
, .

. ,
. ,
. ,
, .
.
.

1 1 .

22-0203 ANAPTIXI EFARMOGON.indb 197

197

7/5/13 12:59 PM

11.1.4
,
Smalltalk Visual Basic,
(methods). .
.
. .
,
. :
.

11.2 |


(event-driven
programming) , , .

,
, .


,
.
,
.
, ,
,
.
,

, ,
.
, .

(event) , ,
.
,
.

198

22-0203 ANAPTIXI EFARMOGON.indb 198

7/5/13 12:59 PM

, ,
, ..
.

11.2.1
,


.
, , (event procedures),
.

. , ,
.
:
_
...

...


.

,
,
.

,
.
,
,
,
:

.
, Visual
C++

(functions).

1 1 .

22-0203 ANAPTIXI EFARMOGON.indb 199

199

7/5/13 12:59 PM


...

...


:
_
...

...



. (modular) , ,
(structural)
, .
, , ..

.

11.2.2

, :



.




.


.

200

.
.


, .

,
, .

( 2).

.

22-0203 ANAPTIXI EFARMOGON.indb 200

7/5/13 12:59 PM

.
,
, .

11.3 |



,

.
.

,
(user interface). , . , ,
, .

.
.
,

.
.
, .
.
,
.


:

-, .

1 1 .

22-0203 ANAPTIXI EFARMOGON.indb 201

201

7/5/13 12:59 PM



, , ,
.
,
.



.

. :
l


.
(toolbox)
.

, .
,
. ,
.
.
, :
l


( ) ,

202

22-0203 ANAPTIXI EFARMOGON.indb 202

7/5/13 12:59 PM

,
.

.
,
.

, :
l


,
,






.
,
1,



.


- ,

1 1 .

22-0203 ANAPTIXI EFARMOGON.indb 203

203

7/5/13 12:59 PM





,


.





.

( )

. 11.4.

,
11.4.

,
.
.
.



.
.

204

22-0203 ANAPTIXI EFARMOGON.indb 204

7/5/13 12:59 PM

,
, .
:
l


,
, .


.


.
:
1_()
1. =
2. =
3. =

2_()
1. =
2. =
3. =

3_()
1. =
2. =
3. =

:
_()


, ,
. . ,

, ,
.

1 1 .

22-0203 ANAPTIXI EFARMOGON.indb 205

205

7/5/13 12:59 PM


,
. ,
( 11.5).


1
2
3

. 11.5.

( 11.6).

2
3

. 11.6.

206

22-0203 ANAPTIXI EFARMOGON.indb 206

7/5/13 12:59 PM

,
.

11.4 |




.
. , .
, Visual C+ +,
Delphi Visual Basic,

. , ,
.
,
.

, , , , , , ,

.
,
, ,
.
,
.
, (toolboxes), (debugging tools), (code
windows), (report generators)
. (wizards)
, .

,

.



.

1 1 .

22-0203 ANAPTIXI EFARMOGON.indb 207

207

7/5/13 12:59 PM

11.4.1
(menus) ,
,
.

.
(menu bar)
( 11.7).






,

(Menu Editor).

. 11.7.
(popup menu) ( 11.8).


.

. 11.8.

208

22-0203 ANAPTIXI EFARMOGON.indb 208

7/5/13 12:59 PM

. 11.9.
, ,
(toolbars) ( 11.9).

.

11.4.2
(dialog boxes) ( 11.10)
.

. ,
.

. 11.10.



.

,
,
.
,
(OK), (Cancel) (Retry).
.

,
.

1 1 .

22-0203 ANAPTIXI EFARMOGON.indb 209

209

7/5/13 12:59 PM

11.5 |
,
.
,
.





.


,

.

(document-centered
view)



(multitasking).


,

, .

. , ,
,
,
,
, ( 11.11).


. ,
.

. 11.11.
, (linking)
. , . ,
,

210

22-0203 ANAPTIXI EFARMOGON.indb 210

7/5/13 12:59 PM

, .

. ,

,
, .

.
(real-time)

.


, :


,
.
(embedding)
.
. .
,
, .
. .

' . ,
, .


.
, ,
. .
. , ,

,
-

1 1 .

22-0203 ANAPTIXI EFARMOGON.indb 211

211

7/5/13 12:59 PM

. ""
, .
,

,
.

212

22-0203 ANAPTIXI EFARMOGON.indb 212

7/5/13 12:59 PM


, ,
, , .

. ,
,
.
,
, .


,
.
.


,
,
,
,

-,

,
,
,
,

, .
.
,

.

-
1. .
2. .
3.

.
4. .
5. .
6. .
7. ;
8. .
9. ;

1 1 .

22-0203 ANAPTIXI EFARMOGON.indb 213

213

7/5/13 12:59 PM

10. .
11. ;
12. ;
13. .

1. Object-Oriented modeling and Design, Prentice Hall, New York, 1991.


2. G. Masini, A. Napoli, D. Colnet, D. Lionard, K. Tombre : Les langages
objets, InterEditions, Paris, 1989.
3. Gary Entsminger: Secrets of the Visual Basic for Windows, SAMS
Publishing, Indiana USA, 1992.
4. Bertrand Meyer : Object-oriented Software Construction, Prentice Hall,
London, 1988.
5. . -. : Visual Basic
4.0, , , 1997.

214

22-0203 ANAPTIXI EFARMOGON.indb 214

7/5/13 12:59 PM

12

11

12

13

14

ASCII

10

11

12

13

14

11

12

13

14

12

ASCII

13

14

ASCII

.......................................... . . . . . . . . . . . . . . . . . . . . . . 48
................................................ . . . . . . . . . . . . . . . . . . . . . . 57
. . . . . . . . . . . . . . . . . . . . . . 58

13

14

................................................................ 69,

ASCII

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
. . . . . . . . . . . . . . . . . . . . . . 58

()

............................................................................................ 89, 90

................................................................................... 91
............................................................................... 175, 177

............................................................................................................ 180

................................................. 188

........................................................................................ 295

............................................................................. 298
......................................................................................... 303

223

................................................................................. 70
() .......................................................... 71

............................................................. 71

()

Fibonacci ................................................................................................. 72

............................................................. 71

Fibonacci ................................................................................................. 72

.............................................................................................. 86

................................................................ 69,

() ..................................................................... 70, 223

................................................................................. 70
()

() .......................................................... 71

............................................................................................ 54

........................................................................................ 58

223

() ..................................................................... 70, 223

............................................................................................ 54

........................................................................................ 58
()

.............................................................................................. 86

............................................................................................ 89, 90

................................................................................... 91

............................................................................... 175, 177


............................................................................................................ 180

................................................. 188

........................................................................................ 295

............................................................................. 298
......................................................................................... 303

algorithmic languages

.
algorithm


.
alphanumeric
,
.. .
recursion
.
recursive function
,
.
analysis
.
object .
.
object program
.
object
oriented language ,
.
data abstraction
.
loop , .
event
-

268

22-0203 ANAPTIXI EFARMOGON.indb 215

268

.
.
machine language

.
programming language

.
graph ,
,
.
write .
data ,

, .
index ,

.
pointer
.
tree
.
,
, .
, .
read ,
.
procedural language

.
interactive
() .

269

7/5/13 12:59 PM



. ,
,
(user
interface) . , ,


.
.


:


,

3
,
;
3 ,
;
3 ;
3 ;
3 ,
;

216

22-0203 ANAPTIXI EFARMOGON.indb 216

7/5/13 12:59 PM

12.1 |
(user interface)
.
,
( 12.1). ,

.
,
"" .

. 12.1.

, (lightpen) .
, , , , ,
,
. , ,
, , ,
,
.

.

.
, .
,
,


.

.

12.

22-0203 ANAPTIXI EFARMOGON.indb 217

217

7/5/13 12:59 PM

, IEEE Standard Directory of Electrical and Electronics Terms,


interface shared boundary, "
".
( )
interface . interface
, , .
,
.

, ,
.

.
,
.

12.2 |

, , .
, (,
..) , ,
.

(command-based). ,
,
, .
DOS.
, .
,
.
.
DOS, DOS (dosshell),
DOS (Norton
Utilities ..). , ,
,
.

218

22-0203 ANAPTIXI EFARMOGON.indb 218

7/5/13 12:59 PM

Apple.
Apple , GUI (Graphical User
Interface). ,
,
.
IBM ,
PCs,
. , Windows OS/2.
Apple.
Macintosh Apple
'
.
GUIs . , , clicks .
To GUI
. , ,
.


:
l

:
, " ".

:
.

.
( 12.2):
,

,

(title bar),
,

(menu bar),
,

(toolbar),
,

12.

22-0203 ANAPTIXI EFARMOGON.indb 219

219

7/5/13 12:59 PM

. 12.2.

(status bar), ,

(scroll bars),
,
,
,

(control menu),
,

(maximize button),

,

(minimize button), ,

(restore button), ,

(close button), .

220

:
. .
,
(, ..).

:
.
.

22-0203 ANAPTIXI EFARMOGON.indb 220

7/5/13 12:59 PM

12.3 |

.
"
;", . , ,


,
,
(user task analysis).




,

.

,
. ,
.
:
l

: , ,
, .
,
, .

: , . ,
,
.

:
. ,
video
,
video, .

:
.
.


. , -

,

,

.

12.

22-0203 ANAPTIXI EFARMOGON.indb 221

221

7/5/13 12:59 PM

,
,
.
,
, .
, - ,

.
l

: , .
.

.
" , " .


.
l

:
.

:
on line , .
, , ,
.

, (assistants) .

.

,
.

222

: , ,
. . ,

22-0203 ANAPTIXI EFARMOGON.indb 222

7/5/13 12:59 PM


.
l

:

. ,
. ,
, ,
, .

.

:
. ,

" ; (/)", " ; (/)",

( , ).

................
!
, , ,
()
................
()
<- 0
_
(/);


, , , n
<- 1
, , ,
<- 2



_ =1 =2





, '


.

12.

22-0203 ANAPTIXI EFARMOGON.indb 223

223

7/5/13 12:59 PM

. .

,
.


.

.
. ( 12.3):

. 12.3.
l

, ,
,

.

,
.
, , . ,
.

,
. , , .

,
,
.

12.4 |


-

224

22-0203 ANAPTIXI EFARMOGON.indb 224

7/5/13 12:59 PM

,
.

12.4.1
To
.
,
.

,
.
,
.
: , , . ,
. , ,
, . :
l

, ,


.
.
.
12.1.
12.1:

12.

22-0203 ANAPTIXI EFARMOGON.indb 225

225

7/5/13 12:59 PM


.
:
l

.
.
.
,
, ,
.

. , .

. .

. , .
, .

. , ,

,
.

.
,

.

.


.
.
12.2 .
12.2 :

226

22-0203 ANAPTIXI EFARMOGON.indb 226

7/5/13 12:59 PM

12.4.2


. , ,
. ,
.

.
,
, , :
l

.
.

" " .
" ", .

. , .

" " "


".

. . " ",
" " .

.
.
.

.

12.5 |



.
, .
,
, .
.
:

12.

22-0203 ANAPTIXI EFARMOGON.indb 227

227

7/5/13 12:59 PM

228

:

. .
.

.
. ,
.

.

.
.

.

.

:
, .
.
, , .

,
.

, .

:
.
. ,
"",
.
,
.. ( )
.

22-0203 ANAPTIXI EFARMOGON.indb 228

7/5/13 12:59 PM

To (user
interface) . ,
(GUI). , .
.

.


(user interface),
,

,
,

-
1. user interface
.

2. .

http://cfg.cit.cornell.edu/
design/contents.html

3. GUI.





,
,
,


..

.

4. .
5.
.
6. .
7. ' "
;".

1. Lon Brafield: The user interface - Concepts & Design, Addison-Wesley


Publishing Company, Amsterdam, Holland,1993.
2. Robert Lindstrom: Multimedia Presentations - Create dynamic
presentations that inspire, Osborne-McGraw Hill, USA, 1994.
3. Arch Luther: Designing Interactive Multimedia, Bantam Books, New
York, USA, 1992.
4. Mark Maubury: Intelligent Multimedia Interfaces, AAAIPress/The MIT
Press, California, USA, 1993.
5. Karen McGraw: Designing and Evaluating User Inetrfaces for Knowledge_
based Systems, Ellis Horwood Limite, West Sussex, England, 1992.
6. : , ,
, , 1994.
7. Ben Shneiderman: Designing the User Interface Strategies for Effective
Human-Computer Interaction, Addison-Wesley Publishing Company
Inc, New York, USA, 1992.

http://www.sju.
edu/~jhodgson/gui/
guihome.html




.



,



.

12.

22-0203 ANAPTIXI EFARMOGON.indb 229

229

7/5/13 12:59 PM

22-0203 ANAPTIXI EFARMOGON.indb 230

7/5/13 12:59 PM

13

12

13

14

ASCII

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
. . . . . . . . . . . . . . . . . . . . . . 58

............................................................................................ 54

........................................................................................ 58
()

................................................................ 69,

223

() ..................................................................... 70, 223


................................................................................. 70
() .......................................................... 71
()

............................................................. 71

Fibonacci ................................................................................................. 72
.............................................................................................. 86

............................................................................................ 89, 90

................................................................................... 91

............................................................................... 175, 177


............................................................................................................ 180
,

................................................. 188

........................................................................................ 295

............................................................................. 298
......................................................................................... 303

11

12

13

14

12

ASCII

13

14

ASCII

................................................................ 48
...................................................................... 57
...................... 58

13

14

................................................................ 69,

ASCII

................................................................ 48
...................................................................... 57
...................... 58

()

............................................................................................ 89, 90

................................................................................... 91
............................................................................... 175, 177

............................................................................................................ 180

................................................. 188

........................................................................................ 295

............................................................................. 298
......................................................................................... 303

................................................................ 69,

223

() ..................................................................... 70, 223


................................................................................. 70
() .......................................................... 71

............................................................. 71

()

Fibonacci ................................................................................................. 72

............................................................. 71

Fibonacci ................................................................................................. 72

.............................................................................................. 86

............................................................................................ 54

........................................................................................ 58

223

() ..................................................................... 70, 223


................................................................................. 70
()

............................................................................................ 54

........................................................................................ 58
()

() .......................................................... 71

.............................................................................................. 86

............................................................................................ 89, 90

................................................................................... 91

............................................................................... 175, 177


............................................................................................................ 180

................................................. 188

........................................................................................ 295

............................................................................. 298
......................................................................................... 303

algorithmic languages

.
algorithm


.
alphanumeric
,
.. .
recursion
.
recursive function
,
.
analysis
.
object .
.
object program
.
object
oriented language ,
.
data abstraction
.
loop , .
event
-

268

268

.
.
machine language

.
programming language

.
graph ,
,
.
write .
data ,

, .
index ,

.
pointer
.
tree
.
,
, .
, .
read ,
.
procedural language

.
interactive
() .

269

268

22-0203 ANAPTIXI EFARMOGON.indb 231

7/5/13 12:59 PM


, ,
, . , , .
,
.
, . ,
,

,
, .


:
,
,
,
.

3 ;
3 ;
3 ;
3
,
;
3
;

232

22-0203 ANAPTIXI EFARMOGON.indb 232

7/5/13 12:59 PM

13.1 |
, , , .
,
.
, :


.
.
, .
, ,
.
, .
, .

, .




(crash) .
,
.
, ,
.
, ,
,
,
,
.








(bug)
.

bugs,


.

1 3 .

22-0203 ANAPTIXI EFARMOGON.indb 233

233

7/5/13 12:59 PM



.


, .

(testing) .


2000 (millennium bug). ,
.

:

234

1962 Mariner 1 Canaveral


.
... (NASA) ,
.
. NASA FORTRAN .
80 .

1990 AT&T, . 5
.

Pentium 1994 ,
. Thomas Nicely Lynchburg Virginia
. ,

450 .

1995 Denver
.
.
, .
, 3,2 .

22-0203 ANAPTIXI EFARMOGON.indb 234

7/5/13 12:59 PM

13.2 |
,
(debugging).
.
,

.
.
,
.

,
, ,
.
,
.

.
.

13.3 |


.
.
,
.
(debuggers).



.

.


,


.

:


(watch expressions)

1 3 .

22-0203 ANAPTIXI EFARMOGON.indb 235

235

7/5/13 12:59 PM

. ,
, .
.

. 13.1.


(breakpoint) .
.
,
.


, .

.

. 13.2.

I
(history)
.

.

, . -

236

22-0203 ANAPTIXI EFARMOGON.indb 236

7/5/13 12:59 PM

(tracing) ,

.

. 13.3. 


(.. ,
),

.

,
,
, .

13.4 |


.

, .
.
.
, .


.



,
.

1 3 .

22-0203 ANAPTIXI EFARMOGON.indb 237

237

7/5/13 12:59 PM

. 13.4.

:
,
.

Java, ADA C++




(exceptions),
Visual Basic

(On Error GoTo).

238

,

(exception error handler), .
.


,
.

:
l


.
.

, .

22-0203 ANAPTIXI EFARMOGON.indb 238

7/5/13 12:59 PM

,
,
, .
l


,
.
(..
) , .

, .
, .


. ,
( ) .



.
.

,
,
,
,


.

.
.

,


.

1 3 .

22-0203 ANAPTIXI EFARMOGON.indb 239

239

7/5/13 12:59 PM

-
1. .
2. .
3.
.
4. .
5. .

1. , , 2, , 1986.
2. . -. : Visual Basic
4.0, , , 1997.
3. Ivars Peterson: Fatal Defect:Chasing killer Computer Bugs, Science
News, USA, 1995.

240

22-0203 ANAPTIXI EFARMOGON.indb 240

7/5/13 12:59 PM

14

13

14

ASCII

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
. . . . . . . . . . . . . . . . . . . . . . 58

............................................................................................ 54

........................................................................................ 58
()

................................................................ 69,

223

() ..................................................................... 70, 223


................................................................................. 70
() .......................................................... 71
()

............................................................. 71

Fibonacci ................................................................................................. 72
.............................................................................................. 86
............................................................................................ 89, 90

................................................................................... 91

............................................................................... 175, 177


............................................................................................................ 180
,

................................................. 188

........................................................................................ 295

............................................................................. 298
......................................................................................... 303

algorithmic languages

.
algorithm


.
alphanumeric
,
.. .
recursion
.
recursive function
,
.
analysis
.
object .
.
object program
.

12

13

14

ASCII

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
. . . . . . . . . . . . . . . . . . . . . . 58

13

14

................................................................ 69,

ASCII

................................................................ 48
...................................................................... 57
...................... 58

()

............................................................................................ 89, 90

................................................................................... 91
............................................................................... 175, 177

............................................................................................................ 180

................................................. 188

........................................................................................ 295

223

() .......................................................... 71
()

............................................................. 71

Fibonacci ................................................................................................. 72

................................................................ 69,

() ..................................................................... 70, 223


................................................................................. 70

() .......................................................... 71
()

............................................................................. 298
......................................................................................... 303

............................................................. 71

Fibonacci ................................................................................................. 72

.............................................................................................. 86

............................................................................................ 54

........................................................................................ 58

223

() ..................................................................... 70, 223


................................................................................. 70

............................................................................................ 54

........................................................................................ 58
()

.............................................................................................. 86

............................................................................................ 89, 90

................................................................................... 91

............................................................................... 175, 177


............................................................................................................ 180

................................................. 188

........................................................................................ 295

............................................................................. 298
......................................................................................... 303

algorithmic languages

.
algorithm


.
alphanumeric
,
.. .
recursion
.
recursive function
,
.
analysis
.
object .
.
object program
.
object
oriented language ,
.
data abstraction
.
loop , .
event
-

268

268

object
oriented language ,
.

.
.
machine language

.

data abstraction
.

programming language

.
graph ,
,
.
write .
data ,

, .
index ,

.
pointer
.
tree
.
,
, .
, .

loop , .

read ,
.
procedural language

.
interactive
() .

269

event
-

268

22-0203 ANAPTIXI EFARMOGON.indb 241

.
.
machine language

.
programming language

.
graph ,
,
.
write .
data ,

, .
index ,

.
pointer
.
tree
.
,
, .
, .
read ,
.
procedural language

.
interactive
() .

269

7/5/13 12:59 PM


. ' ,
"
", .
, ,
,
. VTOC (Visual
Table Of Contains),
.
.


:
, ,
,
( , ..),
,
,
,
.

3
;
3 ;
3
;
3 ;

242

22-0203 ANAPTIXI EFARMOGON.indb 242

7/5/13 12:59 PM

14.1 |
,
, .
.
.
:

- ( , )

( , )
( )
( )

, , ,
, ,
.
' .
.
.
, .
,
. ' , ,
.

14.1.1 -
, "" .
(
), ,
.

.
, ,
. . :
l


,
"" .

!!

14. -

22-0203 ANAPTIXI EFARMOGON.indb 243

243

7/5/13 12:59 PM

1

1000 . ,
. .
:
l

, , .

(<>), , , (=) .

2, 2, 3, 3, 3, 3, 5, 6, 6, 6, 6, 6, 7,
8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9.
:

.
1

: i, S, _, A[1000]

i <- 1
S <- 0
_ <- [i]
i < 1001
_ <> [i]
_, S
_ <- A[i]
S <- 0
_
S <- S+1
i <- i+1
_
_, S
_ 1

244

22-0203 ANAPTIXI EFARMOGON.indb 244

7/5/13 12:59 PM

: i, S, _, A[1000]

i <- 1
S <- 0
_ <- [i]
i < 1001
_ = [i] i < 1001
S <- S+1
i <- i+1
_
_, S
. <- A(i)
S <- 0
_
_ 2
3

: i, S, _, A[1000]

i <- 1
S <- 0
_ <- A[i]
i < 1001
_= A[i]
S <- S+1
i <- i+1

_ A, S
_ <- A[i]
S <- 0
_
_
_, S
_ 3

' .
.

A(i). A(i),
, A(i).

A(i).
i
i<1001. _(i).

14. -

22-0203 ANAPTIXI EFARMOGON.indb 245

245

7/5/13 12:59 PM

, ..
i<1001, i
.
...
.
, (=) (< >),
.......
:
l

, ' .

, .

,
A(i) .
" ., S"
, ".<-(i), s<-0"
.
.
" ., S" ,
, ,
. ,
"s<-0, .<-(i)"
. '
. , s<-s + 1.

14.1.2
. ,
,
, ,
.
. ,
.
,
' ,
3 .
4 .
,
.
, .

246

22-0203 ANAPTIXI EFARMOGON.indb 246

7/5/13 12:59 PM

2
.
_2

,
,
<
,

,
_
_ _2
, ,
.
;
.

3
.
3 6 (3! = 1*2*3 = 6) .
_3

, ,
, ,
<
<
, ,

<
, ,

, ,
_
_

<
, ,

<
, ,

, ,
_
_
_
_ _3

14. -

22-0203 ANAPTIXI EFARMOGON.indb 247

247

7/5/13 12:59 PM

, 24 (4! = 1*2*3*4=24) ,
,
.
, , , ,

, '
.
,
, .
,
, . " "
,
,
16%, , , 50%.
.
.






.



.

_2

,
,
>
temp <-
<-
<-temp
_
,
_ _2
, . ,
, ,
"" .

.
_3

:
, ,
<- 0
, ,
=0
<- 1

248

22-0203 ANAPTIXI EFARMOGON.indb 248

7/5/13 12:59 PM

>
temp <- a
a <-
<- temp
<- 0
_
>
temp <-
<-
<- temp
<- 0
_
_
, ,
_ _3
, . =1
.
( ),
. >
> , . (>) (>, >).

"".
.

14.1.3
.
,
.
,
, .
l

, .

, ,
, .


, .



,


.
. .

14. -

22-0203 ANAPTIXI EFARMOGON.indb 249

249

7/5/13 12:59 PM

.
.
, ,
. ,
; .
.
;
,

.
(,
, ),
.
: ,
; 12; 32;
,

.
:
l

:
l

.
.
0 1.

.
. '
I, V, , L, C, D, ,

.


,
.

.
,
.
,

. ,

. " ".

250

22-0203 ANAPTIXI EFARMOGON 137-280.indd 250

3/31/14 2:14 PM

, ,
, .
,

.
.






,

.

.
' ""
,
.
l

365 , , 366.

, , , , ,
31 .

, , 30 .

28 , ,
29.

4,
100, 400. :
1984 ( 4), 1900 ( 4 100), 2000 (
4, 100, 400), 1993 .

.
' 4 1582
. 4ns 15 .
10 1923.
10ns 23 1923.

11/3/1923 22/3/1923.
5/10/1582 14/10/1582.
, .
,
.

.
.
.

.

, .

14. -

22-0203 ANAPTIXI EFARMOGON.indb 251

251

7/5/13 12:59 PM


, ,
_1(, , , c)
AN c=0
_2(, , , c)
AN c=0
_3(, , , c)
AN c=0

_1(, , , c)
!
c <- 0
>0 >0 >0 c <- 1
_ _1
_2(, , , c)
!
c <- 1
(10< <23) =3 = 1923 c <- 0
_ _2
_3(, , , c)
! ( =1 )
4 <- mod 4
100 <- mod 100
400 <- mod 400
<- 0
4=0
100=0

400=0

<- 1

_

<- 1
_
_
! (c=1 )
c < 0

1, 3, 5, 7, 8, 10, 12

<=31 c <- 1
4, 6, 9, 11

<=30 c <- 1
2

=0 <=28 c <- 1

=1 <=29 c <- 1
_
_ _3

252

22-0203 ANAPTIXI EFARMOGON.indb 252

7/5/13 12:59 PM

_2.
,
. .
, .

.
.
.

14.1.4
, . :
l

.
, ,
(quick sort), ( ) ,

,
,
, ,

,
, ,

,
,
.

5

, .
( ).
.
AN number>0 TOTE
<- +1
_ number<0 TOTE
<- +1

<- +1
_
AN number<0
<- +1

14. -

22-0203 ANAPTIXI EFARMOGON.indb 253

253

7/5/13 12:59 PM

_ number>0 TOTE
<- +1

<- +1
_AN
AN number=0 TOTE
<- +1
_ number<0
<- +1

<- +1
_
;
,
,
. ,
, 2 .

6
1000 . ,

.

3. , , .
,
.
:

.
,
.

, .

, , .

, ,
. ;

254

22-0203 ANAPTIXI EFARMOGON 137-280.indd 254

3/31/14 2:16 PM

12345. 6 :
6 =(1*1+2*3 + 3*5 + 4*7 + 5*13) mod 11 =
(1*1+2*3+3*5+4*7+5*13) mod 11 =(1+6+15+28+65) mod 11 = 5
123455.
, , 6, ,
1000 .
6 :
,
. 11.
. 11 0
10. 10, 6 0.
.

, .
,
,

1000 ,
.

, , ISBN


.

14.2 |



.
14.1 .

. 14.1.

14. -

22-0203 ANAPTIXI EFARMOGON.indb 255

255

7/5/13 12:59 PM




,




.

: " ."

.

, .

14.2.1
. , , ,
.

.

.

.
. (test file),
,
.

14.2.2
. ,
, .
.

. (test file)
,


. ,
.

. . (users manual).

.
, .
"" .
, , ,
.
.

256

22-0203 ANAPTIXI EFARMOGON.indb 256

7/5/13 12:59 PM


.
:
l

- - .
,
. ,
, . . ,
.

.
.

. . , , .

.
,
,
. . .

2000

, ,
, ""
, .
, ,
,
. ,

,
"" ,

.

14. -

22-0203 ANAPTIXI EFARMOGON.indb 257

257

7/5/13 12:59 PM

7

.
.

. , , .

. . ,
,
.
,
.
(Hierarchy plus Input Process Output). ,
. .

(Visual Table Of Contains, VTOC).



.

(Overview Hierarchy plus Input Process Output,


Overview ). ,
,
.

, , (Detail ). ,
.

, VTOC,
.

, ,
. '
, .
, .
To VTOC .

258

22-0203 ANAPTIXI EFARMOGON.indb 258

7/5/13 12:59 PM

0000

1000

9100

3000

9300

3100

9100

3300

9300

5000

3500

3500

. 14.2. VTOC

14.2 , . . ,
.
.

, , ,
. (
), 0000. 1000,
3000 ... 9000
( 1000,
3000 ..). ,
.
,

. 1100
1300 1000 ..

.
, , , ,
, .
,
, .

14. -

22-0203 ANAPTIXI EFARMOGON.indb 259

259

7/5/13 12:59 PM


.
, , ,
.

3


,
( 3 , , , ).

'
.

, ,
.

, .

14.2.3

. ,
, , , ,
,
, .
, .
.

.

14.3 |

,
(, , ).
, , , , ,
(version).

. , , , , ,
(DOS ver.5 DOS ver.6),
, (Windows .3.1,

260

22-0203 ANAPTIXI EFARMOGON.indb 260

7/5/13 12:59 PM

Windows .3.11).

.
(Windows 95, Windows 98, Office 97 ..).

, MS-DOS Windows.

,
.
" "; ;
"
". " " .

, , ,
, . ,
, ,
..,
, , , , ,
, .. ( ).
'
,
, , .. ( ).
,
( ).
. ,
( ).
.
,
(
).
, ,
14.3.
.
, .
,
.

14. -

22-0203 ANAPTIXI EFARMOGON 137-280.indd 261

261

4/23/14 4:48 PM

. 14.3.

, :
l

, .

(, )
.

(modules) ' .


, :


,

.

262

.
.

. (source program).

,
.
(object program).

"" ""
.

, .

. .
l

,
, .

22-0203 ANAPTIXI EFARMOGON.indb 262

7/5/13 12:59 PM

,
.


.
,
. '
.

.
. :
l

"" " ".


. ...
.

14.4 .

&
16%

8%

60%

16%

. 14.4.

14. -

22-0203 ANAPTIXI EFARMOGON.indb 263

263

7/5/13 12:59 PM

-

,

,
.

,
. ,
.

VTOC
.

,
VTOC,

,

1. ;

http://www.acm.org/



,
,


,
ACM (Association of
Computing Machinery).

2. ;
3. 3 ;
4.
;
5. (VTOC);
6. ;
7. ;
8. ;
9. ;
10. ;
11. ;

1. ,
, 1986.
2. . , , , 1992.

264

22-0203 ANAPTIXI EFARMOGON.indb 264

7/5/13 12:59 PM

ASCII

22-0203 ANAPTIXI EFARMOGON.indb 265

7/5/13 12:59 PM

266

22-0203 ANAPTIXI EFARMOGON.indb 266

7/5/13 12:59 PM

22-0203 ANAPTIXI EFARMOGON.indb 267

267

7/5/13 12:59 PM


.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . . . . . 58
. . . . . . . . . . . . . . .. . . . . . . . 59
. ................................................................................... . . . . . . . . . 63
............................................................................... . . . . . . . . . 66
() ................................................................. 68, 185
()...................................................................... 68, 185
. ........................................................................ . . . . . . . . . 68
() ................................................. . . . . . . . . . 69
() ..................................................... . . . . . . . . . 70
Fibonacci . . ....................................................................................... . . . . . . . . . 70
.. .................................................................................... . . . . . . . . . 80
. ........................................................................................... . . . . . . . . . 83
........................................................................... . . . . . . . . . 84
. ............................................................................... 146, 148
...................................................................................................... . . . . . . . 151
, ........................................... . . . . . . . 157
.................................................................................. . . . . . . . 244
. . ..................................................................... . . . . . . . 247
. . ................................................................................. . . . . . . . 251

268

22-0203 ANAPTIXI EFARMOGON.indb 268

7/5/13 12:59 PM


algorithmic languages

.
algorithm


.
alphanumeric
,
.. .
recursion
.
recursive function
,
.
analysis
.
object
.
object program
.
object
oriented language ,
.
data abstraction
.
loop , .
event
-

.
.
machine language

.
programming language

.
graph ,
,
.
write .
data ,

, .
index ,

.
pointer
.
tree
. , , .
.
read ,
.
procedural language

.
interactive
() .

22-0203 ANAPTIXI EFARMOGON.indb 269

269

7/5/13 12:59 PM

interface , , ,
.
interpreter
.
program
testing and debugging
.
program testing
. .
structure program
ming

,
.
:
, .
debugging

.
debugger ,

,
.
assignement
.
software testing
.
instruction

,
.
program verification
.
iteration

270

.
data processing . :
, , , ..
software tools
.
application
.
software life cycle
, ,
.
code
.
() linked list

(pointer)
.
software , ,
.
variable
, ' .
control variable

.
compiler

.
event driven

.
accuracy 1)
. 2)
. .

22-0203 ANAPTIXI EFARMOGON.indb 270

7/5/13 12:59 PM

queue

.
error trapping

,

.
,
.
software package
.
software piracy .
software de
velopment environment
.
table

.
() information
, , , ,
.
() program .
,
.
programming .
programmer
, , , , .
program specification

,

.
append
.

bottom-up
approach

.
access .
breakpoint .
constant
.
stack

.
string
, .
merging
.
. .
assembly language
.
.
assembler

.
condition
, .
bug .
program design

. .
sorting
.

22-0203 ANAPTIXI EFARMOGON.indb 271

271

7/5/13 12:59 PM

program documentation

.

subprogram ,
.

operand .

natural language ,
,
.

operator
.

nesting
.

artificial intelligence .

pseudocode -.

272

22-0203 ANAPTIXI EFARMOGON.indb 272

7/5/13 12:59 PM


character code =

a posteriori =

auxiliary =

a priori =
abstraction = ()

background = ,

access =

backslash = \

character =

accessing=

backtracking =

chart =

accidence = ,

backup =

check digit =

accuracy =

bar chart =

check sum =

activation =

bell = ,

checking =

actual =

benchmark =

choice =

aid =

beta test =

class = ,

algorithm =

blank (character) =

clear =

alignment = ,
alphanumeric =
alteration = , ,

ambersand = &
ambiguious = oovo,

blinking =
block =
bookmark =
boolean (data tpe) =

character set =

client =
clipping =
code =
coding =
collate =

box =

colon = :

ambiguity =

braces = { }

column =

analysis =

brackets = [ ]

combination =

analyst =

break key =

combining = ,

analytic =

break =

comma =

animation =

breakpoint =

command = ,

annotation =

browse = ,

append =

bubblesort =

command driven =

application =

bug =

approximate =

build-in functions =

argument =
array =
artificial intelligence =

assembler =
assembly language =

assignement =
at sign = @

command language =

command line =

business applications =

comment =

button =

compare =

call =

compatibility =

call-by-reference = '

compatible =

call-by-value =
cancel =

compact =

compilation =
compiler =

caret = ^

computability =

authentication =
()

carriage return character =


computational complexity =

authoring languages =

catalog =

computational =

cell = ,

automation =

certification =

computer instruction set =


attribute =

22-0203 ANAPTIXI EFARMOGON.indb 273

273

7/5/13 12:59 PM

computer science =

decision =
declaration =

enhancements = ,

concatenation =

decrement =

entity =

concept =
conception = ,
conceptual =
condition =
conditional branch =

conjuction = , ,
, /
constant =
constraint =
consultant =
context =
continue =
control character =

default value =
default =
definiteness =
definition =
delete = ,
deletion =
delimiter =
demo(stration) =
design =
development =
diagnostics = ()
diagram =
diagramming technique =

control point =

digit =

control variable =

digital =

convention =

dimension =

conversational =

directive =

conversion =

directory =

copying =

discrete =

correction =

disjunction = ,
,

counter = ,

entry = ,
environment =
equal =
equation =
equivalence =
erase =
error =
error trapping =

escape =
evaluation = ,
even = ,
event = ,
exclusion =
executable =
execution =
exit =
expandability =
exponent =
expression =
factorial =
failure = ,

display = o

false =

divide and conquer =

fault = ,
feature =

document = ,

feed =

documentation =
download =

feedback = ,

dummy instruction =

field =
file =

dump =

finiteness =

duplicate =

flag = ,

dyadic operation =

flow chart =

dynamic =

font =

editing = (,
)

foreground =

editor =

formal =

effectiveness =

format =

efficiency = ,

formatting =

element = , ()

free text =

date =

embedding =

function =

debugger = ,

empirical =

global =

emulation =

graph =

debugging =

encapsulation =

greedy method =

create =
cursor =
customer =
cut = ,
cut-and-paste =

data =
data base =
data capture =
data compression =

data definition =
data entry =
data flow =
data processing =

data structure =
data type =

274

form = , , ,

22-0203 ANAPTIXI EFARMOGON.indb 274

7/5/13 12:59 PM

hardware =

key =

nested =

heap =

keyword = -

nesting =

help =

label =

nomenclature =

heuristic =

landscape =

numeric =

hyphen =

library =

object =

hyphenation = ,

licence =

object driven =

icon =

link = , ,

identifier =
()

linked list =

ignore =
image = ,
immediate =
implication =
implicit = oovo,
implied =
improvement =
incompatibility =
indent =
index =
infinite l =
information =
information processing =

inheritance =
input =
insertion = ,
installation =
instance =
instruction =
integer =
interaction =
interactive =
interface =
interpreter =
interrupt =
intractable =
intricic = , ,

inverse =

life cycle =

object oriented = vvop


odd = ,
office automation =

linker = v
linking =

office =

list =

O-nolation =

listing = ,

operand =

literal =

operation =

loader =

operator = ,

local =

optimal =

logic =

option =

logical =

optional =

loop =
machine language =
macro (instruction) =
main program =
maintenance =
manipulation =
manual = ,
map =
mark =
mask =
matching = ,
matrix =
menu = ,
merging =
mirroring =
mode = ,
modify = pooo,
modular = ,

module = oooo,

order =
ordering =
output = ,
overflow =
overlay =
package =
parameter =
parity =
parsing =
password =
paste = ,
patch =
pattern =
performance =
permission =
permutation =
planning = ,
()
platform = ,
pointer =
polymorphism =

italics =

monadic operation =

item =

monitor = ,

pop =

iteration =

move =

portability =

job =

multimedia =

portrait =

join = , ,

natural language =

precision =

jump =

negation = ,
,

primary key =

justification =

polynomial =

print = ,

22-0203 ANAPTIXI EFARMOGON.indb 275

275

7/5/13 12:59 PM

procedure =

run =

sum =

processing =

save =

syntax =

program =

scalar = ,

table =

prompt =

scope =

testing =

property =

scroll bar =

text =

pseudocode =

scrolling =

pull down menu =


searching =

time complexity =

secondary key =

tool =

push =

semantics =

toolbar =

quantity =

separation =

toolbox =

queue =

sequence = , ,

tracing =

quit = ,

sequential =

transform =

quotation mark =

serial =

translate = ,

radian =

set =

translator =

rank =

shift = ,

trapping =

read =

simulation =

tree =

ready =

software =

trial =

real =

sorting =

unary = ,

record =

source =

recursion =

unconditional jump =

reference = ,

space complexity = oo

relation =

specification =

underscore = _

SQL (Structure Query Language) =


undo =

relative =
release = ()
reliability =
replica =
reply =
report = , ,
()
requirement =
rerun =
reserved =
reserved word =

stack =
standardization =
statement = ,
()
static =
status =
step =
straight exchange sort =

string =

underflow =

update =
upgrade =
user =
utility program =

validation =
variable =
verification =
verify =
version = , ,

structural =

virus =
visual =

return =

structure programming =

watchpoint =

row = ,

subprogram =

window =

rule =

subroutine =

write =

restart =
retrieval =

. -. , , , , 1994

276

22-0203 ANAPTIXI EFARMOGON.indb 276

7/5/13 12:59 PM


al Khowarizmi...................................... 33
ALGOL.. . . . . . . . . . . ..................................... 109
Allen P.. . . . . . . . . . . ..................................... 109
BASIC. . . . . . . . . . . . . ..................................... 109
Bolzano. . . . . . . . . ....................................... 81
Clipper. . . . . . . . . . . ..................................... 112
COBOL.. . . . . . . . . . ..................................... 108
dBASE. . . . . . . . . . . . ..................................... 112
Dijkstra E... . . . . . ..................................... 117
Fibonacci. . . . . . . ....................................... 70
FIFO.. . . . . . . . . . . . . . . ................................. 61, 62
FORTRAN.. . . . . . ............................. 107, 108
Gates B... . . . . . . . . ..................................... 109
GOTO.. . . . . . . . . . . . ..................................... 118
HIPO. . . . . . . . . . . . . . . ..................................... 258
Hopper G.M... ..................................... 108
JAVA. . . . . . . . . . . . . . . ..................................... 111
Kemeny G.. . . . . ..................................... 109
Kurtz T.. . . . . . . . . . . ..................................... 109
LIFO.. . . . . . . . . . . . . . . ................................. 60, 62
LISP. . . . . . . . . . . . . . . . ............................. 109, 110
LOGO. . . . . . . . . . . . . ..................................... 110
- . . ..................... 100
OCCAM. . . . . . . . . . ..................................... 120
Papert S.. . . . . . . . ..................................... 110
PASCAL. . . . . . . . . . ..................................... 110
PROLOG.. . . . . . . . ..................................... 109
Ritchie D.. . . . . . . ..................................... 111
SMALTALK. . . . . ..................................... 196
SQL.. . . . . . . . . . . . . . . . ..................................... 113
VTOC.. . . . . . . . . . . . . ..................................... 258
Wirth N... . . . . . . . ............................... 57, 110

.................. 121

. . ........... 111, 119, 193


. ....................................... 243
. ......................................... 249
. .............................. 84
............................................ 243
. .................. 80
. .................. 82
. ................................... 91
. ......................... 33
. . ............................................ 61
....................... 131
Fibonacci.. .............................. 70
.............................. 66
. .......................... 197

............... 236
......................................... 121
. . ................................................ 45

.. ............................................. 198
4 . ........................... 113
- . ........................ 114
- .. .......................................... 106
- ............................ 107
- . ......................... 106
........................................ 115
. . ....................... 207
. ................................................ 73

. . . . . ....................................... 36
. ....................... 114
. . . ....................................... 33
.. . . . . ............................. 115, 127
................................ 237
. . . . . ............................... 67, 184
.. . . ....................................... 63
. ............... 25, 77
-........................... 262
.. . ..................................... 194

............................................. 19
.................................... 58, 71, 155
................................................. 72
.................................. 36
......... 20
. . ..................... 35
....................... 114
........................................ 175
............................ 80
. . ...................................... 210

........................ 201, 217


.............................. . . . . . . . 120
.............. . . . . . . . 182
........................ . . . . . . . . . 55
................... . . . . . . . . . 19
. ................ . . . . . . . 134
.110, 117
................... . . . . . . . . . 80
...... . . . . . . . . . 72
. . . . . . . . . . . . 82

...................................... . . . . . . . . . 66
. . ...................................... . 33, 133
. ................... . . . . . . . 260
.......................... . . . . . . . 235
. ............ . . . . . . . 121
...................................... . 37, 131
. . ..................... . . . . . . . 235
................................... . . . . . . . 132
........................................ . . . . . . . 262
....................... . . . . . . . . . 35
.. .................................... . . . . . . . 182
.. ........ . . . . . . . . . 42
............................... . . . . . . . 197
.............................. . . . . . . . 211
......................................... . 33, 133
................................. . 44, 145
. .......... . . . . . . . . . 19
. ................ . . . . . . . . . 89
. . ...................................... . 38, 139
.............................. . . . . . . . . . 33
.. ...................................... . . . . . . . 246
. ................................... . . . 33, 68
. . ............ . . . . . . . 101

I
....................................... . . . . . . . 196
....................................... . . . . . . . 132
. .................. . . . . . . . 116
.. ..................................... . . . . . . . 236
. ................................ . . . . . . . 236

22-0203 ANAPTIXI EFARMOGON.indb 277

277

7/5/13 12:59 PM


. . .................. 21
................................. 33
.................. 17
.. . . . . . . . . . . . .................................... 196
. . . . . . . . . . . . . ....................................... 66
.............................. 197
.. ..................................... 260
. .................................... 35

.. . . . . . . . . . . . . . ..................................... 233
. . . . . . . ..................................... 115
. . . . . . . . . . . . . . ....................................... 71
. . ..................................... 234
................................ 139

.................. 68
. . . . . . . . ..................................... 195
. ....................... 81
. . ............................... 208
.. . . . ............................... 37, 129
................................. 120
.............................. 113
......... 100


..................... 112, 198
.. . . . . . ....................................... 48
.. . . . . . . ..................................... 129
.............. 112
. . . . . . ....................................... 92
.. . . . . . . . . . . . . ....................................... 61

. ............................... 68, 185

278

.................... 99
...... 120
. . ...................................... 174
. . ................................................... 66
. . ........................................ 33
........................... 121
. ........................................ 58, 155
ASCII. .................................... 266
. . ................................. 19, 55
................................ 197
. .................................. 95
. ............... 99
................. 180
. ........................................... 15
2000........ 16, 234, 257
. ....................... 26
- . ................................................. 26
- ............................................... 25
- .......................................... 26
- ............................... 27
- ........................................... 26
- . .................................... 100
- ........................................... 25
- . .................................... 26
- . .................................... 27
. ....................................... 105
. . ..... 120
. ........... 100

. ............. . . . . . . . 106
.............................. 131, 175
............. . . . . . . . 114
. .................................... . . . . . . . 121
...................... . . . . . . . 133
. .................................. . . . . . . . 122
.................................. . . . . . . . 115
.. ................................ . . . . . . . 263

................................. . . . . . . . . . 65
............. . . . . . . . . . 67
. .................................... . . . . . . . 253
. ............................... . . . . . . . 255
. ................................... . . . . . . . . . 37
. ..................................... . . . . . . . . . 37
......................... . . . . . . . 115

. . ................... 116, 171


................... . . . . . . . 180
. ................................. . . . . . . . 243
....................... . . . . . . . 128
.. ................................ . . . . . . . 115

.................................. . . . . . . . 262
.. . . . . . . . . . 99
.......................... . . . . . . . 173

........................... 63
. ................................... 115
............................... 236
...................................... 37, 128
............................ 63
. ...................................... 58
.................................. 60, 182, 187
........................... 106
. . .................................. 95

. . .................................. . . . . . . . 121
. ......................... . 35, 115

............................ . . . . . . . . . 49
............................ . . . . . . . 255

. ..................................... . . . . . . . . . 61

22-0203 ANAPTIXI EFARMOGON.indb 278

7/5/13 12:59 PM

22-0203 ANAPTIXI EFARMOGON.indb 279

7/5/13 12:59 PM

22-0203 ANAPTIXI EFARMOGON 137-280.indd 280

3/31/14 2:02 PM