### Learning Objectives

- Determine the equation of a plane tangent to a given surface at a point.
- Use the tangent plane to approximate a function of two variables at a point.
- Explain when a function of two variables is differentiable.
- Use the total differential to approximate the change in a function of two variables.

### Tangent Planes

The slope of the tangent line at the point $x=a$ is given by $m=f'(a)$; what is the slope of a tangent plane? We learned about the equation of a plane in Equations of Lines and Planes in Space; in this section, we see how it can be applied to the problem at hand.

### Definition

Let $P_0 = (x_0, y_0, z_0)$ be a point on a surface $S$, and let $C$ be any curve passing through $P_0$ and lying entirely in $S$. If the tangent lines to all such curves $C$ at $P_0$ lie in the same plane, then this plane is called the tangent plane to $S$ at $P_0$.

For a tangent plane to a surface to exist at a point on that surface, it is sufficient for the function that defines the surface to be differentiable at that point. We define the term tangent plane here and then explore the idea intuitively.

### Definition

Let $S$ be a surface defined by a differentiable function $z = f(x, y)$, and let $P_0 = (x_0, y_0)$ be a point in the domain of $f$. Then, the equation of the tangent plane to $S$ at $P_0$ is given by $z = f(x_0, y_0) + f_x(x_0, y_0)(x - x_0) + f_y(x_0, y_0)(y - y_0)$.

### Example

Find the equation of the tangent plane to the surface defined by the function $f(x, y) = 2x^2 - 3xy + 8y^2 + 2x - 4y + 4$ at point $(2, -1)$.

### Solution

First, we must calculate $f_x(x, y)$ and $f_y(x, y)$, then use the equation of the tangent plane with $x_0 = 2$ and $y_0 = -1$.

### Linear Approximations

Recall from Linear Approximations and Differentials that the formula for the linear approximation of a function $f(x)$ at the point $x = a$ is given by $L(x) = f(a) + f'(a)(x - a)$. The diagram for the linear approximation of a function of one variable appears in the following graph.

### Definition

Given a function $z = f(x, y)$ with continuous partial derivatives that exist at the point $(x_0, y_0)$, the linear approximation of $f$ at the point $(x_0, y_0)$ is given by the equation $L(x, y) = f(x_0, y_0) + f_x(x_0, y_0)(x - x_0) + f_y(x_0, y_0)(y - y_0)$.

### Example

Given the function $f(x, y) = \sqrt{41 - 4x^2 - y^2}$, approximate $f(2.1, 2.9)$ using point $(2, 3)$ for $(x_0, y_0)$. What is the approximate value of $f(2.1, 2.9)$ to four decimal places?

### Differentiability

When working with a function $y = f(x)$ of one variable, the function is said to be differentiable at a point $x = a$ if $f'(a)$ exists. Furthermore, if a function of one variable is differentiable at a point, the graph is "smooth" at that point (i.e., no corners exist) and a tangent line is well-defined at that point.

### Definition

A function $f(x, y)$ is differentiable at a point $P(x_0, y_0)$ if for all points $(x, y)$ in a $\delta$ disk around $P$ we can write $\Delta z = f(x + \Delta x, y + \Delta y) - f(x, y) = f_x(x_0, y_0)\Delta x + f_y(x_0, y_0)\Delta y + E\Delta x + E\Delta y$, where the error term $E$ satisfies $\lim_{(\Delta x, \Delta y) \to (0, 0)} \frac{E}{\sqrt{(\Delta x)^2 + (\Delta y)^2}} = 0$.

### Differentials

In Linear Approximations and Differentials we first studied the concept of differentials. The differential of $y$, written $dy$, is defined as $f'(x)dx$. The differential is used to approximate $\Delta y = f(x + \Delta x) - f(x)$, where $\Delta x = dx$. Extending this idea to the linear approximation of a function of two variables at the point $(x_0, y_0)$ yields the formula for the total differential for a function of two variables.

### Definition

Let $z = f(x, y)$ be a function of two variables with $(x_0, y_0)$ in the domain of $f$, and let $\Delta x$ and $\Delta y$ be chosen so that $(x_0 + \Delta x, y_0 + \Delta y)$ is also in the domain of $f$. If $f$ is differentiable at the point $(x_0, y_0)$, then the differentials $dx$ and $dy$ are defined as $dx = \Delta x$ and $dy = \Delta y$. The differential $dz$, also called the total differential of $z = f(x, y)$ at $(x_0, y_0)$, is defined as $dz = f_x(x_0, y_0)dx + f_y(x_0, y_0)dy$.

### Example

Find the differential $dz$ of the function $f(x, y) = 3x^2 - 2xy + y^2$ and use it to approximate $\Delta z$ at point $(2, -3)$. Use $\Delta x = 0.1$ and $\Delta y = -0.05$. What is the exact value of $\Delta z$?


Electric charge generates an electric field and influences other electric charges with an electric force. This force is equal in magnitude and opposite in direction. There are two types of electric charge: positive and negative.

A positive charge has more protons than electrons (Np > Ne) and is denoted by a plus (+) sign. It attracts other negative charges and repels other positive charges. Conversely, a positive charge is attracted to other negative charges and repelled by other positive charges.

A negative charge has more electrons than protons (Ne > Np) and is denoted by a minus (-) sign. It attracts other positive charges and repels other negative charges. Similarly, a negative charge is attracted to other positive charges and repelled by other negative charges.

The interaction between charges can be summarized as follows:
| q1/q2 charges | Force on q1 charge | Force on q2 charge | Result |
| --- | --- | --- | --- |
| - / - | ←⊝ | ⊝→ | Repulsion |
| + / + | ←⊕ | ⊕→ | Repulsion |
| - / + | ⊝→ | ←⊕ | Attraction |
| + / - | ⊕→ | ←⊝ | Attraction |

The charge of subatomic particles is as follows:
| Particle | Charge (C) | Charge (e) |
| --- | --- | --- |
| Electron | 1.602×10^{-19} C | -e |
| Proton | 1.602×10^{-19} C | +e |
| Neutron | 0 C | 0 |

The unit of electric charge is the Coulomb (C), where one Coulomb is equal to the charge of 6.242×10^{18} electrons: 1 C = 6.242×10^{18} e. Electric charge can be calculated using the formula Q = I ⋅ t, where Q is the electric charge in Coulombs (C), I is the current in amperes (A), and t is the time period in seconds (s). Alternatively, Q can be calculated as the integral of the momentary current i(t) over time t.


# Complex Conditionals (and, or, and not)

We can use `and`, `or`, and `not` to join logical expressions together. The `or` operator means that if either expression is true, the whole expression is true. The `and` operator is only true if both expressions are true. The `not` operator negates the logical value that follows it.

| Expression | Meaning |
| --- | --- |
| (a < b) or (c < d) | True if a is less than b or c is less than d. |
| (a < b) and (c < d) | True if a is less than b and c is less than d. |
| not a < b | True if a is greater than or equal to b, equivalent to `a >= b`. |

A common use of `and` is to check if a value is within a range. For example, to check if a number is between 1 and 10:
- The condition `x >= 1 and x <= 10` is true if x is between 1 and 10.
- The condition `x > 0 and x < 10` is true if x is between 1 and 9.

csp-12-5-1: What describes the values of x that will cause the code to print “condition true”?
```python
if x > 0 and x < 10:
    print ("condition true")
print ("All done")
```
A) x is less than 0
B) x is between 1 and 9
C) x is greater than 10
D) x is any value

A common use of `or` is to check if either condition is true. For example, a teen can go out if she has cleaned her room or finished her homework. In Python, `0` means false and any non-zero value is true.

- The condition `x > 0 or x < 10` is true for all values of x.
- The condition `x >= 1 or x <= 9` is true for all values of x except 0.

csp-12-5-2: What describes the values of x that will cause the code to print “condition true”?
```python
if x > 0 or x < 10:
    print ("condition true")
print ("All done")
```
A) x is between 1 and 9
B) x is greater than 10
C) x is any value
D) x is less than 0


# Common Misconceptions (Algebra)

The value of $\sqrt{(-8)^2}$ is $8$.

Given the equation ${ax} + {5b} = {2a} + {bq}$, it implies $x = 2$ and $q = 5$. However, this statement is not true for all real numbers $a, b, x,$ and $q$.

Consider the following steps:
$\begin{aligned}
\sqrt{-1}=&i \\
\dfrac{1}{\sqrt{-1}}=&\dfrac{1}{i} \\
\dfrac{\sqrt {1}}{\sqrt{-1}}=&\dfrac{1}{i} \\
\sqrt{\dfrac{1}{-1}}=&\dfrac{1}{i} \\
\sqrt{\dfrac{-1}{1}}=&\dfrac{1}{i} \\
\dfrac{\sqrt{-1}}{1}=&\dfrac{1}{i} \\
i=&\dfrac{1}{i} \\
i^2=&1 \\
-1=&1
\end{aligned}$

The first mistake is committed in step 7, where $i$ is incorrectly equated to $\dfrac{1}{i}$.

Given any two periodic functions, $f(x)$ and $g(x)$, the function $h(x) = f(x) + g(x)$ will also be periodic with a period that is, at most, the least common multiple of the original two periods, not necessarily the product of the two periods.

The value of $\sqrt{1\%}$ is $\sqrt{\dfrac{1}{100}} = \dfrac{1}{10} = 0.1$.


## TQIX

Quantum Physics

Discover TQIX

Cirq by Google is an open-source library for designing and manipulating quantum circuits. It allows users to run circuits on real quantum hardware or powerful simulators. QuTiP is another library that focuses on simulating quantum systems, enabling users to explore quantum mechanics and test algorithms before using real hardware.

### Cirq Library

The Cirq library can be used to create and manipulate quantum circuits. Here's an example of how to use Cirq:

```python
import cirq

# Pick a qubit
qubit = cirq.GridQubit(0, 0)

# Create a circuit
circuit = cirq.Circuit(
    cirq.X(qubit)**0.5,  # Square root of NOT
    cirq.measure(qubit, key='m')  # Measurement
)

print("Circuit:")
print(circuit)

# Simulate the circuit several times
simulator = cirq.Simulator()
result = simulator.run(circuit, repetitions=20)

print("Results:")
print(result)
```

### QuTiP Library

The QuTiP library is used for simulating quantum systems. It provides various functions for creating and manipulating quantum objects. Here's an example of how to use QuTiP:

```python
import numpy as np
import matplotlib.pyplot as plt
from qutip import Qobj, identity, sigmax, sigmay, sigmaz, tensor
from qutip.qip.algorithms import qft

# Define the physics
Sy = sigmay()
Sz = sigmaz()
Si = 0.5*identity(2)

# Drift Hamiltonian
H_d = 0.5*(tensor(sigmax, sigmax) + tensor(Sy, Sy) + tensor(Sz, Sz))

# Control Hamiltonians
H_c = [tensor(sigmax, Si), tensor(Sy, Si), tensor(Si, sigmax), tensor(Si, Sy)]

# Start point for the gate evolution
U_0 = identity(4)

# Target for the gate evolution - Quantum Fourier Transform gate
U_targ = qft.qft(2)
```

Key concepts and libraries used in this example include:

* Cirq: an open-source library for designing and manipulating quantum circuits
* QuTiP: a library for simulating quantum systems
* Quantum circuits: a series of quantum gates applied to qubits
* Quantum gates: operations that manipulate the state of qubits
* Quantum Fourier Transform (QFT): a quantum algorithm that performs a Fourier transform on a quantum state
* Hamiltonians: mathematical representations of the energy of a quantum system
* Qubits: the fundamental units of quantum information
* Simulators: software tools used to simulate the behavior of quantum systems.


**Key Concepts and Formulas**

1. **Independent Variable**: Also known as the regressor.
2. **Population Regression Line**: B0 + B1Xi, where B0 and B1 are parameters.
3. **Dependent Variable**: Also known as the regressand.
4. **OLS Estimate**: Minimizes the sum of squared prediction mistakes over n observations.
5. **OLS Estimator of Bhat1**: Obtained through a 3-step process involving residuals.
6. **OLS Estimator of Bhat0**: Ybar - Bhat1(Xbar).
7. **Hat**: Denotes a predicted value based on the OLS regression line.
8. **Regression Rˆ2**: Measures the fraction of sample variance of Yi explained by Xi.

