C-cards Using paper and scissors to understand Computer Science Andrea Valente Aalborg University in Esbjerg Denmark Home: www.cs.aue.auc.dk/~av Email:

Slides:



Advertisements
Similar presentations
Models of Computation Prepared by John Reif, Ph.D. Distinguished Professor of Computer Science Duke University Analysis of Algorithms Week 1, Lecture 2.
Advertisements

University of Queensland
Computer Science 210 Computer Organization Introduction to Logic Circuits.
Charles Kime & Thomas Kaminski © 2004 Pearson Education, Inc. Terms of Use (Hyperlinks are active in View Show mode) Terms of Use Chapter 2 – Combinational.
Reversible Gates in various realization technologies
AE1APS Algorithmic Problem Solving John Drake
Teaching through the Mathematical Processes Session 4: Developing Proficiency with Questioning.
Paris, 3 Dec 2007MPRI Course on Concurrency MPRI – Course on Concurrency Lecture 12 Probabilistic process calculi Catuscia Palamidessi LIX, Ecole Polytechnique.
Logic Functions Logical functions can be expressed in several ways: ▫ Truth table ▫ Logical expressions ▫ Graphical form prepared by:eng.Rula Amjed.
8. Introduction to Denotational Semantics. © O. Nierstrasz PS — Denotational Semantics 8.2 Roadmap Overview:  Syntax and Semantics  Semantics of Expressions.
COMPUTER PROGRAMMING I Understand Problem Solving Tools to Design Programming Solutions.
1 Homework Reading –Tokheim, Section 5-1, 5-2, 5-3, 5-7, 5-8 Machine Projects –Continue on MP4 Labs –Continue labs with your assigned section.
PDDL: A Language with a Purpose? Lee McCluskey Department of Computing and Mathematical Sciences, The University of Huddersfield.
University of Queensland
1212 Models of Computation: Automata and Processes Jos Baeten.
Turing machine simulations. Why study so many examples? –Get an intuition for what goes on inside computers without learning all the details of a programming.
9/19/06 Hofstra University – Overview of Computer Science, CSC005 1 Chapter 4 Gates and Circuits.
1 Ivan Lanese Computer Science Department University of Bologna Italy Concurrent and located synchronizations in π-calculus.
Turing Machines CS 105: Introduction to Computer Science.
Copyright © Cengage Learning. All rights reserved. CHAPTER 2 THE LOGIC OF COMPOUND STATEMENTS THE LOGIC OF COMPOUND STATEMENTS.
Software Issues Derived from Dr. Fawcett’s Slides Phil Pratt-Szeliga Fall 2009.
1212 Models of Computation: Automata and Processes Jos Baeten.
Halting Problem. Background - Halting Problem Common error: Program goes into an infinite loop. Wouldn’t it be nice to have a tool that would warn us.
Logic Gates Circuits to manipulate 0’s and 1’s. 0’s and 1’s used for numbers Also to make decisions within the computer. In that context, 1 corresponds.
 A set of objectives or student learning outcomes for a course or a set of courses.  Specifies the set of concepts and skills that the student must.
An Information Theory based Modeling of DSMLs Zekai Demirezen 1, Barrett Bryant 1, Murat M. Tanik 2 1 Department of Computer and Information Sciences,
C-cards Starter Kit All you need is here! c-cardsdev.sf.net Andrea Valente Aalborg University in Esbjerg - DK homepage:
CHAPTER 12 ADVANCED INTELLIGENT SYSTEMS © 2005 Prentice Hall, Decision Support Systems and Intelligent Systems, 7th Edition, Turban, Aronson, and Liang.
Pano Papadatos Mona Leigh Guha Tamara Clegg Clinky the Robot: Preliminary Programming for Preschoolers 5/23/2013.
By: Er. Sukhwinder kaur.  Computation Computation  Algorithm Algorithm  Objectives Objectives  What do we study in Theory of Computation ? What do.
Lawrence Snyder University of Washington, Seattle © Lawrence Snyder 2004 “Digits” does not refer only to your 10 fingers…
 Let A and B be any sets A binary relation R from A to B is a subset of AxB Given an ordered pair (x, y), x is related to y by R iff (x, y) is in R. This.
