Lec 1

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

Algorithms, Data Structures

and Computability
Our goal:

Design algorithms that are


correct and efficient
Why to learn algorithms ?

http://www.neatorama.com/twaggies/2010/11/07/no-112-robcorddry/
KMP algorithm
Kruskal’s algorithm
Sorting algorithm
Design methods:
Floyd’s algorithm • Backtracking = Forbidden ☺
• Greedy
Searching algorithm • Design by Induction
Dijkstra’s algorithm • Divide and Conquer
• Dynamic Programming
Course Goals

• Learn to design algorithms that are correct and efficient


• How do we know that:
• an algorithm is correct ? -> correctness proofs
• an algorithm is efficient ? -> analysis of algorithms (time complexity)
• How to design solutions for new problems ?
• Learning general techniques for design
• Studying a set of well-known algorithms, to serve as examples of success
stories for applying general design techniques

• Become aware that good algorithms are key parts of software


engineering practice !
What does this course talk about?

• Data Structure: Queue, Stack, Linked-list, Tree, Heap, Hash-table.


• Algorithms: Sorting, Searching, Pattern Matching, Graph.
• Paradigms: Divide and Concorde, Optimization, Dynamic, Greedy, Brute-
force, Recursion.
• Complexity: Complexity analysis and big  notation.
• Sets and Logic: Sets and Predicate logic.
• Computability: Computation and its limits.

All of these will be implemented with Python


Jobs in the Market & Average Salary
Why Python?
Why Python?
Comparison with other programming languages

The future will


be Python
Why Python?
Jobs in the market the need Python skills
The course content
1. Introduction
2.From problems to programs
3. Sorting
4.Searching
5.Optimization
6.Sets, logic and databases
7. The limits of computation
The course content
1- Introduction 2- From problems to programs
• Introduction • From problem to program
• What is computation? • Getting the inputs and outputs
• Introducing Python • Getting the algorithm
• Introduction • Getting the ADT
• Come fly with Python • A taste of formal logic
• Basic Python • Iteration and logic
• Why Python? • Pre- and post-conditions
• Computational thinking • Correctness and clarity
• Getting data structures right
• How do we know it is right?
• Dividing and conquering
The course content
3-Sorting
• What is sorting? 4- Searching
• Naive sorting • Searching lists
• Bubble sort • Searching for patterns
• Selection sort • Basic string search
• Insertion sort • The quick search algorithm
• Complexity of straight sorting • The Knuth–Morris–Pratt
algorithms algorithm
• Inducing, reducing and recusing • Other
• Induction • Maps algorithms
• Reduction and recursion • Hashing and hash tables
• Recursive sorting • Search trees
• Sorting smart • Binary search trees
• Dividing and conquering • AVL trees
• Trees and heaps
• Sorting – two final thoughts
The course content
5- Optimisation
• Optimization
• Graphs and greed 6- Sets, logic and databases
• Dynamic programming • Sets and propositional logic
• Predicate logic, or first order logic
• Database retrieval using simple
queries
• The cardinality of infinite sets
7-The limits of computation
• Computability
• Logic revisited
• Computational complexity
• Physics and computing
Text Books
Resources for self-learning:
Online Python Visualization tool:
http://www.pythontutor.com/visualize.html#mode=edit
Python algorithms visualization (Web Animations):
https://pyalgoviz.appspot.com/
https://visualgo.net/en
YouTube Data structures and Algorithms tutorials:
https://www.youtube.com/watch?v=92S4zgXN17o&list=PL2_aWCzGMAwI3W_JlcBbtYTwiQSsOTa6P
https://www.youtube.com/watch?v=c1IW9S2bR2w&list=PLib7LoYR5PuDxi8TxxGKxMgf8b-jtoS3i
https://www.youtube.com/watch?v=Nkw6Jg_Gi4w&list=PLj8W7XIvO93rJHSYzkk7CgfiLQRUEC2Sq
Geeksforgeeks Website:
http://www.geeksforgeeks.org/python/
http://www.geeksforgeeks.org/data-structures/
http://www.geeksforgeeks.org/fundamentals-of-algorithms/.
Python 3 tutorials:
http://python-course.eu/python3_course.php
https://www.youtube.com/watch?v=P74JAYCD45A&list=PLGzru6ACxEALhcvY18A-iox-mEoieHMVG
https://www.youtube.com/watch?v=HBxCHonP6Ro&list=PL6gx4Cwl9DGAcbMi1sH6oAMk4JHw91mC_
Your first task for the next week
“Learn/Revise Python 3”

Python 3 tutorials:
• http://python-course.eu/python3_course.php
• https://www.youtube.com/watch?v=P74JAYCD45A&list=
PLGzru6ACxEALhcvY18A-iox-mEoieHMVG
• https://www.youtube.com/watch?v=HBxCHonP6Ro&list
=PL6gx4Cwl9DGAcbMi1sH6oAMk4JHw91mC_

Any Questions?
Thank you

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy