Computa onal Thinking
Jeanne e M. Wing President’s Professor of Computer Science and Department Head Computer Science Department Carnegie Mellon University
40 Year Anniversary Event University of Zurich Zurich, Switzerland 24 September 2010 My Grand Vision
• Computa onal thinking will be a fundamental skill used by everyone in the world by the middle of the 21st Century.
– Just like reading, wri ng, and arithme c. – Incestuous: Compu ng and computers will enable the spread of computa onal thinking.
– In research: scien sts, engineers, …, historians, ar sts – In educa on: K-12 students and teachers, undergrads, …
J.M. Wing, “Computa onal Thinking,” CACM Viewpoint, March 2006, pp. 33-35. Paper off h p://www.cs.cmu.edu/~wing/
Computa onal Thinking 2 Jeanne e M. Wing Compu ng is the Automa on of Abstrac ons
Abstrac ons
Automa on
Computa onal Thinking focuses on the process of abstrac on - choosing the right abstrac ons - opera ng in terms of mul ple layers of abstrac on simultaneously as in - defining the rela onships the between layers Mathema cs
guided by the following concerns…
Computa onal Thinking 3 Jeanne e M. Wing Measures of a “Good” Abstrac on in C.T.
as in • Efficiency Engineering – How fast? – How much space? NEW – How much power? • Correctness – Does it do the right thing? • Does the program compute the right answer? – Does it do anything? • Does the program eventually produce an answer? [Hal ng Problem] • -ili es – Simplicity and elegance – Usability – Modifiability – Maintainability – Cost – …
Computa onal Thinking 4 Jeanne e M. Wing Computa onal Thinking, Philosophically
• Complements and combines mathema cal and engineering thinking – C.T. draws on math as its founda ons • But we are constrained by the physics of the underlying machine – C.T. draws on engineering since our systems interact with the real world • But we can build virtual worlds unconstrained by physical reality
• Ideas, not ar facts – It’s not just the so ware and hardware that touch our daily lives, it will be the computa onal concepts we use to approach living.
• It’s for everyone, everywhere
Computa onal Thinking 5 Jeanne e M. Wing Sample Classes of Computa onal Abstrac ons • Algorithms – E.g., mergesort, binary search, string matching, clustering • Data Structures – E.g., sequences, tables, trees, graphs, networks • State Machines – E.g., finite automata, Turing machines • Languages – E.g., regular expressions, …, VDM, Z, …, ML, Haskell, …, Java, Perl • Logics and seman cs – E.g., Hoare triples, temporal logic, modal logics, lambda calculus • Heuris cs – E.g., A* (best-first graph search), caching • Control Structures – Parallel/sequen al composi on, itera on, recursion • Communica on – E.g., synchronous/asynchronous, broadcast/P2P, RPC, shared memory/message-passing • Architectures – E.g., layered, hierarchical, pipeline, blackboard, feedback loop, client-server, parallel, distributed • … NOT • Computer literacy, i.e., how to use Word and Excel or even Google • Computer programming, i.e., beyond Java Programming 101 Computa onal Thinking 6 Jeanne e M. Wing Examples of Computa onal Thinking in Other Disciplines
Computa onal Thinking 7 Jeanne e M. Wing One Discipline, Many Computa onal Methods
Computa onal Thinking 8 Jeanne e M. Wing Computa onal Thinking in Biology
• Shotgun algorithm expedites sequencing of human genome
• DNA sequences are strings in a language • Boolean networks approximate dynamics of biological networks • Cells as a self-regulatory system are like electronic circuits • Process calculi model interac ons among molecules • Statecharts used in developmental gene cs • Protein kine cs can be modeled as computa onal processes • Robot Adam discovers role of 12 genes in yeast • PageRank algorithm inspires ecological food web
Computa onal Thinking 9 Jeanne e M. Wing Model Checking Primer
Finite State Machine Temporal Logic model M property Φ
Φ = AG p M’s computa onal tree AF p, EG p, EF p Model Checker
yes counterexample
Φ is falsified here.
Computa onal Thinking 10 Jeanne e M. Wing Model Checking Problem
Let M be a finite state machine. Let Φ be a specifica on in temporal logic.
Find all states s of M such that:
M, s |= Φ
Efficient algorithms: [CE81, CES86, Ku94, QS81, VW94] Efficient data structures: binary decision diagrams [Br86]
Computa onal Thinking 11 Jeanne e M. Wing Model Checking in Biology Goal: Predict Rate of Folding of Proteins 1. Finite State Machine M 1’. BDD efficiently 2. Temporal Logic Formula Φ represents 3-residue protein represents M a. Will the protein end up in a par cular configura on? b. Will the second residue fold before the first one? c. Will the protein fold within t ms? d. What is the probability that (c)? e. Does the state s have k folded residues and have energy c? Method easily handles proteins up to 76 residues.
Model checking can explore state spaces as large as 276 ≈ 1023, 14 orders of magnitude greater than comparable techniques [LJ07].
Energy Profile for FKBP-12, Computed via Method Computa onal Thinking 12 Jeanne e M. Wing One Computa onal Method, Many Disciplines
Machine Learning has transformed the field of Sta s cs.
Computa onal Thinking 13 Jeanne e M. Wing Machine Learning in the Sciences
- Brown dwarfs and fossil galaxies discovery Astronomy via machine learning, data mining, data federa on - Very large mul -dimensional datasets analysis using KD-trees Credit: SDSS Medicine - An -inflammatory drugs - Chronic hepa s - Mammograms - Renal and respiratory failure
Credit: LiveScience Meteorology - Tornado forma on Neurosciences - fMRI data analysis to understand language via machine learning Computa onal Thinking 14 Jeanne e M. Wing Machine Learning Everywhere
Supermarkets Credit Cards
Wall Street
Entertainment: Shopping, Music, Travel Sports
Computa onal Thinking 15 Jeanne e M. Wing Computa onal Thinking 16 Jeanne e M. Wing ?
Computa onal Thinking 17 Jeanne e M. Wing Computa onal Thinking 18 Jeanne e M. Wing Ques on (Kearns): Can a Set of Weak Learners Create a Single Strong One?
Answer: Yes, by Boos ng Algorithms (e.g., [FS99])
Computa onal Thinking 19 Jeanne e M. Wing Computa onal Thinking 20 Jeanne e M. Wing Computa onal Thinking 21 Jeanne e M. Wing Computa onal Thinking 22 Jeanne e M. Wing Computa onal Thinking 23 Jeanne e M. Wing Computa onal Thinking 24 Jeanne e M. Wing Computa onal Thinking 25 Jeanne e M. Wing Computa onal Thinking 26 Jeanne e M. Wing Computa onal Thinking in the Sciences and Beyond
Computa onal Thinking 27 Jeanne e M. Wing CT in Other Sciences
- Atomis c calcula ons are used to explore Chemistry chemical phenomena - Op miza on and searching algorithms iden fy best chemicals for improving reac on condi ons to improve yields
Physics [York, Minnesota]
- Adiaba c quantum compu ng: How quickly is convergence? - Gene c algorithms discover laws of physics.
Geosciences - Abstrac ons for Sky, Sea, Ice, Land, Life, People, etc. - Hierarchical, composable , modular, traceability, allowing mul ple projec ons along any dimension, data element, or query - Well-defined interfaces Computa onal Thinking 28 Jeanne e M. Wing CT in Math and Engineering
Mathema cs
- Discovering E8 Lie Group: 18 mathema cians, 4 years and 77 hours of supercomputer me (200 billion numbers). Profound implica ons for physics (string theory) - Four-color theorem proof
Credit: Wikipedia Credit: Wikipedia
Engineering (electrical, civil, mechanical, aero & astro,…)
Credit: Boeing - Calcula ng higher order terms implies more precision, which implies reducing weight, waste, costs in fabrica on - Boeing 777 tested via computer simula on alone, not in a wind tunnel
Computa onal Thinking 29 Jeanne e M. Wing CT for Society
Economics - Automated mechanism design underlies electronic commerce, e.g., ad placement, on-line auc ons, kidney exchange - Internet marketplace requires revisi ng Nash equilibria model - Use intractability for vo ng schemes to circumvent impossibility results
- Inven ons discovered through automated search are patentable - Stanford CL approaches include AI, temporal logic, state machines, process algebras, Petri nets - POIROT Project on fraud inves ga on is crea ng a detailed Law ontology of European law - Sherlock Project on crime scene inves ga on
Humani es
- Digging into Data Challenge: What could you do with a million books? Nat’l Endowment for the Humani es (US), JISC (UK), SSHRC (Canada) - Music, English, Art, Design, Photography, … Computa onal Thinking 30 Jeanne e M. Wing Educa onal Implica ons
Computa onal Thinking 31 Jeanne e M. Wing Pre-K to Grey
• K-6, 7-9, 10-12 • Undergraduate courses – Freshmen year • “Ways to Think Like a Computer Scien st” aka Principles of Compu ng – Upper-level courses • Graduate-level courses – Computa onal arts and sciences • E.g., entertainment technology, computa onal linguis cs, …, computa onal finance, …, computa onal biology, computa onal astrophysics • Post-graduate – Execu ve and con nuing educa on, senior ci zens – Teachers, not just students
Computa onal Thinking 32 Jeanne e M. Wing Educa on Implica ons for K-12
Ques on and Challenge for the Compu ng Community:
What is an effec ve way of learning (teaching) computa onal thinking by (to) K-12?
- What concepts can students (educators) best learn (teach) when? What is our analogy to numbers in K, algebra in 7, and calculus in 12?
- We uniquely also should ask how best to integrate The Computer with teaching the concepts.
Computer scien sts are now working with educators and cogni ve learning scien sts to address these ques ons.
Computa onal Thinking 33 Jeanne e M. Wing Computa onal Thinking in Daily Life
Computa onal Thinking 34 Jeanne e M. Wing Ge ng Morning Coffee at the Cafeteria straws, s rrers, coffee soda milk cups
sugar, lids creamers
napkins
Computa onal Thinking 35 Jeanne e M. Wing Ge ng Morning Coffee at the Cafeteria straws, s rrers, coffee soda milk cups
sugar, lids creamers
napkins
Computa onal Thinking 36 Jeanne e M. Wing Ge ng Morning Coffee at the Cafeteria straws, s rrers, coffee soda milk cups
sugar, lids creamers
napkins
Especially Inefficient With Two or More Persons…
Computa onal Thinking 37 Jeanne e M. Wing Be er: Think Computa onally—Pipelining! straws, s rrers, coffee soda milk cups
sugar, creamers lids
napkins
Computa onal Thinking 38 Jeanne e M. Wing Computa onal Thinking at NSF CDI: Cyber-Enabled Discovery and Innova on
Computational Thinking for Science and Engineering
• Paradigm shi – Not just compu ng’s metal tools (transistors and wires) but also our mental tools (abstrac ons and methods) • It’s about partnerships and transforma ve research. – To innovate in/innova vely use computa onal thinking; and – To advance more than one science/engineering discipline. • Investments by all directorates and offices – FY08: $48M, 1800 Le ers of Intent, 1300 Preliminary Proposals, 200 Full Proposals, 36 Awards – FY09: $63M+, 830 Preliminary Proposals, 283 Full Proposals, 53+ Awards – FY10: 320 Full Proposals, … holding panels now …. – FY11 President’s Request: > $100M CISE AC 40 Jeanne e M. Wing Range of Disciplines in CDI Awards
• Aerospace engineering • Linguis cs • Astrophysics and cosmology • Materials engineering • Atmospheric sciences • Mathema cs • Biochemistry • Mechanical engineering • Biomaterials • Molecular biology • Biophysics • Nanocompu ng • Chemical engineering • Neuroscience • Civil engineering • Proteomics • Communica ons science and • Robo cs engineering • Social sciences • Computer science • Sta s cs • Cosmology • Sta s cal physics • Ecosystems • Sustainability • Genomics • … • Geosciences … advances via Computa onal Thinking Computa onal Thinking 41 Jeanne e M. Wing Range of Societal Issues Addressed
• Cancer therapy • Climate change • Environment • Sustainability • Visually impaired • Water
Computa onal Thinking 42 Jeanne e M. Wing C.T. in Educa on: Na onal Efforts
ACM-Ed Compu ng CRA-E Community CSTA
NSF College Board
Reboo ng Na onal Academies
Computa onal Thinking workshops
CSTB “CT for Everyone” Steering Commi ee • Marcia Linn, Berkeley K-12 • Al Aho, Columbia • Brian Blake, Georgetown BPC CPATH AP • Bob Constable, Cornell • Yasmin Kafai, U Penn • Janet Kolodner, Georgia Tech • Larry Snyder, U Washington • Uri Wilensky, Northwestern Computa onal Thinking 43 Jeanne e M. Wing Computa onal Thinking, Interna onal
UK Research Assessment (2009)
The Computer Science and Informa cs panel said “Computa onal thinking is influencing all disciplines….”
Computa onal Thinking 44 Jeanne e M. Wing Spread the Word
• Help make computa onal thinking commonplace!
To fellow faculty, students, researchers, administrators, teachers, parents, principals, guidance counselors, school boards, teachers’ unions, congressmen, policy makers, …
Computa onal Thinking 45 Jeanne e M. Wing Thank you! References (Representa ve Only)
• Computa onal Thinking – University of Edinburgh, h p://www.inf.ed.ac.uk/research/programmes/comp-think/ – [Wing06] J.M. Wing, “Computa onal Thinking,” CACM Viewpoint, March 2006, pp. 33-35, h p://www.cs.cmu.edu/~wing/ • Model Checking, Temporal Logic, Binary Decisions Diagrams – [Br86] Randal Bryant, “Graph-Based Algorithms for Boolean Func on Manipula on,” IEEE Trans. Computers, 35(8): 677-691 (1986). – [CE81] E. M. Clarke and E. A. Emerson, “The Design and Synthesis of Synchroniza on Skeletons Using Temporal Logic,” Proceedings of the Workshop on Logics of Programs, IBM Watson Research Center, Yorktown Heights, New York, Springer-Verlag Lecture Notes in Computer Science, #131, pp. 52–71, May 1981. – [CES86] E. M. Clarke, E. A. Emerson, and A. P. Sistla, “Automa c Verifica on of Finite State Concurrent Systems Using Temporal Logic Specifica ons,” ACM Trans. Prog. Lang. and Sys., (8)2, pp. 244-263, 1986. – [CGP99] Edmund M. Clarke, Jr., Orna Grumberg and Doron A. Peled, Model Checking, MIT Press, 1999, ISBN 0-262-03270-8. – [Ku94] Robert P. Kurshan, Computer Aided Verifica on of Coordina ng Processes: An Automata-theore c Approach, Princeton Univ. Press, 1994. – [Pn77] Amir Pnueli, “The Temporal Logic of Programs,” Founda ons of Computer Science, FOCS, pp. 46-57, 1977. – [QS82] Jean-Pierre Queille, Joseph Sifakis, “Specifica on and verifica on of concurrent systems in CESAR,” Symposium on Programming, Springer LNCS #137 1982: 337-351. – [VW86] Moshe Y. Vardi and Pierre Wolper, “An Automata-Theore c Approach to Automa c Program Verifica on (Preliminary Report),” Logic in Computer Science, LICS 1986: 332-344. • Computa onal Thinking and Biology – Allessina and Pascual, “Googling Food Webs: Can an Eigenvector Measure Species' Importance for Coex nc ons?”, PLoS Computa onal Biology, 5(9), September 4, 2009. h p://www.ploscompbiol.org/ar cle/info:doi%2F10.1371%2Fjournal.pcbi.1000494 – Executable Cell Biology, Jasmin Fisher and Thomas A Henzinger, Nature Biotechnology, Vol. 25, No. 11, November 2007. (See paper for many other excellent references.) – [LJ07] Predic ng Protein Folding Kine cs via Temporal Logic Model Checking, Christopher Langmead and Sumit Jha, WABI, 2007. – Systems Biology Group, Ziv Bar-Joseph, Carnegie Mellon University, h p://www.sb.cs.cmu.edu/pages/publica ons.html Computa onal Thinking 47 Jeanne e M. Wing References (Representa ve Only) • Machine Learning and Applica ons – Christopher Bishop, Pa ern Recogni on and Machine Learning, Springer, 2006. – [FS99] Yoav Freund and Robert E. Schapire, “A short introduc on to boos ng.” Journal of Japanese Society for Ar ficial Intelligence, 14(5):771-780, September, 1999. – Tom Mitchell, Machine Learning, McGraw Hill, 1997 – Symbolic Aggregate Approxima on, Eamonn Keogh, UC Riverside, h p://www.cs.ucr.edu/~eamonn/SAX.htm (applica ons in Medical, Meteorological and many other domains) – The Auton Lab, Artur Dubrawski, Jeff Schneider, Andrew Moore, Carnegie Mellon, h p://www.autonlab.org/autonweb/2.html (applica ons in Astronomy, Finance, Forensics, Medical and many other domains) • Computa onal Thinking and Astronomy – J. Gray, A.S. Szalay, A. Thakar, P. Kunszt, C. Stoughton, D. Slutz, J. vandenBerg, “Data Mining the SDSS SkyServer Database,” in Distributed Data & Structures 4: Records of the 4th Interna onal Mee ng, W. Litwin, G. Levy (eds), Paris France March 2002, Carleton Scien fic 2003, ISBN 1-894145-13-5, pp 189-210. – Sloan Digital Sky Survey @Johns Hopkins University, h p://www.sdss.jhu.edu/ • Computa onal Thinking and Chemistry – [Ma07] Paul Madden, Computa on and Computa onal Thinking in Chemistry, February 28, 2007 talk off h p://www.inf.ed.ac.uk/research/programmes/comp-think/previous.html • Computa onal Thinking and Economics – Abraham, D., Blum, A. and Sandholm, T., “Clearing algorithms for barter exchange markets: enabling na onwide kidney exchanges,“ Proc. 8th ACM Conf. on Electronic Commerce, pp. 295–304. New York, NY: Associa on for Compu ng Machinery, 2007. – Conitzer, V., Sandholm, T., and Lang, J., When Are Elec ons with Few Candidates Hard to Manipulate? Journal of the ACM, 54(3), June 2007. – Conitzer, V. and Sandholm, T., Universal Vo ng Protocol Tweaks to Make Manipula on Hard. In Proceedings of the Interna onal Joint Conference on Ar ficial Intelligence (IJCAI), 2003. – Michael Kearns, Computa onal Game Theory, Economics, and Mul -Agent Systems, University of Pennsylvania, h p://www.cis.upenn.edu/~mkearns/#gamepapers – Algorithmic Game Theory, edited by Noam Nisan, Tim Roughgarden, Eva Tardos, and Vijay V. Vazirani, September 2007, h p://www.cambridge.org/us/catalogue/catalogue.asp?isbn=9780521872829 – David Pennock, Yahoo! Research, Algorithmic Economics, h p://research.yahoo.com/ksc/Algorithmic_Economics
Computa onal Thinking 48 Jeanne e M. Wing References (Representa ve Only) • Computa onal Thinking and Law – The Poirot Project, h p://www.ffpoirot.org/ – Robert Plotkin, Esq., The Genie in the Machine: How Computer-Automated Inven ng is Revolu onizing Law and Business, forthcoming from Stanford University Press, April 2009, Available from www.geniemachine.com – Burkhard Schafer, Computa onal Legal Theory, h p://www.law.ed.ac.uk/staff/burkhardschafer_69.aspx – Stanford Computa onal Law, h p://complaw.stanford.edu/ • Computa onal Thinking and Medicine – The Diamond Project, Intel Research Pi sburgh, h p://techresearch.intel.com/ar cles/Tera-Scale/1496.htm – Ins tute for Computa onal Medicine, Johns Hopkins University, h p://www.icm.jhu.edu/ – See also Symbolic Aggregate Approxima on, Eamonn Keogh, UC Riverside, h p://www.cs.ucr.edu/~eamonn/SAX.htm • Computa onal Thinking and Meteorology – Yubin Yang, Hui Lin, Zhongyang Guo, Jixi Jiang, “A data mining approach for heavy rainfall forecas ng based on satellite image sequence analysisSource,” Computers and Geosciences, Volume 33 , Issue 1, January 2007, pp. 20-30, ISSN:0098-3004. – See also Symbolic Aggregate Approxima on, Eamonn Keogh, UC Riverside, h p://www.cs.ucr.edu/~eamonn/SAX.htm • Computa onal Thinking (especially Machine Learning) and Neuroscience – Yong Fan, Dinggang Shen, Davatzikos, C., “Detec ng Cogni ve States from fMRI Images by Machine Learning and Mul variate Classifica on,” Computer Vision and Pa ern Recogni on Workshop, 2006. CVPRW '06, June 2006, p. 89. – T.M. Mitchell, R. Hutchinson, R.S. Niculescu, F.Pereira, X. Wang, M. Just, and S. Newman, " Learning to Decode Cogni ve States from Brain Images,"Machine Learning, Vol. 57, Issue 1-2, pp. 145-175. October 2004. – X. Wang, R. Hutchinson, and T. M. Mitchell, " Training fMRI Classifiers to Detect Cogni ve States across Mul ple Human Subjects ," Neural Informa on Processing Systems 2003. December 2003. – T. Mitchell, R. Hutchinson, M. Just, R.S. Niculescu, F. Pereira, X. Wang, " Classifying Instantaneous Cogni ve States from fMRI Data," American Medical Informa cs Associa on Symposium, October 2003. – Dmitri Samaras, Image Analysis Lab, h p://www.cs.sunysb.edu/~ial/brain.html – Singh, Vishwajeet and Miyapuram, K. P. and Bapi, Raju S., “Detec on of Cogni ve States from fMRI data using Machine Learning Techniques,” IJCAI, 2007. • Computa onal Thinking and Sports – Synergy Sports analyzes NBA videos, h p://broadcastengineering.com/news/video-data-dissect-basketball-0608/ Computa onal Thinking – Lance Armstrong’s cycling computer tracks man and machine sta s cs, website 49 Jeanne e M. Wing Credits
• Copyrighted material used under Fair Use. If you are the copyright holder and believe your material has been used unfairly, or if you have any sugges ons, feedback, or support, please contact: [email protected]
• Except where otherwise indicated, permission is granted to copy, distribute, and/or modify all images in this document under the terms of the GNU Free Documenta on license, Version 1.2 or any later version published by the Free So ware Founda on; with no Invariant Sec ons, no Front- Cover Texts, and no Back-Cover Texts. A copy of the license is included in the sec on en tled “GNU Free Documenta on license” ( h p://commons.wikimedia.org/wiki/Commons:GNU_Free_Documenta on_License)
Computa onal Thinking 50 Jeanne e M. Wing