**Formulas**

1. **Rˆ2**: 1 - SSR/TSS
2. **SER**: SSR / (n-2)
3. **TSS**: ESS + SSR
4. **Adjusted Rˆ2**: 1 - (n-1)SSR / (n-k-1)TSS
5. **SER for Multiple Regressors**: SSR/n-k-1

**Hypothesis Testing**

1. **Null and Alternative Hypotheses**: H0: B1 = B1,0 vs. H1: B1 ≠ B1,0 (two-sided)
2. **T-statistic**: (Bhat1 - B1,0) / SE(Bhat1)
3. **P-value**: Pr(H0) = PrH0[(Bhat1 - B1,0)/SEBhat1 > (Bact1 - B1,0)/SEBhat1]
4. **Confidence Interval**: [Bhat1 - ___SEBhat1, Bhat1 + ____ SEBhat1)

**Assumptions and Biases**

1. **OLS Assumptions**: E(ui given Xi) = 0, i.i.d., large outliers are unlikely.
2. **Omitted Variable Bias**: Occurs when a regressor is correlated with an omitted variable.
3. **Heteroskedasticity**: Variance of ui given Xi is not constant.

**Multiple Regression**

1. **Population Regression Model**: Yi = B0 + B1Xi + ui
2. **Dummy Variable Trap**: Occurs when all binary variables are included as regressors.
3. **F-statistic**: Used to test multiple hypotheses.

**True or False Questions**

1. **Adjusted Rˆ2 can be greater than Rˆ2**: False
2. **High Rˆ2 or adjusted Rˆ2 means no omitted variable bias**: False
3. **Adding irrelevant regressors will not bias relevant coefficients**: True
4. **RSquared is usually high in timeseries data**: False

**Multiple Choice Questions**

1. **What is the formula for Rˆ2?**: Rˆ2 = ESS/TSS = 1-(RSS/TSS)
2. **What is the formula for the adjusted Rˆ2?**: Rbarˆ2 = 1-(n-1 / n-k-1)(RSS/TSS)
3. **What is the SSR from a single regression in which the estimated slope coefficients all equal 0?**: TSS

**Critical Values**

1. **10%: 2-sided vs. 1-sided**: 1.64, 1.28, -1.28
2. **5%: 2-sided vs. 1-sided**: 1.96, 1.64, -1.64
3. **1%: 2-sided vs. 1-sided**: 2.58, 2.33, -2.33


## Sequence 1: Find the Missing Number
Find the connection between the numbers in the sequence: 5, 5, 5, 6, 7, 22, 7, 8, 36, 8, 8, ??

## Sequence 2: Identify the Pattern
Determine the next number in the sequence: 1, 10, 7, 20, 13, 30, 19, ?, ?

## Geometry Quiz: Calculate the Area
Find the area of the circle inside a square, where the square is drawn from the midpoints of another square.

## Sequence 3: Discover the Next Number
Find the connection between the numbers in the sequence: 3, 9, 5, 12, 7, 15, 9, 18, ?, ?

## Math Riddles: Fill in the Missing Numbers
Fill the empty boxes with the missing numbers based on the given pattern.

## Sequence 4: Guess the Next Two Numbers
Determine the next two numbers in the sequence: 17, 17, 34, 20, 20, 31, 23, ?, ?

## Fun Riddle: Find the Missing Letter
Find the logic between the numbers and letters in the table: 3 P, 8, 9 G, 11, 2 U, 4, 3 W, 1, 7, ?, 18. Identify the missing letter.


To represent inequations on a number line, we must consider the given conditions and the set of numbers the variable belongs to.

Example I demonstrates representing x > 4 on a number line where x is a natural number. If we test x = 0, we find 0 > 4 is not true, so 0 is not a solution. Thus, all natural numbers greater than 4 are solutions for the inequation x > 4.

Directions for representing inequations on a number line include:
1. Represent x > 5 on the number line where x is a natural number.
2. Represent x > 2 on the number line where x is a natural number.
3. Represent x ≥ 4 on the number line where x ∈ R.
4. Represent x ≥ 2 on the number line where x ∈ R.
5. Represent x < 5 on the number line where x is a natural number.
6. Represent x < 10 on the number line where x is a natural number.
7. Represent x ≤ 4 on the number line where x ∈ R.
8. Represent x ≤ 9 on the number line where x ∈ R.

These examples and directions guide the representation of various inequations on a number line, considering whether x belongs to natural numbers or real numbers.


**What is 136 octal in binary?**
The base-8 value of 136_{8} is equal to the base-2 value of 1011110_{2}.

136_{8} = 1011110_{2}
0o136 = 0b1011110

The conversion chart is as follows:
Octal | Binary | Decimal |
---|---|---|
134.4 | 1011100.1 | 92.5 |
135 | 1011101 | 93 |
135.4 | 1011101.1 | 93.5 |
136 | 1011110 | 94 |
136.4 | 1011110.1 | 94.5 |
137 | 1011111 | 95 |

**136 Octal to Binary Conversion:**

Step 1: Write each digit of the given octal number 136_{8} into its equivalent binary containing 3 digits each.
1 = 001
3 = 011
6 = 110

Step 2: Arrange the binary numbers group in the same order.
**136**_{8} = 001 011 110 = 1011110_{2}


# Difference between revisions of "Course:SLU MATH 124: Math and Escher - Fall 2007 - Dr. Steve Harris"

## Contents
1 General Information
2 Schedule
2.1 Week of August 27 - Euclidean Geometry
2.2 Week of September 3 - Symmetry of Rosettes
2.3 Week of September 10 - Basic Tessellations; Frieze Symmetries
2.4 Week of September 17 - Wallpaper Symmetries
2.5 Week of September 24 - Algebra of Symmetry Groups
2.6 Week of October 1 - More on Tessellations
2.7 Week of October 8 - Escher's Tessellations
2.8 Week of October 15 - Spherical Geometry
2.9 Week of October 22 - Spherical Isometries and Tessellations
2.10 Week of October 29 - Finishing Up Spherical Geometry, Introduction to Hyperbolic Geometry
2.11 Week of November 5 - Spherical Tesselations; More Hyperbolic Geometry
2.12 Week of November 12 - Hyperbolic Tessellations, Normal and Ideal
2.13 Week of November 19 - Exam II
2.14 Week of November 26 - Multiple Geometries; Intro to Fractals
2.15 Week of December 3 - Fractals; Other Topological Ideas
2.16 Week of December 10 - Summaries, Conclusions, Questions
3 Alhambra Pictures

## General Information
**Class Time:** 1:10 PM - 2:00 PM MWF
**Where:** Ritter 225
**Contact Information:**
- Office: Ritter Hall 208 (office hours: MWF, 4:00--late)
- Email: harrissg@slu.edu
- Phone: (314) 977-2439
**Books:**
- M.C. Escher: Visions of Symmetry by D. Schattschneider. W.H. Freeman and Company (1990)
**Prerequisite:** 3 years of high school mathematics or MT A 120 (College Algebra).
**Grading:**
- probably two in-class exams
- at least one project
- various in-class worksheets and homework assignments
- a final exam
**Final:** Friday December 14 12:00 N – 1:50 PM
How to do well: Attendance and participation are extremely important.

## Schedule
The schedule below is a tentative schedule.

### Week of August 27 - Euclidean Geometry
Introduction to the course. Exploring properties of triangles and quadrilaterals with an eye towards tessellations.
- Do the Quadrilaterals Exploration (as much as possible in class; turn in)
- Do Tessellations, a first look Exploration (1-5 in class; 6-8 to work on at home, compare in class, then turn in)
- Read the Fundamental Concepts with special attention to triangles, quadrilaterals, and convexity.
- Schattschneider p. 1-19
- Polygon Exercises: turn in 3-5, 8-11.

### Week of September 3 - Symmetry of Rosettes
The concept of symmetry is fundamental to many explorations in this course.
- Symmetric Figures Exploration (introduction to the program Kali; play with in class for a while)
- Symmetry of Stars and Polygons Exploration (1-6 in class, turn in)
- Rotational and Reflectional Symmetry in Escher’s Prints (discuss in class)
- Celtic Art Exploration (discuss in class)
- Rosette Exercises: turn in 3,4,5,8,9,12,14
- work on 15 in class

### Week of September 10 - Basic Tessellations; Frieze Symmetries
- Tessellation Exploration: The Basics (read it all, turn in 7-9 in class)
- Identifying Border Patterns Exploration (do 1-6 in class, turn in)
- Frieze Exercises: turn in 1-4, 7, 8

### Week of September 17 - Wallpaper Symmetries
- Wallpaper Symmetry Exploration (do it all, turn in)
- Escher's Wallpaper Groups Exploration (do as much as we have time for, turn in)
- Wallpaper Exercises: turn in 1, 3, 4, 7
- visit the Cathedral Basilica and record symmetry groups, as described in Cathedral Fieldtrip Project

### Week of September 24 - Algebra of Symmetry Groups
- Regular Triangle Symmetry Group Exploration (turn in 1 & 8)
- Symmetry Group for Border Pattern Exploration (select and turn in 3 of the questions)

### Week of October 1 - More on Tessellations
- Tessellations: Why There Are Only Three Regular Tessellations (look at 1-6; work on and turn in 7-10)
- playing around with Geometer's Sketchpad
- GSP Introduction Exploration (use this as a source for explaining the buttons, etc.)
- GSP Quadrilateral Tessellation Exploration (turn in a sketch of how to tessellate using a non-convex quadrilateral)
- Polygonal Tessellation Exercises: turn in 3, 6-9, 15

### Week of October 8 - Escher's Tessellations
- **Monday: Exam 1**
- Escher Tessellations Using Geometer’s Sketchpad (see what you can make with this; save as jpeg what you think looks good and send to harrissg@slu.edu)
- Escher-Like Tessellations Explorations (turn in the sheet your team likes best)

### Week of October 15 - Spherical Geometry
- Tessellation Art Project: preliminary sketches due by Wednesday, Oct. 24, final version due by Wednesday, Nov. 7
- Spherical Easel Exploration (turn in 1-6, think about the others)
- Spherical Geometry Exploration (turn in 1-7)
- Spherical Geometry: Polygons (turn in 1-4, 6, 7)
- Spherical Geometry Exercises 1, 3-8

