## Algorithms worksheets

antiloquax
Posts: 406
Joined: Sun Nov 20, 2011 11:37 am
Contact: Website

### Algorithms worksheets

I have made 10 worksheets with some algorithms (in Python).
Sharing just in case anyone wants to use one (could be given as a homework, I guess).

Algorithms

1: A. M. Legendre, exponentiation by successive squaring.
2: Heron of Alexandria, square roots
3: Peano arithmetic
4: Zeller's congruence
5: Factorial
6: Fibonacci numbers
7: Euclid's GCD & prime factors
8: Eratosthenes' sieve and the Miller-Rabin algorithm
9: Pascal's triangle
10: Tau using Gregory and Euler's equations

The .tar.gz and .zip files include .pdfs and the code examples.

algorithms.tar.gz
algorithms.zip

morphy_richards
Posts: 1603
Joined: Mon Mar 05, 2012 3:26 pm
Location: Epping Forest
Contact: Website

### Re: Algorithms worksheets

Thanks for this I think I'll be able to work them into a GCSE computer science scheme of work quite nicely.

morphy_richards
Posts: 1603
Joined: Mon Mar 05, 2012 3:26 pm
Location: Epping Forest
Contact: Website

### Re: Algorithms worksheets

Just had a slightly more detailed look, the worksheets really are rather good!
Out of curiosity , what led to you making them?

antiloquax
Posts: 406
Joined: Sun Nov 20, 2011 11:37 am
Contact: Website

### Re: Algorithms worksheets

I was mainly inspired to put this together because of reading The Structure and Intepretation of Computer Programs, by Abelson and Sussman.

I do teach some CS, but using SmallBasic, not Python. so this was just "for fun"!

antiloquax
Posts: 406
Joined: Sun Nov 20, 2011 11:37 am
Contact: Website

### Re: Algorithms worksheets

I've made a few more examples in this series of maths / algorithmic worksheets:

Algorithms - Series Two

1. Newton's method for nth roots.
2. Primes revisited
a) faster Miller-Rabin
b) Lucas-Lehmer number
3. A Little Number Theory
a) Ramanujan's Highly Composite Numbers
b) Ramanujann and Hardy - roundness
c) Pythagoras - perfect numbers
d) Pythagoras - friendly numbers
4. Pi
a) Euler's method for calculating Pi
b) Cesaro / Monte Carlo method
5. The RSA algorithm

You can get the pdfs and the code examples here.