text:
# Multi File Renamer

July 23, 2010 at 10:55:31
Specs: Windows XP
 So, these have been asked before, and I have looked, but couldn't find what I want.I want to know how to rename many files with different extensions, to the same/similar name, & extension. Por exemple:New Bitmap Image.bmpNew Bitmap Image (2).bmpNew Bitmap Image (3).bmpNew Bitmap Image (4).bmpNew JPEG Image.bmpNew JPEG Image (2).bmpNew JPEG Image (3).bmpNew JPEG Image (4).bmpwould all rename to:1.png2.png3.png4.png5.png6.png7.png8.pngI did have a batch file which did this, but I have lost it, and I can't find it again.Please help?!

See More: Multi File Renamer

#1
July 23, 2010 at 11:03:42
 Oops. They were supoed to beNew JPEG Image.jpgNew JPEG Image (2)jpgNew JPEG Image (3).jpgNew JPEG Image (4).jpgbut still renaming to1.png2.pngetc...

Report •

#2
July 23, 2010 at 11:10:53
 Have alook at this listhttp://www.snapfiles.com/downloadfi... A thank you would be nice, if I have helped.

Report •

#3
July 23, 2010 at 11:58:09
 Thanx. I would MUCH prefer the batch version which you can write yourself! I don't want to be dowloading to get to do it. I got the script before and it worked, but I just don't know where I got it from...I downloaded a batch one from the list, and:"SpaceRemoverComponent 'MSCOMCTL.OCX' or one of its dependencies not correctly registered: a file is missing or invalid"Yep. A batch file to write oneself, would work. Also, if I'm on a PC where I can't install things, such as someone else's or work/college etc... and need to rename... the batch version one could write oneself would work.

Report •
Related Solutions


text:
# Development and Cross-Cultural Validity of a Brief Measure of Separation-Individuation

### Abstract

Separation from parents is a key aspect of adolescent development and has been linked to a variety of important mental and behavioral health outcomes. Separation-individuation measures were developed in the United States and have been used in Asian contexts. However, no cross-cultural studies have demonstrated that measures of separation-individuation tap the same domains across Asian and American adolescents. This article describes two studies conducted to develop and initially validate a scale for measuring adolescent separation-individuation. Study 1 ($n$ = 300) developed a Brief Measure of Separation-Individuation (BMSI) using Confirmatory Factor Analysis and Item Response Theory. The result was a 32-item BMSI that provided comparable test information to the original 148-item measure. Study 2 examined the BMSI for measurement invariance and convergent validity across U.S. and Taiwanese samples ($n$s = 231 and 323). Findings suggest that functional independence, attitudinal independence, and emotional independence may be culturally invariant separation-individuation constructs. However, conflictual independence seems to be more culturally dependent in that its items were only partially scalar invariant and it was only loosely related to the other separation-individuation factors. Findings are consistent with previous research that recommended against using total scores for the PSI (i.e., scoring a single separation-individuation dimension). This study suggests the BMSI holds promise as a brief measure of separation-individuation that can be used in cross-cultural research.

Type
Publication
In Journal of Child and Family Studies
comments powered by Disqus

format: plain


text:
Home » Rating Methods » Rating Method Sovereign Wikirating Index (SWI)

Rating Method Sovereign Wikirating Index (SWI)

Criteria and Base-Data

The Sovereign Wikirating Index (SWI) is a framework which evaluates the credit rating of sovereign countries/territories based on economic indicators. The following five mid-term and three long-term criteria are used:

The resulting value is calibrated by multiplying it with a ‘scaling factor’, which is composed by three long-term indicators, the Human Development Index (HDI), the Corruption Perceptions Index (CPI) and the Economic Freedom Index (EFI). Originally, the third index Political Instability Index was used for the first version of the SWI[1]Unfortunately this index has not been updated since 2010 from “The Economist”, therefore it has been removed as criteria from the SWI, and the ratings for 2011 are retroactively … Continue reading. Each criterium is calibrated with respect to the relative minimum and maximum value of all countries. For some criterion a threshold value is defined in order to avoid distorted values.

Short TitleLong TitleValueWeightReal MinReal MaxSWI MinSWI Max
HDIHuman Development IndexWeighted index of development indicators50%01[2]Raw Data of social scaling factors is divided by the Real Max value to normalize the input.01
CPICorruption Perceptions IndexIndex of perceived corruption30%010[3]Raw Data of social scaling factors is divided by the Real Max value to normalize the input.01
EFIEconomic Freedom IndexIndex of economic freedom20%010[4]Raw Data of social scaling factors is divided by the Real Max value to normalize the input.01
PIIPolitical Instability IndexIndex of political instability (not used any more)[5]Unfortunately this index has not been updated since 2010 from “The Economist”, therefore it has been removed as criteria from the SWI, and the ratings for 2011 are retroactively … Continue reading010[6]Raw Data of social scaling factors is divided by the Real Max value to normalize the input.01
PDPublic DebtDebt/GDP as %, reflects the economies ability to honour loans.40%00.22.0
ABCurrent Account BalanceCurrent account balance as % of GDP, reflects foreign inflows and outflows.15%-∞-0.20.2
PGGDP GrowthDomestic growth an an annual %15%-1-0.030.06
IRConsumer Price IndexConsumer Price index as %15%-10.020.2
URUnemployment RateRate of unemployment as %15%010.020.3
RRatingResult of SWI calculation as %0101

Formula

DefinitionExplanation

Let c be an element in the set of countries C:

c \in \left\{ \mathbf{C} \right\}
That means that every c is a country.

Let R be the vector of ratings, so that

\forall c:\ R_c \in \left[0,1\right] \subset \R
That means that Rc is the rating for the country c and every rating is ranging from 0 to 100%.
Let \operatorname{dim}\left(v\right) be the dimension of vThe function \operatorname{dim} basically counts the number of elements in the vector. In example, \operatorname{dim}\left( R \right) is the total number of ratings and thus the number of rated countries.
Let \operatorname{min}\left(v\right) the minimal, and \operatorname{max}\left(v\right)the maximal value of vThese functions find the smallest and the biggest number in a set of numbers, such as a vector. This is needed for normalization.
\operatorname{norm}(v) = \frac{v-\min(v)}{\max(v)-\min(v)}We are defining a scale-normalizating function on an vector v.
Let \operatorname{B}(x) = {\mathbf C} \times \left\{ \mathrm{HDI, CPI, EFI, PD, AB, PG, IR, UR} \right\}x is a matrix. We define the base B of this matrix, so that it contains vectors with factors for individual countries in the direction x_c, while the economic and social factors are in direction x^i.
Let s\in\left\{\mathrm{HDI,CPI,EFI}\right\} and e\in\left\{\mathrm{PD,AB,PG,IR,UR}\right\}s is an indexer for the social factors and e is the indexer for economic factors.
w^\mathrm{HDI} = 50%, w^\mathrm{CPI} = 30%, w^\mathrm{EFI} = 20%, w^\mathrm{PD} = 40%, w^\mathrm{AB} = 15%, w^\mathrm{PG} = 15%, w^\mathrm{IR} = 10%, w^\mathrm{UR} = 15%Applying the weights. The vector w^i contains the (scalar) weights for the individual economic and social factors.
r = \left( x^s\,w^s \right) \cdot \left( x^e\,w^e \right)By using the Einstein notation, we weight and sum the social factors to get the scaling factor. We also weight and sum the economic factors. Then we multiply the two results.
R = \operatorname{norm}\left(r\right) + \left(1-n \right)\cdot \left( 1-\operatorname{norm}\left(r\right) \right)We finally do some normalisation on the rating r, so that the resulting values are ranging from 0 to 100% and the values represent the performance relative to the other rated countries. The result of this formula is the SWI rating R. n is a vector that contains the number of given ratings for a specific country and thus the trust in the values.

Calculation

General Variable Modifiers
For example, the variable AB.

• AB = Number used in calculations for SWI.
• rAB = Raw or real value, actual data from source in whichever format it is acquired.
• wAB = Weighting value for the data.
• minAB = Floor value of variable, will cause ABC to equal 0 or 100 if ABC is below this value.
• maxAB = Ceiling value of variable, will cause ABC to equal 0 or 100 if ABC is above this variable.
• nAB = Number of ratings (for rating)

So for instance, if the real value (rAB) was 4 on a 10 point scale, this would be divided by 10 to create the value for calculations (AB) which, in calculations, is multiplied by the weighting (e.g. 0.5 for 50% weight.)


text:
# Using chain rule to differentiate x^x

1. Oct 7, 2009

### Shakas

1. The problem statement, all variables and given/known data

Use the chain rule to find (d/dx)(xx) by using the function f(y,z)=yz.

2. Relevant equations

Chain rule: $$\frac{dz}{dt}$$ = $$\frac{\partial z}{\partial x}$$ $$\frac{dx}{dt}$$ + $$\frac{\partial z}{\partial y}$$ $$\frac{dy}{dt}$$

3. The attempt at a solution

I honestly have no clue on how to use chain rule in this problem. I have spent about an hour trying to set up a chain rule equation and I have given up hope on finding one.

The partial derivatives of f(y,z) are:
$$\frac{\partial x}{\partial y}$$ = zyz-1
$$\frac{\partial x}{\partial z}$$ = yzln(y)

I have a strong feeling that I need to set up parametric equations somewhere to cancel out and get dy/dx, but I can't seem to find any possible way.

I know how to find the derivative using one-variable calculus, and it comes to out be [dy/dz = xx(1+ln(x))]. Any hints on how to setup a chain rule equation would be greatly appreciated, thank you.

Last edited: Oct 7, 2009
2. Oct 7, 2009

### slider142

Let y(t) = t and let z(t) = t. What you're looking for is then df/dt, which the fits the chain rule you posted nicely.

3. Oct 8, 2009

### Shakas

Alright so taking it a step further:

$$\frac{df}{dt} = \frac{\partial f}{\partial y} \frac{dy}{dt} + \frac{\partial f}{\partial z} \frac{dz}{dt}$$

$$y(t)=t$$

$$z(t)=t$$

$$\frac{dy}{dt} = 1$$

$$\frac{dz}{dt} = 1$$

$$\frac{df}{dt} = \frac{\partial f}{\partial y}$$ + $$\frac{\partial f}{\partial z}$$

$$\frac{df}{dt} = zy^z-1 + y^z ln(y)$$

$$\frac{df}{dt} = \frac{zy^z}{y} + y^z ln(y)$$

$$\frac{df}{dt} = y^z (\frac{z}{y} + ln(y))$$

$$y=x$$

$$z=x$$

$$\frac{dy}{dx} = x^x (\frac{x}{x} + ln(x))$$

$$\frac{dy}{dx} = x^x (1+ln(x))$$

Thank you very much for your help.

4. Oct 8, 2009

### blake knight

The answer to your problem: (d/dx)(x^x) = y(x^x)....z is to be cancelled out along the operations..try differentiating both sides of the equations.

First let y=x^x and
f(y,z)=u=y^z--->from here solve for y in terms of z, you can do that by getting the ln of both sides.
You will arrive at having: y=e^lnu.

Hope this could be of any help.


text:
# American Institute of Mathematical Sciences

July  2015, 35(7): 3059-3086. doi: 10.3934/dcds.2015.35.3059

## On regular solutions of the $3$D compressible isentropic Euler-Boltzmann equations with vacuum

 1 Department of Mathematics and Key Lab of Scientific and Engineering Computing (MOE), Shanghai Jiao Tong University, Shanghai 200240 2 Department of Mathematics, Shanghai Jiao Tong University, Shanghai 200240, China

Received  September 2013 Revised  November 2014 Published  January 2015