### Week of October 22 - Spherical Isometries and Tessellations
- **Monday, October 22: Fall Break, class cancelled**
- Spherical Geometry: Isometry Exploration (turn in 1-7)
- Spherical Geometry Exercises 12-16 (#16: a, b only)

### Week of October 29 - Finishing Up Spherical Geometry, Introduction to Hyperbolic Geometry
- finish spherical explorations
- if time, Escher's Circle Limit Exploration (turn in 1-10; 11-13 to be discussed in class)

### Week of November 5 - Spherical Tesselations; More Hyperbolic Geometry
- Escher's Circle Limit Exploration (turn in 1-10; 11-13 to be discussed in class)
- **Moved to next week:** Hyperbolic Geometry Exploration (turn in 1-4)
- **Moved to next week:** Hyperbolic Geometry with Noneuclid II Exploration (turn in 1-4, 7-10)
- Regular pentagonal tessellations of the sphere.
- **Moved to next week:** Hyperbolic Geometry Exercises 1-6, 9, 11, 16a.
- Revision of the description of the Written Report for the Tessellation Art Project

### Week of November 12 - Hyperbolic Tessellations, Normal and Ideal
- Hyperbolic Tessellations Exploration (turn in 2, 3, 5; 6 for extra credit)
- Ideal Hyperbolic Tessellations Exploration (turn in 1-6; you may ignore the coloring, if you wish)
- **Exam II** Monday of next week

### Week of November 19 - Exam II
- **Exam II**, Monday, November 19
- Wednesday, Friday: Thanksgiving Vacation

### Week of November 26 - Multiple Geometries; Intro to Fractals
- Comparison between the three geometries Exploration (turn in table)
- Dilation Exploration (turn in 1-4; bring "Visions of Symmetry" book)
- Iteration Exploration (turn in 1-3)
- thoughts about the shape of the universe (1-2 page paper; to be detailed in class)

### Week of December 3 - Fractals; Other Topological Ideas
- Fractal Dimension Exploration (turn in 1-3)
- others: groups may choose *ad libitum* (do at least one; anything further is extra credit)
- Self-Similarity Exercises 1, 2, 5, 6, 8b, 9, 12, 13, 14

### Week of December 10 - Summaries, Conclusions, Questions
- Class meets only on Monday.
- **Final Exam**, Friday, Dec. 14, 12:00 - 1:50
- You are permitted to bring notes on how to identify frieze and wallpaper groups and one additional page of notes.

## Alhambra Pictures
- [[Steve's Alhambra Pictures]]


# Dimensions of Momentum

Energy and momentum have different dimensions. In some texts, authors use "natural units" where the speed of light $c=1$. The momentum four-vector is $\hat p = [\frac{E}{c},p_i]$.

In natural units, commonly used in Quantum Field Theory (QFT) and relativity, $c=1$. In SI units, the 4-momentum is $\mathbf p = (E/c, \vec p)$, with $\vec p = \gamma m \vec v$ as the 3-momentum.


## What are the five steps to writing a book?

The five steps to write and finish a book idea are:
1. Determine the start of the book.
2. Determine the end of the book.
3. Write the book.
4. Edit the book.
5. Accept the book.

## Writing Numbers in Words

To write numbers in words:
- 123 is written as "one hundred and twenty-three".
- 90 is written as "ninety".
- 1234 is written as "one thousand, two hundred thirty-four".

## Standard Form of a Linear Equation

The standard form of a linear equation in two variables, x and y, is Ax + By = C, where:
- A, B, and C are integers (positive or negative whole numbers).
- A is non-negative.
- A, B, and C have no common factors other than 1.
- The coefficient of the x-term should be a positive integer value.

## Rules for Standard Form

Key rules for standard form:
- A, B, and C can be positive or negative integers.
- No fractions or decimals are allowed in standard form.
- The standard form equation is Ax + By = C, where A and B are not zero.

## Rewriting in Standard Form

To rewrite an equation in standard form:
1. Move all terms containing variables to the left side of the equation.
2. Rewrite the equation with the sides flipped if necessary.
3. Ensure A, B, and C are integers and A is non-negative.

## Standard Form Examples

Examples of standard form:
- The number 200,000 in standard form is 2 x 10^5.
- The equation should be rewritten to fit the Ax + By = C format, where A, B, and C meet the standard form criteria.


Deep neural networks are widely used for various tasks, but they often face issues like overfitting and overconfidence. While overfitting can be addressed with strategies like dropout, weight regularization, and early stopping, overconfidence can be tackled with label smoothing. Label smoothing is a loss function modification that enhances the robustness of a model, allowing it to generalize well. It has been shown to be beneficial for deep learning network training, improving image classification, translation, and speech recognition performance.

To understand label smoothing, let's consider a classification problem with K candidate classes, labeled as [1, 2, …, K]. The predictions from the last layer of a neural network can be represented as:

\[ p_k = \frac{exp(x^Tw_k)}{\sum_{l=1}^{L}exp(x^Tw_l)} \]

where \( p_k \) is the likelihood of the model assigning label k, \( w_i \) is the weight of the \( i^{th} \) layer, and x is the vector containing activations. The cross-entropy loss function can be used to minimize the difference between the predicted and actual labels.

However, the problem lies in hard targets, where the model is forced to produce a large logit value for the correct label. This can lead to overconfidence, as the model tries to maximize the difference between the largest logit and all other logits, reducing its ability to adapt. As a result, the model may overfit.

Label smoothing can solve this problem by introducing soft targets, defined as:

\[ y_k^{LS} = y_k(1-\alpha) + \frac{\alpha}{K} \]

where \( \alpha \) is a hyperparameter that determines the amount of smoothing. When \( \alpha = 0 \), the soft target becomes a hard target. By using label smoothing, the model can become more robust and generalize better, reducing overconfidence and overfitting.

In summary, label smoothing is a valuable tool for improving the performance of deep neural networks by addressing overconfidence and overfitting. By introducing soft targets, label smoothing allows the model to adapt better and generalize well, leading to improved performance in various tasks.


Dynamic programming is a method for solving complex problems by breaking them down into simpler subproblems. It is a mathematical optimization technique used in computer programming and economics. The method was developed by Richard Bellman in the 1950s and has been applied in various fields, including aerospace engineering, economics, and computer science.

The key characteristics of dynamic programming are:

1.  **Optimal substructure**: The problem can be broken down into smaller subproblems, and the optimal solution to the larger problem can be constructed from the optimal solutions of the subproblems.
2.  **Overlapping subproblems**: The subproblems may have some overlap, meaning that some subproblems may be identical or have similar solutions.

Dynamic programming is used to solve problems that have the following properties:

1.  **Optimization**: The problem requires finding the optimal solution, which is the best possible solution among all possible solutions.
2.  **Discrete time**: The problem is defined in discrete time, meaning that the decisions are made at specific time intervals.
3.  **Finite horizon**: The problem has a finite horizon, meaning that the decisions are made for a limited number of time periods.

The dynamic programming approach involves the following steps:

1.  **Define the problem**: Define the problem and identify the decision variables, the objective function, and the constraints.
2.  **Break down the problem**: Break down the problem into smaller subproblems, which are more manageable and can be solved independently.
3.  **Solve the subproblems**: Solve each subproblem and store the solution in a memory-based data structure, such as a table or an array.
4.  **Combine the solutions**: Combine the solutions to the subproblems to obtain the solution to the original problem.

Dynamic programming has many applications in computer science, including:

1.  **Shortest path problems**: Dynamic programming can be used to solve shortest path problems, such as finding the shortest path between two nodes in a graph.
2.  **Knapsack problems**: Dynamic programming can be used to solve knapsack problems, which involve finding the optimal way to pack items of different sizes and weights into a knapsack of limited capacity.
3.  **Matrix chain multiplication**: Dynamic programming can be used to solve matrix chain multiplication problems, which involve finding the most efficient way to multiply a chain of matrices.

Some common dynamic programming algorithms include:

1.  **Dijkstra's algorithm**: Dijkstra's algorithm is a dynamic programming algorithm used to solve shortest path problems.
2.  **Bellman-Ford algorithm**: The Bellman-Ford algorithm is a dynamic programming algorithm used to solve shortest path problems in graphs with negative weight edges.
3.  **Floyd-Warshall algorithm**: The Floyd-Warshall algorithm is a dynamic programming algorithm used to solve shortest path problems in graphs with positive weight edges.

Dynamic programming has many advantages, including:

1.  **Efficient**: Dynamic programming can be more efficient than other methods, such as recursion, because it avoids redundant calculations.
2.  **Optimal**: Dynamic programming can be used to find the optimal solution to a problem, which is the best possible solution among all possible solutions.
3.  **Flexible**: Dynamic programming can be used to solve a wide range of problems, including optimization problems, shortest path problems, and knapsack problems.

However, dynamic programming also has some limitations, including:

1.  **Complexity**: Dynamic programming can be complex and difficult to implement, especially for large and complex problems.
2.  **Memory requirements**: Dynamic programming requires a significant amount of memory to store the solutions to the subproblems.
3.  **Computational time**: Dynamic programming can be computationally intensive, especially for large and complex problems.

In conclusion, dynamic programming is a powerful method for solving complex problems by breaking them down into simpler subproblems. It has many applications in computer science and economics and can be used to solve a wide range of problems, including optimization problems, shortest path problems, and knapsack problems. However, it also has some limitations, including complexity, memory requirements, and computational time.


The strategies learned will be helpful in mastering math concepts. To begin, review the doubles rhyme and partners of ten rhyme. Doubles facts are easy to remember and can be used to learn other facts. A fact family is a group of related facts using the same numbers. For example, if we have the numbers 12, 14, and 16, we can create a fact family by using these numbers to make different math facts.

To create a subtraction fact from these numbers, we can reverse the order of the numbers, but the sum will remain the same. If a fact has not been mastered, ask children to figure it out by using number relationships and fact families. The Make a Ten strategy can also be used to solve math problems. For example, to add 9 to a number, we can add 10 to the number and then subtract 1.

Fact families are a powerful tool for mastering math facts. Once you know one fact in a family, you can work out the other facts in the same family. To practice this concept, have children write the related fact on the chalkboard and then write the second fact under the first fact. Repeat this process with other doubles and near doubles.

The sum of doubles only has two members in their family. The order of the numbers can be changed, and one of the smaller numbers can be taken away from the larger number. To practice this concept, use manipulatives such as cubes and fact cards. Have children explain their thinking and allow time for discussion of different strategies.

A number sentence is a mathematical sentence that uses numbers and symbols to represent a math problem. To write a number sentence, have children fill in the blank with the correct operation. For example, if we have the numbers 7 and 5, we can write a number sentence such as 7 + 5 = ?. Have children show their work by drawing or using other visual aids.

To make learning fun, use games and activities that practice math concepts. For example, use math boards to practice adding and subtracting numbers. Have children roll a dice and move their piece on the board. If someone wins the game, they can play again.

In addition to games, use worksheets and lesson plans to practice math concepts. For example, have children write a number sentence to solve a word problem. Use the Quiz Mixer to create assessments and track progress. By using these strategies and activities, children can master math concepts and develop a strong understanding of number relationships.

Key concepts to review include:

* Doubles and near doubles
* Fact families
* Make a Ten strategy
* Number sentences
* Math boards and games
* Worksheets and lesson plans

By practicing these concepts and using different strategies, children can become proficient in math and develop a strong foundation for future learning.


In electrical systems, the highest amount of power is used to transmit power to the load for its operation. A key example is an audio amplifier, which transmits the maximum amount of current from the amplifier to the speaker. Similarly, in radio systems, the highest amount of current is supplied from the power amplifier to the antenna. For maximum power transmission, the load resistance should be ideal. If it is less than or greater than the ideal value, the maximum amount of power will not be transmitted. To maintain the ideal value of load resistance, the Maximum Power Transfer Theorem (MPT) was developed.

## Maximum Power Transfer Theorem (MPT) Definition

The MPT states that in a linear bilateral network, the maximum power is transferred from the source to the load circuit when the load impedance is the complex conjugate of the source impedance. The source impedance (Zs) and load impedance (Zl) are represented as:

Zs = Rs + jXs
Zl = Rl + jXl

where Rs is the source resistance, Xs is the source reactance, Rl is the load resistance, and Xl is the load reactance.

## Thevenin’s Theorem

Thevenin’s theorem is used to replace a complex network with a single voltage source and series impedance. Thevenin’s resistance is observed by switching off all independent sources and considering only the resistance.

## Properties or Applications of Maximum Power Transfer Theorem

The MPT is applicable to linear networks with R, L, C, and linear controlled sources as elements. It is used for both active and passive networks. The theorem is applicable only when the load is variable. Otherwise, the minimum internal impedance of the source results in maximum current through the fixed load, and maximum power is dissipated by the load circuit.

## Steps to Solve Maximum Transfer Power Theorem

### DC Source with Variable Resistor

The power transferred to the load (PRl) is given by:

PRl = (IRl)^2 * Rl

To find the maximum power, we differentiate PRl with respect to Rl and set it to zero:

dPRl/dRl = 0

Solving for Rl, we get:

Rl = Rs

The maximum power (Pmax) is:

Pmax = (Vs)^2 / 4Rl

### AC Source with Variable Load Impedance

The load resistor is only variable. The power transferred to the load (Pl) is given by:

Pl = (Is)^2 * Rl

To find the maximum power, we differentiate Pl with respect to Rl and set it to zero:

dPl/dRl = 0

Solving for Rl, we get:

Rl = sqrt(Rs^2 + (Xl + Xs)^2)

The maximum power (Pmax) is:

Pmax = (Imax)^2 * Rl

### Load Reactance is only Variable

The power transferred to the load (Pl) is given by:

Pl = (Is)^2 * Rl

To find the maximum power, we differentiate Pl with respect to Xl and set it to zero:

dPl/dXl = 0

Solving for Xl, we get:

Xl = Xs

The maximum power (Pmax) is:

Pmax = (Imax)^2 * Rl

### Load Impedance is Variable

The power transferred to the load (Pl) is given by:

Pl = (Is)^2 * Rl

To find the maximum power, we differentiate Pl with respect to Zl and set it to zero:

dPl/dZl = 0

Solving for Zl, we get:

Zl = Zs^*

The maximum power (Pmax) is:

Pmax = (Vs)^2 / 4Rl

## Maximum Power Transfer Theorem Problems with Solutions

### Find Rl for MPT to Load

The load resistor (Rl) is given by:

Rl = Rs

### Find Rl Value for MPT

The Thevenin’s equivalent circuit is used to find Rl. The Rl value is:

Rl = sqrt(Rs^2 + Xs^2)

## Applications of MPTT

The MPTT is applied in radio communications, where the power amplifier transmits the maximum amount of signal to the antenna if the load impedance is equal to the source impedance. It is also applied in audio systems, where the amplifier amplifies the maximum amount of voice when the load impedance is equal to the source impedance.

What is the value of Rl for maximum power transfer in the given circuit?

A) 2 ohms
B) 5 ohms
C) 10 ohms
D) 20 ohms

