Coding in Python and Elements of Discrete Mathematics Companion Web Site —

Total Page:16

File Type:pdf, Size:1020Kb

Coding in Python and Elements of Discrete Mathematics Companion Web Site — Coding in Python and Elements of Discrete Mathematics Maria Litvin Phillips Academy, Andover, Massachusetts Gary Litvin Skylight Software, Inc. Skylight Publishing Andover, Massachusetts Skylight Publishing 9 Bartlet Street, Suite 70 Andover, MA 01810 web: http://www.skylit.com e-mail: [email protected] [email protected] Copyright © 2019 by Maria Litvin, Gary Litvin, and Skylight Publishing All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, electronic, mechanical, photocopying, recording, or otherwise, without the prior written permission of the authors and Skylight Publishing. Library of Congress Control Number: 2019905086 ISBN 978-0-9972528-4-2 The names of commercially available software and products mentioned in this book are used for identification purposes only and may be trademarks or registered trademarks owned by corporations and other commercial entities. Skylight Publishing and the authors have no affiliation with and disclaim any sponsorship or endorsement by any of these products’ manufacturers or trademarks’ owners. 1 2 3 4 5 6 7 23 22 21 20 19 Printed in the United States of America To Henry and Esther, digital natives Brief Contents Preface xi Chapter 1. An Introduction to Computers and Coding in Python 1 Chapter 2. Variables and Arithmetic 17 Chapter 3. Sets and Functions 35 Chapter 4. Algorithms and while and for Loops 63 Chapter 5. Strings, Lists, Dictionaries, and Files 77 Chapter 6. Number Systems 109 Chapter 7. Boolean Algebra and if-else Statements 127 Chapter 8. Digital Circuits and Bitwise Operators 149 Chapter 9. Turtle Graphics 167 Chapter 10. Sequences and Sums 191 Chapter 11. Parity, Invariants, and Finite Strategy Games 213 Chapter 12. Counting 235 Chapter 13. Probabilities 253 Chapter 14. Vectors and Matrices 275 Chapter 15. Polynomials 295 Chapter 16. Recurrence Relations and Recursion 311 Chapter 17. Graphs 327 Chapter 18. Number Theory and Cryptology 361 Appendices 387 Index 399 About the Authors Maria Litvin has taught computer science and mathematics at Phillips Academy in Andover, Massachusetts, since 1987. Prior to joining Phillips Academy, Maria taught computer science at Boston University. Maria has co-authored several popular computer science textbooks — C++ for You++: An Introduction to Programming and Computer Science (1998), Java Methods: Object-Oriented Programming and Data Structures (2001-2015), Be Prepared for the AP Computer Science Exam in Java, and 250 Multiple-Choice Computer Science Questions — as well as Continental Mathematics League (CML) computer science contests for elementary and middle school students. As a consultant for the College Board, Maria provides training for high school AP Computer Science teachers, and, since 2014, as a Code.org facilitator, Maria has trained hundreds of New England elementary school teachers in teaching computer science to children in grades K-5. Maria is the recipient of the 1999 Siemens Award for Advanced Placement for Mathematics, Science, and Technology for New England and the 2003 RadioShack National Teacher Award. Gary Litvin is the co-author of C++ for You++, Java Methods, Be Prepared for the AP Computer Science Exam in Java, 250 MC Questions, and CML computer science contests. Gary has worked in many areas of software development, including artificial intelligence, pattern recognition, computer graphics, and neural networks. As the founder of Skylight Software, Inc., he developed SKYLIGHTS/GX, one of the first visual programming tools for C and C++ programmers. Gary led the development of several state-of-the-art software products, including interactive touch screen development tools, OCR and handwritten character recognition systems, and credit card fraud detection software. Contents Preface xi Chapter 1. An Introduction to Computers and Coding in Python 1 1.1 Prologue 2 1.2 CPU and Memory 2 1.3 Python Interpreter 6 1.4 Using IDLE 12 1.5 Review 15 Chapter 2. Variables and Arithmetic 17 2.1 Prologue 18 2.2 Python Code Structure 18 2.3 Variables 24 2.4 Arithmetic Operators 30 2.5 Review 33 Chapter 3. Sets and Functions 35 3.1 Prologue 36 3.2 Sets in Math and in Python 37 3.3 Ways to Define a Function in Math 43 3.4 Functions in Python 46 3.5 Function Arguments 53 3.6 Python’s Built-In Functions 57 3.7 Review 62 Chapter 4. Algorithms and while and for Loops 63 4.1 Prologue 64 4.2 Algorithms 64 4.3 while and for Loops 67 4.4 Review 75 vii viii CONTENTS Chapter 5. Strings, Lists, Dictionaries, and Files 77 5.1 Prologue 78 5.2 Indices, Slices, and the in Operator 79 5.3 Strings 83 5.4 Lists and Tuples 90 5.5 Dictionaries 97 5.6 Files 101 5.7 Review 107 Chapter 6. Number Systems 109 6.1 Prologue 110 6.2 Positional Number Systems 111 6.3 The Binary, Octal, and Hexadecimal Systems 114 6.4 Representation of Numbers in Computers 119 6.5 Irrational Numbers 122 6.6 Review 125 Chapter 7. Boolean Algebra and if-else Statements 127 7.1 Prologue 128 7.2 Operations in Boolean Algebra 129 7.3 Logic and Sets 133 7.4 if-else Statements in Python 138 7.5 Review 147 Chapter 8. Digital Circuits and Bitwise Operators 149 8.1 Prologue 150 8.2 Gates 153 8.3 Bitwise Logical Operators 158 8.4 Review 166 Chapter 9. Turtle Graphics 167 9.1 Prologue 168 9.2 The turtle Module Basics 170 9.3 Coordinates and Text 179 9.4 Colors 185 9.5 Review 190 CONTENTS ix Chapter 10. Sequences and Sums 191 10.1 Prologue 192 10.2 Arithmetic and Geometric Sequences 193 10.3 Sums 196 10.4 Infinite Sums 200 10.5 Fibonacci Numbers 204 10.6 Review 212 Chapter 11. Parity, Invariants, and Finite Strategy Games 213 11.1 Prologue 214 11.2 Parity and Checksums 215 11.3 Invariants 220 11.4 Finite Strategy Games 225 11.5 Review 234 Chapter 12. Counting 235 12.1 Prologue 236 12.2 The Multiplication Rule 236 12.3 Permutations 239 12.4 Using Division 242 12.5 Combinations 245 12.6 Using Addition and Subtraction 249 12.7 Review 252 Chapter 13. Probabilities 253 13.1 Prologue 254 13.2 Calculating Probabilities by Counting 254 13.3 More Probabilities by Counting 259 13.4 Multiplication, Addition, and Subtraction 263 13.5 Pseudorandom Numbers 268 13.6 Review 274 Chapter 14. Vectors and Matrices 275 14.1 Prologue 276 14.2 Operations on Vectors 278 14.3 Matrices 285 14.4 Review 294 x CONTENTS Chapter 15. Polynomials 295 15.1 Prologue 296 15.2 Addition and Subtraction 297 15.3 Multiplication, Division, and Roots 300 15.4 Binomial Coefficients 305 15.5 Review 310 Chapter 16. Recurrence Relations and Recursion 311 16.1 Prologue 312 16.2 Recurrence Relations 312 16.3 Recursion in Programs 314 16.4 Mathematical Induction 321 16.5 Review 326 Chapter 17. Graphs 327 17.1 Prologue 328 17.2 Types of Graphs 331 17.3 Isomorphism of Graphs 335 17.4 Degree of a Vertex 338 17.5 Directed and Weighted Graphs 342 17.6 Adjacency Matrices 346 17.7 Coloring Maps and Graphs 350 17.8 The Four Color Theorem 353 17.9 Review 360 Chapter 18. Number Theory and Cryptology 361 18.1 Prologue 362 18.2 Euclid’s Algorithm 362 18.3 The Fundamental Theorem of Arithmetic 368 18.4 Arithmetic of Remainders 372 18.5 Ciphers 379 18.6 Review 386 Appendix A. Getting Started with Python www.skylit.com/python Appendix B. Selected Built-In, math, and random Functions 389 Appendix C. String Operations and Methods 391 Appendix D. List, Set, and Dictionary Operations and Methods 395 Index 399 Preface This book is a “Python early” remake of our earlier book Mathematics for the Digital Age and Programming in Python. We introduce more Python features earlier, giving the reader the necessary tools to start writing Python code sooner and in a more “pythonic” (idiomatic) manner. We have added two chapters — “Turtle Graphics” and “Vectors and Matrices” — and a separate section on Fibonacci numbers (in the “Sums and Sequences” chapter). We have updated many examples, exercises, and solutions. And we have changed the title to better match the sequence of topics and the fast-changing technological landscape and vocabulary. But the main idea of the book remains the same: to introduce the discrete mathematics concepts that we consider essential knowledge for any literate coder. This kind of math is very accessible, yet most K-12 math curricula in the United States do not yet include it. The math segments of this book include many hands-on coding exercises, which reinforce students’ learning of both coding and math. “So, is this a math book or a computer programming book?” This is probably the first question on the impatient reader’s mind. But why should it be? It is a librarian’s dilemma: “Does it go on the math shelf or on the computer shelf?” There is a simple solution: put a copy on each. The purpose of this book is to teach a particular way of thinking — precision thinking — and how to solve problems that require this way of thinking. Both mathematics and computer programming nourish the ability to think with precision and to solve problems that call for exact solutions. Mathematics teaches us to appreciate the beauty of a rigorous argument. In the long run, this is more valuable than a lesson on solving today’s practical problems. Still, mathematics does not exist in a vacuum — its abstractions are rooted in practical knowledge accumulated over centuries. The teaching of mathematics draws on examples and analogies from the world around us.
Recommended publications
  • Donald Knuth Fletcher Jones Professor of Computer Science, Emeritus Curriculum Vitae Available Online
    Donald Knuth Fletcher Jones Professor of Computer Science, Emeritus Curriculum Vitae available Online Bio BIO Donald Ervin Knuth is an American computer scientist, mathematician, and Professor Emeritus at Stanford University. He is the author of the multi-volume work The Art of Computer Programming and has been called the "father" of the analysis of algorithms. He contributed to the development of the rigorous analysis of the computational complexity of algorithms and systematized formal mathematical techniques for it. In the process he also popularized the asymptotic notation. In addition to fundamental contributions in several branches of theoretical computer science, Knuth is the creator of the TeX computer typesetting system, the related METAFONT font definition language and rendering system, and the Computer Modern family of typefaces. As a writer and scholar,[4] Knuth created the WEB and CWEB computer programming systems designed to encourage and facilitate literate programming, and designed the MIX/MMIX instruction set architectures. As a member of the academic and scientific community, Knuth is strongly opposed to the policy of granting software patents. He has expressed his disagreement directly to the patent offices of the United States and Europe. (via Wikipedia) ACADEMIC APPOINTMENTS • Professor Emeritus, Computer Science HONORS AND AWARDS • Grace Murray Hopper Award, ACM (1971) • Member, American Academy of Arts and Sciences (1973) • Turing Award, ACM (1974) • Lester R Ford Award, Mathematical Association of America (1975) • Member, National Academy of Sciences (1975) 5 OF 44 PROFESSIONAL EDUCATION • PhD, California Institute of Technology , Mathematics (1963) PATENTS • Donald Knuth, Stephen N Schiller. "United States Patent 5,305,118 Methods of controlling dot size in digital half toning with multi-cell threshold arrays", Adobe Systems, Apr 19, 1994 • Donald Knuth, LeRoy R Guck, Lawrence G Hanson.
    [Show full text]
  • Leading the Way in Scientific Computing. Addison-Wesley. I When Looking for the Best in Scientific Computing, You've Come to Rely on Addison-Wesley
    Leading the way in scientific computing. Addison-Wesley. I When looking for the best in scientific computing, you've come to rely on Addison-Wesley. I Take a moment to see how we've made our list even stronger. The LATEX Companion sional programming languages. This book is the definitive user's Michael Goossens, Frank Mittelbach, and Alexander Samarin guide and reference manual for the CWEB system. This book is packed with information needed to use LATEX even 1994 (0-201 -57569-8) approx. 240 pp. Softcover more productively. It is a true companion to Leslie Lamport's users guide as well as a valuable complement to any LATEX introduction. Concrete Mathematics. Second Edition Describes the new LATEX standard. Ronald L. Graham, Donald E. Knuth, and Oren Patashnick 1994 (0-201 -54 199-8) 400 pp. Softcover With improvements to almost every page, the second edition of this classic text and reference introduces the mathematics that LATEX: A Document Preparation System, Second Edition supports advanced computer programming. Leslie Lamport 1994 (0-201 -55802-5) 672 pp. Hardcover The authoritative user's guide and reference manual has been revised to document features now available in the new standard Applied Mathematics@: Getting Started, Getting It Done software release-LATEX~E.The new edition features additional styles William T. Shaw and Jason Tigg and functions, improved font handling, and much more. This book shows how Mathematics@ can be used to solve problems in 1994 (0-201-52983-1) 256 pp. Softcover the applied sciences. Provides a wealth of practical tips and techniques. 1 994 (0-201 -542 1 7-X) 320 pp.
    [Show full text]
  • Types in Logic, Mathematics, and Programming from the Handbook of Proof Theory
    CHAPTER X Types in Logic, Mathematics and Programming Robert L. Constable Computer Science Department, Cornell University Ithaca, New York 1~853, USA Contents 1. Introduction ..................................... 684 2. Typed logic ..................................... 692 3. Type theory ..................................... 726 4. Typed programming languages ........................... 754 5. Conclusion ...................................... 766 6. Appendix ...................................... 768 References ........................................ 773 HANDBOOK OF PROOF THEORY Edited by S. R. Buss 1998 Elsevier Science B.V. All rights reserved 684 R. Constable 1. Introduction Proof theory and computer science are jointly engaged in a remarkable enter- prise. Together they provide the practical means to formalize vast amounts of mathematical knowledge. They have created the subject of automated reasoning and a digital computer based proof technology; these enable a diverse community of mathematicians, computer scientists, and educators to build a new artifact a globally distributed digital library of formalized mathematics. I think that this artifact signals the emergence of a new branch of mathematics, perhaps to be called Formal Mathematics. The theorems of this mathematics are completely formal and are processed digitally. They can be displayed as beautifully and legibly as journal quality mathematical text. At the heart of this library are completely formal proofs created with computer assistance. Their correctness is based on the axioms and rules of various foundational theories; this formal accounting of correctness supports the highest known standards of rigor and truth. The need to formally relate results in different foundational theories opens a new topic in proof theory and foundations of mathematics. Formal proofs of interesting theorems in current foundational theories are very large rigid objects. Creating them requires the speed and memory capacities of modern computer hardware and the expressiveness of modern software.
    [Show full text]
  • Concrete Mathematics: Foundation for Computer Science Free Download
    CONCRETE MATHEMATICS: FOUNDATION FOR COMPUTER SCIENCE FREE DOWNLOAD Ronald Graham,Oren Patashnik,Donald Ervin Knuth | 672 pages | 10 Mar 1994 | Pearson Education (US) | 9780201558029 | English | Boston, United States Concrete Mathematics: A Foundation for Computer Science, Second Edition Seller Inventory ING Reprinted as chapter 18 of the book Digital Typography. Table of contents Product information. The second edition includes important new material about the revolutionary Gosper-Zeilberger algorithm for mechanical summation. Midpoint between a discrete math text and dedicated algorithms text. Original Title. However, I promise to reply in due time. By continuing, you're agreeing to use of cookies. Dewey Decimal. Concrete Mathematics: Foundation for Computer Science response to the widespread use of the first edition as a reference book, the Concrete Mathematics: Foundation for Computer Science and index have also been expanded, and additional nontrivial improvements can be found on almost every page. Credits for Exercises. Apr 15, Bishu rated it it was amazing. Donald Knuth. Concrete Mathematics: Foundation for Computer Science Reviews. Dust Jacket Condition: New. Knuth is known throughout the world for his pioneering work on algorithms and programming techniques, for his invention of the Tex and Metafont systems for computer typesetting, and for his prolific and influential writing. If you like books and love to build cool products, we may be looking for you. This second edition includes important new material about mechanical summation. It is an indispensable text and reference not only Concrete Mathematics: Foundation for Computer Science computer scientists - the authors themselves rely heavily on it! It is an indispensable text and reference not only for computer scientists - the authors themselves rely heavily on it! Other Editions Example 4: A convoluted recurrence.
    [Show full text]
  • Math Never Seen
    TUGboat, Volume 31 (2010), No. 2 221 Math never seen ò Quality criteria Johannes Küster What makes a notation superior to another? What makes a symbol successful (in the sense that other mathemati- Abstract cians accept and adopt it)? e following list gives the Why have certain mathematical symbols and notations most important quality criteria. A mathematical symbol gained general acceptance while others fell into oblivion? or notation should be: To answer this question I present quality criteria for • readable, clear and simple mathematical symbols. I show many unknown, little- • needed known or little-used notations, some of which deserve • international (or derived from Latin) much wider use. • mnemonic I also show some new symbols and some ideas for new notations, especially for some well-known concepts • writable which lack a good notation (Stirling numbers, greatest • pronounceable common divisor and least common multiple). • similar and consistent • distinct and unambiguous • adaptable Ô Introduction • available For TEX’s "20th birthday it seems appropriate to present is list is certainly not exhaustive, but these are the most some ne points of mathematical typography and some important points. Not all criteria are equally important, ideas for new symbols and notations. Let’s start with a and some may conict with others, so few symbols really quotation from e METAFONTbook [ , p. ]: fulll all criteria. — Let me explain each point in turn. Above all, a notation should be readable — but what “Now that authors have for the rst time the power constitutes readability? Certainly it comprises clear and to invent new symbols with great ease, and to have simple.
    [Show full text]
  • ACM Bytecast Don Knuth - Episode 2 Transcript
    ACM Bytecast Don Knuth - Episode 2 Transcript Rashmi: This is ACM Bytecast. The podcast series from the Association for Computing Machinery, the ​ ​ world's largest educational and scientific computing society. We talk to researchers, practitioners, and innovators who are at the intersection of computing research and practice. They share their experiences, the lessons they've learned, and their own visions for the future of computing. I am your host, Rashmi Mohan. Rashmi: If you've been a student of computer science in the last 50 years, chances are you are very familiar and somewhat in awe of our next guest.An author, a teacher, computer scientist, and a mentor, Donald Connote wears many hats. Don, welcome to ACM Bytecast. ​ ​ Don: Hi. Rashmi: I'd like to lead with a simple question that I ask all my guests. If you could please introduce yourself and talk about what you currently do and also give us some insight into what drew you into this field of work. Don: Okay. So I guess the main thing about me is that I'm 82 years old, so I'm a bit older than a lot of the other people you'll be interviewing. But even so, I was pretty young when computers first came out. I saw my first computer in 1956 when I was 18 years old. So although people think I'm an old timer, really, there were lots of other people way older than me. Now, as far as my career is concerned, I always wanted to be a teacher. When I was in first grade, I wanted to be a first grade teacher.
    [Show full text]
  • The Concrete Mathematics of Microfluidic Mixing, Part I
    The Concrete Mathematics of Microfluidic Mixing, Part I∗ UNM TR-CS-2006-09 Jennifer Sager, Maxwell Young, and Darko Stefanovic Department of Computer Science University of New Mexico Albuquerque, NM 87131 May 1, 2006 ∗Supplementary Material to Characterization of Transverse Channel Concentration Profiles Obtainable With a Class of Microfluidic Networks, published in Langmuir, 22(9), 4452–4455 (2006) Abstract We analyze mathematically a previously reported class of passive microfluidic mixing networks. The networks produce nonhomogeneous concentrations in the out- put channel, resulting in diverse concentration profiles. We formally prove that all profiles obtainable with this class of networks can be described as polynomials of degree no higher than the number of input channels less one. We derive explicit for- mulas for the calculation of resultant output concentration profiles and conversely for the calculation of input concentrations needed to obtain set output profiles. 1 Introduction Microfluidic technology presents the opportunity for low-cost fabrication of sophisticated reaction assemblies in which chemical and biochemical reactions, including open-system reactions, can be performed with very small reactant volumes and with high volumetric accuracy. For instance, microfluidic assemblies have found uses in the design of reac- tion chambers for DNA computing [14, 15, 4]. Fluid flow in microfluidic channels is entirely laminar, owing to typical channel cross-sections, flow velocities, and fluid prop- erties. Therefore, when two miscible flows are merged into a common channel, they mix only by diffusion. This means that mixing is generally slower than with turbulent flows and special care must be taken to achieve complete mixing of flows (assuming this is desired).
    [Show full text]
  • A Handbook of Mathematical Discourse
    A Handbook of Mathematical Discourse Version 0.9 Charles Wells April 25, 2002 Charles Wells Professor Emeritus of Mathematics, Case Western Reserve University Affiliate Scholar, Oberlin College Address: 105 South Cedar Street Oberlin, OH 44074, USA Email: [email protected] Website: http://www.cwru.edu/artsci/math/wells/home.html Copyright c 2002 by Charles Wells Contents List of Words and Phrases Entries Preface Bibliography About this Handbook Citations Overview Point of view Index Coverage Left To Do Descriptive and Prescriptive Citations Citations needed Presentation Information needed Superscripted cross references TeX Problems Acknowledgments Things To Do contents wordlist index List of Words and Phrases abstract algebra arbitrary brace compartmentaliza- abstraction argument by bracket tion abuse of notation analogy but componentwise accumulation of argument calculate compositional attributes argument call compute action arity cardinality concept image ad-hoc article cases conceptual blend polymorphism assertion case conceptual affirming the assume category concept consequent assumption character conditional aha at most check assertion algebra attitudes circumflex conjunction algorithm addiction back formation citation connective algorithm bad at math classical category consciousness- alias bare delimiter closed under raising all barred arrow code example all notation codomain consequent always bar cognitive consider analogy behaviors dissonance constructivism and be collapsing contain angle bracket binary operation collective plural
    [Show full text]
  • Donald E. Knuth Papers SC0097
    http://oac.cdlib.org/findaid/ark:/13030/kt2k4035s1 Online items available Guide to the Donald E. Knuth Papers SC0097 Daniel Hartwig & Jenny Johnson Department of Special Collections and University Archives August 2018 Green Library 557 Escondido Mall Stanford 94305-6064 [email protected] URL: http://library.stanford.edu/spc Note This encoded finding aid is compliant with Stanford EAD Best Practice Guidelines, Version 1.0. Guide to the Donald E. Knuth SC00973411 1 Papers SC0097 Language of Material: English Contributing Institution: Department of Special Collections and University Archives Title: Donald E. Knuth papers Creator: Knuth, Donald Ervin, 1938- source: Knuth, Donald Ervin, 1938- Identifier/Call Number: SC0097 Identifier/Call Number: 3411 Physical Description: 39.25 Linear Feet Physical Description: 4.3 gigabyte(s)email files Date (inclusive): 1962-2018 Abstract: Papers reflect his work in the study and teaching of computer programming, computer systems for publishing, and mathematics. Included are correspondence, notes, manuscripts, computer printouts, logbooks, proofs, and galleys pertaining to the computer systems TeX, METAFONT, and Computer Modern; and to his books THE ART OF COMPUTER PROGRAMMING, COMPUTERS & TYPESETTING, CONCRETE MATHEMATICS, THE STANFORD GRAPHBASE, DIGITAL TYPOGRAPHY, SELECTED PAPERS ON ANALYSIS OF ALGORITHMS, MMIXWARE : A RISC COMPUTER FOR THE THIRD MILLENNIUM, and THINGS A COMPUTER SCIENTIST RARELY TALKS ABOUT. Special Collections and University Archives materials are stored offsite and must be paged 36-48 hours in advance. For more information on paging collections, see the department's website: http://library.stanford.edu/depts/spc/spc.html. Immediate Source of Acquisition note Gift of Donald Knuth, 1972, 1980, 1983, 1989, 1996, 1998, 2001, 2014, 2015, 2019.
    [Show full text]
  • Euler in Use Context Support for the Euler Math Font, with Examples
    16 MAPS 32 Adam T. Lindsay Euler in Use ConTEXt support for the Euler math font, with examples Abstract The Euler math font was designed by Hermann Zapf. ConTEXt support was limited until now. We show how to use the Eulervm LaTEX package in combination with some new math definitions and typescripts to give a more informal look to your equations. Keywords ConTeXt, fonts, Euler, math Introduction The Euler math font was designed by Hermann Zapf. The underlying philosophy of Zapf’s Euler design was to “capture the flavor of mathematics as it might be written by a mathematician with excellent handwriting.” ConTEXt support had previously been limited, but now includes nearly all features available with ConTEXt’s mathe- matics support. We show how to use the Eulervm LaTEX package in combination with some relatively new math definitions and typescripts to give a new look to your equations. Along the way, we provide several examples using ConTEXt’s typescript and typeface mechanisms. Although Euler has a somewhat informal feel that may make it inappropriate in certain situations, it does have certain advantages: as it does not directly mirror the form of any particular roman font (and has a robust weight), it mates with many more fonts than Computer Modern Math or others that are available. As D.E. Knuth himself had a hand in its creation, it offers features like optical scaling (e.g., script and scriptscript sizes) and multiple weights (i.e., bold math) not seen in most ‘alternative’ fonts. Most of the disadvantages that previously came with Euler use, chief among them poor glyph coverage, have disappeared with Walter Schmidt’s Euler-VM package.
    [Show full text]
  • Typesetting Concrete Mathematics Testfont Routine [5, Appendix HI; These Tests Put Donald E
    TUGboat, Volume 10 (1989), No. 1 3 1 Typesetting Concrete Mathematics testfont routine [5, Appendix HI; these tests put Donald E. Knuth the characters through their basic paces by type- Stanford University setting formulas such as /A+ ,B1+ C + ... + Z1, a2tb2+c2t..+z2, az+br+c2+...+p,and During 1987 and 1988 I prepared a textbook entitled 3 + 5 + + + . + 2. I noticed among other things Concrete Mathematics [I],written with co-authors that the Fraktur characters had all been placed too Ron Graham and Oren Patashnik. I tried my best high above the baseline, and that more blank space to make the book mathematically interesting, but was needed at the left and right of the characters in I also knew that it would be typographically in- subscript/superscript sizes. After fixing such prob- teresting-because it would be the first major use lems I also needed to set the italic corrections so of a new typeface by Hermann Zapf, commissioned that subscripts and superscripts would have proper by the American Mathematical Society. This type- offsets; and I needed to define suitable kerns with face, called AMS Euler, had been carefully digitized a \skewchar so that accents would appear visually and put into METAFONT form by Stanford's digital centered. AMS Euler contains more than 400 char- typography students [a]; but it had not yet been acters, and Hermann had made them beautiful; my "tuned up" for real applications. My new book job was to find the right adjustments to the spacing served as an ideal test case, because (1) it involved so that they would fit properly into mathematics.
    [Show full text]
  • Computer Science 1
    Computer Science 1 A coordinated MBA/MCS degrees program is also offered in conjunction COMPUTER SCIENCE with the Jesse H. Jones Graduate School of Business. Contact Information Bachelor's Programs Computer Science • Bachelor of Arts (BA) Degree with a Major in Computer Science https://www.cs.rice.edu/ (https://ga.rice.edu/programs-study/departments-programs/ 3122 Duncan Hall engineering/computer-science/computer-science-ba/) 713-348-4834 • Bachelor of Science in Computer Science (BSCS) Degree (https:// ga.rice.edu/programs-study/departments-programs/engineering/ Christopher M. Jermaine computer-science/computer-science-bscs/) Department Chair [email protected] Master's Programs Alan L. Cox • Master of Computer Science (MCS) Degree (https://ga.rice.edu/ Undergraduate Committee Chair programs-study/departments-programs/engineering/computer- [email protected] science/computer-science-mcs/) • Master of Computer Science (MCS) Degree, Online Program (https:// T. S. Eugene Ng ga.rice.edu/programs-study/departments-programs/engineering/ Graduate Committee Chair computer-science/computer-science-mcs-online/) [email protected] • Master of Data Science (MDS) Degree (https://ga.rice.edu/programs- study/departments-programs/engineering/data-science/data- science-mds/) Computer science is concerned with the study of computers and • Master of Data Science (MDS) Degree, Online Program (https:// computing, focusing on algorithms, programs and programming, and ga.rice.edu/programs-study/departments-programs/engineering/ computational systems. The main goal of the discipline is to build a data-science/data-science-mds-online/) systematic body of knowledge, theories, and models that explain the • Master of Science (MS) Degree in the field of Computer Science properties of computational systems and to show how this body of (https://ga.rice.edu/programs-study/departments-programs/ knowledge can be used to produce solutions to real-world computational engineering/computer-science/computer-science-ms/) problems.
    [Show full text]