
Introduction to Computation and Programming Using Python.
Title:
Introduction to Computation and Programming Using Python.
Author:
Guttag, John V.
ISBN:
9780262312202
Personal Author:
Edition:
2013th ed.
Physical Description:
1 online resource (281 pages)
Contents:
Contents -- Preface -- Spring 2013 Edition -- Acknowledgments -- 1 Getting Started -- 2 Introduction to Python -- 2.1 The Basic Element of Python -- 2.1.1 Objects, expressions, and numerical types -- 2.1.2 Variables and assignment -- 2.1.3 IDLE -- 2.2 Branching Programs -- 2.3 Type Str and Input -- 2.3.1 Input -- 2.4 Iteration -- 3 Some Simple Numerical Programs -- 3.1 Exhaustive enumeration -- 3.2 For Loops -- 3.3 Approximate Solutions and Bisection Search -- 3.4 A Few Words About Using Floats -- 3.5 Newton-Raphson -- 4 Functions and Abstraction by Specification -- 4.1 Functions and Scoping -- 4.1.1 Function definitions -- 4.1.2 Keyword Arguments and Default Values -- 4.1.3 Scoping -- 4.2 Specifications -- 4.3 Recursion -- 4.3.1 Fibonacci numbers -- 4.3.2 Palindromes and divide-and-conquer -- 4.4 Global Variables -- 4.5 Modules and Import -- 4.6 Files -- 5 Structured Types, Mutability, and Higher-Order Functions -- 5.1 Tuples -- 5.1.1 Sequences and Multiple Assignment -- 5.2 Lists and Mutability -- 5.2.1 Cloning -- 5.2.2 List comprehension -- 5.3 Functions as Objects -- 5.4 Strings, tuples, and lists -- 5.5 Dictionaries -- 6 Testing and Debugging -- 6.1 Testing -- 6.1.1 Black-box testing -- 6.1.2 Glass-box testing -- 6.1.3 Conducting Tests -- 6.2 Debugging -- 6.2.1 Learning to Debug -- 6.2.2 Designing the Experiment -- 6.2.3 When the Going Gets Tough -- 6.2.4 And When You Have Found "The" Bug -- 7 Exceptions and Assertions -- 7.1 Handling Exceptions -- 7.2 Exceptions as a Control Flow Mechanism -- 7.3 Assertions -- 8 Classes and Object-Oriented Programming -- 8.1 Abstract Data Types and Classes -- 8.1.1 Designing Programs Using Abstract Data Types -- 8.1.2 Using Classes to Keep Track of Students and Faculty -- 8.2 Inheritance -- 8.2.1 Multiple Levels of Inheritance -- 8.2.2 The Substitution Principle -- 8.3 Encapsulation and Information Hiding.
8.3.1 User-Defined Iterators -- 8.4 Mortgages, an Extended Example -- 9 A Simplistic Introduction to Algorithmic Complexity -- 9.1 Thinking About Computational Complexity -- 9.2 Asymptotic Notation -- 9.3 Some Important Complexity Classes -- 9.3.1 Constant complexity -- 9.3.2 Logarithmic complexity -- 9.3.3 Linear Complexity -- 9.3.4 Log-linear Complexity -- 9.3.5 Polynomial Complexity -- 9.3.6 Exponential Complexity -- 9.3.7 Comparisons of Complexity Classes -- 10 Some Simple Algorithms and Data Structures -- 10.1 Search Algorithms -- 10.1.1 Linear Search and Using Indirection to Access Elements -- 10.1.2 Binary Search and Exploiting Assumptions -- 10.2 Sorting Algorithms -- 10.2.1 Merge Sort -- 10.2.2 Exploiting Functions as Parameters -- 10.2.3 Sorting in Python -- 10.3 Hash Tables -- 11 Plotting and More About Classes -- 11.1 Plotting Using PyLab -- 11.2 Plotting Mortgages, an Extended Example -- 12 Stochastic Programs, Probability, and Statistics -- 12.1 Stochastic Programs -- 12.2 Inferential Statistics and Simulation -- 12.3 Distributions -- 12.3.1 Normal Distributions and Confidence Levels -- 12.3.2 Uniform Distributions -- 12.3.3 Exponential and Geometric Distributions -- 12.3.4 Benford's Distribution -- 12.4 How Often Does the Better Team Win? -- 12.5 Hashing and Collisions -- 13 Random Walks and More About Data Visualization -- 13.1 The Drunkard's Walk -- 13.2 Biased Random Walks -- 13.3 Treacherous Fields -- 14 Monte Carlo Simulation -- 14.1 Pascal's Problem -- 14.2 Pass or Don't Pass? -- 14.3 Using Table Lookup to Improve Performance -- 14.4 Finding π -- 14.5 Some Closing Remarks About Simulation Models -- 15 Understanding Experimental Data -- 15.1 The Behavior of Springs -- 15.1.1 Using Linear Regression to Find a Fit -- 15.2 The Behavior of Projectiles -- 15.2.1 Coefficient of Determination -- 15.2.2 Using a Compuational Model.
15.3 Not All Close Fits are Good Fits -- 15.4 Fitting Exponential Distributions -- 15.5 When Theory is Missing -- 16 Lies, Damned Lies, and Statistics -- 16.1 Garbage In Garbage Out (GIGO) -- 16.2 Pictures Can Be Deceiving -- 16.3 Cum Hoc Ergo Propter Hoc -- 16.4 Statistical Measures Don't Tell the Whole Story -- 16.5 Sampling Bias -- 16.6 Context Matters -- 16.7 Beware of Extrapolation -- 16.8 The Texas Sharpshooter Fallacy -- 16.9 Percentages Can Confuse -- 16.10 Just Beware -- 17 Knapsack and Graph Optimization Problems -- 17.1 Knapsack Problems -- 17.1.1 Greedy Algorithms -- 17.1.2 Exponential Solution to the 0/1 Knapsack Problem -- 17.2 Graph Optimization Problems -- 17.2.1 Some Classic Graph Theoretic Problems -- 17.2.2 The Spread of Disease and Min Cut -- 17.2.3 Shortest Path, Depth-first search, and Breadth-first Search -- 18 Dynamic Programming -- 18.1 Fibonacci Sequences, Revisited -- 18.2 Dynamic Programming and the 0/1 Knapsack Problem -- 18.3 Dynamic Programming and Divide-and-Conquer -- Python 2.7 Quick Reference -- Index.
Abstract:
An introductory text that teaches students the art of computational problem solving, covering topics that range from simple algorithms to information visualization.
Local Note:
Electronic reproduction. Ann Arbor, Michigan : ProQuest Ebook Central, 2017. Available via World Wide Web. Access may be limited to ProQuest Ebook Central affiliated libraries.
Genre:
Electronic Access:
Click to View