Answer: B) 5 ohms


Introduction to Probability & Statistics

This lesson covers the basics of statistics, including statistical modeling and parameterizing models. Key topics include:

* Statistical modeling and parameterizing models
* Point estimators, such as the sample average for the mean and the population variance for the variance
* The concept of p-value, a numerical way of characterizing evidence against a hypothesis with a test statistic
* Confidence intervals, which contain all numbers between a and b and can be calculated using the Central Limit Theorem
* Bayesian statistics, which treats parameters as random variables and uses Bayes' Rule to update the distribution of parameters

The lesson is divided into several sections, each covering a crucial aspect of statistics. By the end of the lesson, students will have a solid understanding of the fundamentals of statistics and be able to apply them to real-world problems.

Some key concepts to focus on include:
- The sample average as a point estimator for the mean
- The population variance as a point estimator for the variance
- The p-value and its role in hypothesis testing
- The calculation of confidence intervals using the Central Limit Theorem
- The application of Bayes' Rule in Bayesian statistics to update parameter distributions.


Differential Equations help is needed for the equation Y'' + 16Y = f(x). Three cases are presented to find the form of Yp.

1. For f(x) = 2x^2*e^(3x), give the form of Yp.
2. For f(x) = cos(2x), give the form of Yp.
3. For f(x) = 5x*cos(3x), give the form of Yp.


Newton's Law of Universal Gravitation states that the force of gravity between two masses in the universe is directly proportional to the product of the masses and inversely proportional to the square of the distance between their centers. The formula to calculate the force of gravitation is F = G * (m1 * m2) / d^2.

There are two important concepts in understanding motion: mass and weight. Mass is the quantity of matter in an object, while weight is the gravitational force exerted on an object by the nearest, most massive body (Earth). For example, a brick has a mass of 1 kg and a weight of 2.2 pounds.

Newton's Laws of Motion are fundamental principles that describe the relationship between a body and the forces acting upon it. The first law, also known as Galileo's principle of inertia, states that no force is needed to keep an object moving with constant velocity. The second law, also known as the law of dynamics, states that a force is needed to change the velocity (i.e., accelerate) of an object.

Friction is a force that opposes motion between two surfaces that are in contact. There are two types of friction: static friction, which keeps an object at rest and prevents it from moving, and kinetic friction, which acts during motion.

Momentum is a measure of how difficult it is to stop a moving object. It is a vector that depends on two physical quantities: the mass and the velocity of the moving object. The formula for momentum is p = m * v. Momentum is conserved, meaning that the total momentum of a closed system remains constant over time.

Impulse is the change in momentum of an object, and it is equal to the force applied to the object multiplied by the time over which the force is applied. The law of conservation of momentum applies to objects at rest and in motion, and it states that the total momentum of a closed system remains constant over time.

The four fundamental forces in nature are gravity, electromagnetic force, strong nuclear force, and weak nuclear force. Gravity is the force that attracts objects with mass towards each other, while electromagnetic force is the force that acts between charged particles. Strong nuclear force is the force that holds quarks together inside protons and neutrons, and weak nuclear force is the force that acts between particles during certain types of radioactive decay.

To solve problems involving motion and force, it is essential to understand the concepts of mass, weight, friction, momentum, and impulse. By applying these concepts and using the formulas and equations that describe them, you can analyze and solve problems involving objects in motion.

What are Newton's three laws of motion?
A) The law of gravity, the law of friction, and the law of electromagnetism
B) The law of inertia, the law of dynamics, and the law of gravitation
C) The law of inertia, the law of dynamics, and the law of action and reaction
D) The law of gravity, the law of friction, and the law of action and reaction

Answer: C) The law of inertia, the law of dynamics, and the law of action and reaction

What is the difference between mass and weight?
A) Mass is the quantity of matter in an object, while weight is the force exerted on an object by gravity
B) Mass is the force exerted on an object by gravity, while weight is the quantity of matter in an object
C) Mass is the quantity of energy in an object, while weight is the quantity of matter in an object
D) Mass is the quantity of matter in an object, while weight is the quantity of energy in an object

Answer: A) Mass is the quantity of matter in an object, while weight is the force exerted on an object by gravity

What is momentum?
A) A measure of how difficult it is to start a moving object
B) A measure of how difficult it is to stop a moving object
C) A measure of the energy of a moving object
D) A measure of the force exerted on a moving object

Answer: B) A measure of how difficult it is to stop a moving object

What is the law of conservation of momentum?
A) The total momentum of a closed system remains constant over time
B) The total energy of a closed system remains constant over time
C) The total force exerted on a closed system remains constant over time
D) The total mass of a closed system remains constant over time

Answer: A) The total momentum of a closed system remains constant over time


When configuring cords, the number of possibilities for the first cord is 26*25/2, since a letter can't be plugged into itself and the order of the ends doesn't matter. For the second cord, there are 24*23/2 possibilities, as each letter can only be plugged into one other letter.

The total number of ways to configure 2 cords is not 26*25*24*23/(2*2), because the order of the cords doesn't matter. This distinction is crucial in mathematics, as it's the difference between a permutation and a combination. A permutation refers to the selection of elements where order matters, such as choosing 3 Enigma rotors from 5, which can be done in 5*4*3 = 60 ways, or 5P3.

A combination, on the other hand, refers to the selection of elements where order doesn't matter, such as picking 6 numbers in the National Lottery. If the numbers range from 1 to 50, there are 50*49*48*47*46*45 ways to pick 6 numbers in order, but since order doesn't matter, this is divided by the number of ways to order 6 numbers, which is 6*5*4*3*2*1, or 50C6.

For the 2-cord problem, we need to divide by the number of ways to select 2 cords, which is 2. For 3 cords, the number of ways to put the cords into the plugboard is 3*2*1, or 3!, and the number of choices for the third cord is 22*21/2. So, for three cords, we have 26*25*24*23*22*21/((2*2*2)*3!).

For 4 cords, the formula is 26*25*24*23*22*21*20*19/((2*2*2*2)*4!). A pattern emerges: for n cords, the denominator is n!*2^n, and the numerator is 26*25*24*23... until there are 2n numbers, which can also be written as 26!/(26-2n)!.

The final formula for n cords is 26!/((26-2n)!*n!*2^n). If n = 10, the result is 150 million million. Interestingly, if n = 11, the result is even larger, but for n = 12 and n = 13, the number decreases. This suggests that the Germans could have used 11 cords instead of 10 to increase the number of possibilities.

To understand this concept, consider the following:
- For n cords, the number of possibilities is given by the formula 26!/((26-2n)!*n!*2^n).
- This formula accounts for the fact that the order of the cords and the ends of the cords do not matter.
- The formula can be applied to different values of n to determine the number of possible configurations.
- By using this formula, it is possible to calculate the number of possible configurations for any given number of cords.

Note that the number of possibilities increases as n increases, up to a certain point, and then decreases. This is an important consideration in applications where the number of possible configurations is a critical factor.

In conclusion, the formula 26!/((26-2n)!*n!*2^n) provides a way to calculate the number of possible configurations for n cords, taking into account the fact that the order of the cords and the ends of the cords do not matter. This formula has important implications for applications where the number of possible configurations is a critical factor.

The key concepts to understand are permutations, combinations, and the formula for calculating the number of possible configurations for n cords. Permutations refer to the selection of elements where order matters, while combinations refer to the selection of elements where order does not matter. The formula 26!/((26-2n)!*n!*2^n) provides a way to calculate the number of possible configurations for n cords, taking into account the fact that the order of the cords and the ends of the cords do not matter.

By applying this formula and understanding the underlying concepts, it is possible to calculate the number of possible configurations for any given number of cords and to make informed decisions in applications where the number of possible configurations is a critical factor.

The formula can be used to calculate the number of possible configurations for different values of n, and the results can be compared to determine the optimal value of n for a given application. This can be useful in a variety of contexts, including cryptography and coding theory.

In summary, the formula 26!/((26-2n)!*n!*2^n) provides a way to calculate the number of possible configurations for n cords, taking into account the fact that the order of the cords and the ends of the cords do not matter. This formula has important implications for applications where the number of possible configurations is a critical factor, and can be used to calculate the number of possible configurations for different values of n.

The underlying concepts of permutations and combinations are critical to understanding the formula and its applications. By applying this formula and understanding the underlying concepts, it is possible to make informed decisions in applications where the number of possible configurations is a critical factor.

The formula can be used to calculate the number of possible configurations for any given number of cords, and the results can be used to determine the optimal value of n for a given application. This can be useful in a variety of contexts, including cryptography and coding theory.

In conclusion, the formula 26!/((26-2n)!*n!*2^n) is a powerful tool for calculating the number of possible configurations for n cords, and has important implications for applications where the number of possible configurations is a critical factor. By understanding the underlying concepts of permutations and combinations, and applying the formula, it is possible to make informed decisions in these applications.

The key takeaways are:
- The formula 26!/((26-2n)!*n!*2^n) provides a way to calculate the number of possible configurations for n cords.
- The formula takes into account the fact that the order of the cords and the ends of the cords do not matter.
- The formula has important implications for applications where the number of possible configurations is a critical factor.
- The underlying concepts of permutations and combinations are critical to understanding the formula and its applications.
- The formula can be used to calculate the number of possible configurations for different values of n, and the results can be used to determine the optimal value of n for a given application.

By applying this formula and understanding the underlying concepts, it is possible to make informed decisions in applications where the number of possible configurations is a critical factor. The formula is a powerful tool for calculating the number of possible configurations for n cords, and has important implications for a variety of contexts, including cryptography and coding theory.

The formula can be used to calculate the number of possible configurations for any given number of cords, and the results can be compared to determine the optimal value of n for a given application. This can be useful in a variety of contexts, including cryptography and coding theory.

In summary, the formula 26!/((26-2n)!*n!*2^n) provides a way to calculate the number of possible configurations for n cords, taking into account the fact that the order of the cords and the ends of the cords do not matter. This formula has important implications for applications where the number of possible configurations is a critical factor, and can be used to calculate the number of possible configurations for different values of n.

The underlying concepts of permutations and combinations are critical to understanding the formula and its applications. By applying this formula and understanding the underlying concepts, it is possible to make informed decisions in applications where the number of possible configurations is a critical factor.

The formula can be used to calculate the number of possible configurations for any given number of cords, and the results can be used to determine the optimal value of n for a given application. This can be useful in a variety of contexts, including cryptography and coding theory.