In this paper, we discuss the Cauchy problem for the compressible isentropic Euler-Boltzmann equations with vacuum in radiation hydrodynamics. We establish the existence of a unique local regular solution with vacuum by the theory of quasi-linear symmetric hyperbolic systems and some techniques dealing with the complexity caused by the coupling between fluid and radiation field under some physical assumptions for the radiation quantities. Moreover, it is interesting to show the non-global existence of regular solutions caused by the effect of vacuum for polytropic gases with adiabatic exponent $1<\gamma\leq 3$ via some observations on the propagation of the radiation field. Compared with [11][15][20], some new initial conditions that will lead to the finite time blow-up for classical solutions have been introduced. These blow-up results tell us that the radiation effect on the fluid is not strong enough to prevent the formation of singularities caused by the appearance of vacuum.
Citation: Yachun Li, Shengguo Zhu. On regular solutions of the $3$D compressible isentropic Euler-Boltzmann equations with vacuum. Discrete & Continuous Dynamical Systems, 2015, 35 (7) : 3059-3086. doi: 10.3934/dcds.2015.35.3059
##### References:

show all references

##### References:
 [1] Yachun Li, Shengguo Zhu. Existence results for compressible radiation hydrodynamic equations with vacuum. Communications on Pure & Applied Analysis, 2015, 14 (3) : 1023-1052. doi: 10.3934/cpaa.2015.14.1023 [2] Xin Zhong. A blow-up criterion of strong solutions to two-dimensional nonhomogeneous micropolar fluid equations with vacuum. Discrete & Continuous Dynamical Systems - B, 2020, 25 (12) : 4603-4615. doi: 10.3934/dcdsb.2020115 [3] Jens Lorenz, Wilberclay G. Melo, Natã Firmino Rocha. The Magneto–Hydrodynamic equations: Local theory and blow-up of solutions. Discrete & Continuous Dynamical Systems - B, 2019, 24 (8) : 3819-3841. doi: 10.3934/dcdsb.2018332 [4] Françoise Demengel, O. Goubet. Existence of boundary blow up solutions for singular or degenerate fully nonlinear equations. Communications on Pure & Applied Analysis, 2013, 12 (2) : 621-645. doi: 10.3934/cpaa.2013.12.621 [5] Peng Jiang. Global well-posedness and large time behavior of classical solutions to the diffusion approximation model in radiation hydrodynamics. Discrete & Continuous Dynamical Systems, 2017, 37 (4) : 2045-2063. doi: 10.3934/dcds.2017087 [6] Xiaojing Xu. Local existence and blow-up criterion of the 2-D compressible Boussinesq equations without dissipation terms. Discrete & Continuous Dynamical Systems, 2009, 25 (4) : 1333-1347. doi: 10.3934/dcds.2009.25.1333 [7] Xi Tu, Zhaoyang Yin. Local well-posedness and blow-up phenomena for a generalized Camassa-Holm equation with peakon solutions. Discrete & Continuous Dynamical Systems, 2016, 36 (5) : 2781-2801. doi: 10.3934/dcds.2016.36.2781 [8] Ronghua Jiang, Jun Zhou. Blow-up and global existence of solutions to a parabolic equation associated with the fraction p-Laplacian. Communications on Pure & Applied Analysis, 2019, 18 (3) : 1205-1226. doi: 10.3934/cpaa.2019058 [9] Mingyou Zhang, Qingsong Zhao, Yu Liu, Wenke Li. Finite time blow-up and global existence of solutions for semilinear parabolic equations with nonlinear dynamical boundary condition. Electronic Research Archive, 2020, 28 (1) : 369-381. doi: 10.3934/era.2020021 [10] Akmel Dé Godefroy. Existence, decay and blow-up for solutions to the sixth-order generalized Boussinesq equation. Discrete & Continuous Dynamical Systems, 2015, 35 (1) : 117-137. doi: 10.3934/dcds.2015.35.117 [11] Shu-Xiang Huang, Fu-Cai Li, Chun-Hong Xie. Global existence and blow-up of solutions to a nonlocal reaction-diffusion system. Discrete & Continuous Dynamical Systems, 2003, 9 (6) : 1519-1532. doi: 10.3934/dcds.2003.9.1519 [12] Xiumei Deng, Jun Zhou. Global existence and blow-up of solutions to a semilinear heat equation with singular potential and logarithmic nonlinearity. Communications on Pure & Applied Analysis, 2020, 19 (2) : 923-939. doi: 10.3934/cpaa.2020042 [13] Binbin Shi, Weike Wang. Existence and blow up of solutions to the $2D$ Burgers equation with supercritical dissipation. Discrete & Continuous Dynamical Systems - B, 2020, 25 (3) : 1169-1192. doi: 10.3934/dcdsb.2019215 [14] Hua Chen, Huiyang Xu. Global existence and blow-up of solutions for infinitely degenerate semilinear pseudo-parabolic equations with logarithmic nonlinearity. Discrete & Continuous Dynamical Systems, 2019, 39 (2) : 1185-1203. doi: 10.3934/dcds.2019051 [15] Daniele Bartolucci, Changfeng Gui, Yeyao Hu, Aleks Jevnikar, Wen Yang. Mean field equations on tori: Existence and uniqueness of evenly symmetric blow-up solutions. Discrete & Continuous Dynamical Systems, 2020, 40 (6) : 3093-3116. doi: 10.3934/dcds.2020039 [16] Mingzhu Wu, Zuodong Yang. Existence of boundary blow-up solutions for a class of quasiliner elliptic systems for the subcritical case. Communications on Pure & Applied Analysis, 2007, 6 (2) : 531-540. doi: 10.3934/cpaa.2007.6.531 [17] Vo Anh Khoa, Le Thi Phuong Ngoc, Nguyen Thanh Long. Existence, blow-up and exponential decay of solutions for a porous-elastic system with damping and source terms. Evolution Equations & Control Theory, 2019, 8 (2) : 359-395. doi: 10.3934/eect.2019019 [18] Claudianor O. Alves, M. M. Cavalcanti, Valeria N. Domingos Cavalcanti, Mohammad A. Rammaha, Daniel Toundykov. On existence, uniform decay rates and blow up for solutions of systems of nonlinear wave equations with damping and source terms. Discrete & Continuous Dynamical Systems - S, 2009, 2 (3) : 583-608. doi: 10.3934/dcdss.2009.2.583 [19] Xiaoli Zhu, Fuyi Li, Ting Rong. Global existence and blow up of solutions to a class of pseudo-parabolic equations with an exponential source. Communications on Pure & Applied Analysis, 2015, 14 (6) : 2465-2485. doi: 10.3934/cpaa.2015.14.2465 [20] Wenjun Liu, Jiangyong Yu, Gang Li. Global existence, exponential decay and blow-up of solutions for a class of fractional pseudo-parabolic equations with logarithmic nonlinearity. Discrete & Continuous Dynamical Systems - S, 2021  doi: 10.3934/dcdss.2021121

2020 Impact Factor: 1.392


text:
### 题目

The highest building in our city has only one elevator. A request list is made up with N positive numbers. The numbers denote at which floors the elevator will stop, in specified order. It costs 6 seconds to move the elevator up one floor, and 4 seconds to move down one floor. The elevator will stay for 5 seconds at each stop.

For a given request list, you are to compute the total time spent to fulfill the requests on the list. The elevator is on the 0th floor at the beginning and does not have to return to the ground floor when the requests are fulfilled.

Input Specification:
Each input file contains one test case. Each case contains a positive integer N, followed by N positive numbers. All the numbers in the input are less than 100.

Output Specification:
For each test case, print the total time on a single line.

Sample Input:
3 2 3 1
Sample Output:
41

### 代码

#include <iostream>
using namespace std;

int main() {

int n;
cin >> n;
// 刚开始在第0层
int now = 0, next;
int time = 0;
for (int i = 0; i < n; ++i) {
cin >> next;
// 向上一层6s
if (next > now)
time += (next - now) * 6;
// 向下一层4s
else if (next < now)
time += (now - next) * 4;
// 到达后停留5s
time += 5;
// 移动当前位置
now = next;
}
cout << time;
return 0;
}

Q.E.D.

Think twice, code once.


text:
## Revista Matemática Iberoamericana

### Isoperimetry for spherically symmetric log-concave probability measures

Nolwen Huet

#### Abstract

We prove an isoperimetric inequality for probability measures $\mu$ on $\mathbb{R}^n$ with density proportional to $\exp(-\phi(\lambda |x|))$, where $|x|$ is the euclidean norm on $\mathbb{R}^n$ and $\phi$ is a non-decreasing convex function. It applies in particular when $\phi(x)=x^\alpha$ with $\alpha \ge 1$. Under mild assumptions on $\phi$, the inequality is dimension-free if $\lambda$ is chosen such that the covariance of $\mu$ is the identity.

#### Article information

Source
Rev. Mat. Iberoamericana, Volume 27, Number 1 (2011), 93-122.

Dates
First available in Project Euclid: 4 February 2011

Permanent link to this document
https://projecteuclid.org/euclid.rmi/1296828830

Mathematical Reviews number (MathSciNet)
MR2815733

Zentralblatt MATH identifier
1225.26035

#### Citation

Huet, Nolwen. Isoperimetry for spherically symmetric log-concave probability measures. Rev. Mat. Iberoamericana 27 (2011), no. 1, 93--122. https://projecteuclid.org/euclid.rmi/1296828830

#### References

• Ané, C., Blachère, S., Chafaï, D., Fougères, P., Gentil, I., Malrieu, F., Roberto, C. and Scheffer, G.: Sur les inégalités de Sobolev logarithmiques. Panoramas et Synthèses 10. Société Mathématique de France, Paris, 2000.
• Barthe, F.: Levels of concentration between exponential and Gaussian. Ann. Fac. Sci. Toulouse Math. 10 (2001), no. 3, 393-404.
• Barthe, F.: Log-concave and spherical models in isoperimetry. Geom. Funct. Anal. 12 (2002), no. 1, 32-55.
• Barthe, F.: Infinite dimensional isoperimetric inequalities in product spaces with the supremum distance. J. Theoret. Probab. 17 (2004), no. 2, 293-308.
• Barthe, F., Cattiaux, P. and Roberto, C.: Interpolated inequalities between exponential and Gaussian, Orlicz hypercontractivity and isoperimetry. Rev. Mat. Iberoamericana 22 (2006), no. 3, 993-1067.
• Barthe, F., Cattiaux, P. and Roberto, C.: Isoperimetry between exponential and Gaussian. Electron. J. Probab. 12 (2007), no. 44, 1212-1237.
• Barthe, F. and Roberto, C.: Sobolev inequalities for probability measures on the real line. Studia Math. 159 (2003), no. 3, 481-497.
• Bobkov, S.G.: Extremal properties of half-spaces for log-concave distributions. Ann. Probab. 24 (1996), no. 1, 35-48.
• Bobkov, S.G.: Isoperimetric and analytic inequalities for log-concave probability measures. Ann. Probab. 27 (1999), no. 4, 1903-1921.
• Bobkov, S.G.: Spectral gap and concentration for some spherically symmetric probability measures. In Geometric aspects of functional analysis, 37-43. Lecture Notes in Math. 1807. Springer, Berlin, 2003.
• Borell, C.: Convex measures on locally convex spaces. Ark. Mat. 12 (1974), 239-252.
• Gromov, M. and Milman, V.D.: A topological application of the isoperimetric inequality. Amer. J. Math. 105 (1983), no. 4, 843-854.
• Huet, N.: Inégalités géométriques pour des mesures log-concaves. PhD thesis. Université de Toulouse, 2009.
• Kannan, R., Lovász, L. and Simonovits, M.: Isoperimetric problems for convex bodies and a localization lemma. Discrete Comput. Geom. 13 (1995), no. 3-4, 541-559.
• Klartag, B.: A central limit theorem for convex sets. Invent. Math. 168 (2007), no. 1, 91-131.
• Latała, R. and Oleszkiewicz, K.: Between Sobolev and Poincaré. In Geometric aspects of functional analysis, 147-168. Lecture Notes in Math. 1745. Springer, Berlin, 2000.
• Ledoux, M.: The concentration of measure phenomenon. Mathematical Surveys and Monographs 89. American Mathematical Society, Providence, RI, 2001.
• Ledoux, M.: Spectral gap, logarithmic Sobolev constant, and geometric bounds. In Surveys in differential geometry. Vol. IX, 219-240. Surv. Differ. Geom., IX. Int. Press, Somerville, MA, 2004.
• Milman, E.: On the role of convexity in functional and isoperimetric inequalities. Proc. Lond. Math. Soc. (3) 99 (2009), no. 1, 32-66.
• Milman, E.: On the role of convexity in isoperimetry, spectral gap and concentration. Invent. Math. 177 (2009), no. 1, 1-43.
• Sodin, S.: An isoperimetric inequality on the $\ell_p$ balls. Ann. Inst. H. Poincaré Probab. Stat. 44 (2008), no. 2, 362-373.


