1) Απληστοι Αλγόριθμοι
1.1) Συντομότερο Μονοπάτι σε Γράφο
1.1.1) Ο αλγόριθμος του Dijkstra
1.2) Ελάχιστο Συνδετικό Δένδρο
1.2.1) Ο αλγόριθμος του Prim
1.2.2) Ο αλγόριθμος του Kruskal
1.3) Ελαχιστοποίηση Νομισμάτων με Ρέστα
Εφαρμογές
1) Επιστροφή χρηματικού ποσού για ρέστα
2) Άπληστος Αλγόριθμος για Χρωματισμό Γραφήματος
This short document promotes the creation of Haiku Deck presentations on SlideShare by stating it provides inspiration and allows users to get started making their own presentations. It encourages the reader to create presentations on the Haiku Deck platform hosted on SlideShare.
Como crear una cuenta en Twitter (taller de Twitter para principiantes)Augusto Ayesta
Este documento proporciona instrucciones paso a paso para crear una cuenta en Twitter. Explica que Twitter es un servicio de microblogging que permite a los usuarios compartir y recibir información a través de mensajes cortos. Luego detalla los 11 pasos para establecer una cuenta, que incluyen elegir un nombre de usuario, contraseña y correo electrónico, seguir cuentas recomendadas y completar una verificación de seguridad. Una vez creada la cuenta, el usuario puede acceder a Twitter para participar en conversaciones y compartir contenido con otros
1) Απληστοι Αλγόριθμοι
1.1) Συντομότερο Μονοπάτι σε Γράφο
1.1.1) Ο αλγόριθμος του Dijkstra
1.2) Ελάχιστο Συνδετικό Δένδρο
1.2.1) Ο αλγόριθμος του Prim
1.2.2) Ο αλγόριθμος του Kruskal
1.3) Ελαχιστοποίηση Νομισμάτων με Ρέστα
Εφαρμογές
1) Επιστροφή χρηματικού ποσού για ρέστα
2) Άπληστος Αλγόριθμος για Χρωματισμό Γραφήματος
This short document promotes the creation of Haiku Deck presentations on SlideShare by stating it provides inspiration and allows users to get started making their own presentations. It encourages the reader to create presentations on the Haiku Deck platform hosted on SlideShare.
Como crear una cuenta en Twitter (taller de Twitter para principiantes)Augusto Ayesta
Este documento proporciona instrucciones paso a paso para crear una cuenta en Twitter. Explica que Twitter es un servicio de microblogging que permite a los usuarios compartir y recibir información a través de mensajes cortos. Luego detalla los 11 pasos para establecer una cuenta, que incluyen elegir un nombre de usuario, contraseña y correo electrónico, seguir cuentas recomendadas y completar una verificación de seguridad. Una vez creada la cuenta, el usuario puede acceder a Twitter para participar en conversaciones y compartir contenido con otros
Los medios de comunicación se utilizan para transmitir información a grandes audiencias de forma masiva o a pequeños grupos. Proporcionan datos sobre acontecimientos políticos, sociales, económicos y culturales a nivel local y global. Aunque los medios de comunicación son omnipresentes, su definición depende del contexto y pueden usarse con diferentes objetivos como informar, manipular o documentar la historia.
This document discusses how the magazine NME uses social media to advertise new editions. It notes that NME uses its Facebook page to remind readers of new editions with the cover as the profile photo. It also uses Twitter for short, frequent updates with links and images, also using the new cover as the profile photo. Both Facebook and Twitter help introduce new readers through suggestions based on what people like and follow, and NME has over 500,000 Facebook likes and 700,000 Twitter followers that are growing daily.
The document provides an overview of communication skills and effective communication. It discusses the sequence of topics presented, including the definition of communication, functions of communication, history of communication technologies, types of communication, electronic communication, the 7 Cs of communication, barriers to effective communication, importance of listening, listening techniques, and conclusions. The key points covered are the process of exchanging information through various mediums, the evolution of communication methods over history, different types of verbal and nonverbal communication, and factors that influence effective communication such as the 7 Cs, overcoming barriers, and developing strong listening abilities.
Madonna runs away from criminals down a hill with a burning barrel in the background, setting the scene of danger. A close-up of a burning cross brings new meanings related to racism and the KKK. Jump cuts between an attacker and Madonna as a witness create tension as their eye contact suggests a disturbing interaction.
The document discusses food additives and their effects on health. It defines food additives as substances added to food that affect its natural characteristics. Direct additives are intentionally added, while indirect additives result from processing or storage. Many direct additives are used as colors, flavors, or preservatives. However, excessive consumption of synthetic colors and preservatives can pose health risks over time like reduced lifespan. The document emphasizes understanding additives and their impacts in order to make informed choices for family food safety.
El documento habla sobre el dogma católico de la Inmaculada Concepción de María. Explica que el 8 de diciembre de 1854, el Papa Pío IX definió como doctrina de fe que María fue preservada sin pecado original desde el primer instante de su concepción. También incluye oraciones dedicadas a la Virgen María y citas sobre su pureza e importancia como madre de Dios.
This document provides an overview and analysis of the office condo markets in Vancouver and Toronto. It finds that office condo markets in both cities have experienced significant growth in recent years, driven by increasing commercial lease rates. Owning an office condo can provide cost savings compared to leasing, as well as equity appreciation. The Vancouver market saw particularly strong growth in the Broadway Corridor, while the Toronto market saw most sales in downtown and midtown areas close to transportation. Both markets are expected to continue attracting demand from owner-occupiers and investors.
An overview of the quantitative and qualitative data provided by live chat, and how to measure the sales, marketing, and customer support ROI of a chat widget.
Los medios de comunicación se utilizan para transmitir información a grandes audiencias de forma masiva o a pequeños grupos. Proporcionan datos sobre acontecimientos políticos, sociales, económicos y culturales a nivel local y global. Aunque los medios de comunicación son omnipresentes, su definición depende del contexto y pueden usarse con diferentes objetivos como informar, manipular o documentar la historia.
This document discusses how the magazine NME uses social media to advertise new editions. It notes that NME uses its Facebook page to remind readers of new editions with the cover as the profile photo. It also uses Twitter for short, frequent updates with links and images, also using the new cover as the profile photo. Both Facebook and Twitter help introduce new readers through suggestions based on what people like and follow, and NME has over 500,000 Facebook likes and 700,000 Twitter followers that are growing daily.
The document provides an overview of communication skills and effective communication. It discusses the sequence of topics presented, including the definition of communication, functions of communication, history of communication technologies, types of communication, electronic communication, the 7 Cs of communication, barriers to effective communication, importance of listening, listening techniques, and conclusions. The key points covered are the process of exchanging information through various mediums, the evolution of communication methods over history, different types of verbal and nonverbal communication, and factors that influence effective communication such as the 7 Cs, overcoming barriers, and developing strong listening abilities.
Madonna runs away from criminals down a hill with a burning barrel in the background, setting the scene of danger. A close-up of a burning cross brings new meanings related to racism and the KKK. Jump cuts between an attacker and Madonna as a witness create tension as their eye contact suggests a disturbing interaction.
The document discusses food additives and their effects on health. It defines food additives as substances added to food that affect its natural characteristics. Direct additives are intentionally added, while indirect additives result from processing or storage. Many direct additives are used as colors, flavors, or preservatives. However, excessive consumption of synthetic colors and preservatives can pose health risks over time like reduced lifespan. The document emphasizes understanding additives and their impacts in order to make informed choices for family food safety.
El documento habla sobre el dogma católico de la Inmaculada Concepción de María. Explica que el 8 de diciembre de 1854, el Papa Pío IX definió como doctrina de fe que María fue preservada sin pecado original desde el primer instante de su concepción. También incluye oraciones dedicadas a la Virgen María y citas sobre su pureza e importancia como madre de Dios.
This document provides an overview and analysis of the office condo markets in Vancouver and Toronto. It finds that office condo markets in both cities have experienced significant growth in recent years, driven by increasing commercial lease rates. Owning an office condo can provide cost savings compared to leasing, as well as equity appreciation. The Vancouver market saw particularly strong growth in the Broadway Corridor, while the Toronto market saw most sales in downtown and midtown areas close to transportation. Both markets are expected to continue attracting demand from owner-occupiers and investors.
An overview of the quantitative and qualitative data provided by live chat, and how to measure the sales, marketing, and customer support ROI of a chat widget.
Οι περιπέτειες του Ηρακλή ΓΙΑΝΝΗΣ Φ. ΠΑΝΑΓΙΩΤΗΣ Χ.ppt
Εισαγωγή στις αρχές της επιστήμης των ΗΥ κεφ 2 2 4
1. Εισαγωγή στις Αρχές Της
Επιστήμης των ΗΥ
Κεφάλαιο 2_2_4: Βασικοί Τύποι Αλγορίθμων
Ιωάννου Γιαννάκης
26/6/2015
2. Βασικοί Τύποι Αλγορίθμων
Ο ορισμός του αλγορίθμου που δόθηκε στην αρχή
αυτού του κεφαλαίου, συμφωνεί με τη φιλοσοφία των
περισσότερων υπολογιστών σήμερα, που διαθέτουν
μία Κεντρική Μονάδα Επεξεργασίας (ΚΜΕ) στην
οποία οι εντολές εκτελούνται με σειρά, η μία μετά την
άλλη. Για το λόγο αυτό ονομάζονται σειριακοί
αλγόριθμοι.
Σειριακοί λέγονται οι αλγόριθμοι που χρησιμοποιούν μία
κεντρική μονάδα επεξεργασίας και οι εντολές τους
εκτελούνται σε σειρά η μία μετά την άλλη.
3. Βασικοί Τύποι Αλγορίθμων
Όμως η ύπαρξη προβλημάτων στα οποία απαιτείται πολύ μεγάλος
χρόνος για τον υπολογισμό της λύσης ενός προβλήματος,
δημιούργησε την ανάγκη εύρεσης αλγορίθμων, όπου ορισμένα ή
μία σειρά από βήματα αυτών των αλγορίθμων θα
μπορούσαν να εκτελούνται παράλληλα (ταυτόχρονα).
Σε αυτή την περίπτωση, η εκτέλεση του ενός βήματος δεν εξαρτάται
από την ολοκλήρωση της εκτέλεσης του προηγούμενου.
Αλγόριθμοι αυτής της μορφής ονομάζονται παράλληλοι αλγόριθμοι
και η υλοποίησή τους γίνεται με την ύπαρξη πολλαπλών ΚΜΕ
στο σύστημα του υπολογιστή.
Παράλληλοι χαρακτηρίζονται οι αλγόριθμοι που χρησιμοποιούν
πολλαπλές κεντρικές μονάδες επεξεργασίας όπου ορισμένες ή
μία σειρά από εντολές εκτελούνται παράλληλα (ταυτόχρονα).
4. Βασικοί Τύποι Αλγορίθμων
Παράδειγμα 2.5. Έστω ότι υπάρχει ένας πίνακας που
έχει ως περιεχόμενο τους αριθμούς:
1 2 3 4
6 9 8 3
Στόχος είναι να τοποθετηθούν οι αριθμοί σε αύξουσα
σειρά από το μικρότερο στο μεγαλύτερο (αύξουσα
ταξινόμηση). Η διαδικασία ταξινόμησης θα επιχειρηθεί
με σειριακή και παράλληλη επεξεργασία.
5. Βασικοί Τύποι Αλγορίθμων
Σειριακά
Εντοπίζεται το μικρότερο στοιχείο του πίνακα (στην περίπτωση αυτή
είναι το 3) και αντιμετατίθεται με το στοιχείο της πρώτης θέσης.
Εντοπίζεται το μικρότερο από τα υπόλοιπα στοιχεία του πίνακα (που
είναι το 6) και αντιμετατίθεται με το στοιχείο της δεύτερης θέσης.
Εντοπίζεται το μικρότερο από τα υπόλοιπα στοιχεία του πίνακα (που
είναι το 8), το οποίο όμως είναι το τρίτο στοιχείο του πίνακα,
οπότε η ταξινόμηση έχει ολοκληρωθεί.
6. Βασικοί Τύποι Αλγορίθμων
Παράλληλα
Συγκρίνονται ταυτόχρονα με δύο διαφορετικούς επεξεργαστές το 1ο με το 2ο
στοιχείο και το 3ο με το 4ο. Αν δεν είναι σωστά διαταγμένα,
αντιμετατίθενται.
Συγκρίνονται ταυτόχρονα με δύο διαφορετικούς επεξεργαστές το 1ο με το 3ο
στοιχείο και το 2ο με το 4ο. Αν δεν είναι σωστά διαταγμένα,
αντιμετατίθενται.
Τώρα το μικρότερο από όλα τα στοιχεία είναι στη σωστή θέση (την 1η) και
το μεγαλύτερο επίσης στη σωστή θέση (την 4η). Ωστόσο τα δύο μεσαία
στοιχεία δεν είναι βέβαιο ότι είναι σωστά διαταγμένα. Οπότε απαιτείται
μια ακόμη σύγκριση αυτών των δύο από έναν επεξεργαστή και
ολοκληρώνεται η ταξινόμηση.
7. Βασικοί Τύποι Αλγορίθμων
Οι αλγόριθμοι επιλύουν προβλήματα. Υπάρχουν
απλά και σύνθετα προβλήματα. Λίγα απλά
προβλήματα μπορούν να επιλυθούν με
διαδοχική εκτέλεση μερικών βημάτων, αφού τα
περισσότερα προβλήματα απαιτούν την
εκτέλεση ορισμένων συγκεκριμένων βημάτων
πολλές φορές. Αυτοί οι αλγόριθμοι
αποκαλούνται επαναληπτικοί.
8. Βασικοί Τύποι Αλγορίθμων
Παράδειγμα 2.6. Να αναπτυχθεί αλγόριθμος ο
οποίος θα διαβάζει τον αριθμό Ν και θα
υπολογίζει και θα εμφανίζει το Ν παραγοντικό
(συμβολισμός: Ν!).
Το Ν! ορίζεται ως το γινόμενο των ακέραιων
αριθμών 1, 2 έως Ν.
Δηλαδή
Ν!=1·2·3·….· (Ν-1) ·Ν
Αν Ν = 5, το 5! = 1·2·3·4·5 = 120
9. Βασικοί Τύποι Αλγορίθμων
Όμως το Ν! μπορεί να οριστεί και με άλλο τρόπο, που αποκαλείται
αναδρομικός, ως εξής:
Ν! = Ν·(Ν-1)! για Ν ≥ 1 (1)
0! = 1 (2)
Από τη σχέση (1) φαίνεται ότι το παραγοντικό του Ν ορίζεται
χρησιμοποιώντας το παραγοντικό του (Ν - 1). Ο όρος
αναδρομικότητα εδώ εκφράζει, ότι για να βρεθεί η τιμή του Ν!
πρέπει να βρεθεί η τιμή του (Ν - 1)!, η τιμή του οποίου χρειάζεται
την τιμή του (Ν - 2)! κ.ο.κ.
Έτσι το 5! κάνει διαδοχικά:
5! = 4!·5 = 3!·4·5=2!·3·4·5=1!·2·3·4·5=0!·1·2·3·4·5=1·1·2·3·4·5=120
Φαίνεται ότι ο υπολογισμός του Ν! με αναδρομικό τρόπο είναι πιο
πολύπλοκος από τον επαναληπτικό. Ωστόσο σε άλλες
περιπτώσεις και ιδίως σε μερικά δύσκολα προβλήματα η
αναδρομή διευκολύνει σημαντικά.
10. Βασικοί Τύποι Αλγορίθμων
Όμως το Ν! μπορεί να οριστεί και με άλλο τρόπο, που αποκαλείται
αναδρομικός, ως εξής:
Ν! = Ν·(Ν-1)! για Ν ≥ 1 (1)
0! = 1 (2)
Από τη σχέση (1) φαίνεται ότι το παραγοντικό του Ν ορίζεται
χρησιμοποιώντας το παραγοντικό του (Ν - 1). Ο όρος
αναδρομικότητα εδώ εκφράζει, ότι για να βρεθεί η τιμή του Ν!
πρέπει να βρεθεί η τιμή του (Ν - 1)!, η τιμή του οποίου χρειάζεται
την τιμή του (Ν - 2)! κ.ο.κ.
Έτσι το 5! κάνει διαδοχικά:
5! = 4!·5 = 3!·4·5=2!·3·4·5=1!·2·3·4·5=0!·1·2·3·4·5=1·1·2·3·4·5=120
Φαίνεται ότι ο υπολογισμός του Ν! με αναδρομικό τρόπο είναι πιο
πολύπλοκος από τον επαναληπτικό. Ωστόσο σε άλλες
περιπτώσεις και ιδίως σε μερικά δύσκολα προβλήματα η
αναδρομή διευκολύνει σημαντικά.