In conclusion, the formula 26!/((26-2n)!*n!*2^n) is a powerful tool for calculating the number of possible configurations for n cords, and has important implications for applications where the number of possible configurations is a critical factor. By understanding the underlying concepts of permutations and combinations, and applying the formula, it is possible to make informed decisions in these applications.

What is the number of possible configurations for 10 cords?
A) 100 million million
B) 150 million million
C) 200 million million
D) 250 million million

Answer: B) 150 million million

What is the number of possible configurations for 11 cords?
A) 100 million million
B) 150 million million
C) 200 million million
D) Greater than 150 million million

Answer: D) Greater than 150 million million

What is the optimal number of cords to use in an application where the number of possible configurations is a critical factor?
A) 10
B) 11
C) 12
D) Depends on the specific application

Answer: D) Depends on the specific application

What is the formula for calculating the number of possible configurations for n cords?
A) 26!/((26-2n)!*n!)
B) 26!/((26-2n)!*n!*2^n)
C) 26!/((26-n)!*n!)
D) 26!/((26-n)!*n!*2^n)

Answer: B) 26!/((26-2n)!*n!*2^n)


We were able to solve our sports scheduling problem with 4 teams, 24 decision variables, and 22 basic constraints quickly. However, the problem size increases rapidly. The same problem with 10 teams would have 585 decision variables and 175 basic constraints. For scheduling major league baseball, the problem has 100,000 decision variables and 200,000 constraints.

For small problems, spreadsheet software like LibreOffice is great. But for large problems like this, solving them in LibreOffice would be impossible. So, how are integer optimization models like this solved in practice? Many different tricks are used to solve large integer optimization problems. One is to reformulate the problem. The sports scheduling problem with more teams is often solved by changing the formulation. Instead of the decision variables discussed, the variables are sequences of games.

Additionally, the problem can be split into three smaller problems that can each be solved separately and much faster than just solving the whole problem. Another trick that's often used is what are called Heuristic methods. These methods find good, but not necessarily optimal decisions. A good decision is sometimes accepted since the problem is so much easier to solve using a heuristic method.

In addition to changing the formulation and using heuristics, there are general-purpose optimization solvers that can solve large problems. These include CPLEX, Gurobi, GLPK, and Cbc, a COIN-OR project. Most practitioners who solve large optimization problems use one of these software packages. And in the past 20 years, the speed of integer optimization solvers has increased by a factor of 250,000, which doesn't even include the increasing speed of computers.

Assuming a modest machine speedup of 1,000, this means that a problem that can be solved in one second today took seven years to solve 20 years ago. Because of this increase in speed, we are able to solve much larger and more complicated optimization problems today than just a few years ago. So, how about the sports scheduling problem? When the Sports Scheduling Group was started in 1996, integer optimization software was too slow to be useful. Now, they can use powerful solvers to generate sports schedules.

Even with these solvers, it can take months to make the major league baseball schedule. This is due to several reasons, including the enormous list of ever-changing constraints that they have to account for, the need to define priorities on the constraints to find a feasible solution, and the fact that it takes several iterations to get a good schedule. But even with these challenges, analytics offers a significant edge in sports scheduling. The use of optimization allows for the addition of new constraints or schedule changes. A new schedule can easily be generated based on an updated requirement or request.

Now, all professional sports and most college sports construct their schedules using optimization. In this lecture, we've seen one powerful use of integer optimization, but this method has a huge number of applications, which you'll see more of in the second lecture, The Recitation, and in the homework assignment.


## Introduction to Taxes

Taxes are a necessary part of life, and understanding how they work is crucial, especially for self-employed individuals. When you have an employer, taxes are automatically deducted from your paycheck, including state income taxes, federal income taxes, and Medicare and Social Security taxes. However, as a self-employed individual, you are responsible for managing your own taxes.

## How Taxes are Calculated

Calculating taxes involves several steps:

1. **Net Business Income**: Calculate your income minus deductible expenses.
2. **Add Other Income**: Include income from other jobs, spouse's jobs, stock sales, rental income, etc.
3. **Subtract Standard Deduction**: Apply the federally allowed standard deduction.
4. **Tax Bracket**: Use the tax bracket to calculate your tax.

Note that tax brackets change and update each year. It's essential to understand how tax brackets work: your income is taxed at different rates, and only the amount above a certain threshold is taxed at the higher rate.

## State Income Tax and Self-Employment Tax

State income tax is calculated similarly to federal income tax, but with lower tax rates, typically under 10%. Some states have no income tax. Self-employment tax, also known as SE tax, is a flat 15.3% up to $128,000 and 2.9% thereafter.

## Example Calculation

Let's consider Penny the Photographer, who made $80,000 and had deductible expenses of $35,000. She also made $3,000 from stock sales. Her federal tax owed is $4,130, and her effective tax rate is 11.5%. Her state income tax is about 1/4 of her federal tax, and her self-employment tax is 15.3% of her net business income.

## Calculating Quarterly Tax

To calculate quarterly tax, estimate your tax for the year, divide it by 4, and pay that amount in equal installments. Using Penny's example, her total tax is $10,988, so she should pay $2,747 each quarter.

## Finding Your "Savings Percentage"

To find your savings percentage, divide your total tax by your gross income. For Penny, her total tax is $12,045, and her gross income is $83,000, so her savings percentage is 14.5%. This means she should set aside 14.5% of her business income to cover her taxes.

## Do You Have to Pay Quarterly Taxes?

You don't have to pay quarterly taxes, but you may be penalized if you don't. The rule is: if you expect to owe at least $1,000 in tax and your withholding and refundable credits are less than 90% of the tax to be shown on your return or 100% of the tax shown on your prior return.

## Penalties for Late Payment

The IRS penalty for late payment is 0.5% per month, which can add up to around 3.75% of the tax owed. It's essential to make quarterly payments to avoid penalties, but don't go into credit card debt to do so.

## Top Tip

Even if you won't be penalized, it's a good idea to pay your quarterlies. Save for your tax bill and pay it quarterly to avoid a large tax bill at the end of the year.

## How to Pay Quarterly Taxes

Paying quarterly taxes is easy and can be done online. You can download a graphic to help you with the process or watch a tutorial video for step-by-step instructions.


### MCQ Questions for Class 10 Mathematics with Answers

## Q1. Mode is the
(a) middle most frequent value
(b) least frequent value
(c) maximum frequent value
(d) none of these
Answer: (c) maximum frequent value

## Q2. The mean of the first 10 multiples of 6 is
(a) 3.3
(b) 33
(c) 34
(d) none of these
Answer: (b) 33

## Q3. If the mean of frequency distribution is 7.5 and ∑fi xi = 120 + 3k, ∑fi = 30, then k is equal to:
(a) 40
(b) 35
(c) 50
(d) 45
Answer: (b) 35

## Q4. The relationship between mean, median and mode for a moderately skewed distribution is
(a) mode = median – 2 mean
(b) mode = 3 median – 2 mean
(c) mode = 2 median – 3 mean
(d) mode = median – mean
Answer: (b) mode = 3 median – 2 mean

## Q5. The class marks of the class 18–22 is
(a) 20
(b) 22
(c) 18
(d) 4
Answer: (a) 20

## Q6. The wickets taken by a bowler in 10 cricket matches are 2, 6, 4, 5, 0, 3, 1, 3, 2, 3. The mode of the data is
(a) 1
(b) 2
(c) 3
(d) 4
Answer: (c) 3

## Q7. The mode and mean is given by 7 and 8, respectively. Then the median is:
(a) 1/13
(b) 13/3
(c) 23/3
(d) 33
Answer: (c) 23/3

## Q8. Which of the following can not be determined graphically?
(a) Mean
(b) Median
(c) Mode
(d) None of these
Answer: (a) Mean

## Q9. Mode and mean of a data are 12k and 15A. Median of the data is
(a) 12k
(b) 14k
(c) 15k
(d) 16k
Answer: (b) 14k

## Q10. The abscissa of the point of intersection of the less than type and of the more than type cumulative frequency curves of a grouped data gives its
(a) median
(b) mean
(c) mode
(d) all of these
Answer: (a) median

## Q11. Find the mean of the first six prime numbers.
(a) 68.3
(b) 6.71
(c) 7
(d) 6.83
Answer: (d) 6.83

## Q12. The marks obtained by 9 students in Mathematics are 59, 46, 30, 23, 27, 44, 52, 40 and 29. The median of the data is
(a) 30
(b) 35
(c) 29
(d) 40
Answer: (d) 40

## Q13. The median of the data 13, 15, 16, 17, 19, 20 is:
(a) 30/2
(b) 31/2
(c) 33/2
(d) 35/2
Answer: (c) 33/2

## Q14. While computing mean of grouped data, we assume that the frequencies are
(a) evenly distributed over all the classes
(b) centred at the classmarks of the classes
(c) centred at the upper limits of the classes
(d) centred at the lower limits of the classes
Answer: (b) centred at the classmarks of the classes

## Q15. The mean of squares of first five natural numbers is-
(A) 25
(B) 11
(C) 25
(D) 11/5
Answer: (B) 11

## Q16. If 10, 13,15,18,( x + 1),(x + 3),30,32,35 and 41 are ten observations in the ascending order with median 24, find the value of ‘x’.
(a) 42
(b) 22
(c) 10
(d) 32
Answer: (b) 22

## Q17. The measure of central tendency which is given by the x-coordinate of the point of intersection of the ‘more than’ ogive and ‘less than’ ogive is –
(a) Mean
(b) Median
(c) Mode
(d) None of these
Answer: (b) Median

## Q18. If AM of a, a+3, a+6, a+9 and a+12 is 10, then a is equal to;
(a)1
(b)2
(c)3
(d)4
Answer: (d)4

## Q19. If α variable takes the discrete values : α + 4, α -7/2 ,α -5/2 , α–3, α– 2, α +1/2 , α -1/2 , α+ 5, (α> 0) then the median is –
(A) α -5/4
(B) α -1/2
(C) α – 2
(D) α +5/4
Answer: (A) α -5/4

## Q20. From a series of 50 observations, an observation 45 is dropped, but the mean remains the same. What was the mean of 50 observations?
(a) 50
(b) 49
(c) 45
(d) 40
Answer: (c) 45

## Q21. What is the value of ‘n’ if the mean of first 9 natural numbers is 5n/9 ?
(a) 7
(b) 8
(c) 9
(d) 11
Answer: (c) 9

## Q22. What is the mean of the first ‘n’ natural numbers?
(a) 1/2+n
(b) n(n + 1)
(c) 1/2(n+1)
(d) (n+1)2n
Answer: (c) 1/2(n+1)


In tetrahedron $SABC$, the circumcircles of faces $SAB$, $SBC$, and $SCA$ each have a radius of 108. The inscribed sphere of $SABC$, centered at $I$, has a radius of 35, and $SI = 125$. We need to find the largest possible value of the circumradius of face $ABC$, denoted as $R$.

$R$ can be expressed in the form $\sqrt{\frac{m}{n}}$, where $m$ and $n$ are relatively prime positive integers. The goal is to find $m + n$.

Given the information, we can start by analyzing the properties of the tetrahedron and the relationships between its components to determine the value of $R$.

The final answer to the problem is $m + n = 35928845209$.


When building a retaining wall, accurate estimates of stone blocks, cap stones, and gravel are necessary to plan for material and labor costs, saving time and money. The amount of stone blocks and gravel needed depends on the wall's dimensions and backfill space depth.

To estimate the materials needed, follow these steps:

## Step 1: Calculate Wall Square Footage
Multiply the wall's length (in feet) by its height (in feet) and then by 1.12 to account for 12% of the wall's height being under the ground surface for stability.

## Step 2: Example Calculation
For a 24-foot long and 2.5-foot high wall, the square footage is (24)(2.5)(1.12) = 67.2 sq.ft.

## Step 3: Calculate Stone Block Square Footage
Measure each stone block's area in square inches and divide by 144 to convert to square feet.

## Step 4: Example Stone Block Calculation
For a stone block 10 inches wide and 6 inches high, the square footage is (10)(6)/144 = 0.4167 sq.ft.

## Step 5: Calculate Total Number of Stones Needed
Divide the wall's square footage by each stone block's square footage.

