-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
64 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Algoritmien laskennallinen vaativuus | ||
==================================== | ||
O-notaatio, P, NP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
Puut ja graafit | ||
=============== | ||
::samp::`raco pkg install graph` | ||
|
||
BSL with list abbreviations | ||
|
||
Pitää olla quote selitettynä | ||
|
||
Solmu, kaari, graafi, sykli, syklitön (puu) | ||
|
||
Suunnattu ja suuntaamaton | ||
|
||
Painotettu ja painottamaton | ||
|
||
:: | ||
|
||
(require graph) | ||
(define g (weighted-graph/undirected | ||
'((178 Helsinki Tampere) | ||
(168 Helsinki Turku) | ||
(162 Turku Tampere) | ||
(104 Helsinki Lahti) | ||
(63 Kouvola Lahti) | ||
(127 Lahti Tampere) | ||
(487 Oulu Tampere) | ||
(287 Oulu Kuopio) | ||
(320 Oulu Vaasa) | ||
(242 Vaasa Tampere) | ||
(335 Vaasa Turku) | ||
(290 Lahti Kuopio) | ||
(292 Kuopio Tampere) | ||
(377 Kuopio Vaasa) | ||
(267 Kuopio Kouvola)))) | ||
(get-vertices g) | ||
(get-edges g) | ||
(edge-weight g 'Helsinki 'Lahti) | ||
|
||
Lyhyimmän matkan etsiminen kahden kaupungin välillä | ||
--------------------------------------------------- | ||
|
||
Leveyshaku | ||
********** | ||
|
||
Syvyyshaku | ||
********** | ||
|
||
Djikstra | ||
******** | ||
|
||
Kauppamatkustajan ongelma | ||
------------------------- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -77,6 +77,14 @@ Sanasto | |
graafi | ||
TODO | ||
|
||
vertex | ||
solmu | ||
TODO | ||
|
||
edge | ||
kaari | ||
TODO | ||
|
||
string | ||
merkkijono | ||
TODO | ||
|