text:
GMAT Question of the Day - Daily to your Mailbox; hard ones only

 It is currently 23 Oct 2019, 08:33

### GMAT Club Daily Prep

#### Thank you for using the timer - this advanced tool can estimate your performance and suggest more practice questions. We have subscribed you to Daily Prep Questions via email.

Customized
for You

we will pick new questions that match your level based on your Timer History

Track

every week, we’ll send you an estimated GMAT score based on your performance

Practice
Pays

we will pick new questions that match your level based on your Timer History

# Cole drove from home to work at an average speed of 75 kmh. He then

 new topic post reply Question banks Downloads My Bookmarks Reviews Important topics
Author Message
TAGS:

### Hide Tags

Intern
Joined: 10 Sep 2015
Posts: 26
Cole drove from home to work at an average speed of 75 kmh. He then  [#permalink]

### Show Tags

15 Sep 2015, 13:44
7
00:00

Difficulty:

45% (medium)

Question Stats:

67% (02:33) correct 33% (03:09) wrong based on 167 sessions

### HideShow timer Statistics

Cole drove from home to work at an average speed of 75 kmh. He then returned home at an average speed of 105 kmh. If the round trip took a total of 2 hours, how many minutes did it take Cole to drive to work?
A) 66
B) 70
C) 72
D) 75
E) 78

Source: GMAT Prep Now - http://www.gmatprepnow.com/module/gmat- ... /video/914
Intern
Joined: 20 Aug 2015
Posts: 4
Re: Cole drove from home to work at an average speed of 75 kmh. He then  [#permalink]

### Show Tags

16 Sep 2015, 01:36
3
3
[quote="skylimit"]Cole drove from home to work at an average speed of 75 kmh. He then returned home at an average speed of 105 kmh. If the round trip took a total of 2 hours, how many minutes did it take Cole to drive to work?
A) 66
B) 70
C) 72
D) 75
E) 78

Hi All,

Here is my first post...

I prefer to use the ratio approach when it is possible, in this case it is.

The ratios between the speeds Work:Home = 75:105 = 5:7
Given that the distance in both directions is the same, the ratios of times becomes Work:Home = 7:5 (inverse)

The total time is given 2 hours ==> , so: 2/12 *7 = 14/12 hours ==> Multiple by 5 to get minutes = 70/60 ==> Answer is 70 minutes.
##### General Discussion
Intern
Joined: 10 Sep 2015
Posts: 26
Re: Cole drove from home to work at an average speed of 75 kmh. He then  [#permalink]

### Show Tags

15 Sep 2015, 13:52
I tried solving the question by starting with this:
time to work + time home = 2
d/75 + d/105 = 2
105d/7875 + 75d/7875 = 15750
180d/7875 = 15750
180d = 7875*15750
I used my calculator for the rest and got d = 689062.5 which is obviously too big to work with the question.
So I stopped.
What went wrong?
Intern
Joined: 14 Jul 2015
Posts: 21
Location: India
Concentration: International Business, General Management
GMAT 1: 660 Q49 V32
WE: Business Development (Energy and Utilities)
Re: Cole drove from home to work at an average speed of 75 kmh. He then  [#permalink]

### Show Tags

15 Sep 2015, 14:55
1
Let the distance one way be x
Time from home to work = x/75
Time from work to home = x/105
Total time = 2 hrs
(x/75) + (x/105)= 2
Solving for x, we get x = 175/2

Time from home to work in minutes= (175/2)*60/75 = 70 minutes

Ans= B
Intern
Joined: 14 Jul 2015
Posts: 21
Location: India
Concentration: International Business, General Management
GMAT 1: 660 Q49 V32
WE: Business Development (Energy and Utilities)
Cole drove from home to work at an average speed of 75 kmh. He then  [#permalink]

### Show Tags

15 Sep 2015, 14:57
2
skylimit wrote:
I tried solving the question by starting with this:
time to work + time home = 2
d/75 + d/105 = 2
105d/7875 + 75d/7875 = 15750
180d/7875 = 15750
180d = 7875*15750
I used my calculator for the rest and got d = 689062.5 which is obviously too big to work with the question.
So I stopped.
What went wrong?

The error lies in your 2nd step- 105d/7875 + 75d/7875 = 15750

It should be 105d/7875 + 75d/7875 = 2

A better approach would be to take the common factors out. This way the calculation becomes much simpler. In this case taking common factor "15" out we get:

(1/15)*[(d/5)+(d/7)]= 2 --> (d/5)+(d/7)=30; which is much easier to solve manually. Remember, if you think you need a calculator on any GMAT question then probably your approach is not correct. There is always a way around.
Intern
Joined: 10 Sep 2015
Posts: 26
Re: Cole drove from home to work at an average speed of 75 kmh. He then  [#permalink]

### Show Tags

15 Sep 2015, 15:12
sunnysid wrote:
skylimit wrote:
I tried solving the question by starting with this:
time to work + time home = 2
d/75 + d/105 = 2
105d/7875 + 75d/7875 = 15750
180d/7875 = 15750
180d = 7875*15750
I used my calculator for the rest and got d = 689062.5 which is obviously too big to work with the question.
So I stopped.
What went wrong?

The error lies in your 2nd step- 105d/7875 + 75d/7875 = 15750

It should be 105d/7875 + 75d/7875 = 2

A better approach would be to take the common factors out. This way the calculation becomes much simpler. In this case taking common factor "15" out we get:

(1/15)*[(d/5)+(d/7)]= 2 --> (d/5)+(d/7)=30; which is much easier to solve manually. Remember, if you think you need a calculator on any GMAT question then probably your approach is not correct. There is always a way around.

Shoot! Nice catch. Thanks
Intern
Joined: 10 Sep 2015
Posts: 26
Re: Cole drove from home to work at an average speed of 75 kmh. He then  [#permalink]

### Show Tags

16 Sep 2015, 09:07
zurvy wrote:
The total time is given 2 hours ==> , so: 2/12 *7 = 14/12 hours ==> Multiple by 5 to get minutes = 70/60 ==> Answer is 70 minutes.

The inverse method is interesting and it seems pretty fast too.
I just don't understand the very last part above.
Why did you multiply 2/12 by 7 and then multiply by 5 to get minutes?
Intern
Joined: 20 Aug 2015
Posts: 4
Re: Cole drove from home to work at an average speed of 75 kmh. He then  [#permalink]

### Show Tags

16 Sep 2015, 23:34
1
skylimit wrote:
zurvy wrote:
The total time is given 2 hours ==> , so: 2/12 *7 = 14/12 hours ==> Multiple by 5 to get minutes = 70/60 ==> Answer is 70 minutes.

The inverse method is interesting and it seems pretty fast too.
I just don't understand the very last part above.
Why did you multiply 2/12 by 7 and then multiply by 5 to get minutes?

Hi there,

The ratio of time is as explained 5:7 during the entire trip , and it took a total of 2 hours ==> Imagine it like this, you have to split the 2 hours
with a ratio of 5:7 ==> The total parts would be in this case 5+7 = 12 ==> so The total time has to be divided first by 12, and then multiplied by 5.
If I told you to split 24 apples among two persons with a ratio of 5:7, you would first divide 24/12 (12=7+5) and than multiple by 5 and 7 respectively to get the answer.
24/12 * 5 = 10 for one person 24/12 * 7 = 14 for the other making a total of 24 apples.

Regarding the multiplication by 5, you need to convert 14/12 to fractions of 60 (so you get the minutes).
(5*14/5*12 = 70/60)
Or you could, 14/12 = 7/6 hour = 1 1/6 hour = 1 hour and 10 minutes = 70/60 hour (its just playing with fractions, and with time, having a denominator of 60, always
gives you the number of minutes at the top)
Intern
Joined: 10 Sep 2015
Posts: 26
Re: Cole drove from home to work at an average speed of 75 kmh. He then  [#permalink]

### Show Tags

17 Sep 2015, 10:06
zurvy wrote:
skylimit wrote:
zurvy wrote:
The total time is given 2 hours ==> , so: 2/12 *7 = 14/12 hours ==> Multiple by 5 to get minutes = 70/60 ==> Answer is 70 minutes.

The inverse method is interesting and it seems pretty fast too.
I just don't understand the very last part above.
Why did you multiply 2/12 by 7 and then multiply by 5 to get minutes?

Hi there,

The ratio of time is as explained 5:7 during the entire trip , and it took a total of 2 hours ==> Imagine it like this, you have to split the 2 hours
with a ratio of 5:7 ==> The total parts would be in this case 5+7 = 12 ==> so The total time has to be divided first by 12, and then multiplied by 5.
If I told you to split 24 apples among two persons with a ratio of 5:7, you would first divide 24/12 (12=7+5) and than multiple by 5 and 7 respectively to get the answer.
24/12 * 5 = 10 for one person 24/12 * 7 = 14 for the other making a total of 24 apples.

Regarding the multiplication by 5, you need to convert 14/12 to fractions of 60 (so you get the minutes).
(5*14/5*12 = 70/60)
Or you could, 14/12 = 7/6 hour = 1 1/6 hour = 1 hour and 10 minutes = 70/60 hour (its just playing with fractions, and with time, having a denominator of 60, always
gives you the number of minutes at the top)

Thanks zurvy!
I didn't realize you multiplied by 5 to get a denominator of 60.
Nice solution
VP
Joined: 07 Dec 2014
Posts: 1224
Cole drove from home to work at an average speed of 75 kmh. He then  [#permalink]

### Show Tags

17 Sep 2015, 17:00
let t=time to work
time to home (derived from inverse kmh ratio)=75t/105➡5t/7
t+5t/7=2 hours total time
t=7/6 hours➡70 minutes
Intern
Joined: 19 Mar 2014
Posts: 5
Re: Cole drove from home to work at an average speed of 75 kmh. He then  [#permalink]

### Show Tags

18 Sep 2015, 22:25
[quote="skylimit"]Cole drove from home to work at an average speed of 75 kmh. He then returned home at an average speed of 105 kmh. If the round trip took a total of 2 hours, how many minutes did it take Cole to drive to work?
A) 66
B) 70
C) 72
D) 75
E) 78

First round distance travelled (say) = d
Speed = 75 k/h
Time taken, T2 = d/75 hr

Second round distance traveled = d (same distance)
Speed = 105 k/h
Time taken, T2 = d/105 hr

Total time taken = 2 hrs
Therefore , 2 = d/75 + d/105
LCM of 75 and 105 = 525

2= d/75 + d/105
=> 2 = 7d/525 + 5d/525
=> d = 525 / 6 Km

Therefore, T1= d/75
=> T1 = 525 / (6 x 75)
=> T1 = (7 x 60) / 6 -- in minutes
=> T1 = 70 minutes.
Intern
Joined: 21 Feb 2016
Posts: 9
Location: United States (MA)
Cole drove from home to work at an average speed of 75 kmh. He then  [#permalink]

### Show Tags

30 Jun 2016, 11:53
Cole drove from home to work at an average speed of 75 kmh. He then returned home at an average speed of 105 kmh. If the round trip took a total of 2 hours, how many minutes did it take Cole to drive to work?
A) 66
B) 70
C) 72
D) 75
E) 78