## Step 6: Example Total Stones Calculation
Using the sample numbers, 67.2/0.4167 = 162 blocks are needed. Add a few more to account for breakage.

## Step 7: Estimate Gravel for the Trench
The trench needs to be L feet long, 0.12H feet deep, and 2T inches wide, where L is the wall's length, H is its height, and T is the wall's thickness in inches.

## Step 8: Calculate Trench Volume
The volume of the trench in cubic yards is LHT/1350, with about half filled with coarse gravel, so the cubic yards of gravel needed for the base is LHT/2700.

## Step 9: Example Gravel for Trench Calculation
For a 24-foot long, 2.5-foot high, and 8-inch thick wall, (24)(2.5)(8)/2700 = 0.1778 cubic yards of gravel are needed for the base.

## Step 10: Estimate Gravel for Backfill
Assuming half a foot of space between the stones and the earth, the volume of gravel needed is 0.5LH cubic feet or LH/54 cubic yards.

## Step 11: Calculate Backfill Volume
For a 24-foot long and 2.5-foot high wall, (24)(2.5)/54 = 1.111 cubic yards of gravel are needed for backfill.

## Step 12: Calculate Number of Capstones Needed
Divide the wall's length in feet by the capstone's length in inches and then multiply by 12.

## Step 13: Example Capstones Calculation
For a 24-foot long wall and 8-inch wide capstones, 24/(8/12) = 36 capstones are needed. Buy a few extra in case some need to be cut or break.

## Step 14: Finalize Estimates
Combine the calculations for stone blocks, gravel for the trench, gravel for backfill, and capstones to finalize the material estimates for the retaining wall project.


**Problem 1: Lion in a Circular Cage Puzzle**

A lion and a lion tamer are enclosed within a circular cage, moving at the same speed. The question is whether the lion can catch the lion tamer under these conditions.

**Problem 2: Geometry Puzzle: Center of Square in Circle**

Given a square inscribed in a circle, two uniform random points are chosen within the square. The task is to find the probability that the center of the square lies within the circle formed by these two points as the diameter.

**Problem 3: Consecutive Heads**

Two scenarios involve tossing a fair coin until consecutive heads are obtained:
1. Calculate the probability that the number of tosses to get 2 consecutive heads (X) is greater than the number of tosses to get 3 consecutive heads (Y).
2. Find the expected value of X, the number of tosses to get 2 consecutive heads.
3. Find the expected value of Y, the number of tosses to get 3 consecutive heads.

**Problem 4: Coins Puzzle**

Two parts:
1. Divide 100 coins (50 heads, 50 tails) into two equal halves, each with an equal number of tails (and thus heads), without knowing which side is up.
2. Divide 100 coins (10 tails, 90 heads) into two halves (not necessarily equal) with an equal number of tails in each, without knowing which side is up.

**Problem 5: Arithmetic Puzzle: Broken Calculator**

A calculator with disabled digits (0-9) and basic arithmetic operators (+, -, *, /) but functional scientific functions (exp, log, sin, cos, arctan, etc.) currently displays 0. The goal is to use the available functions to first display 2 and then display 3.


**Define a Matrix**

A matrix is an ordered array of numbers. The numbers in the matrix are called **elements**. Matrices are named based on the number of **rows** and **columns** they contain. Rows are read horizontally, while columns are read vertically.

For example, in a given matrix, the first row is read as the sequence of numbers from left to right, and the first column is read as the sequence of numbers from top to bottom. A matrix with 2 rows and 3 columns is referred to as a "2 by 3" matrix. The notation for naming matrices follows the format of rows first, then columns.


SLASD5 (3) Linux Manuals

NAME
slasd5.f

SYNOPSIS
The SLASD5 subroutine computes the square root of the ith eigenvalue of a positive symmetric rank-one modification of a 2-by-2 diagonal matrix. It is used by the sbdsdc subroutine.

Function/Subroutine Documentation
subroutine slasd5 (integer I, real D(2), real Z(2), real DELTA(2), real RHO, real DSIGMA, real WORK(2))

Purpose:
This subroutine calculates the square root of the Ith eigenvalue of a positive symmetric rank-one modification of a 2-by-2 diagonal matrix, given by diag(D) * diag(D) + RHO * Z * transpose(Z). The diagonal entries in the array D must satisfy 0 <= D(i) < D(j) for i < j. Additionally, RHO must be greater than 0, and the Euclidean norm of the vector Z must be one.

Parameters:
- I: The index of the eigenvalue to be computed (I = 1 or I = 2).
- D: A real array of dimension 2, containing the original eigenvalues, where 0 <= D(1) < D(2).
- Z: A real array of dimension 2, representing the components of the updating vector.
- DELTA: A real array of dimension 2, containing (D(j) - sigma_I) in its jth component, which holds the information necessary to construct the eigenvectors.
- RHO: A real scalar in the symmetric updating formula, where RHO > 0.
- DSIGMA: A real value representing the computed sigma_I, the Ith updated eigenvalue.
- WORK: A real array of dimension 2, containing (D(j) + sigma_I) in its jth component.

Authors:
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.

Date: September 2012

Contributors:
- Ren-Cang Li, Computer Science Division, University of California at Berkeley, USA

Definition at line 117 of file slasd5.f, generated automatically by Doxygen for LAPACK from the source code.


**Introduction to Code Conversion**

All types of codes have a defining property that enables them to encode decimal numbers in formats understandable by digital systems. Binary code, gray code, and excess 3 code are examples of such codes. Each code has its specialty: binary code has a value that depends on its position, gray code differs from its predecessor by only 1 bit, and excess 3 code has a value that is +3 of its corresponding decimal place.

**Code Conversion using Combinational Logic Circuits**

Code converters are special combinational logic circuits that enable inter-conversion between different types of codes. These circuits provide flexibility in designing transmission paths and memory storage. The following sections will discuss the design of code converters for 3-bit and 4-bit binary to gray code, gray to binary code, and binary to excess 3 code.

**Designing a 3-bit Binary to Gray Code Converter**

To convert a 3-bit binary to gray code, the following rules apply:

* The MSB of the binary code is equal to the MSB of the gray code.
* The subsequent gray code bits are obtained by EXORing the corresponding binary bit and the preceding binary bit.

The equations for a 3-bit binary to gray code converter are:

G2 = B2
G1 = B1 ⊕ B2
G0 = B0 ⊕ B1

**Truth Table for a 3-bit Binary to Gray Code Converter**

| B2 | B1 | B0 | G2 | G1 | G0 |
| --- | --- | --- | --- | --- | --- |
| 0 | 0 | 0 | 0 | 0 | 0 |
| 0 | 0 | 1 | 0 | 0 | 1 |
| 0 | 1 | 0 | 0 | 1 | 1 |
| 0 | 1 | 1 | 0 | 1 | 0 |
| 1 | 0 | 0 | 1 | 1 | 0 |
| 1 | 0 | 1 | 1 | 1 | 1 |
| 1 | 1 | 0 | 1 | 0 | 1 |
| 1 | 1 | 1 | 1 | 0 | 0 |

**Designing a 4-bit Binary to Gray Code Converter**

The process is similar to the 3-bit converter. The equations for a 4-bit binary to gray code converter are:

G3 = B3
G2 = B2 ⊕ B3
G1 = B1 ⊕ B2
G0 = B0 ⊕ B1

**Truth Table for a 4-bit Binary to Gray Code Converter**

| B3 | B2 | B1 | B0 | G3 | G2 | G1 | G0 |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 |
| 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 |
| 0 | 0 | 1 | 1 | 0 | 0 | 1 | 0 |
| 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 |
| 0 | 1 | 0 | 1 | 0 | 1 | 1 | 1 |
| 0 | 1 | 1 | 0 | 0 | 1 | 0 | 1 |
| 0 | 1 | 1 | 1 | 0 | 1 | 0 | 0 |
| 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 |
| 1 | 0 | 0 | 1 | 1 | 1 | 0 | 1 |
| 1 | 0 | 1 | 0 | 1 | 1 | 1 | 1 |
| 1 | 0 | 1 | 1 | 1 | 1 | 1 | 0 |
| 1 | 1 | 0 | 0 | 1 | 0 | 1 | 0 |
| 1 | 1 | 0 | 1 | 1 | 0 | 1 | 1 |
| 1 | 1 | 1 | 0 | 1 | 0 | 0 | 1 |
| 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 |

**Designing a 3-bit Gray to Binary Code Converter**

To convert from gray to binary, the following rules apply:

* The MSB of the gray code is equal to the MSB of the binary code.
* The subsequent binary bits are obtained by EXORing the corresponding gray code bit with the preceding binary bit.

The equations for a 3-bit gray to binary code converter are:

B2 = G2
B1 = G1 ⊕ B2
B0 = G0 ⊕ B1

**Truth Table for a 3-bit Gray to Binary Code Converter**

| G2 | G1 | G0 | B2 | B1 | B0 |
| --- | --- | --- | --- | --- | --- |
| 0 | 0 | 0 | 0 | 0 | 0 |
| 0 | 0 | 1 | 0 | 0 | 1 |
| 0 | 1 | 0 | 0 | 1 | 1 |
| 0 | 1 | 1 | 0 | 1 | 0 |
| 1 | 0 | 0 | 1 | 1 | 1 |
| 1 | 0 | 1 | 1 | 1 | 0 |
| 1 | 1 | 0 | 1 | 0 | 0 |
| 1 | 1 | 1 | 1 | 0 | 1 |

**Designing a 4-bit Gray to Binary Code Converter**

The process is similar to the 3-bit converter. The equations for a 4-bit gray to binary code converter are:

B3 = G3
B2 = G2 ⊕ B3
B1 = G1 ⊕ B2
B0 = G0 ⊕ B1

**Truth Table for a 4-bit Gray to Binary Code Converter**

| G3 | G2 | G1 | G0 | B3 | B2 | B1 | B0 |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 |
| 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 |
| 0 | 0 | 1 | 1 | 0 | 0 | 1 | 0 |
| 0 | 1 | 0 | 0 | 0 | 1 | 1 | 1 |
| 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 |
| 0 | 1 | 1 | 0 | 0 | 1 | 0 | 0 |
| 0 | 1 | 1 | 1 | 0 | 1 | 0 | 1 |
| 1 | 0 | 0 | 0 | 1 | 1 | 1 | 1 |
| 1 | 0 | 0 | 1 | 1 | 1 | 1 | 0 |
| 1 | 0 | 1 | 0 | 1 | 1 | 0 | 0 |
| 1 | 0 | 1 | 1 | 1 | 1 | 0 | 1 |
| 1 | 1 | 0 | 0 | 1 | 0 | 0 | 0 |
| 1 | 1 | 0 | 1 | 1 | 0 | 0 | 1 |
| 1 | 1 | 1 | 0 | 1 | 0 | 1 | 1 |
| 1 | 1 | 1 | 1 | 1 | 0 | 1 | 0 |

**Designing a 3-bit Binary to Excess 3 Code Converter**

An excess 3 code is an excess of three of the binary number. The equations for a 3-bit binary to excess 3 code converter are:

E2 = B0 + B1 + B1'B2
E1 = B2
E0 = B0'

**Truth Table for a 3-bit Binary to Excess 3 Code Converter**

| B2 | B1 | B0 | E2 | E1 | E0 |
| --- | --- | --- | --- | --- | --- |
| 0 | 0 | 0 | 0 | 0 | 1 |
| 0 | 0 | 1 | 1 | 0 | 0 |
| 0 | 1 | 0 | 1 | 0 | 1 |
| 0 | 1 | 1 | 1 | 1 | 0 |
| 1 | 0 | 0 | 1 | 1 | 1 |
| 1 | 0 | 1 | x | x | x |
| 1 | 1 | 0 | x | x | x |
| 1 | 1 | 1 | x | x | x |

**Designing a 4-bit Binary to Excess 3 Code Converter**

The process is similar to the 3-bit converter. The equations for a 4-bit binary to excess 3 code converter are:

