Podcast
Questions and Answers
Which of the following is the most suitable outfit for a job interview, based on the listed styles?
Which of the following is the most suitable outfit for a job interview, based on the listed styles?
- Loose
- Scruffy
- Formal (correct)
- Casual
If someone is described as 'well-built', which aspect of their physical appearance is being highlighted?
If someone is described as 'well-built', which aspect of their physical appearance is being highlighted?
- Their height
- Their age
- Their body structure (correct)
- Their weight
Which of the following accessories would be categorized under 'Dodatki'?
Which of the following accessories would be categorized under 'Dodatki'?
- Gloves (correct)
- Boots
- Trousers
- Shirt
A person with 'wavy' hair would best be described as having:
A person with 'wavy' hair would best be described as having:
Which of the following would be considered 'CZĘŚCI GARDEROBY'?
Which of the following would be considered 'CZĘŚCI GARDEROBY'?
If someone is looking for 'buty za kostkę, kozaki', what type of footwear are they interested in?
If someone is looking for 'buty za kostkę, kozaki', what type of footwear are they interested in?
What is the Polish word for 'hoody'?
What is the Polish word for 'hoody'?
What is the appropriate term for someone in their 'twenties'?
What is the appropriate term for someone in their 'twenties'?
Which of the following would describe someone's 'wzrost'?
Which of the following would describe someone's 'wzrost'?
If a person has 'pełne usta', which of the following best describes them?
If a person has 'pełne usta', which of the following best describes them?
Flashcards
Shirt
Shirt
A garment for the upper body
Shorts
Shorts
Short trousers.
Trousers
Trousers
A piece of clothing that covers the legs.
Jeans
Jeans
A dress made of denim
Signup and view all the flashcards
Sweater
Sweater
A garment worn on the upper body to keep warm.
Signup and view all the flashcards
Raincoat
Raincoat
Outerwear to protect from rain.
Signup and view all the flashcards
Socks
Socks
Clothing worn on the feet inside shoes.
Signup and view all the flashcards
Boots
Boots
Footwear covering the whole foot and lower leg.
Signup and view all the flashcards
High heels
High heels
Footwear with a raised heel.
Signup and view all the flashcards
Shoes
Shoes
Footwear with laces or straps.
Signup and view all the flashcardsStudy Notes
Multiple Integrals: Application to Center of Mass
- In one dimension, the center of mass for $n$ particles is calculated as $\bar{x} = \frac{\sum_{i=1}^{n} m_i x_i}{\sum_{i=1}^{n} m_i} = \frac{\sum_{i=1}^{n} m_i x_i}{M}$, where $M$ is the total mass.
- For a continuous mass distribution along a line, the center of mass is $\bar{x} = \frac{\int x \rho(x) dx}{\int \rho(x) dx} = \frac{\int x \rho(x) dx}{M}$, with $M = \int \rho(x) dx$ being the total mass and $\rho(x)$ the density.
Center of Mass in Two Dimensions
- For a thin plate with density $\rho(x, y)$, the mass is $M = \iint_D \rho(x, y) dA$.
- The moments about the x and y axes are $M_x = \iint_D y \rho(x, y) dA$ and $M_y = \iint_D x \rho(x, y) dA$ respectively.
- The coordinates for the center of mass are given by $\bar{x} = \frac{M_y}{M} = \frac{\iint_D x \rho(x, y) dA}{\iint_D \rho(x, y) dA}$ and $\bar{y} = \frac{M_x}{M} = \frac{\iint_D y \rho(x, y) dA}{\iint_D \rho(x, y) dA}$.
Example: Center of Mass of a Lamina
- Consider a lamina bounded by $y = x^2$ and $y = 4$ with density $\rho(x, y) = x$.
- The region D is bounded by the parabola $y = x^2$ and the line $y = 4$, with intersection points at $(-2, 4)$ and $(2, 4)$.
- As the integral is performed over a region symmetric about the y-axis with x taking +ve abd -ve values, we consider density $\rho(x, y) = |x|$.
- $M = \iint_D |x| dA = \int_{-2}^{2} \int_{x^2}^{4} |x| dy dx = 8$
- $M_y = \iint_D x|x| dA = \int_{-2}^{2} \int_{x^2}^{4} x|x| dy dx = 0$
- Compute $M_x: M_x = \iint_D y|x| dA = \int_{-2}^{2} \int_{x^2}^{4} y|x| dy dx = \frac{64}{3}$
- The center of mass is $(\bar{x}, \bar{y}) = (0, \frac{8}{3})$.
Triple Integrals
- Triple integrals are used to calculate properties in three dimensions.
- Volume is found by $V = \iiint_E dV$ and mass by $m = \iiint_E \rho(x, y, z) dV$.
Example: Evaluation of a Triple Integral
- Integrate $\iiint_E (x + 2y) dV$ over the region $E$ bounded by $x^2 + y^2 = 4$, $z = 0$, and $z = y + 3$.
- Region E is a cylinder with radius 2, bounded by $z = 0$ and $z = y + 3$.
- Using cylindrical coordinates, the integral becomes $\int_{0}^{2\pi} \int_{0}^{2} \int_{0}^{r\sin\theta + 3} (r\cos\theta + 2r\sin\theta) r dz dr d\theta = 8\pi$.
Angoli (Angles)
- Angles are measured in degrees or radians, with a full circle being 360° or $2\pi$ radians.
- Conversion from degrees to radians is $\alpha \text{ (in gradi)} = \frac{\alpha \pi}{180} \text{ (in radianti)}$.
Funzioni trigonometriche (Trigonometric functions)
- For a circle of radius 1 centered at the origin, a point P has coordinates defined by $\cos(\theta)$ (x-coordinate) and $\sin(\theta)$ (y-coordinate), where $\theta$ is the angle between OP and the x-axis.
- Values: $\sin(0) = 0$, $\cos(0) = 1$, $\sin(\frac{\pi}{6}) = \frac{1}{2}$, $\cos(\frac{\pi}{6}) = \frac{\sqrt{3}}{2}$, $\sin(\frac{\pi}{4}) = \frac{\sqrt{2}}{2}$, $\cos(\frac{\pi}{4}) = \frac{\sqrt{2}}{2}$, $\sin(\frac{\pi}{3}) = \frac{\sqrt{3}}{2}$, $\cos(\frac{\pi}{3}) = \frac{1}{2}$, $\sin(\frac{\pi}{2}) = 1$, $\cos(\frac{\pi}{2}) = 0$.
Altre funzioni trigonometriche (Other trigonometric functions)
- $\tan(\theta) = \frac{\sin(\theta)}{\cos(\theta)}$
- $\cot(\theta) = \frac{\cos(\theta)}{\sin(\theta)}$
- $\sec(\theta) = \frac{1}{\cos(\theta)}$
- $\csc(\theta) = \frac{1}{\sin(\theta)}$
Formule trigonometriche (Trigonometric formulas)
- $\sin^2(\theta) + \cos^2(\theta) = 1$
- $\sin(\alpha \pm \beta) = \sin(\alpha)\cos(\beta) \pm \cos(\alpha)\sin(\beta)$
- $\cos(\alpha \pm \beta) = \cos(\alpha)\cos(\beta) \mp \sin(\alpha)\sin(\beta)$
- $\sin(2\alpha) = 2\sin(\alpha)\cos(\alpha)$
- $\cos(2\alpha) = \cos^2(\alpha) - \sin^2(\alpha)$
Periodicità (Periodicity)
- $\sin(\theta + 2\pi) = \sin(\theta)$
- $\cos(\theta + 2\pi) = \cos(\theta)$
- $\tan(\theta + \pi) = \tan(\theta)$
What is Python?
- Python is a programming language created by Guido van Rossum in 1991.
- It excels in web development (server-side), software creation, mathematics, and system scripting.
What can Python do?
- Web applications.
- Software workflows.
- Interact with database systems.
- Big data handling and complex math.
- Rapid prototype or production-ready software.
Why Python?
- Cross-platform compatibility (Windows, Mac, Linux, Raspberry Pi, etc.).
- Simple, English-like syntax.
- Concise code.
- Interpreted execution for quick feedback.
- Supports procedural, object-oriented, or functional paradigms.
Syntax Comparison
- Designed for readability, similar to English.
- Uses newlines for command completion.
- Uses indentation (whitespace) to define scope.
Python - Getting Started
- An interpreter is required to execute Python code.
Python on the Command Line
- Open the command line and type
python
. This will open the Python interpreter, indicated by>>>
. - Type
exit()
and press Enter to exit the Python command line.
Python in a File
- Python code can be executed from a file with a
.py
extension. - Run the file from the command line using
python filename.py
.
Comments
- Comments in Python serve as documentation for the code.
Single-line comments
- Start with a
#
. - Python ignores everything after the
#
on that line.
Multi-line comments
- Achieved by using a
#
per line or by using triple-quoted strings (which Python ignores if unassigned).
Variables
- Variables store data values; no explicit declaration is needed.
- A variable is created when you first assign it a value.
- Variables can change data types after assignment.
- Variable names are case-sensitive.
Variable names
- Must start with a letter or underscore (_).
- Cannot start with a number.
- Can only contain alphanumeric characters and underscores.
- Are case-sensitive.
Data Types
- Python has built-in data types for various purposes.
Text Types
str
for strings.
Numeric Types
int
for integers,float
for floating-point numbers, andcomplex
for complex numbers.
Sequence Types
list
,tuple
, andrange
.
Mapping Types
dict
for dictionaries.
Set Types
set
andfrozenset
.
Boolean Types
bool
for boolean values (True or False).
Binary Types
bytes
,bytearray
, andmemoryview
.- The
type()
function returns the data type of an object.
Numbers
int
: Whole numbers of unlimited lengthfloat
: Numbers with decimal points, can also be scientific notation using "e".complex
: Numbers use "j" to indicate their imaginary part.
Type Conversion
int()
,float()
, andcomplex()
can convert between types.
Strings
- Represented by text surrounded by single or double quotes.
- Multi-line strings can be assigned using triple quotes (""" or ''').
Strings are Arrays
- Strings act as arrays of Unicode characters.
- Individual characters can be accessed using brackets
[]
.
Substring
- A range of characters can be returned using slice notation. Example: string[2:5].
String Length
- The
len()
function returns the number of characters in a string.
String Methods
- Various built-in methods:
capitalize()
,casefold()
,center()
,count()
,encode()
,endswith()
,expandtabs()
,find()
,format()
,format_map()
,index()
,isalnum()
,isalpha()
,isascii()
,isdecimal()
,isdigit()
,isidentifier()
,islower()
,isnumeric()
,isprintable()
,isspace()
,istitle()
,isupper()
,join()
,ljust()
,lower()
,lstrip()
,maketrans()
,partition()
,replace()
,rfind()
,rindex()
,rjust()
,rpartition()
,rsplit()
,rstrip()
,split()
,splitlines()
,startswith()
,strip()
,swapcase()
,title()
,translate()
,upper()
, andzfill()
.
String Formatting
- To control how strings are displayed, use the
format()
method. - Placeholders marked with
{}
are replaced by arguments to the method. - Numbered placeholders
{0}
,{1}
allow control over argument order.
Boolean Operators
- Used to compare values:
==
- name: Equal
- syntax:
x == y
!=
- name: Not equal
- syntax:
x != y
>
- name: Greater than
- syntax:
x > y
>=
- name: Greater than or equal to
- syntax:
x >= y
<
- name: Less than
- syntax: `x 0$ for $t 0$ and $t 0$ (events rarely occur simultaneously).
- Independent Increments: The number of events occurring in disjoint time intervals are independent.
- Stationary Increments: The distribution of events in an interval depends only on the length of the interval.
- Poisson Process: The number of events in the interval $[t, t+x]$, denoted as $N(t+x) - N(t)$, follows a Poisson distribution with parameter $\lambda x$.
-
i.e. $P{N(t+x)-N(t)=n}=e^{-\lambda x}\frac{{(\lambda x)}^n}{n!}$
-
$E[N(t)] = \lambda t$
-
$\operatorname{Var}[N(t)] = \lambda t$
Interarrival Times
- $T_1, T_2,...$ represent the times between events.
- They are independent, exponentially distributed with parameter $\lambda$ so $f_{T_1}(t)= \lambda e^{-\lambda t}$ for $t > 0 ; i = 1,2,...$
Waiting Times
- $S_n$ represents the time it takes for the $n$th event to occur.
- Has a gamma distribution where $f_{s_n}(t) = \lambda e^{-\lambda t} \frac{{(\lambda t)}^{n-1}}{(n-1)!} ;$ $t> 0$
Theorem
- When you are given N(t) = n, then n arrival times $S_1, S_n$ have same distribution as $n$ independent RV that are uniformly distributed on (0, t).
Lecture 14 Summary: Algorithmic Game Theory
- Focus on designing mechanisms without monetary transfers, relevant in scenarios like organ donation or student assignments.
Kidney Exchange
- Incompatible patient-donor pairs can exchange kidneys to enable transplants.
- Graph representation: nodes are patient-donor pairs, edges indicate compatibility.
- Objective: find the maximum number of disjoint cycles, representing exchanges.
- Complexity: NP-hard problem, except for 2-cycles and 3-cycles, which can be solved in polynomial time.
- Methods to determine the number of 2-cycles via maximum weight matching in a graph
- Pools: patients without compatible donors can enter a pool; deceased donors can also donate.
- Priority is given to patients who have waited longer.
National Kidney Registry (NKR) & United Network for Organ Sharing (UNOS)
- The NKR facilitates kidney exchanges in the U.S.
- UNOS manages the organ transplant system in the U.S.
Top Trading Cycle Algorithm
- Assigning items to agents with preferences.
- Algorithm: agents point to their most preferred item, cycles are formed, items exchanged, agents removed.
Top Trading Cycle Algorithm example
- Each agent receives his most preferred object
- Can occur via pareto efficient and strategy-proof methods
Proof of Strategy-proofness
- Showing that no agent can get a better object by misreporting preferences.
Boston Mechanism
- Assigns students to schools based on student preferences and school priorities.
Algorithm
Each student applies to their most preferred school. Schools admit students by priority until full. Students not admitted apply to their second choice, and so on.
Properties
- Not strategy-proof.
Deferred Acceptance Algorithm (Gale-Shapley)
- Algorithm: students apply to schools, schools tentatively admit based on priority, rejected students apply to their next choice
- Each student applies to his most preferred school.
- Each school tentatively admits students according to its priority ordering until it is full.
- Each school rejects the students it cannot admit.
- Each student applies to his next most preferred school.
- Repeat until all students have been admitted to a school.
Properties
- Strategy-proof for students.
- Not strategy-proof for schools.
Stable Matching
- No student and school both prefer each other to their current assignment.
- The deferred acceptance algorithm produces a stable matching.
Course Project Brainstorming
- Ideas for student course projects.
Poisson Process
- A stochastic process {N(t), t >= 0} that counts the number of events occurring over time.
- A Poisson process is a counting process, so # of all events that have occured up until time t.
- Requires: N(0) = 0 where Increments are $N(t+s) - N(s)$.
Poisson Process Assumptions
- Rare events For a very short time, there is at most 1 event. Where $P(N(t, t+ \Delta t) >= 2) = o(\Delta t)$ for $t >= 0$. and $t 0.
Studying That Suits You
Use AI to generate personalized quizzes and flashcards to suit your learning preferences.