Round-trip average speed: (2*75*105)/(75+105)=525/6
Round-trip time=2 hrs given
So round-trip distance=(526/6)*2=175 kms
Single-trip distance=175/2 kms...Time taken to cover this distance at 75kmph= (175/2)/75 hrs=70 mins.
Manager
Joined: 30 Apr 2013
Posts: 75
Re: Cole drove from home to work at an average speed of 75 kmh. He then  [#permalink]

### Show Tags

03 Oct 2017, 01:55
Time = distance /speed

So Lets consider D =100

Therefore , 100/75(60) +100/105(50)= 120 mins

Is the right way of thinking ?

Can someone please explain this with logic not formulas
Manager
Joined: 22 May 2015
Posts: 126
Re: Cole drove from home to work at an average speed of 75 kmh. He then  [#permalink]

### Show Tags

03 Oct 2017, 05:22
santro789 wrote:
Time = distance /speed

So Lets consider D =100

Therefore , 100/75(60) +100/105(50)= 120 mins

Is the right way of thinking ?

Can someone please explain this with logic not formulas

It is incorrect to assume the value of distance D as we have a constrain on time ( t1+t2 = 2 hours ).

We know the avg speed for first half is 75kmph => D = 75 * T1
We also know the avg speed for second half is 105kmph => D = 105*T2

Since the distance is same we can equate the above equations 75*T1 = 105*T2 => 5T1=7T2.
Now we know the total time taken is 2 hours => T1+T2 = 2
On solving we will get T1 = 7/6 hours which is 70 minutes.
_________________
Consistency is the Key
Target Test Prep Representative
Status: Founder & CEO
Affiliations: Target Test Prep
Joined: 14 Oct 2015
Posts: 8137
Location: United States (CA)
Re: Cole drove from home to work at an average speed of 75 kmh. He then  [#permalink]

### Show Tags

05 Oct 2017, 10:12
1
skylimit wrote:
Cole drove from home to work at an average speed of 75 kmh. He then returned home at an average speed of 105 kmh. If the round trip took a total of 2 hours, how many minutes did it take Cole to drive to work?
A) 66
B) 70
C) 72
D) 75
E) 78

We use the formula distance = rate x time, or equivalently, time = distance/rate. We can let the distance either way = d; thus, Cole’s time from home to work is d/75 and his time from work to home is d/105. The total travel time is given as 2 hours, so we have:

d/75 + d/105 = 2

Multiplying the entire equation by 525, we have:

7d + 5d = 1050

12d = 1050

d = 1050/12 = 525/6 = 175/2 km

Thus, it took him (175/2)/75 = 175/150 = 7/6 hours = 7/6 x 60 = 70 minutes.

_________________

# Scott Woodbury-Stewart

Founder and CEO

Scott@TargetTestPrep.com
122 Reviews

5-star rated online GMAT quant
self study course

See why Target Test Prep is the top rated GMAT quant course on GMAT Club. Read Our Reviews

If you find one of my posts helpful, please take a moment to click on the "Kudos" button.

Intern
Joined: 09 Dec 2013
Posts: 26
Cole drove from home to work at an average speed of 75 kmh. He then  [#permalink]

### Show Tags

Updated on: 11 Feb 2018, 20:29
Thanks

Originally posted by Buttercup3 on 05 Oct 2017, 17:19.
Last edited by Buttercup3 on 11 Feb 2018, 20:29, edited 1 time in total.
Senior SC Moderator
Joined: 22 May 2016
Posts: 3581
Cole drove from home to work at an average speed of 75 kmh. He then  [#permalink]

### Show Tags

05 Oct 2017, 19:03
1
skylimit wrote:
Cole drove from home to work at an average speed of 75 kmh. He then returned home at an average speed of 105 kmh. If the round trip took a total of 2 hours, how many minutes did it take Cole to drive to work?
A) 66
B) 70
C) 72
D) 75
E) 78

Source: GMAT Prep Now - http://www.gmatprepnow.com/module/gmat- ... /video/914

I avoid division if I can in RTD problems. I solved for time with multiplication. It's fast.

Total time = 2 hours

Let time from home to work = x
So time from work to home = (2-x)

Rate, home to work = 75 kmh
Rate, work to home = 105 kmh

$$r*t=D$$

D, home to work: (75*x)
D, work to home: (105)*(2-x)

$$D$$ is equal both ways, hence

$$75x = (105)(2-x)$$
$$75x = 210 - 105x$$
$$180x = 210$$

$$x = \frac{210}{180} = \frac{21}{18} =\frac{7}{6}hrs$$

Any fraction of an hour can be multiplied by 60 to obtain minutes.

$$x =\frac{7}{6}hrs * 60$$ = 70 minutes

_________________
SC Butler has resumed! Get two SC questions to practice, whose links you can find by date, here.

If you ask for kudos, you had better be ready to give them.

Instructions for living a life. Pay attention. Be astonished. Tell about it. -- Mary Oliver
SVP
Status: It's near - I can see.
Joined: 13 Apr 2013
Posts: 1686
Location: India
Concentration: International Business, Operations
Schools: INSEAD Jan '19
GPA: 3.01
WE: Engineering (Real Estate)
Re: Cole drove from home to work at an average speed of 75 kmh. He then  [#permalink]

### Show Tags

06 Mar 2019, 01:48
skylimit wrote:
Cole drove from home to work at an average speed of 75 kmh. He then returned home at an average speed of 105 kmh. If the round trip took a total of 2 hours, how many minutes did it take Cole to drive to work?
A) 66
B) 70
C) 72
D) 75
E) 78

Source: GMAT Prep Now - http://www.gmatprepnow.com/module/gmat- ... /video/914

Speed from home to work = 75 kmph

Say time spent = t hours

Therefore distance travelled = 75t kms

Speed from work to home = 105 kmph

Time spent = (2 - t) hours {as total time is 2 hours)

Distance travelled = 105 (t - 2) = 105t - 210 kms

As both distances are same, we can equate distances:

105t - 210 = 75t

t = 210/180 = 7/6

t = 7/6 * 60

t = 70 minutes

