Intro Alg L1

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 33

1

/ &

Email: zaro@ceid.upatras.gr

/: 15:00-17:00 & 15:00-17:00,



/ &


http://www.ceid.upatras.gr/webpages/faculty/zaro/teaching/intro-alg/

()

>
( )
: . 2016 & /. 2016 ()
4 (2 .)

= max{TE, 0.4x + 0.6x}


=
=

&

.
:
(, , ),
, ,


,

, .


.




.

4
;

[[webster.com]
b t ]





( )







.

[Knuth]
,
,
, .

5
;

.
, , , , .
,
. -Francis Sullivan
6

70%

Wall Sttreet








W
6.5.2010 14:45:
6 5 2010 @ 14 45
30-
75.000

2 6
2.6
20 ,



7
2

(Mainz, 1448):
Johannes Gutenberg (1398 - 1468)

( ), Abu 'Abd Allah


Muhammad ibn Musa Al-Khwarizmi (~820 ),
( ~600 )
Al-Khwarizmi (780 835/850 ):
.

Kitab al-jabr
j wa'l-muqabala
q ((
))

itab: (12 )
Leonardo Fibonacci (1170 1250)

=
()

! / [] +

: Abu 'Abd
Allah Muhammad ibn Musa Al-Khwarizmi (780 835/850 ).

9
&


..

(325 265 ..)

10
&

1970

11

(, , )








( )





...


12

&
, ,
(, , )





13

1. J. Kleinberg and E. Tardos, ,


, , 2008
2 T
2. T. Cormen,
Cormen C.
C Leiserson,
Leiserson R.
R Rivest,
Rivest and C.
C Stein,
Stein
, , ,
2012
3. K. Mehlhorn and P. Sanders,
, , , 2014
4. S. Dasgupta, C. Papadimitriou, and U. Vazirani, ,
, , 2008
5
5. .
,
:
:



, , 1999

14
&

,


.






, :




;; - Charles Babbage
g (1864)
( )

Charles Babbage
(1791 - 1871)
()

15

:
() ;
.. ()
1.000.000 10.000

17

1 ():



(


))

18

: , ( ),

, ,

( ):




19

2 ( ):

20

3 ( ):
()

/

-

21

22
RAM
( Random Access Machine)

0

1

CPU

.....

John von Neumann


(1903-1957)
(load/store, , , , jump, )
w bit: 2w
n
n = 2w w = log
. l 2 n log
l n bit
log N bit
: = nc = 2w (c )
), w = c
clog
log n,
n .

log n bit
23
RAM
( Random Access Machine)

n , N
:
1 (.., ,
, , , )
1 (/)
log n ( log ) bit


= f(n) [ f(n, log N)]
= g(n, log N)

: ( ) f g ;

24
()

:
( )
2n (.. n!) n
( n)

a > 0, c > 0, d > 0, 0





n,



.., n! nn = 2n log n

25

c > 0, d > 0, 0
n, c nd logk n

. ,



n c nd logk n
2n c (2n)d logk (2n) <
< c (2d+1 ) nd logk n = 2d+1

26
vs

1 / S1 .
/sec


n2 n1
2n 1

/ S2 = 100 S1 . /sec

1:


n2


/ ??

2: 2
/ ??

27
&
2.1

((

))


,
.
1025 , .

n n log2 n n2 n3 1.5n 2n n!
n = 10 < 1 sec < 1 sec < 1 sec < 1 sec < 1 sec < 1 sec 4 sec
n = 30 < 1 sec < 1 sec < 1 sec < 1 sec < 1 sec 18 min 1025
n = 50 < 1 sec < 1 sec < 1 sec < 1 sec 11 36

n = 100 < 1 sec < 1 sec < 1 sec 1 sec 12,892 1017

n = 1,000 < 1 sec < 1 sec 1 sec 18

n = 10,000 < 1 sec < 1 sec 2 12

n = 100,000 < 1 sec 2 sec 3 32

n = 1,000,000 1 sec 20 sec 12 31,710

28
&

: !
,
.

.







/
/
, .

((
)
)


.
Simplex
Unix g
grep
p

29

: ;

30

: n
:
() /sec
1 10nlog n 1 (2005) 107
2 n2 2 ((2014)) 109

n = 106

1 ( ) 1 ():
(1010
(10 106log
l 106) / 107 = 6log
6 l 10 secs 20 secs

2 ( ) 2 ():
(106) 2 / 109 = 1000 secs = 16.6 min

31

: n
:
() /sec
1 10nlog n 1 (2005) 107
2 n2 2 ((2014)) 109

n = 107

1 ( ) 1 ():
(1010
(10 107log
l 107) / 107 = 70log
70 l 10 = 232 secs 3.8
3 8 min
i

2 ( ) 2 ():
(107) 2 / 109 = 100000 ses = 27.7 hours (!)

32

: ;

33

You might also like