Showing posts with label Algorithms. Show all posts
Showing posts with label Algorithms. Show all posts
Monday, 5 September 2016
Year 10 Lesson 1/2 Notes - Algorithms
The notes from the first few lessons can be found here .
Friday, 2 September 2016
Mary's Viennese Whirls
On The Great British Bake Off on Wednesday evening the bakers had to make 12 Viennese Whirls.
The full recipe can be found here but we're just going to focus on the first part of the recipe which is making the jam.
For the jam, put the raspberries in a small, deep-sided saucepan and crush them using a potato masher. Add the sugar and bring to the boil over a low heat. When the sugar is melted, increase the heat and boil for a further 4 minutes. Remove from the heat and carefully pour into a shallow container (pass it through a sieve if you'd rather not have seeds in your jam). Leave to cool and set.
1. Create an algorithm that will solve the problem of making the jam.
2. Label each section as either Sequence, Iteration or Selection.
3. Read through your algorithm:
(i) Does it always make jam? (Is it correct?)
(ii) Is it as quick as it could possibly be? (Is it efficient?)
Extension:
4. Create a flow chart of your algorithm.
Socks Algorithm
From BBC news:
People often end up pulling out a sock, one at a time, and searching for its partner. But sorting socks this way can be a slow process.
If you only owned one pair of socks it would be fine - apart from the personal hygiene implications.
But each new pair added to the mix makes things harder in two different ways - first, you've got to pair up more socks, and second, each sock that you're trying to pair up is swimming in a larger pile of unmatched socks.
Two pairs will take four times longer to match, on average, than one pair. Five pairs will take 25 times longer and 100 pairs will take 10,000 times longer, according to computer scientist and co-author of Algorithms to Live By, Prof Brian Christian.
Question for thought:
In your new OneNote notebook, create a page for algorithms, give it a title and suggest an idea of speeding up the sorting of socks.
Subscribe to:
Posts (Atom)