E3 = B3
E2 = B2' (B0 + B1) + B0'B1'B2
E1 = B1 ⊕ B2 ⊕ B3
E0 = B0'

**Truth Table for a 4-bit Binary to Excess 3 Code Converter**

| B3 | B2 | B1 | B0 | E3 | E2 | E1 | E0 |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 |
| 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 |
| 0 | 0 | 1 | 0 | 0 | 1 | 0 | 1 |
| 0 | 0 | 1 | 1 | 0 | 1 | 1 | 0 |
| 0 | 1 | 0 | 0 | 0 | 1 | 1 | 1 |
| 0 | 1 | 0 | 1 | 1 | 0 | 0 | 0 |
| 0 | 1 | 1 | 0 | 1 | 0 | 0 | 1 |
| 0 | 1 | 1 | 1 | 1 | 0 | 1 | 0 |
| 1 | 0 | 0 | 0 | 1 | 0 | 1 | 1 |
| 1 | 0 | 0 | 1 | 1 | 1 | 0 | 0 |
| 1 | 0 | 1 | 0 | 1 | 1 | 0 | 1 |
| 1 | 0 | 1 | 1 | 1 | 1 | 1 | 0 |
| 1 | 1 | 0 | 0 | 1 | 1 | 1 | 1 |
| 1 | 1 | 0 | 1 | x | x | x | x |
| 1 | 1 | 1 | 0 | x | x | x | x |
| 1 | 1 | 1 | 1 | x | x | x | x |


**The K-Nearest Neighbors (KNN) Algorithm**

The KNN algorithm is a simple, supervised machine learning algorithm used to solve both classification and regression problems. It is based on the principle that similar data points tend to have similar labels.

**Key Features of KNN:**

1. **Simple and Easy to Understand**: KNN is a straightforward algorithm to comprehend and implement.
2. **Versatile**: KNN can be used for both classification and regression problems, and with data of varying dimensions.
3. **Non-Parametric**: KNN does not make assumptions about the data, making it a flexible algorithm.
4. **Instance-Based Learning**: KNN does not require training data, as it learns from the data itself.
5. **Lazy Algorithm**: KNN does not have a training phase, making it efficient for small datasets.
6. **Distance-Based**: KNN uses a distance metric to calculate the distance between data points.

**Examples of KNN Applications:**

1. **Classification, Regression, and Outlier Detection**: KNN can be used for various tasks, including classification, regression, and outlier detection.
2. **Creditworthiness Prediction**: KNN can predict the creditworthiness of customers based on financial data.
3. **Customer Segmentation**: KNN can identify customer segments from demographic data.
4. **Fraud Detection**: KNN can detect fraudulent activities in transaction data.

**KNN Implementation:**

The KNN algorithm involves the following steps:

* Calculate the distance between the test point and all training points
* Sort the distances and select the k nearest neighbors
* Return the most common class among the neighbors

**Code Examples:**

```python
def knn(k, X_train, y_train, X_test):
    distances = []
    for i in range(len(X_train)):
        dist = np.linalg.norm(X_test - X_train[i])
        distances.append((dist, y_train[i]))
    distances.sort(key=lambda x: x[0])
    neighbors = [distances[i][1] for i in range(k)]
    return np.argmax(np.bincount(neighbors))
```

**Conclusion:**

The KNN algorithm is a simple and versatile algorithm that can be applied to various datasets. However, it is susceptible to overfitting if the data is not carefully preprocessed. With its ease of implementation and flexibility, KNN remains a popular choice for many machine learning tasks.


# APU Math 302 Midterm Exam

## Question 1
Classifying fruit as apple, orange, or banana is an example of which level of measurement?
A. Interval
B. Ordinal
C. Ratio
D. Nominal

## Question 2
If two events are mutually exclusive, what is the probability that one or the other occurs?
A. 0.25
B. Cannot be determined from the information given
C. 0.50
D. 1.00

## Question 3
In a company with 4 secretaries, 20 technicians, 4 engineers, 2 executives, and 50 factory workers, what is the probability that a randomly selected person is a factory worker?
A. 5/8
B. 2/5
C. 1/8
D. 1/4

## Question 4
A die is rolled 360 times. Find the standard deviation for the number of 3s rolled.
A. 60
B. 50
C. 7.1
D. 5.9

## Question 5
A survey of college students is not a binomial model because...
A. Students who strongly supported the change and those who only mildly supported the change are counted the same
B. Less than half of the students supported the change
C. 30 students are not enough for a good sample
D. There are 3 possible outcomes, not 2

## Question 6
Suppose 50 identical batteries are tested. After 8 hours, a battery is still operating with a probability of 0.70 and has failed with a probability of 0.30. What is the probability that greater than 30 batteries will last at least 8 hours?
A. 0.0848
B. 0.9152
C. 0.8594
D. 0.9522

## Question 7
One reason for standardizing random variables is to measure variables with:
A. Different means and standard deviations on a non-standard scale
B. Similar means and standard deviations on two scales
C. Dissimilar means and similar standard deviations in like terms
D. Different means and standard deviations on a single scale

## Question 8
If Z is a standard normal random variable, then the value z for which P(-z < Z < z) equals 0.8764 is
A. 3.08
B. 1.54
C. 0.3764
D. 1.16

## Question 9
In a normal distribution, changing the standard deviation:
A. Splits the distribution to two curves
B. Shifts the curve left or right
C. Makes the curve more robust
D. Makes the curve more or less spread out

## Question 10
Given that the random variable X is normally distributed with a mean of 80 and a standard deviation of 10, P(85 < X < 90) is
A. 0.1498
B. 0.5328
C. 0.3413
D. 0.1915

## Question 11
The continuous distribution characterized by a symmetric, bell-shaped curve is the:
A. Poisson distribution
B. Binomial distribution
C. Normal distribution
D. Exponential distribution

## Question 12
The standard deviation of a probability distribution is a:
A. Measure of skewness of the distribution
B. Measure of variability of the distribution
C. Measure of relative likelihood
D. Measure of central location

## Question 13
Find the mean score on an exam with the following scores: 77 81 74 77 79 73 80 85 86 73 83 84 81 73 75 91 76 77 95 76 90 85 92 84 81 64 75 90 78 78 82 78 86 86 82 70 76 78 72 93
Answer: 80.40

## Question 14
Find P(1 < X < 5) given the probability distribution:
| X | P(X=x) |
| --- | --- |
| 0 | 0.55 |
| 1 | 0.15 |
| 2 | 0.10 |
| 3 | 0.10 |
| 4 | 0.04 |
| 5 | 0.03 |
| 6 | 0.03 |
Answer: 0.24

## Question 15
What is the probability that a consumer selected at random purchased fewer products than before?
| Number of Products Purchased | Same | Changed | Total |
| --- | --- | --- | --- |
| Fewer | 10 | 262 | 272 |
| Same | 14 | 82 | 96 |
| More | 24 | 8 | 32 |
| Total | 48 | 352 | 400 |
Answer: 0.6800

## Question 16
What is the probability that only one of the questionnaires will be returned if each company returns the questionnaire with a probability of 0.30?
Answer: 0.42

## Question 17
In how many ways can 6 books be arranged on a shelf that can hold 4 books?
Answer: 360

## Question 18
What score represents the 70th percentile score on a mathematics exam with a mean of 65 and a standard deviation of 15?
Answer: 73

## Question 19
Find the probability that the mean of a sample of 100 employees is greater than $460 given a mean of $450 and a standard deviation of $50.
Answer: 0.0228

## Question 20
Find the probability that the mean of a sample of 100 employees is less than $445 given a mean of $450 and a standard deviation of $50.
Answer: 0.1587

## Question 21
What is the probability that the average catch of 30 lobster fishermen is less than 31.5 pounds given a mean of 32 pounds and a standard deviation of 4 pounds?
Answer: 0.2468

## Question 22
How many chicken sandwiches must a restaurant stock to be 99% sure of not running out on a given day given a mean of 120 and a standard deviation of 30?
Answer: 140

## Question 23
Find the mean of the sampling distribution of the means of average weekly earnings for samples of size 100 given a mean of $450 and a standard deviation of $50.
Answer: 450

## Question 24
Is the statement "A random variable X is normally distributed with a mean of 100 and a variance of 25. Given that X = 110, its corresponding Z-score is 0.40" true or false?
Answer: False

## Question 25
Is the statement "If Z is a standard normal variable, then P(Z = 1) = 0.3413" true or false?
Answer: False


The results of raising things into power strictly depends on the writer's interpretation; whereas \(\frac{6}{2}=3\), raising to \(\frac{6}{2}\) is not the same as raising to \(3\). This is because there's a difference between \(\sqrt{(-2)^6}\) and \((\sqrt{-2})^6\).

In \(\sqrt{(-2)^6}\), you're ordering the operation to raise \(-2\) to the sixth power and then take the square root. In \((\sqrt{-2})^6\), you're ordering the operation to take the square root of \(-2\) and then raise it to the sixth power.