_________________
"Do not watch clock; Do what it does. KEEP GOING."
Re: Cole drove from home to work at an average speed of 75 kmh. He then   [#permalink] 06 Mar 2019, 01:48
Display posts from previous: Sort by

# Cole drove from home to work at an average speed of 75 kmh. He then

 new topic post reply Question banks Downloads My Bookmarks Reviews Important topics

 Powered by phpBB © phpBB Group | Emoji artwork provided by EmojiOne


text:
# Preprint of the project: SFB 701: Spectral Structures and Topological Methods in Mathematics - Project A2

## Numerical analysis of high-dimensional transfer operators

07-011 Thorsten Hüls.
Homoclinic trajectories of non-autonomous maps

For non-autonomous difference equations of the form $x_{n+1}=f(x_n,\lambda_n),\quad n\in\mathbb{Z},$ we consider homoclinic trajectories. These are pairs of trajectories that converge in both time directions towards each other. Assuming hyperbolicity, we derive a numerical method to compute homoclinic trajectories in two steps. In the first step, one trajectory is approximated by the solution of a boundary value problem and precise error estimates are given. In particular, influences of parameters $$\lambda_n$$ with $$|n|$$ large are discussed in detail. A second trajectory that is homoclinic to the first one is computed in a subsequent step as follows. We transform the original system into a topologically equivalent form having $$0$$ as an $$n$$-independent fixed point. Applying the boundary value ansatz to the transformed system, we obtain a non-autonomous homoclinic orbit, converging towards the origin (see [hu06]). Transforming back to the original coordinates leads to the desired homoclinic trajectories. The numerical method and the validity of the error estimates are illustrated by examples.


text:
# Product of positive definite and seminegative definite matrices

Let $A$ a spd (symmetric positive definite) matrix and $B$ a symmetric seminegative definite matrix. Is tr $AB \leq 0$ and more general is $AB$ seminegative definite?

I know that tr $AB \leq 0$ follows from $AB$ seminegative definite since the eigenvalues $\lambda$ of $AB$ are nonpositve and hence tr $AB=\sum_{\lambda \in spec\ A} \lambda \leq 0$. But I don't know how to find something out about the definitness of $AB$. I think in general there is nothing you can say about the eigenvalues of $AB$.

• $AB$ is not necessarily symmetric, except if $A$ and $B$ commute. May 19 '12 at 16:01
• Yes I know that. But the question is wheater $AB$ is seminegative definite or at least weather the trace is nonpositve. May 19 '12 at 16:05
• I believe the term is "negative semidefinite". And I suspect that the reason Davide pointed out that $AB$ isn't necessarily symmetric is that sometimes symmetry is considered a prerequisite for positive/negative (semi)definiteness. May 19 '12 at 16:16
• If you only cared about the trace, you could note that $\sqrt AB\sqrt A$ is negative semidefinite, and $\mathrm{tr}(\sqrt AB\sqrt A)=\mathrm{tr}(AB)$. May 25 '12 at 7:04

First, take $A$, $B$ symmetric positive-definite. Suppose $\lambda$ is an eigenvalue of $AB$ with corresponding eigenvector $x\neq 0$, i.e. $ABx=\lambda x$.Then $BABx=\lambda Bx$ and so $x' BAB x = \lambda x' B x$. It is not hard to check that $BAB$ will also be positive definite. Since $x \neq 0$, $x'Bx \neq 0$, thus $\lambda = \frac{x' BAB x}{x'Bx}$. By the positive definiteness of $B$ we have $x' Bx >0$. By the positive definiteness of $BAB$ we will have $x' BAB x>0$. Thus $\lambda >0$, i.e. $AB$ has positive eigenvalues.
Now let $A>0$ and $B<0$. Apply the above result to $-(AB)=A(-B)$. Since $-B>0$, all eigenvalues of $A(-B)$ will be positive. But the eigenvalues of $A(-B)$ are the negative counterparts of the eigenvalues of $AB$. Thus $AB$ will have negative eigenvalues.
Note however, that $AB$ needs not be symmetric. The terminology "negative-definite" refers to hermitian (symmetric) matrices.
• Oh! I see now. You rely on the fact that $B=B'$. Mar 7 '20 at 19:35
• I agree that $BAB$ is positive definite, but what prevents $x'BABx'$ from being zero for $x \neq 0$? More specifically, we could have $x \neq 0$ but $Bx = 0$, which would make $x'BABx$ zero and thus eigenvalue zero, meaning $AB$ is positive semi-definite. Why isn't this possible? Mar 7 '20 at 19:55
• Oh! I realized that because $B$ is positive definite, for $x \neq 0$, $Bx \neq 0$ because otherwise $x'Bx=0$, contradicting that $B$ is positive definite. Mar 7 '20 at 19:56


text:
# Alternatives to multiplication/division/modulo for encoding choices?

The obvious way to encode, with minimum entropy, choosing s out of n (equiprobable) choices when x is already encoded is to identify s with a number [0, n) and set x = n * x + s, decoded with s = x % n, x = x / n.

Is this optimal if the only constraint is that the encoded result must be a bitstring? Would *+/% still be the choice if they were not available as instructions?

I know arithmetic coding (and ANS) exists, but it also can't avoid big integer arithmetic without giving up some entropy.

• Do you have a different set of allowed instructions in mind? In general, all we need is a bijection between $[n^m] \times [n]$ and $[n^{m+1}]$ for every natural $m$. – Yuval Filmus Apr 1 '20 at 21:21
• Not in particular, though basically I have bitwise logic in mind. TBH it's not obvious to me how to even convert a [n^(m+1)] into a bitstring without operations that amount to multiplication. – sellon Apr 2 '20 at 16:57


text:
# Reynolds number

(Difference between revisions)
 Revision as of 05:22, 4 October 2005 (view source)Praveen (Talk | contribs)← Older edit Latest revision as of 09:15, 3 January 2012 (view source)Peter (Talk | contribs) m (Reverted edits by Reverse22 (talk) to last revision by Jmortizz) (6 intermediate revisions not shown) Line 1: Line 1: - The Reynolds number is probably the single most important parameter in fluid dynamics. It characterises the relative importance of inertial and viscous forces in a flow. It is important in determining the state of the flow, whether it is laminar or turbulent. At high Reynolds numbers flows generally tend to be turbulent, which was first recognized by [[Osborne Reynolds]] in his famous pipe flow experiments. Consider the momentum equation which is given below + The Reynolds number characterises the relative importance of inertial and viscous forces in a flow. It is important in determining the state of the [[flow]], whether it is [[laminar]] or [[turbulent]]. At high Reynolds numbers flows generally tend to be [[turbulent]], which was first recognized by [[Osborne Reynolds]] in his famous [[pipe flow experiments]]. Consider the [[Navier-Stokes equations|momentum equation]] which is given below :$:[itex] Line 7: Line 7:$ [/itex] - The terms on the right are the inertial forces and those on the left correspond to viscous forces. If $U$, $L$, $\rho$ and $\mu$ are the reference values for velocity, length, density and dynamic viscosity, then + The terms on the right are the [[inertial forces]] and those on the left correspond to [[viscous forces]]. If $U$, $L$, $\rho$ and $\mu$ are the reference values for [[velocity]], [[length]], [[density]] and [[dynamic viscosity]], then inertial force ~ $\frac{\rho U^2}{L}$ inertial force ~ $\frac{\rho U^2}{L}$ Line 33: Line 33: ==Reynolds number as a ratio of time scales== ==Reynolds number as a ratio of time scales== - Consider an impulsively started flat plate moving in its own plane with velocity $U$. Due to the no-slip condition on the plate a boundary layer gradually develops on the plate. At time $t$, the thickness of the boundary layer is of the order of $\sqrt{\nu t}$  (see Batchelor(1967), section 4.3). Let $L$ be the characteristic length scale. The time taken for viscous and convective effects to travel a distance $L$ is + Consider an impulsively started flat plate moving in its own plane with [[velocity]] $U$. Due to the [[no-slip condition]] on the plate a [[boundary layer]] gradually develops on the plate. At time $t$, the thickness of the [[boundary layer]] is of the order of $\sqrt{\nu t}$  (see Batchelor(1967), section 4.3). Let $L$ be the [[characteristic length scale]]. The time taken for [[viscous]] and [[convective]] effects to travel a distance $L$ is :$:[itex] Line 51: Line 51:$ [/itex] - Thus the Reynolds number is a measure of the viscous and convective time scales. A large Reynolds number means that viscous effects propagate slowly into the fluid. This is the reason why boundary layers are thin in high Reynolds number flows because the fluid is being convected along the flow direction at a much faster rate than the spreading of the boundary layer, which is normal to the flow direction. + Thus the Reynolds number is a measure of the viscous and convective time scales. A large Reynolds number means that viscous effects propagate slowly into the [[fluid]]. This is the reason why boundary layers are thin in high Reynolds number flows because the fluid is being convected along the [[flow]] direction at a much faster rate than the spreading of the [[boundary layer]], which is normal to the [[flow]] direction. ==References== ==References== - *{{reference-book | author=Batchelor G K | year=1967 | title=An Introduction to Fluid Dynamics | rest=Cambridge University Press}} + *{{reference-book | author=Batchelor, G K | year=1967 | title=An Introduction to Fluid Dynamics | rest=Cambridge University Press}} + + *{{reference-book |author=Rott, N | year=1990 | title=Note on the history of the Reynolds number| rest =Annual Review of Fluid Mechanics, Vol. 22, 1990, pp. 1–11}} [[Category: Dimensionless parameters]] [[Category: Dimensionless parameters]]

## Latest revision as of 09:15, 3 January 2012

The Reynolds number characterises the relative importance of inertial and viscous forces in a flow. It is important in determining the state of the flow, whether it is laminar or turbulent. At high Reynolds numbers flows generally tend to be turbulent, which was first recognized by Osborne Reynolds in his famous pipe flow experiments. Consider the momentum equation which is given below

$\frac{\partial}{\partial t}\left( \rho u_i \right) + \frac{\partial}{\partial x_j} \left[ \rho u_i u_j + p \delta_{ij} \right] = \frac{\partial}{\partial x_j} \tau_{ij}$

The terms on the right are the inertial forces and those on the left correspond to viscous forces. If $U$, $L$, $\rho$ and $\mu$ are the reference values for velocity, length, density and dynamic viscosity, then

inertial force ~ $\frac{\rho U^2}{L}$

viscous force ~ $\frac{\mu U}{L^2}$

Their ratio is the Reynolds number, usually denoted as $Re$

$Re = \frac{\mbox{inertial force}}{\mbox{viscous force}} = \frac{\rho U L}{\mu}$

In terms of the kinematic viscosity

$\nu = \frac{\mu}{\rho}$

the Reynolds number is given by

$Re = \frac{U L}{\nu}$

## Reynolds number as a ratio of time scales

Consider an impulsively started flat plate moving in its own plane with velocity $U$. Due to the no-slip condition on the plate a boundary layer gradually develops on the plate. At time $t$, the thickness of the boundary layer is of the order of $\sqrt{\nu t}$ (see Batchelor(1967), section 4.3). Let $L$ be the characteristic length scale. The time taken for viscous and convective effects to travel a distance $L$ is

$T_{v} = \frac{L^2}{\nu}$

and

$T_{c} = \frac{L}{U}$

The ratio of viscous to convective time scales is

$\frac{ T_{v} }{ T_{c} } = \frac{(L^2/\nu)}{(L/U)} = \frac{UL}{\nu} = Re$

Thus the Reynolds number is a measure of the viscous and convective time scales. A large Reynolds number means that viscous effects propagate slowly into the fluid. This is the reason why boundary layers are thin in high Reynolds number flows because the fluid is being convected along the flow direction at a much faster rate than the spreading of the boundary layer, which is normal to the flow direction.

## References

• Batchelor, G K (1967), An Introduction to Fluid Dynamics, Cambridge University Press.
• Rott, N (1990), Note on the history of the Reynolds number, Annual Review of Fluid Mechanics, Vol. 22, 1990, pp. 1–11.


text:
5

# Mass of 280 kg is attached spring and set into oscillation on horizontal frictionless surface The simple harmonic motion of the mass described bY x(t) (0.800 mJcos[...

## Question

###### Mass of 280 kg is attached spring and set into oscillation on horizontal frictionless surface The simple harmonic motion of the mass described bY x(t) (0.800 mJcos[(10.0 rads)t]- Determine the following.amplitude 800oscillation for the oscillating Massforce constant for the spring Nmposition of the mass after has been oscillating for one half periodposition of the mass one-sixth of period after it has been releasedHow can You determine the position of the object at specific time from an expressi

mass of 280 kg is attached spring and set into oscillation on horizontal frictionless surface The simple harmonic motion of the mass described bY x(t) (0.800 mJcos[(10.0 rads)t]- Determine the following. amplitude 800 oscillation for the oscillating Mass force constant for the spring Nm position of the mass after has been oscillating for one half period position of the mass one-sixth of period after it has been released How can You determine the position of the object at specific time from an expression for the position af the object at ay time? m time takes the mass t0 get t0 the position 0.100 m after has been released

#### Similar Solved Questions

##### Affects dog's muscle phenotype: Myostatin is structural In dogs, mutation in the Myosddins {ooâ‚¬ noecta ,eterozys 'gous = dogs are muscular; and homozygous wild-type dogs look protein. Homozygous overly muscular (Mosher et al. 2007). mutant dogs are Wild-type homozygo mutanthelerzyOon chromosome 37 in dogs: Chromosome 37 is 900,000 (3 points) Myostatin is at 700,000 base Pairs = 37 looks like in dog that is heterozygous for the wild- base pairs long: Draw what chromosome type {A) and
affects dog's muscle phenotype: Myostatin is structural In dogs, mutation in the Myosddins {ooâ‚¬ noecta ,eterozys 'gous = dogs are muscular; and homozygous wild-type dogs look protein. Homozygous overly muscular (Mosher et al. 2007). mutant dogs are Wild-type homozygo mutant helerzyO ...
##### Acetal (Only Chapter Acidtc Cn difons 8 Mechaaiam 8 7 L]336+Eto Acetal 8 (Only J Acidic 8 1i Reverse (enf Ponu
Acetal (Only Chapter Acidtc Cn difons 8 Mechaaiam 8 7 L ] 33 6+ Eto Acetal 8 (Only J Acidic 8 1i Reverse (enf Ponu...
##### The average production cost for major movies is 62 million dollars and the standard deviation is 22 million dollars Assume the production cost distribution is normal, Suppose that 17 randomly selected major movies are researched Answer the following questions_ Give your answers in millions of dollars not dollars _ Round all answers to decimal places where possibleWhat is the distribution of X? X `What is the distribution of % â‚¬For single randomly selected movie_ find the probability that this
The average production cost for major movies is 62 million dollars and the standard deviation is 22 million dollars Assume the production cost distribution is normal, Suppose that 17 randomly selected major movies are researched Answer the following questions_ Give your answers in millions of dollar...
##### 7 rill40. Biologists have found that 959 of the offspring of a species of brown rats are actually brown and the rest are albino white. Only 259 of the offspring of albino rats are brown; the rest are albino. Determine the eventual proportion of brown and albino rats
7 rill 40. Biologists have found that 959 of the offspring of a species of brown rats are actually brown and the rest are albino white. Only 259 of the offspring of albino rats are brown; the rest are albino. Determine the eventual proportion of brown and albino rats...
##### Written Assignment 1 Write careful, complete solutions for the following problems and submit them according to Directions for Submitting Written Assignments; under Orientation to Online Calculus the Canvas classroom.Find two different antiderivatives of / 4o
Written Assignment 1 Write careful, complete solutions for the following problems and submit them according to Directions for Submitting Written Assignments; under Orientation to Online Calculus the Canvas classroom. Find two different antiderivatives of / 4o...
##### Evaluate the tnple (xjuis 2) Integral 2 1 6 1 Ininuuuna {(X, 3 8 ol(z
Evaluate the tnple (xjuis 2) Integral 2 1 6 1 Ininuuuna {(X, 3 8 ol(z...
##### (1 point) Consider the helix r(t) = (cos(-1t) sin(-1t) , -4t) . Compute, at t = A: The unit tangent vector T = sin(-pi/6)sart1; ~cos(-pi/6)/sqrt Msart17B. The unit normal vector N =sqrt3/1/2C: The unit binormal vector B =2/sqrt17(2sar3)sart171(2sart17)The - curvature K = sqrt17 /sqrt1+4:
(1 point) Consider the helix r(t) = (cos(-1t) sin(-1t) , -4t) . Compute, at t = A: The unit tangent vector T = sin(-pi/6)sart1; ~cos(-pi/6)/sqrt Msart17 B. The unit normal vector N = sqrt3/ 1/2 C: The unit binormal vector B = 2/sqrt17 (2sar3)sart17 1(2sart17) The - curvature K = sqrt17 /sqrt1+4:...
##### 7. (5 points) Let T be a mapping from Pz into M(R)2x2 defined by02 ~02 T (ao + G12 + a2z2) = Co 02 @o + (2show that T is a linear transformation.
7. (5 points) Let T be a mapping from Pz into M(R)2x2 defined by 02 ~02 T (ao + G12 + a2z2) = Co 02 @o + (2 show that T is a linear transformation....
##### Consider a common mirage formed by superheated air immediately above a roadway. A truck driver whose eyes are $2.00 mathrm{~m}$ above the road, where $n=1.0003$, looks for ward. She perceives the illusion of a patch of water ahead on the road, where her line of sight makes an angle of $1.20^{circ}$ below the horizontal. Find the index of refraction of the air immediately above the road surface. Suggestion:Treat this problem as one about total internal reflection.
Consider a common mirage formed by superheated air immediately above a roadway. A truck driver whose eyes are $2.00 mathrm{~m}$ above the road, where $n=1.0003$, looks for ward. She perceives the illusion of a patch of water ahead on the road, where her line of sight makes an angle of $1.20^{circ}$ ...
##### BrzCompoundrepresented through Fischer projecliontripletdoublettwo overlapping signals: one is quintet and the other one is quartetquintetHSP-03-153ppm
Brz Compound represented through Fischer projeclion triplet doublet two overlapping signals: one is quintet and the other one is quartet quintet HSP-03-153 ppm...
##### Arrange the following compounds in order of their expected increasing solubility in hexane $\left(\mathrm{C}_{6} \mathrm{H}_{14}\right): \mathrm{NaBr}, \mathrm{CCl}_{4}, \mathrm{CH}_{3} \mathrm{COOH} .$
Arrange the following compounds in order of their expected increasing solubility in hexane $\left(\mathrm{C}_{6} \mathrm{H}_{14}\right): \mathrm{NaBr}, \mathrm{CCl}_{4}, \mathrm{CH}_{3} \mathrm{COOH} .$...
##### EXERCISEAn ant crawling on table undcrgoes three consecuive Jish accmeml 3.5j} cn, 272,0*581 (5.8i 6.7j) displacemnent. (Enter the maanitude Cm an Ehe dinechon dedrees couuerclockwice HOr(5 9i 4.71)Find the m Amnilud edirection the resultantHintmnaanitudcuirectioncouniercck Vis tom the Fres
EXERCISE An ant crawling on table undcrgoes three consecuive Jish accmeml 3.5j} cn, 272,0*581 (5.8i 6.7j) displacemnent. (Enter the maanitude Cm an Ehe dinechon dedrees couuerclockwice HOr (5 9i 4.71) Find the m Amnilud e direction the resultant Hint mnaanitudc uirection couniercck Vis tom the Fres...
##### Ii [ 2 chemical equations 8 using 5 smiallest wholel Feooo HBr(g) numbet cocfficients1Ty Another Version1mpL[ ]
Ii [ 2 chemical equations 8 using 5 smiallest wholel Feooo HBr(g) numbet cocfficients 1 Ty Another Version 1 mpL[ ]...
##### Find the center, the vertices, the foci, and the asymptotes. Then draw the graph.$$x^{2}-4 y^{2}=4$$
Find the center, the vertices, the foci, and the asymptotes. Then draw the graph. $$x^{2}-4 y^{2}=4$$...
##### Simplify each expression by performing the indicated operation. Explain how you arrived at each answer. See the Concept Check in this section. A. $$z+3 z$$ B. $$z \cdot 3 z$$ C. $$-z-3 z$$ D. $$(-z)(-3 z)$$
Simplify each expression by performing the indicated operation. Explain how you arrived at each answer. See the Concept Check in this section. A. $$z+3 z$$ B. $$z \cdot 3 z$$ C. $$-z-3 z$$ D. $$(-z)(-3 z)$$...
##### 7/6 4. Evaluate [ tan" (2x) + dx Write your final answer as a single logarithm
7/6 4. Evaluate [ tan" (2x) + dx Write your final answer as a single logarithm...


text:
Tutorial 6

1 / 21

# Tutorial 6 - PowerPoint PPT Presentation

Tutorial 6. Bias and variance of estimators The score and Fisher information Cramer-Rao inequality. Estimators and their Properties.

I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.

## PowerPoint Slideshow about 'Tutorial 6' - Mercy

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
Tutorial 6
• Bias and variance of estimators
• The score and Fisher information
• Cramer-Rao inequality

236607 Visual Recognition Tutorial

Estimators and their Properties
• Let be a parametric set of distributions. Given a sample drawn i.i.d from one of the distributions in the set we would like to estimate its parameter (thus identifying the distribution).
• An estimator for w.r.t. is any function notice that an estimator is a random variable.
• How do we measure the quality of an estimator?
• Consistency: An estimator for is consistent if

this is a (desirable) asymptotic property that motivates us to acquire large samples. But we should emphasize that we are also interested in measures for finite (and small!) sample sizes.

236607 Visual Recognition Tutorial

Estimators and their Properties
• Bias: Define the bias of an estimator to be Here, the expectation is w.r.t. to the distribution

The estimator is unbiased if its bias is zero

• Example: the estimators and , for the mean of a normal distribution, are both unbiased. The estimator for its variance is biased whereas the estimator is unbiased.
• Variance: another important property of an estimator is its variance . We would like to find estimators with minimum bias and variance.
• Which is more important, bias or variance?

236607 Visual Recognition Tutorial

Risky Estimators
• Employ our decision-theoretic framework to measure the quality of estimators.
• Abbreviate and consider the square error loss function
• The conditional risk associated with when is the true parameter
• Claim:
• Proof:

236607 Visual Recognition Tutorial

Bias vs. Variance
• So, for a given level of conditional risk, there is a tradeoff between bias and variance.
• This tradeoff is among the most important facts in pattern recognition and machine learning.
• Classical approach: Consider only unbiased estimators and try to find those with minimum possible variance.
• This approach is not always fruitful:
• The unbiasedness only means that the average of the estimator (w.r.t. to ) is . It doesn’t mean it will be near for a particular sample (if variance is large).
• In general, an unbiased estimate is not guaranteed to exist.

236607 Visual Recognition Tutorial

The Score
• The score of the family is the random variable

measures the “sensitivity” of as a function of the parameter .

• Claim:
• Proof:
• Corollary:

236607 Visual Recognition Tutorial

The Score - Example
• Consider the normal distribution
• clearly,
• and

236607 Visual Recognition Tutorial

The Score - Vector Form
• In case where is a vector, the score is the vector whose th component is
• Example:

236607 Visual Recognition Tutorial

Fisher Information
• Fisher information: Designed to provide a measure of how much information the parametric probability law carries about the parameter .
• An adequate definition of such information should possess the following properties:
• The larger the sensitivity of to changes in , the larger should be the information
• The information should be additive: The information carried by the combined law should be the sum of those carried by and
• The information should be insensitive to the sign of the change in and preferably positive
• The information should be a deterministic quantity; should not depend on the specific random observation

236607 Visual Recognition Tutorial

Fisher Information
• Definition (scalar form):Fisher information (about ), is the variance of the score
• Example: consider a random variable

236607 Visual Recognition Tutorial

Fisher Information - Cntd.
• Whenever is a vector, Fisher information is the matrix where
• Remainder:
• Remark: the Fisher information is only defined whenever the distributions satisfy some regularity conditions. (For example, they should be differentiable w.r.t. and all the distributions in the parametric family must have same support set).

236607 Visual Recognition Tutorial

Fisher Information - Cntd.
• Claim: Let be i.i.d. random variables . The score of is the sum of the individual scores.
• Proof:
• Example: If are i.i.d. , the score is

236607 Visual Recognition Tutorial

Fisher Information - Cntd.
• Based on i.i.d. samples, the Fisher information about is
• Thus, the Fisher information is additive w.r.t. i.i.d. random variables.
• Example: Suppose are i.i.d. . From previous example we know that the Fisher information about the parameter based on one sample is Therefore, based on the entire sample,

236607 Visual Recognition Tutorial

The Cramer-Rao Inequality
• Theorem: Let be an unbiased estimator for . Then
• Proof: Using we have:

236607 Visual Recognition Tutorial

The Cramer-Rao Inequality - Cntd.
• Now

236607 Visual Recognition Tutorial

The Cramer-Rao Inequality - Cntd.
• So,
• By the Cauchy-Schwarz inequality
• Therefore,
• For a biased estimator we have:

236607 Visual Recognition Tutorial

The Cramer-Rao General Case
• The Cramer-Rao inequality also true in general form: The error covariance matrix for is bounded as follows:

236607 Visual Recognition Tutorial

The Cramer-Rao Inequality - Cntd.
• Example: Let be i.i.d. . From previous example
• Now let be an (unbiased) estimator for .
• So matches the Cramer-Rao lower bound.
• Def: An unbiased estimator whose covariance meets the Cramer-Rao lower bound is called efficient.

236607 Visual Recognition Tutorial

Efficiency
• Theorem (Efficiency): The unbiased estimator is efficient, that is,

iff

• Proof (If): If then

meaning

236607 Visual Recognition Tutorial

Efficiency
• Only if: Recall the cross covariance between

The Cauchy-Schwarz inequality for random variables says

thus

236607 Visual Recognition Tutorial

Cramer-Rao Inequality and ML - Cntd.
• Theorem: Suppose there exists an efficient estimator for all . Then the ML estimator is .
• Proof: By assumption

By previous claim or

for all

This holds at and since this is a maximum point the left side is zero so

236607 Visual Recognition Tutorial


text:
# Week 6 Notes¶

Note

Keep an eye weekly pages as they might be updated throughout the week.

## Week 6 Overview¶

Week 6: New directions? This week we turn to communication. You should have already (or be close) submitted your a2, congrats! Next up is assignment 3. A3 requires you to use your journaling program to communicate with a remote server. Remember, I will be announcing the address and port we will be using in Zulip. You will also want to check back here early next week for a copy of the lightweight DSP server. You might find the DSP server helpful for testing your a3 code. Once released, we will discuss in live class.

The lectures for this week will help you get started with assignment 3.

Networks and Sockets

Protocols

## Lecture Materials¶

### Live Class¶

Class Recording

DSUServer Lite

#### Thursday¶

Class Recording

Note: To avoid the chaos, skip forward to 15:40 (sorry professor internet went down).

### Recorded Lectures¶

#### Networks and Sockets¶

##### Lecture Recording¶

Networking and Sockets Lecture

##### Lecture Notes¶

In a1 and a2, you are tasked with storing and retrieving data from the file system by opening, reading or writing, and closing a file using Python’s built-in functions for file management. open(), close(), read(), and write(), as examples, allow us to open a stream to a file to send and receive data to a file located in our computer’s file system

But what if we wanted to send and receive data to a different computer? We could continue to use the file system to store the data and then find a way to transfer the file over a network connection. Or, we could create a direct connection to a networked computer and stream the data directly. Since we are not going to concern ourselves with the transfer of files just yet, let’s look at how we can use Python’s networking interface to send data to another computer.

In Python, we can think of a networking interface as any tool that facilitates communication with another computer over an ethernet connection. In the following diagram, a network connection has been established between two computers. Although the diagram does not specify, we can assume that the client (laptop) and server (box) are both connected to a common network (e.g., a corporate lan, wan, or the Internet). In order to communicate with each other, the server exposes a unique IP address (168.235.86.101, as depicted here for example) and the client must know of that IP address.

When the client is ready to connect, it first checks to see if the server’s address is available for connections. If available, the server sends a response to confirm and then waits for data to be sent from the client. Communication is performed using a socket, which in Python, is a wrapper on many of the underlying details that computers must establish to stream data. For the purposes of this lecture, we will focus on a fairly narrow set of the many ways that sockets can be used. So our primary concern here is how sockets send and receive data. Notice in the diagram above, that each computing system has two sockets: a response socket and a send socket, which represent the input stream of data from a remote computer and the output stream of data that is sent from the local computer. When data is streamed to the socket, Python’s socket library attempts to ensure that all data is sent or received arrives intact and in the order it was written.

The following diagram illustrates the primary Python functions required to establish a socket between two computers. Notice how the send() and recv() functions at the end are iterative. In this example, after a response is sent, the server waits until the client sends data again, establish a send and receive loop until either the client disconnects or the server rejects the connection.

So now let’s take a look at how the code for these two computer systems could be written using Python’s socket library.

import socket

PORT = 2020
HOST = "127.0.0.1"

with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as srv:
srv.bind((HOST, PORT))
srv.listen()

print("server listening on port", PORT)

with connection:
print("client connected")

while True:
rec_msg = connection.recv(4096)

print("echo", rec_msg)

if not rec_msg:
break
connection.sendall(rec_msg)

print("client disconnected")

In the code above, we start by importing the socket module to the program, and set a PORT and HOST variable that contain the IP address of the server and the desired port (port numbers are unrestricted, however, there are some common conventions for ports where you might find conflicts, so choose wisely).

Then, a with statement is used to instantiate a socket object and assign it to the variable srv. with will handle the responsibility of properly closing the socket and connection. The socket is first bound to the desired address and port, then set to listen for incoming socket connection requests. The code, as is, will block at this point until a it hears a remote connection, at which point the socket will accept the connection and store the socket connection and remote address in the variables connection and address respectively.

Now that a connection between a remote computer and server is established, the program can begin to exchange data. The server depicted by the code here is a lightweight echo server whose only responsibility is to send the data it receives as a response. Because Python sockets use the same underlying tools for establishing network connections as other programming languages and networking tools, we can connect to this server in a number of different ways. If you are on Windows, you can download a program called “PUTTY” to connect to this server and send it messages. If you are on Linux or OSX, you should have a preinstalled tool called ncat that will allow you to connect. In the following example, I use ncat to connect to the server and send a few messages.

Take a minute and try it for yourself. Grab PUTTY or fire up ncat, copy the server code sample into IDLE, and send some messages!

Oh, one more thing before we move on. In networking, there are some IP addresses that have special meaning. One of those address that will be relevant to you here is the loopback address:

The loopback address, 127.0.0.1 is networking convention that allows a computer to connect to itself using its network connection. And just like domain names on the Internet, the ‘name’ localhost is an alphanumeric map to the loopback IP address. In the example above, I bind the Python server to the loopback address and connect to it using ncat. This provides a simple and straightforward way to test our socket programming without having to maintain code on two separate systems.

Okay, so we have seen how we can connect to the Python server with an existing client, now let’s take a look at how we can write our own.

import socket

PORT = 2020
HOST = "127.0.0.1"

with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as client:
client.connect((HOST, PORT))

print("client connected to {HOST} on {PORT}")

while True:
msg = input("Enter message to send: ")

client.sendall(msg.encode('utf-8'))
srv_msg = client.recv(4096)

print("Response",srv_msg.decode('utf-8'))

So in the client example, just like the server code, we first instantiate a socket object and assign it to a variable, in this case we will use client for differentiation. However, rather than bind() and listen() on an address and port, we tell the socket to connect() to the location that we expect to be listening. Then we simply create a while loop to continuously collect user input, send it using the connected socket, and print the response from the server.

Go ahead, take a minute to copy the client code into a new instance of IDLE. You should be to run both the server and client at the same time. Just make sure that you start the server first so the client can connect.

One final concern that we have not discussed yet is the format in which we are sending and receiving data. You have probably noticed that prior to the client sending the user input string, it is encoded. The encode() function converts the its string object to bytes in the format that is passed as a parameter (utf-8) in our example. Likewise, the response from the server is decoded again before printing to the shell. This process can become quite burdensome when a program needs to send and receive larger, complex data sets. Fortunately, Python makes this process much easier for us by exposing some additional functions that abstract much of the work for us. Let’s take a look at the revised code first:

import socket

PORT = 2020
HOST = "127.0.0.1"

with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as client:
client.connect((HOST, PORT))

send = client.makefile('w')
recv = client.makefile('r')

print("client connected to {HOST} on {PORT}")

while True:
msg = input("Enter message to send: ")

send.write(msg + '\r\n')
send.flush()

print("Response",srv_msg)

Here we make use of the socket module’s makefile function to create a read and write convention that more closely resembles what we have learned from file operations. Makefile abstracts much of the work required to convert string-like data into bytes. Notice, we no longer have to conduct any encoding or decoding operations. Rather, we simply create readable (.makefile('r')) and writeable (.makefile('w')) file objects on our connected socket. The only additional responsibility required here is to tell the remote connection when we have completed writing operations. Write operations will typically store data in a buffer prior to sending, often, buffered data will not be sent until the buffer is full. Therefore, it is always important to remember flush the buffer when write operations have completed. The socket’s .flush() function will conduct this operation for you.

#### Protocols¶

The protocols lecture makes use of three Python programs. While various parts of the programs are included in this section, you will want to download the actual files if you plan on running them yourself in IDLE.

SMP Protocol

SMP Client Program

SMP Server Program

##### Lecture Recording¶

Protocols Lecture

##### Lecture Notes¶

In assignment 2, you are working with the Profile module for storing and loading user data. In this module, we make use of a particular format for storing information called JSON that wraps Profile object data in a style of notation using the rules and conventions set forth by the creators of the format.

All the files that you find on your computer adhere to a similar process: a format is created that specifies how data should be stored and retrieved and programs that make use of the format adhere to the format conventions. A file’s format is typically specified by it’s extension, or suffix (e.g., .jpg, .doc, .py), providing the program that wants to use it with some clue as to how to interpret the file contents. A good example of this is an image editing program that can display different image formats.

Programs that talk to each other over networks follow a similar process. A format is agreed upon and the programs that want to talk to each other must follow this format to successfully communicate. In networking, this format is called a protocol. The Hypertext Transfer Protocol or HTTP, for example, is one way that servers and the clients that connect to them can communicate (if you are reading this web page right now, you have no doubt accessed it using HTTP).

So, now that we have established a preliminary understanding of what constitutes a protocol. Let’s create one of our own. After all, there is really nothing special about a protocol, it’s just a set of requests and responses agreed upon by two or more programs.

Let’s start by building a protocol for UCI’s Working Well Daily Symptom check tool. Now, I am not sure if you receive these emails as a student, but employees at UCI are required to answer these emails everyday. How might we go about converting this tool to a program? And how might we extract some common language to be used by the program (e.g., create a protocol)?

Well, we can start by asking a few high level questions: What information does the tool need to collect? What are the conditions that need to be handled? What actions must be taken in response to those conditions? Certainly, there are many different ways to answer these questions, so the path we take here is likely not the only direction we could go, but it should be sufficient to demonstrate the underlying concepts of networking protocols.

First, we need to know who is submitting a daily wellness check. Then, by reading through the email we can determine which conditions determine the next steps required by the user. Notice in the email how every question is constructed to respond to either a yes or no answer. We can use this boolean like response to construct the type of data we need for the protocol. Also notice how there are only two actions for each response: no further action is required, or continue to next question.

The following table lays out what we can expect from a typical client-server interaction using the protocol. We first assume the typical handshaking process that must occur when sockets are establishing a connection. The handshake process is then followed by the first requirement of the transaction: identification (or authentication) of the user. We then proceed to check off the various steps as laid out in the original email. Since we only need to give the server a yes or no answer, the structure for the protocol messages can be fairly simple. Here, we construct a command using the following schema:

SMP_[TYPE] [VALUE]

The only command that we do not require a 1 or 0 value for is SMP_AUTH since we must pass some form of user identification to the server.

| client          | server     |
|-----------------|------------|
| connect         |            |
|                 | accept     |
| SMP_AUTH userid |            |
|                 | WELCOME    |
| SMP_STATUS 0    |            |
|                 | COMPLETE   |
| SMP_STATUS 1    |            |
|                 | CONTINUE   |
| SMP_SYMPTOMS 0  |            |
|                 | COMPLETE   |
| SMP_SYMPTOMS 1  |            |
|                 | CONTINUE   |
| SMP_TESTED 0    |            |
|                 | CONTINUE   |
| SMP_PROXIMITY 0 |            |
|                 | COMPLETE   |
| disconnect      |            |
|                 | disconnect |

And that’s our protocol. There are a few more conditions not listed in the previous table, such as when the SMP_TESTED or SMP_PROXIMITY commands are 1 on 0, that if we wanted to provide a formal protocol specification we would probably want to explain in greater detail.

You may be wondering why we even need a protocol for this program. Why not just collect the required data from the user and send it over to a server all at once? While that might work fine within the constraints of the UC system wellness checking needs, what if we needed to support other universities, organizations, and governments around the world? Perhaps it would be easier to give all of those outlets the ability to build their own platforms, rather than modify a single program to support all of them. By creating (and standardizing) a protocol, we don’t have to depend on the capabilities of a single program from a single source. Rather, as long as a program adheres to the protocol, anyone can create their own custom interfaces, programs, and platforms.

Okay, so now that we have a protocol, let’s take a look at how it is implemented in Python. I won’t be putting the entire project into the notes here, but you can download the protocol file at the top of this section. We will be calling this protocol the Symptom Monitoring Protocol (SMP).

Note

Unlike previous snippets, those used in this lecture are not feature complete. They will not run on their own if you copy and paste from here. To run the programs and view all of the code, please download the files listed at the top of this section.

AUTH = "SMP_AUTH"
STATUS = "SMP_STATUS"
SYMPTOMS = "SMP_SYMPTOMS"
TESTED = "SMP_TESTED"
PROXIMITY = "SMP_PROXIMITY"

WELCOME = "WELCOME"
CONTINUE = "CONTINUE"
COMPLETE = "COMPLETE"
NOUSER = "NOUSER"
ERROR = "ERROR"

Here we specify some constant variables to hold the commands we created for the protocol. Constant variables will help us keep the string representations of the commands together and make updating the protocol commands a little easier if the need arises.

In the following section, we create a namedtuple object to hold the objects derived from the socket. A namedtuple is a convenient way to pass multiple objects without having to manage individual variables for each one. The protocol is first initialized by placing a call to the init method and passing it a socket that has been connected to the desired SMP supported endpoint (a client, or a server).

SMPConnection = namedtuple('SMPConnection',['socket','send','recv'])

def init(sock:socket) -> SMPConnection:
'''
The init method should be called for every program that uses the SMP Protocol. The calling program should first establish a connection with a socket object, then pass that open socket to init. init will then create file objects to handle input and output.
'''
try:
f_send = sock.makefile('w')
f_recv = sock.makefile('r')
except:
raise SMPProtocolError("Invalid socket connection")

return SMPConnection(
socket = sock,
send = f_send,
recv = f_recv
)

def listen(smp_conn: SMPConnection) -> str:
'''
listen will block until a new message has been received
'''

def authenticate(smp_conn: SMPConnection, userid: str) -> str:
'''
a helper method to authenticate a userid with a server
'''
cmd = '{} {}'.format(AUTH, userid)
_write_command(smp_conn, cmd)

return result

def report(smp_conn: SMPConnection, report: str, status: str) -> str:
'''
report will send the command specified by the parameters and return a response to the command using the SMP Protocol.

report: one of the SMP_X commands provided by the module
status: either 0 or 1 to indicate the status of the command specified in the report parameter
'''
cmd = '{} {}'.format(report, status)
_write_command(smp_conn, cmd)

def nouser(smp_conn: SMPConnection):
'''
a send only wrapper for the NOUSER command
'''
_write_command(smp_conn, NOUSER)

def _write_command(smp_conn: SMPConnection, cmd: str):
'''
performs the required steps to send a message, including appending a newline sequence and flushing the socket to ensure
the message is sent immediately.
'''
try:
smp_conn.send.write(cmd + '\r\n')
smp_conn.send.flush()
except:
raise SMPProtocolError

'''
performs the required steps to receive a message. Trims the
newline sequence before returning
'''
return cmd

This code contains just a few of the functions in the protocol, however, most of the remaining functions are similar to the ones represented here. In particular, the function nouser is one of several helper functions that send specific commands. Also notice how the write and read operations have been abstracted to their own function (_write_command, _read_command). By moving this required, but repetitive code to its own function, we can consolidate purely structural operations (e.g., appending or trimming socket messages) to a single location.

Okay, so that is the bulk of the SMP protocol module. Now let’s take a look at how we might go about incorporating it into our programs. We will be building upon the code used in the Networks and Sockets lecture, so be sure to watch it before continuing.

print("Welcome to the UCI Working Well Daily Symptom Checker")
print()

sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.connect((HOST, PORT))
_smp_conn = smp.init(sock)

try:
while True:
userid = input()

res = smp.authenticate(_smp_conn, userid)
if res == smp.NOUSER:
print('Unable to find user. Check your ID and try again.')
else:
break

while True:
if _report_status(_smp_conn) == smp.COMPLETE:
print('Thank you. No further action is required.')
break

if _report_symptoms(_smp_conn) == smp.COMPLETE:
print('Thank you. No further action is required.')
break

if _report_tested(_smp_conn) == smp.CONTINUE:
if _report_proximity(_smp_conn) == smp.COMPLETE:
print('Thank you. It is advised that you do not come to campus today.')
break
else:
print('Thank you. No further action is required.')
break
else:
print('Thank you. No further action is required.')
break
except SMPProtocolError:
print("An error occurred while attempting to communicate with the remote server.")
else:
# only disconnect if an SMPProtocolError did not occur
smp.disconnect(_smp_conn)
finally:
sock.close()

Just as with the client server we created, we start by connecting a socket to the desired host and port. Once we have a connected socket, we can use that socket to initialize the SMP protocol. Recall that upon initialization, the protocol module returns a namedtuple called SMPConnection that contains the socket, a writable file object, and a readable file object. Now that we have an SMPConnection, we can begin conducting operations using the protocol module. If we refer to the table from earlier, we know that the first thing we need to do is authenticate as a user. So the program first collects the required data from the user and then sends it to the remote endpoint for processing. An invalid id will cause the user to be prompted again, otherwise, the program will continue with the protocol.

For more detail on how the client program works, as well as a peak at the server program, please watch the lecture videos!


text:
## Monday, May 18, 2020

### Win $500 easily: a taxi surrounded by 10 trees OK, here you have the nearly complete solution to the$500 Bitcoin puzzle. No people outside TRF know it, except for the author. The BIP39 seed must be
tree tree tree tree tree TAXI tree tree tree tree tree SOMETHING
and I am donating you almost $500. I hope that the person who can get the funds will reimburse me, at least 50%. At any rate, if he doesn't, people will know that he has probably taken it from this website. A Krkonoše Mountains taxi driver tried to get to Výrovka. He paid a$100 fine because you can't do it a national park.

SOMETHING is one of the 2048 English BIP39 words; each 16th seed passes the checksum so there are about 128 wallets for different choices of something; one of them should contain over \$500. I have checked that neither tree nor taxi nor creek nor water gives the right wallet.

Why is this the right password hiding in that electronic music album, Bifurcations?

First, you see a taxi in the middle of 5+5 trees. So many trees, it's called a forest. And a taxi at this place, it's strange, it is a Towncar in the Forest, the name of the composition 9/10.

Also, the speed of light is about 300,000 km/s. The number may be written as an 11-digit number
00000 3 00000
Great, the speed of light is the hint from the composition named "c". Finally, the taxi isn't quite clear, it could also be a truck.

But if you carefully listen around 8:15 in the video, you hear... the Morse code. This realization is a "leap of some kind", as the author described it. In the composition 1, "6 times 7", the Morse code is used in the spectrogram. But that's directly not relevant. Another 0composition tells you "nothing to see, hear" which means that you shouldn't look at the Morse code in the spectrograms, you should hear it.

Well, it's very bad to hear the Morse letters. But around 8:15, at the frequency of 1045 Hz or so, you hear beeping and it is the Morse code for TAXI, I think. But it may be wrong. You need to disentangle the frequency 1045 from its 1/2, 1/4, and maybe 1/8. To make things worse, the audio contains an echo with the delay of 0.6 seconds or so. It's also possible that two frequencies are used for letters: lower frequency for dots, higher frequency for dashes. If the high frequency Morse word isn't TAXI, it could also be QUANTUM. The reconstruction doesn't seem reproducible LOL. The end is clearer, it could be both TUM and XI. ;-)

Note that "a leap of some kind" could refer to the "quantum leap", like the Sinclair QL computer.

At the page Reddit: puzzle, you may search for "wallets import" and find a Python script that looks for the right seed among 2048 possibilities (completes the 12th word). It requires a bitcoinlib library and installing it just gives me errors for a few hours, the only reason why I wrote this blog post.

Alternatively, here you have a JavaScript web page where you can convert the 12-word "BIP39 seed/mnemonic" to the Bech32 (bc1...) Bitcoin address. The right public address (the first one) should end with "gcutg".

You should empty this Bitcoin wallet before Wednesday or Thursday. Don't be afraid to do so. On the contrary, you should, otherwise the clever author of the puzzle will take the funds back. When you get the funds, you should also send me a majority of the money via PayPal.

You may want to look at the balance of all Bitcoin wallets that may be obtained from 2-3 words, too. ;-)

Update: The precise Ansatz with 1 taxi, 10 trees, and something doesn't work but a variation may. A tree may be replaced by forest, zero, or nothing. Also, the way how "3" is encoded may be a bit different.


text:
Why are the perturbation term in Zeeman effect not diagonalized?

In the case of weak field Zeeman effect (anomalous Zeeman effect) in hydrogen atom, the unperturbed Hamiltonian reads as $$H_0 = \frac{\hat{p}^2}{2m} + \frac{C_1}{r} + f(r)\mathbf{L}\cdot\mathbf{S}$$ and the perturbation term, which comes from the external magnetic field, is $$H' = C_2(L_z+2S_z)$$ In my problem, the exact form of $C_1$ and $C_2$ are not important. What bothers me is that every literature always uses the eigenkets of $H_0$, which can be denoted as $|n,L,J,m_j\rangle$ as the unperturbed kets. But these kets do not diagonalize the perturbation term $H'$. Aren't the zeroth-order eigenkets supposed to be chosen such that they diagonalize the perturbation in the case of degenerate levels, which is true in this problem?

• What quantum mechanics textbook are you referring to? I remember the treatment of degenerate (time-independent) perturbation theory being somewhat unclear with regard to the problem that you pose (see eg. Shankar). In general, as you seem to know, perturbation theory uses as the zero-th order kets the very same eigenkets of the unperturbed hamiltonian. In the case of a degenerate energy spectrum, should the perturbation be able to remove the degeneration, the standard treatment is first of all to calculate the matrix elements of the perturbation between the unperturbed eigenkets; ... Feb 5 '16 at 10:38
• ...once you've done so, you'll be able to find the states that diagonalize the perturbation; then, and only then, you can go to the basis which diagonalizes the perturbation, and calculate the energy spectrum to first order. You can't really start from kets that diagonalize the perturbation, as you don't know them from the beginning. Once you've found the kets that diagonalize the perturbation, to find the correct (up to first order in the perturbation) eigenkets you don't need to use the formula with the (in this case) infinite denominators anymore: the two sets coincide to first order Feb 5 '16 at 10:41
• Modern QM by Sakurai and Physics of Atoms and Molecules by Bransden and Joachain, as well as some online resources that I have found. All of them do not seem to really care about the fact that $H'$ is not diagonal in $|n,L,J,m_J\rangle$ basis. I don't really get what you mean. Since I know the exact form of $|n,L,J,m_J\rangle$ and how $H'=L_z+2S_z$ acts on these kets, I can easily compute the matrix element of $H'$ for fixed $n$ and $L$, namely $\langle n,L,J',m_J'|H'|n,L,J,m_J\rangle$. Having found this matrix, I can diagonalize it and find the corresponding basis. Feb 5 '16 at 10:57
• Aren't those steps of diagonalization not so hard to carry out? But why those authors neglect it? Feb 5 '16 at 11:02
• You indeed understood correctly. The basis that you'll find is, to first order, the perturbed eigenket basis you're looking for. As for the energy levels, the perturbation removes the degeneracy by adding to the former energy of the new kets the energies that correspond to the diagonal entries. Feb 5 '16 at 11:02

1. If I were to diagonalize $H'$, I must do it in the subspace of fixed $n$ and $J$, instead of fixed $n$ and $L$. This is because the energy eigenvalues of the unperturbed Hamiltonian $H_0$ are specified by $(n,J)$ (states with same $n$ and $J$ but different $L$'s can have the same energy).
2. The matrix elements of $H'=J_z+S_z$ between states of the same $n,J$ but different $L$'s and/or $m_J$'s vanish, \begin{aligned} \langle n,L',J,m_J'|H'| n,L,J,m_J\rangle &= m_J\hbar\delta_{m_Jm_J'}\delta_{LL'} + \langle n,L',J,m_J'|S_z| n,L,J,m_J\rangle\\ &= \delta_{LL'} \Bigg( m_J\hbar\delta_{m_Jm_J'} + \frac{\hbar}{2} \sqrt{\frac{(L'\pm m_J'+1/2)(L\pm m_J+1/2)}{(2L'+1)(2L+1)}} \delta_{m_J-1/2,m_J'-1/2} \ldots \\ & \ldots -\frac{\hbar}{2} \sqrt{\frac{(L'\mp m_J'+1/2)(L\mp m_J+1/2)}{(2L'+1)(2L+1)}} \delta_{m_J+1/2,m_J'+1/2} \Bigg)\\ &= \delta_{LL'} \Bigg( m_J\hbar\delta_{m_Jm_J'} + \frac{\hbar}{2} \frac{(L\pm m_J+1/2)}{(2L+1)} \delta_{m_J-1/2,m_J'-1/2} \ldots \\ & \ldots -\frac{\hbar}{2} \frac{(L\mp m_J+1/2)}{(2L+1)} \delta_{m_J+1/2,m_J'+1/2} \Bigg)\\ &= K\delta_{m_Jm_J'}\delta_{LL'} \end{aligned} with $$K = m_J\hbar + \frac{\hbar}{2} \frac{(L\pm m_J+1/2)}{(2L+1)}-\frac{\hbar}{2} \frac{(L\mp m_J+1/2)}{(2L+1)} = m_J\hbar \Bigg( 1 \pm \frac{1}{(2L+1)}\Bigg).$$
• Degeneracy becomes your concern when it's the unperturbed Hamiltonian that is degenerate. You don't want to care too much about the spectrum of the perturbation itself, at least for first order perturbation theory. As I already showed above, in the subspace of fixed $n$ and $J$ in the spectrum of $H_0$, $H'$ is diagonal. Nov 24 '16 at 7:47


text:
# Mixed-strategy Nash equilibria

Is the following statement always true:

if there is a mixed-strategy Nash equilibria then it is unique.

I know that there can be several pure strategy Nash equilibrias.

## 1 Answer

Shameless Advertisement: Game Theory proposal on Area 51 that you should totally follow!

No. The easiest way to prove this is by counterexample. Expanding matching pennies, we can create a game with two mixed strategies (players either mix between A and B or between C and D):

What might be true about that statement is for a mix of particular pure strategies for two players, there is a unique mixed strategy equilibrium. This presumes that there is a threshold after which you switch from using strategy $0$ to strategy $1$. At this threshold, your opponent is ambivalent between her strategies. As depicted below, the intersection (and hence mix) will be unique.


text:
1. double integral, conditions

I have to find: I I (over S) (2/(sqrt(1+x2+y2)) dx dy

S is a set of x,y such that 1<=x2 + y2 <=4 and x>=0, y>=0.

I understand that we have a circle here, actually a circle within a circle, and as i see, conditions give me only quarter of that circle, r going from 1 to 2 and having 0 to 1/2pi, right?

I guess i should work somehow with polar form, but how to actually do the integral?

thanks

2. Originally Posted by fiksi
I have to find: I I (over S) (2/(sqrt(1+x2+y2)) dx dy

S is a set of x,y such that 1<=x2 + y2 <=4 and x>=0, y>=0.

I understand that we have a circle here, actually a circle within a circle, and as i see, conditions give me only quarter of that circle, r going from 1 to 2 and having 0 to 1/2pi, right?

I guess i should work somehow with polar form, but how to actually do the integral?

thanks
If $\iint_R \frac{2}{\sqrt{1+x^2+y^2}}\,dA = \int_0^{\pi/2} \int_1^2 \frac{2r}{\sqrt{1+r^2}}\, dr d\theta$. You should be able to do this integral.

3. Originally Posted by danny arrigo
If $\iint_R \frac{2}{\sqrt{x^2+y^2}}\,dA = \int_0^{\pi/2} \int_1^2 \frac{2r}{\sqrt{1+r^2}}\, dr d\theta$. You should be able to do this integral.
Yes, we have in sqrt 1 + x2 + y2, not just x2 + y2. But i see now, i can put

I get 2/sqrt(1+r2). If I integrate as you say, using substitution, i get pi/2(2sqrt5 - 2 sqrt2). It seems I have made a mistake somehwere? Or is this it?

4. Originally Posted by fiksi
Yes, we have in sqrt 1 + x2 + y2, not just x2 + y2. But i see now, i can put