CS1Q Computer Systems Lecture 6 Simon Gay. Lecture 6CS1Q Computer Systems - Simon Gay2 Algebraic Notation Writing AND, OR, NOT etc. is long-winded and.
Boolean Algebra and Computer Logic Mathematical Structures for Computer Science Chapter 7.1 – 7.2 Copyright © 2006 W.H. Freeman & Co.MSCS Slides Boolean.
1 - CPRE 583 (Reconfigurable Computing): Compute Models Iowa State University (Ames) CPRE 583 Reconfigurable Computing Lecture 7: Wed 10/28/2009 (Compute.
Cellular Automata Martijn van den Heuvel Models of Computation June 21st, 2011.
The Game of Cubic is NP-complete Erich Friedman Stetson University.
Chapter 3 Syntax, Errors, and Debugging Fundamentals of Java.
Fibonacci Numbers, Vector Programs and a new kind of science.
Cellular Automata FRES 1010 Eileen Kraemer Fall 2005.
1 RLL: Relay Ladder Logic CONTENTS 1. PLC operation 2. PLC programming 3. Ladder logic 4. Memory and gates.
1 Homework Reading –Tokheim, Section 5-1, 5-2, 5-3, 5-7, 5-8 Machine Projects –Continue on MP4 Labs –Continue labs with your assigned section.
Finite State Machines (FSM) OR Finite State Automation (FSA) - are models of the behaviors of a system or a complex object, with a limited number of defined.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
Onlinedeeneislam.blogspot.com1 Design and Analysis of Algorithms Slide # 1 Download From
1 Turing Machines and Equivalent Models Section 13.1 Turing Machines.
Victoria Ibarra Mat:  Generally, Computer hardware is divided into four main functional areas. These are:  Input devices Input devices  Output.
Chapter 12. Chapter Summary Boolean Functions Representing Boolean Functions Logic Gates Minimization of Circuits (not currently included in overheads)
Sub-fields of computer science. Sub-fields of computer science.
Homework Reading Machine Projects Labs
COMP541 Combinational Logic - II
Overview Part 1 – Gate Circuits and Boolean Equations
Jeremy R. Johnson Wed. Sept. 29, 1999
Teaching KS3 Computing Session 4 Theory: Boolean logic AND/OR/NOT
Computer Science 210 Computer Organization
Jeremy R. Johnson Anatole D. Ruslanov William M. Mongan
Agenda – 2/12/18 Questions? Readings: CSI 4, P
Transformations: Translations and Reflections
Boolean Logic Boolean Logic is considered to be the basic of digital electronics. We know that a computer’s most basic operation is based on digital electronics.
CS Chapter 3 (3A and ) – Part 2 of 5
Halting Problem.
Chapter 4 Gates and Circuits.
COMP541 Combinational Logic - II
Principles of Computing – UFCFA Week 1
Introductory Concepts
Copyright © Cengage Learning. All rights reserved.
Digital Logic Design Basics Combinational Circuits Sequential Circuits.
Computer Tools.
Petri Nets Laurie Frazier.
Agenda Lecture Content: Combinatorial Circuits Boolean Algebras
Presentation transcript:

C-cards Using paper and scissors to understand Computer Science Andrea Valente Aalborg University in Esbjerg Denmark Home:

The problem Define an educational tool for teaching Computer Science to young children (8 to 12 years old) and students without a solid mathematical background. 1! = 1 n! = n * (n-1)!

A solution: c-cards ● Peg-source ● Peg-pit ● Peg ● Cross ● East turn ● West turn ● Confluence ● Switch

Behaviour and circuits Cards can be connected to build circuits. Pegs move across cards, from port to port, one at the time: sequential execution model.

Behaviour and circuits (cont.) This is a time-reversible boolean not gate! position = value change positions = computation

Behaviour and circuits (cont.) In the shape (on the left) the In source card is defined by the pattern (white.black) * which means: a white peg, then a black and so on. The implemented circuit (right) separates white pegs from black ones. - Implementation - - Specification -

Behaviour and circuits (cont.) The 2 states of a switch card. NOTE: All pegs are identical!

Semantics... A card circuit is a graph of ports, each one possibly containing one peg. Graph-rewriting rules are simple to explain and support our visual and physical metaphor for computation. All rules work up-to card rotation and are deterministic: they are triggered by the presence of pegs, and depend upon the current state of cards.

Exercise 1 Suppose now we want to make a more complex exercise, working with a source defined by (white.slashed.black) * The resulting circuit will have three pits, in which pegs of the same color will accumulate: the first (western) pit will receive all white pegs, the second all the slashed ones and the black pegs will stop at the third. The (white.black) circuit could be a starting point for the definition of this one!

Exercise 1: a little help switch 1. white 2. slash 3. black 4. white (2) ?

Exercise 1: solution a MACRO card! Result We can count modulo n.

Macro & custom cards We can map the whole circuit it into a single large card, a macro-card, preserving the circuit's behaviour. Source cards became input ports, while pits are turned into output ports; arrows (and some informal annotations about actions to be performed) will express the high-level behaviour of the large card. It is also possible to define new custom cards behaving as a whole circuit; the geometry of the original circuit is hard to preserve. Students can easily define their own cards.

Let's make a new card! The random card An extension to the basic deck is the random card: a peg entering this card will be sent out from the left or the right, with {1/2,1/2} probability distribution. This is the non-deterministic version of the switch card.

Exercise 2 It is easy to build a circuit that divides white markers from black ones, with 50% probability of making an error. It is the random equivalent of the white.black circuit discussed before. Is it possible to have a probability distribution of { 1/4, 3/4 } ?

Exercise 2: solution Result Using two or more of these cards in cascade, we can have a peg-source implementing almost every probability distribution needed. rnd 1/4 3/4

Exercise 2: the circuit New custom cards!

Channels, errors and redundancy - Shannon's binary symmetric channel - Perfect channel

Work in progress ● what is the computational power of c-cards ? ● what about a parallel semantics ? ● Turing Machines / Cellular Automata ? ● c-cards in LOGO / StarLogo ? ● a 3D version ? ● more exercises ? ● work with a class of children...

Conclusions Related work and bibliography ➔ Fredkin, E. and Toffoli, T. (1982). Conservative logic. International Journal of Theoretical Physics, 21(3/4): 219–53. ➔ Milner, R. (1989). Concurrency and Communication. Prentice Hall. ➔ Gardner, P. (1999). Graphical presentations of interactive systems. Submitted for publication. ➔ Helen Sharp, Mary Lynn Manns, Phil McLaughlin, Maximo Prieto and Mahesh Dodani (1996). Pedagogical patterns – successes in teaching object technology. ACM SIGPLAN Notices, Vol. 31(12), December 1996, pp ➔ McNerney, T. (2000). Tangible Programming Bricks: An Approach to Making Programming Accessible to Everyone. Ph.D. Thesis. C-cards is a card game with formal rules, and also an educational tool for teaching computer science to young students. Students can create and manipulate their own computing machines, reason about design and implementation of card circuits. Probability and information can be discussed on a concrete basis using a simple extension of the standard card deck. Experiments can be set up to understand redundancy and transmission errors.

Extras! ● Gaussian distribution - For teachers mostly! -

Gaussian distribution rnd 1/2 1/4 2/41/4 rnd

Gaussian distribution (cont.) rnd 1/2 1/4 1/8 3/8 1/8 rnd

Gaussian distribution (cont.) rnd 4/166/164/161/16 rnd 1/16

Gaussian distribution (cont.) rnd 5/32 10/32 5/32 rnd 1/32

Gaussian distribution (cont.) / 1 / 2 / 4 / 8 / 16 / 32 /