240 likes | 269 Views
The Red Black Mind Meld. Paul Curzon and Peter McOwan Queen Mary University of London. With support from Department for Education, Mayor of London, Google and EPSRC. Twitter: @TeachingLDNComp @cs4fn. www.teachinglondoncomputing.org. Aims. Give you deeper understanding of core topics
E N D
The Red Black Mind Meld Paul Curzon and Peter McOwan Queen Mary University of London With support from Department for Education, Mayor of London, Google and EPSRC Twitter: @TeachingLDNComp @cs4fn www.teachinglondoncomputing.org
Aims • Give you deeper understanding of core topics • Computational thinking • Evaluation of algorithms • Logical Thinking • Testing versus rigorous argument • The link between Computing and Maths • Give you practical ways to teach computing in a fun, thought provoking way • away from computers, focus on concepts • Linked activity sheets and booklets can be downloaded from our website: www.teachinglondoncomputing.org
On to the magic …Please keep the secrets • I’m going to teach you how to do the tricks • Some are actually in the shows of professional magicians • If you do perform them later for friends don’t break the magician’s code • Keep the secrets! • If you do know then don’t shout out let others puzzle it out first!
Deal the cards in to 2 equal piles Magician takes one face up, volunteer other face down Repeat while cards left Magician picks a random number (1-5) and colour (red or black) Places that many cards in to a red or black pile as appropriate Volunteer randomly places the same number of unseen cards in a pile in front of that pile Make Prediction “Unseen Reds in front of red pile IS SAME AS Unseen Blacks in front of black pile” Count the red cards in the pile in front of the red pile and black cards in the pile in front of the back pile Declare they are the same as predicted Self-working tricksare Algorithms
Algebra- Lets call them... Computational Thinking • We can use some abstraction and logical thinking to prove the trick (the algorithm) always works. • Abstraction involves focussing on the information that matters • We then use logical thinking and rigorous argument (algebra) to prove it always works.
R1 B1 B2 R0 R2 B0 A mathematical model -Abstraction • Only the numbers of reds and blacks in each pile matters • We give each number a name as we don’t know the actual values • Eg R0 is how many reds in the red pile, B0 blacks in the black pile
R0+R1+R2=26 reds B0+B1+B2=26 blks R0 R2 R1 B0 B2 B1 The facts we know: There are 26 reds and 26 blacks in total
R0+R1+R2=26 reds B0+B1+B2=26 blks R0 R2 R1 B0 B2 B1 R0 = R1+B1 B0 = R2+B2 The facts we know: There are the same number of cards in the corresponding face up and face down piles
R0+R1+R2=26 reds B0+B1+B2=26 blks R0 R2 R1 B0 B2 B1 R0 = R1+B1 B0 = R2+B2 R0+R1+R2=B0+B1+B2 Substitute for equals
R0+R1+R2=26 reds B0+B1+B2=26 blks R0 R2 R1 B0 B2 B1 R0 = R1+B1 B0 = R2+B2 R0+R1+R2=B0+B1+B2 (R1+B1)+R1+R2=(R2+B2)+B1+B2 Substitute for equals
R0+R1+R2=26 reds B0+B1+B2=26 blks R0 R2 R1 B0 B2 B1 R0 = R1+B1 B0 = R2+B2 R0+R1+R2=B0+B1+B2 (R1+B1)+R1+R2=(R2+B2)+B1+B2 2R1+B1+R2=R2+B1+2B2 Simplify
R0+R1+R2=26 reds B0+B1+B2=26 blks R0 R2 R1 B0 B2 B1 R0 = R1+B1 B0 = R2+B2 R0+R1+R2=B0+B1+B2 (R1+B1)+R1+R2=(R2+B2)+B1+B2 2R1+B1+R2=R2+B1+2B2
R0+R1+R2=26 reds B0+B1+B2=26 blks R0 R2 R1 B0 B2 B1 R0 = R1+B1 B0 = R2+B2 R0+R1+R2=B0+B1+B2 (R1+B1)+R1+R2=(R2+B2)+B1+B2 2R1+B1+R2=R2+B1+2B2
R0+R1+R2=26 reds B0+B1+B2=26 blks R0 R2 R1 B0 B2 B1 R0 = R1+B1 B0 = R2+B2 R0+R1+R2=B0+B1+B2 (R1+B1)+R1+R2=(R2+B2)+B1+B2 2R1+B1+R2=R2+B1+2B2 2R1=2B2
R0+R1+R2=26 reds B0+B1+B2=26 blks R0 R2 R1 B0 B2 B1 R0 = R1+B1 B0 = R2+B2 R0+R1+R2=B0+B1+B2 (R1+B1)+R1+R2=(R2+B2)+B1+B2 2R1+B1+R2=R2+B1+2B2 R1=B2
R1 R2 R0 B0 B1 B2 What have we shown?R1 = B2 • R1 = B2 means … The number of reds in the face down ‘red’ pile equals the number of blacks in the face down ‘black’ pile
R1 R2 R0 B0 B1 B2 What have we shown?R1 = B2 • We have proved that the property we predicted about the red and black cards ALWAYS holds
Mathematical and Computational modelling • We can create models of • Programs and hardware • Human behaviour • The situations • Use logical thinking to reason about whether theya re corect and whether people will make mistakes using them • And if so change the design of the system before the mistakes happen …
Computational Thinking • Algorithmic thinking • Inventing magic tricks is about inventing algorithms • Abstraction • Didn’t model all details, just those that matters • Use variables to represent the numbers that matter • Evaluation • The limitations of testing and the need for rigorous argument about software • Logical Thinking • Rigorous argument involves logical thinking that draws on mathematical techniques • algebra shows the trick always works
More support On our website to support this session: • Activity sheets • Story sheets • Slides Details of more worskshops/courses • free unplugged sessions • subsidised courses (e.g. GCSE programming) www.teachinglondoncomputing.org Twitter: @TeachingLDNComp @cs4fn