The difference between these two operations is that in the first case, you will be taking a square root of a single value, and will thus obtain two distinct roots (unless it's 0). In the second case, you will be finding the two distinct square roots, and then raising each of them individually into the sixth power.

Now, raising to \(3\) is another story. When you choose to simplify \(\frac{6}{2}\) to \(3\), you're killing off roots. For example, consider the equation \(x^2=x\). If you cancel the \(x\) on both sides, you get \(x=1\), but you're killing a root, because the correct solution is \(x=0,1\).

In conclusion, it's just a matter of notation. This is one of those confusing wings of mathematics that teachers and professors leave out in high schools and colleges. Mathematicians refer to "principal roots" to avoid this confusion. In real-world applications, depending on what you're trying to calculate, you may want to take the square root of a value to the sixth power to observe symmetry, or just cube it because your model is simplistic.

The function \(f(x)=\sqrt{x}\) has its domain in the non-negative reals. \(\sqrt{x^2}=|x|\), so \(\sqrt{(-2)^2}=|-2|=2\), not \(-2\). The symbol \(\sqrt{\quad}\) is called the principal square root operator, which takes a non-negative integer and spits out its principal square root. \(\sqrt{x^2}\) is not always equal to \(x\).

When taking square roots, you should have two possible answers, \(8\) and \(-8\), because both squared give you \(64\). However, when you square by an odd number, the negative sign still stays, and when you power by an even number, the number will always be positive, no matter what other number power you put it to after.

In the case of \((-2)^{6/2}\), the square root after multiplying to power \(6\) may be positive or negative. Using the order of operations (BODMAS), you should first divide and then multiply. The correct way to solve this is to evaluate \((-2)^{6}\) first and then take the square root, which gives you \(\pm 8\).

On the other hand, \((\sqrt{-2})^6\) is equivalent to \((-2)^{6/2}\), but the square root is taken before raising to the power of \(6\). This will also give you \(\pm 8\), but the negative sign is preserved when taking the square root of \(-2\).

In summary, the key to solving these types of problems is to pay attention to the order of operations and to consider all possible roots when taking square roots.


## Introduction to Percentage to Fraction Calculator

The percentage to fraction calculator is a tool designed to convert percentages into fractions accurately and efficiently. It eliminates the potential for human error, providing a reliable method for conversion.

## Understanding Percentages and Fractions

To convert a percentage to a fraction, one must first understand the basic principles of both. A percentage is a number or ratio expressed as a fraction of 100. For example, 42% is equivalent to 42/100. Fractions, on the other hand, represent parts of a whole, where the top number (numerator) indicates how many parts, and the bottom number (denominator) indicates how many parts the whole is divided into.

## Converting Percentage to Fraction

The process involves moving the decimal point of the percentage to the right until you have a whole number, then expressing it as a fraction over 100, and simplifying if possible.

### Examples:

1. **Converting 66.6% to a fraction:**
   - 66.6% = 66.6/100
   - Simplifying gives 333/500, which further simplifies to 2/3.

2. **Converting 25% to a fraction:**
   - 25% = 25/100
   - Simplifying gives 1/4.

## Percentage to Fraction Conversion Chart

The following chart provides a quick reference for converting common percentages to fractions:

| Percentage | Fraction |
|------------|----------|
| 0.5%       | 1/200    |
| 1%         | 1/100    |
| 1.5%       | 3/200    |
| 2%         | 1/50     |
| 3%         | 3/100    |
| 3.33%      | 1/30     |
| 3.5%       | 7/200    |
| 3.6%       | 9/250    |
| 3.7%       | 37/1000  |
| 3.8%       | 19/500   |
| 3.9%       | 39/1000  |
| 4%         | 1/25     |
| 5%         | 1/20     |
| 6%         | 3/50     |
| 7%         | 7/100    |
| 8%         | 2/25     |
| 9%         | 9/100    |
| 10%        | 1/10     |
| 11.11%     | 1/9      |
| 12%        | 3/25     |
| 22.22%     | 2/9      |
| 33.33%     | 1/3      |
| 44.44%     | 4/9      |
| 55.55%     | 5/9      |
| 55%        | 11/20    |
| 60%        | 3/5      |
| 65%        | 13/20    |
| 70%        | 7/10     |
| 75%        | 3/4      |

This calculator and conversion chart are essential tools for anyone needing to work with percentages and fractions, providing a straightforward and error-free way to convert between these two forms of numerical representation.


**Spoon in Matrix Problem**

Chef disagrees with the concept "There is no spoon" from the movie Matrix. He believes a spoon is essential and wants to prove its existence in the matrix. A digital map of the matrix is provided, and the task is to find the word "Spoon" in it.

**Problem Statement**

Given a matrix of lowercase and uppercase Latin letters, determine if the word "Spoon" occurs in the matrix. A word is considered to occur in the matrix if it appears in a row from left to right or in a column from top to bottom. The match is case-insensitive.

**Input Format**

* The first line contains a positive integer T, representing the number of test cases.
* Each test case consists of:
	+ A line with two space-separated integers R and C, representing the number of rows and columns in the matrix.
	+ R lines, each containing C characters, representing the digital map.

**Output Format**

For each test case, print one line:
* "There is a spoon!" if the word "Spoon" is found in the matrix.
* "There is indeed no spoon!" if the word "Spoon" is not found in the matrix.

**Constraints**

* 1 ≤ T ≤ 100
* 1 ≤ R, C ≤ 100

**Sample Input**

3
3 6
abDefb
bSpoon
NIKHil
6 6
aaaaaa
ssssss
xuisdP
oooooo
ioowoo
bdylan
6 5
bdfhj
cacac
opqrs
ddddd
india
yucky

**Sample Output**

There is a spoon!
There is a spoon!
There is indeed no spoon!


## 4 Key Math Concepts You Won’t Find on Standardized Tests

Standardized tests like the SAT and ACT are good indicators of math aptitude and college readiness, with students having about a minute to answer each problem. Success on these tests requires memorized fundamental math rules and fluency in their use. However, some problem types that take more than a minute to solve are not found on the SAT, PSAT, or ACT, and may be lacking in courses designed to "teach to the test."

These concepts are vital for teaching math as the "language of science," connecting students to their world and their Creator. The following four key concepts are present in Shormann Mathematics but are normally missing from the SAT and ACT.

### Measurement/Unit Analysis

Measurement and unit conversion are essential skills in various fields, from cooking to engineering. Accurate measurement is important, as emphasized in Proverbs 20:10. Measuring and converting units help us understand the world around us, and as Christians, we start with God as the beginning of knowledge (Proverbs 1:7).

### Proofs

Understanding any subject requires starting with rules and definitions. In math, postulates are statements assumed to be true without proof, while theorems are true statements requiring proof. A mature math student should be able to give a reason for their problem-solving steps, just like a maturing Christian can give a reason for their hope (I Peter 3:15). Proofs and proof-writing techniques require careful thought and preparation.

### Infinite Series

Leonhard Euler (1707-1783) emphasized the importance of studying infinite series with "the greatest attention." However, most modern math courses introduce infinite series late, often in calculus, which can create confusion. Euler included infinite series in his algebra book, *Elements of Algebra*, and Shormann Math introduces them in Algebra 1. Infinite series help students understand fractions, rates of change, and computations used in computer programs.

### Vectors

Vectors allow us to consider an object's speed and direction of travel simultaneously. The Parallelogram Law provides a simple way to add vectors, and Alfred North Whitehead (1861-1947) believed that vectors are a crucial tool for studying God's creation. Understanding vectors requires patient practice over several years, which is why Shormann Math introduces these concepts in basic forms starting in Algebra 1.

These concepts, like learning a language or a new instrument, require gradual skill-building through practice and repetition. Shormann Math introduces them in more basic forms starting in Algebra 1, giving students time to develop their skills and prepare for the SAT, ACT, and CLEP exams.


## Maths Class 10 Notes for Area Related to Circles

**PERIMETER AND AREA OF A CIRCLE**

The area of a circle measures the region enclosed by its boundary, in square units. The perimeter, or circumference, is the length of its boundary, measured in units of length.

**Key Formulas:**
- Area of a circle = πr²
- Perimeter of a circle = 2πr, where r is the radius.

**AREA OF SECTOR OF CIRCLE**

A sector is the part of a circle between two radii.
- Area of sector = θ/360° × πr²
- Length of arc = θ/360° × 2πr, where θ is the measure of the arc.
- Perimeter of a minor sector = θ/360° × 2πr + 2r

**AREA OF SEGMENT OF CIRCLE**

A chord divides a circle into two segments: a major segment and a minor segment.
- Area of minor segment = Area of sector - Area of triangle
- Area of major segment = πr² - Area of minor segment
- Area of triangle with angle θ = 1/2 × OA × OB × sin(θ)

**GENERAL PRINCIPLE**
Area of a segment = Area of the corresponding sector - Area of the corresponding triangle.

**AREA BETWEEN TWO CIRCLES**

For two concentric circles with radii R and r (R > r), the area enclosed between them = πR² - πr²

**USEFUL RESULTS**

1. Internally touching circles: Distance between centers = Difference of radii.
2. Externally touching circles: Distance between centers = Sum of radii.
3. Distance moved by a rotating wheel in one revolution = Circumference of the wheel.
4. Number of revolutions per minute = Distance moved in one minute / Circumference.


The total number of possible soundtracks is calculated by sampling at 44.1kHz with 16bit resolution per stereo channel, resulting in 90 × 60 × 44100 samples. This yields approximately (2^32)^(90 * 60 * 44100) different soundtracks, which is around 10^(10^9.36).

To calculate the number of different full HD movies, we start with the number of colors modern graphic cards can represent, which is 256^3 = 16.7 million. A full HD image has 1920 × 1080 = 2 million pixels. The total number of possible full HD images is (256^3)^(1920*1080), which equals 1.5... × 10^14,981,179 or 10^(10^7.17...). Let's denote this number as HD.

For comparison, Googol is 10^100, and Googolplex is 10^(10^100). The number HD is greater than Googol but smaller than Googolplex.

Assuming silent movies with no audio, lasting 90 minutes, and filmed at 48fps, we get 90 * 60 * 48 = 259,200 frames. Since each frame can be any of the HD images, the number of all HD movies is (10^(10^7.17...))^(0.26 * 10^5), approximately 10^(3.83 * 10^12).

Combining the possibilities for soundtracks and movies, the total number of different movies is roughly 10^(10^22), which falls between 10^(10^22) and 10^(10^23), and is more than the number of possible soundtracks, which is around 10^(10^9.36). This total is still between Googol and Googolplex.


Is it possible to prove that something cannot be derived in a natural derivation system, considering only well-formed formulas? Specifically, if a premise P cannot yield the conclusion Q, it is because there isn't any logical rule that justifies the inference. The question remains, how can someone prove that a particular conclusion cannot be derived from a given premise in a logical system?


**Grade 4 Common Core State Standards for Fractions and Decimals**

The standards aim to extend understanding of fraction equivalence and ordering. Key concepts include:

* **Equivalent Fractions**: Explain why a fraction a/b is equivalent to a fraction (n × a)/(n × b) using visual fraction models.
* **Comparing Fractions**: Compare two fractions with different numerators and denominators by creating common denominators or numerators, or by comparing to a benchmark fraction such as 1/2.
* **Building Fractions**: Build fractions from unit fractions by applying and extending previous understandings of operations on whole numbers.
* **Adding and Subtracting Fractions**: Add and subtract fractions with like denominators, and solve word problems involving addition and subtraction of fractions.
* **Multiplying Fractions**: Apply and extend previous understandings of multiplication to multiply a fraction by a whole number.
* **Decimal Notation**: Understand decimal notation for fractions, and compare decimal fractions.

**Key Standards**

* **4.NF.1**: Explain why a fraction a/b is equivalent to a fraction (n × a)/(n × b) using visual fraction models.
* **4.NF.2**: Compare two fractions with different numerators and denominators.
* **4.NF.3**: Build fractions from unit fractions by applying and extending previous understandings of operations on whole numbers.
* **4.NF.4**: Apply and extend previous understandings of multiplication to multiply a fraction by a whole number.
* **4.NF.5**: Express a fraction with denominator 10 as an equivalent fraction with denominator 100.
* **4.NF.6**: Use decimal notation for fractions with denominators 10 or 100.
* **4.NF.7**: Compare two decimals to hundredths by reasoning about their size.

**Lessons and Worksheets**

* **Equality of Fractions**: Lesson and Worksheets #1 and #2
* **Inequality of Fractions**: Lesson and Worksheets #1 and #2
* **Adding Fractions**: Lesson and Worksheets #3, #4, and #5
* **Subtracting Fractions**: Lesson and Worksheets #6, #7, and #8
* **Multiplying Fractions**: Lesson and Worksheets #1, #2, and #3
* **Decimal Notation**: Lessons and Worksheets #1, #2, #5, #6, #7, and #8

**Notes**

* Visual fraction models and decimal squares are used to illustrate key concepts.
* Place value tables are introduced to relate to visual models for decimals.
* Activities for thousandths are optional in some lessons and worksheets.


**Permutation**

A permutation refers to the arrangement of a group of elements taken from a larger set. For instance, in a horse racing event with 7 participants, we can determine the number of possible arrangements for the 1st, 2nd, and 3rd champions. Since each participant has a chance to be the 1st champion, there are 7 ways to determine the 1st champion. Then, with 6 participants left, there are 6 ways to determine the 2nd champion. After selecting the 1st and 2nd champions, 5 participants remain to be the 3rd champion, resulting in 5 ways to determine the 3rd champion. Using the multiplication rule, the total number of possible arrangements for the 1st, 2nd, and 3rd champions is 7 × 6 × 5 = 210.

This arrangement is called a permutation, denoted as _7P3, P(7,3), P7,3, or P37. The permutation formula is given by:

If n and k are positive integers with n ≥ k, then the permutation formula is:

Pnk = n × (n-1) × (n-2) × ... × (n-k+1)

**QnA about Permutation**

1. The value of _7P3 is equal to …
A. 840
B. 280
C. 210
D. 70
E. 35
Answer: C

2. The value of _10P2 is equal to …
A. 90
B. 45
C. 35
D. 20
E. 15
Answer: A

3. The value of _13P3 is equal to …
A. 1716
B. 1617
C. 6171
D. 156
E. 155
Answer: A

4. The value of (_7P3 – _6P2) = …
A. 210
B. 200
C. 190
D. 180
E. 170
Answer: D

5. The value of n to make _nP2 = 72 is …
A. 9
B. 8
C. 7
D. 6
E. 5
Answer: A

6. The value of n to make _n-1P2 = 90 is …
A. 12
B. 11
C. 10
D. 9
E. 6
Answer: C, but given answer is A, however 10 is the correct answer as _10-1P2 = _9P2 = 9 × 8 = 72 and _11-1P2 = _10P2 = 10 × 9 = 90.

7. If _n+1P3 = _nP4, then n = …
A. 2
B. 3
C. 4
D. 5
E. 6
Answer: D

8. If _2n+1P2 – _nP3 = 0, then n = …
A. 4
B. 5
C. 6
D. 7
E. 8
Answer: D