Discrete Mathematics with Coding
7,210.00₹ 9,710.00₹
- Author: Hugo D Junghenn
- ISBN: 9781032398525
- Availability: In Stock
Buy Discrete Mathematics with Coding | New Arrivals, FOREIGN BOOKS , A Social Legal Perspective, ENGINEERING BOOKS
ABOUT THE BOOK
This book, for a first undergraduate course in Discrete Mathematics, systematically exploits the relationship between discrete mathematics and computer programming. Unlike most discrete mathematics texts focusing on one of the other, the book explores the rich and important connection between these two disciplines and shows how each discipline reinforces and enhances the other.
The mathematics in the book is self-contained, requiring only a good background in precalculus and some mathematical maturity. New mathematical topics are introduced as needed.
The coding language used is VBA Excel. The language is easy to learn, has intuitive commands, and the reader can develop interesting programs from the outset. Additionally, the spreadsheet platform in Excel makes for convenient and transparent data input and output and provides a powerful venue for complex data manipulation. Manipulating data is greatly simplified using spreadsheet features and visualizing the data can make programming and debugging easier.
The VBA language is seamlessly integrated into the spreadsheet environment with no other resources required. Furthermore, as some of the modules in the book show, intricate patterns, graphs, and animation in the form of moving cells is possible.
Features
- Introduces coding in VBA Excel assuming no previous coding experience.
- Develops programs in Linear Analysis, Logic, Combinatorics, Probability, and Number Theory.
- Contains over 90 fully tested and debugged programs. The code for these is as well as the exercises is available on the author's website.
- Contains numerous examples that gradually introduce the reader to coding techniques.
- Includes programs that solve systems of linear equations, linear programming problems, combinatorial problems, Venn diagram problems and programs that produce truth tables from logic statements and logic statements from switching and gate circuits, encrypt and decrypt messages and simulate probability experiments.
TABLE OF CONTENTS
Introduction
1.1 Modules, Subs, and Functions
- Data Output and Input. OutputExample,InputExample
- Cell Characteristics. CellAttributes
- Number Formats. NumberFormat
- Passing Arguments. SwitchIntegers
- User Defined Data Types
- Command Buttons
- Spin Buttons. MixColors
- Exercises
- VBA Operators
- Arithmetic Operators
- Comparison Operators
- Logical Operators
- Exercises
- Conditional Statements
3.1
The If Then Else Statement. Grade
3.2
The Select Case Statement. CycleEdges
3.3
Exercises
4 Loops
4.1
The For Next Statement
4.2
The Do While Loop. ReduceFraction, NumberOfTerms
4.3
The Do Until Loop
4.4
Exit Statements
4.5
Finding the Zeros of a Function. FindZero, FunctionVal
4.6
Exercises
5 Arrays
5.1
Declaring Arrays
5.2
First and Last Indices of an Array
5.3
Passing and Returning Arrays
- Variants and the Array Function
- Sorting Numeric Data. NumericSort
- Finding Nearest Numbers. NearestNumbers
- Stacks. Push, Pop
- Exercises
- String Functions
- The VBA Concatenation Operator &
- The VBA Extraction Function Mid
- The VBA ASCII Functions Asc and Chr
- VBA Data Conversion Functions CStr, CInt, CLng, CDbl
- The VBA Function Replace
- The VBA Function InStr
- The VBA Operator Like
- The VBA Functions Join and Split
- Exercises
- Grids
- Setting Up a Grid. MakeGrid
- The Grid As a Torus. TorusPoint
- Installing Coordinates in a Grid. InstallCoord
- Sieve of Erastothenes. Sieve
- A Changing Rectangle. CollapseExpandRectangle, Delay
- Table Sum Game. TableSum
- Finding the Nearest Cells. NearestCells
- A Growing Spiral. Spiral
- Billiard Ball. BilliardBall
- Exercises
- Recursion
- The Factorial Function. FactRecursive
- Binary Trees. Binarytree
- The Tower of Hanoi. HanoiTower
- Charts and Graphs
- Frequency Charts. LetterFreqency
- Drawing Lines. GraphPoly
- Intersection of Two Lines. LineIntersect
- Projection of a Point onto a Line. Point2Line
- The Incenter of a Triangle. Incenter
- Function Graphs. GraphFunction
- Fitting a Line to Data. Least Squares
- Graphing Parametric Curves. GraphCurve
- A Fractal Game. ChaosTriangleGame
- Overlaying Graphs. PredatorPrey
- Bezier Curves. Bezier
- Exercises
- Random Numbers
- The VBA Function Rnd
- A Nonsense Generator. Nonsense
- Area Under a Curve. AreaUnderCurve
- A Simple Random Walk. Random Walk
- Spreading Disease. SpreadOfDisease
- Particle Swarm Optimization. ParticleSwarmOpt
- A Randomly Sprouting Plant. SproutWither
- Random Walk of a Rotating Pattern. RotateAndMove
- Random Tessellations. RandomTess
- Maxwell’s Entropy Demon. MaxwellsDemon
- Multi-Random Walk. RandomWalks
- A Shedding Organism. RandomWalkShed
- A Splitting Organism. RandomWalkSplit
- Random Mazes. Maze
- Exercises
- Linear Equations
- Matrix Arrays. MatrixIn, MatrixOut
- Systems of Linear Equations
- The Gauss Jordan Method
- Row Operations with VBA. RowOperations
- Row Echelon Form with VBA. RowEchelon
- Exercises
Duplicating Strings. DupString
Matching Symbols. IsMatch
Inserting, Replacing a String. RemoveInsertString
A Variation of Mid. Midd
Boolean ASCII Functions. IsUpper,IsLower,IsLetter,IsDigit
Removing Spaces From a String. RemoveWhiteSpace
Removing Duplicate Characters. RemoveDupChar
Deleting Duplicate Strings. DeleteDupStr
*8.4 A Complex Arithmetic Calculator. ComplexCalc
*8.5 A Polynomial Calculator. PolyCalc
8.6 Exercises
Random Decimals. RndDec
Random Integers. RndInt
Random Permutations. RndPerm
Random Position. NextRndPos
Probability Distributions. RndOut
II Linear Analysis
12 Linear Programming
12.1 Linear Inequalities and Feasible Regions
12.2 Formulation of the General LP Problem
The Standard LP Max Problem
The Standard LP Min Problem
Nonstandard LP Problems
- Graphic Solution for Two Dimensions
- The Simplex Method
- Standard Max Problem with VBA. Simplex
- Duality and the Standard LP Min Problem
- Solving Nonstandard LP Problems
- Exercises
- Matrix Algebra
- Determinants
- Definition and Properties
- Determinants Using VBA. DetEchelon, DetRecursive
- Cramer’s Rule. CramersRule
- Collinear and Coplanar Points Using Determinants
- Areas and Volumes Using Determinants
- Circumscribing a Triangle. Circumcenter
- Exercises
13.1
Matrix Scalar Multiplication. ScalarMult
13.2
Matrix Addition and Substraction. AddSubMat
13.3
Matrix Multiplication. MultMat
13.4
Inverse of a Matrix. MatrixInversion
13.5
Matrix Powers. PowerMat
13.6
Input-Output Models. IOModel
13.7
Polynomial of Best Fit. PolyFitData
*13.8
The Barnsley Fern. AffineIterations
*13.9
A Matrix Calculator. MatrixCalculator
13.10
Exercises
III
Logic
15 Propositional Logic
15.1 Compound Statements
- Equivalent Statements and Laws of Logic
- Truth Tables with VBA. Stmt2TruthTable
- Statement from a Truth Table. TruthTable2DisjNormal
- Valid Arguments
- Exercises
- Switching Circuits
- Introduction
- Series and Parallel Circuits
- Equivalent Circuits
- Circuit Expressions With VBA. SwitchCircuitExpr
- Exercises
- Gates and Logic Circuits
- The Gates NOT, AND, OR
- The Gates XOR, NAND, NOR
- Logic Circuit Expressions with VBA. LogicCircuitExpr
- Half Adders
- VBA Simulation of a Half Adder
- Full Adders
- VBA Simulation of a 4-bit Adder. FullAdder4
- Exercises
- Combinatorics
- Sets
- Introduction
- The Union of Two Sets. Union
- The Intersection of Two Sets. Intersection, Card
- The Complement of a Set. Complement
- Extensions to Three or More Sets
- Calculating Sets with VBA. SetCalculator
- Venn Diagram Components with VBA. VennParts
- Laws of Set Equality
- Laws of Set Inclusion
- Cartesian Products, Relations, and Functions
- Exercises
19 Counting
19.1
The Addition Principle
*19.2
Venn Solutions with VBA. Venn3Solver
19.3
The Multiplication Principle
19.4
Permutations
19.5
Generating Permutations with VBA. Permutations
19.6
Combinations
19.7
Generating Combinations with VBA. Combinations
19.8
Traveling Salesman Problem. TravelSales
*19.9
Permutation Algebra. MultPerm, InvPerm, PowerPerm
*19.10
Permutation Cycles. PermCycles
19.11
Exercises
- Probability
- Probability
- Sample Spaces, Probabilities, and Events
- Throwing a Pair of Fair Dice. DiceRelativFreq
- Poker Hands. PokerHands
- Drawing Balls from an Urn
- Simulation of the Binomial Distribution. GaltonsBoard
- Conditional Probability
- Bayes’ Theorem
- Disease Testing. TruePosTrueNeg
- Independence
- Exercises
- Random Variables
- Examples of Random Variables
- Expected Value of a Random Variable
- Properties of Expectation
- Variance and Standard Deviation of a Random Variable
- The Law of Large Numbers
- Central Limit Theorem
Mean Time For Two Heads. MeanTimeForFirstHH
Bernoulli-Laplace model. BernoulliLaplaceMeanTime