text:
# 4.2 Graph linear equations in two variables

 Page 1 / 7
By the end of this section, you will be able to:
• Recognize the relationship between the solutions of an equation and its graph.
• Graph a linear equation by plotting points.
• Graph vertical and horizontal lines.

Before you get started, take this readiness quiz.

1. Evaluate $3x+2$ when $x=-1$ .
If you missed this problem, review [link] .
2. Solve $3x+2y=12$ for $y$ in general.
If you missed this problem, review [link] .

## Recognize the relationship between the solutions of an equation and its graph

In the previous section, we found several solutions to the equation $3x+2y=6$ . They are listed in [link] . So, the ordered pairs $\left(0,3\right)$ , $\left(2,0\right)$ , and $\left(1,\frac{3}{2}\right)$ are some solutions to the equation $3x+2y=6$ . We can plot these solutions in the rectangular coordinate system as shown in [link] .

 $3x+2y=6$ $x$ $y$ $\left(x,y\right)$ 0 3 $\left(0,3\right)$ 2 0 $\left(2,0\right)$ 1 $\frac{3}{2}$ $\left(1,\frac{3}{2}\right)$

Notice how the points line up perfectly? We connect the points with a line to get the graph of the equation $3x+2y=6$ . See [link] . Notice the arrows on the ends of each side of the line. These arrows indicate the line continues.

Every point on the line is a solution of the equation. Also, every solution of this equation is a point on this line. Points not on the line are not solutions.

Notice that the point whose coordinates are $\left(-2,6\right)$ is on the line shown in [link] . If you substitute $x=-2$ and $y=6$ into the equation, you find that it is a solution to the equation.

So the point $\left(-2,6\right)$ is a solution to the equation $3x+2y=6$ . (The phrase “the point whose coordinates are $\left(-2,6\right)$ ” is often shortened to “the point $\left(-2,6\right)$ .”)

So $\left(4,1\right)$ is not a solution to the equation $3x+2y=6$ . Therefore, the point $\left(4,1\right)$ is not on the line. See [link] . This is an example of the saying, “A picture is worth a thousand words.” The line shows you all the solutions to the equation. Every point on the line is a solution of the equation. And, every solution of this equation is on this line. This line is called the graph of the equation $3x+2y=6$ .

## Graph of a linear equation

The graph of a linear equation     $Ax+By=C$ is a line.

• Every point on the line is a solution of the equation.
• Every solution of this equation is a point on this line.

The graph of $y=2x-3$ is shown.

For each ordered pair, decide:

Is the ordered pair a solution to the equation?
Is the point on the line?

A $\left(0,-3\right)$  B $\left(3,3\right)$  C $\left(2,-3\right)$  D $\left(-1,-5\right)$

## Solution

Substitute the x - and y - values into the equation to check if the ordered pair is a solution to the equation.

1. Plot the points A $\left(0,3\right)$ , B $\left(3,3\right)$ , C $\left(2,-3\right)$ , and D $\left(-1,-5\right)$ .

The points $\left(0,3\right)$ , $\left(3,3\right)$ , and $\left(-1,-5\right)$ are on the line $y=2x-3$ , and the point $\left(2,-3\right)$ is not on the line.

The points that are solutions to $y=2x-3$ are on the line, but the point that is not a solution is not on the line.

Use the graph of $y=3x-1$ to decide whether each ordered pair is:

• a solution to the equation.
• on the line.

$\left(0,-1\right)$ $\left(2,5\right)$

yes, yes  yes, yes

Use graph of $y=3x-1$ to decide whether each ordered pair is:

• a solution to the equation
• on the line

$\left(3,-1\right)$ $\left(-1,-4\right)$

no, no  yes, yes

## Graph a linear equation by plotting points

There are several methods that can be used to graph a linear equation. The method we used to graph $3x+2y=6$ is called plotting points, or the Point–Plotting Method.

Three-fourths of the people at a concert are children. If there are 87 children, what is the total number of people at the concert?
Erica earned a total of $50,450 last year from her two jobs. The amount she earned from her job at the store was$1,250 more than four times the amount she earned from her job at the college. How much did she earn from her job at the college?
Tsimmuaj
Erica earned a total of $50,450 last year from her two jobs. The amount she earned from her job at the store was$1,250 more than four times the amount she earned from her job at the college. How much did she earn from her job at the college?
Tsimmuaj
? Is there anything wrong with this passage I found the total sum for 2 jobs, but found why elaborate on extra If I total one week from the store *4 would = the month than the total is = x than x can't calculate 10 month of a year
candido
what would be wong
candido
87 divided by 3 then multiply that by 4. 116 people total.
Melissa
the actual number that has 3 out of 4 of a whole pie
candido
was having a hard time finding
Teddy
use Matrices for the 2nd question
Daniel
One number is 11 less than the other number. If their sum is increased by 8, the result is 71. Find the numbers.
26 + 37 = 63 + 8 = 71
gayla
Amara currently sells televisions for company A at a salary of $17,000 plus a$100 commission for each television she sells. Company B offers her a position with a salary of $29,000 plus a$20 commission for each television she sells. How televisions would Amara need to sell for the options to be equal?
yes math
Kenneth
company A 13 company b 5. A 17,000+13×100=29,100 B 29,000+5×20=29,100
gayla
DaMarcus and Fabian live 23 miles apart and play soccer at a park between their homes. DaMarcus rode his bike for 34 of an hour and Fabian rode his bike for 12 of an hour to get to the park. Fabian’s speed was 6 miles per hour faster than DaMarcus’s speed. Find the speed of both soccer players.
?
Ann
DaMarcus: 16 mi/hr Fabian: 22 mi/hr
Sherman
Joy is preparing 20 liters of a 25% saline solution. She has only a 40% solution and a 10% solution in her lab. How many liters of the 40% solution and how many liters of the 10% solution should she mix to make the 25% solution?
15 and 5
32 is 40% , & 8 is 10 % , & any 4 letters is 5%.
Karen
It felt that something is missing on the question like: 40% of what solution? 10% of what solution?
Jhea
its confusing
Sparcast
3% & 2% to complete the 25%
Sparcast
because she already has 20 liters.
Sparcast
ok I was a little confused I agree 15% & 5%
Sparcast
8,2
Karen
Jim and Debbie earned $7200. Debbie earned$1600 more than Jim earned. How much did they earned
5600
Gloria
1600
Gloria
Bebbie: 4,400 Jim: 2,800
Jhea
A river cruise boat sailed 80 miles down the Mississippi River for 4 hours. It took 5 hours to return. Find the rate of the cruise boat in still water and the rate of the current.
A veterinarian is enclosing a rectangular outdoor running area against his building for the dogs he cares for. He needs to maximize the area using 100 feet of fencing. The quadratic equation A=x(100−2x) gives the area, A , of the dog run for the length, x , of the building that will border the dog run. Find the length of the building that should border the dog run to give the maximum area, and then find the maximum area of the dog run.
ggfcc
Mike
Washing his dad’s car alone, eight year old Levi takes 2.5 hours. If his dad helps him, then it takes 1 hour. How long does it take the Levi’s dad to wash the car by himself?
1,75hrs
Mike
I'm going to guess. Divide Levi's time by 2. Then divide 1 hour by 2. 1.25 + 0.5 = 1.3?
John
Oops I mean 1.75
John
I'm guessing this because since I have divide 1 hour by 2, I have to do the same for the 2.5 hours it takes Levi by himself.
John
1,75 hrs is correct Mike
Emund
How did you come up with the answer?
John
Drew burned 1,800 calories Friday playing 1 hour of basketball and canoeing for 2 hours. On Saturday, he spent 2 hours playing basketball and 3 hours canoeing and burned 3,200 calories. How many calories did he burn per hour when playing basketball?
Brandon has a cup of quarters and dimes with a total value of $3.80. The number of quarters is four less than twice the number of dimes. How many quarters and how many dimes does Brandon have? Kendra Reply Tickets to a Broadway show cost$35 for adults and $15 for children. The total receipts for 1650 tickets at one performance were$47,150. How many adult and how many child tickets were sold?
825
Carol
Arnold invested $64,000, some at 5.5% interest and the rest at 9%. How much did he invest at each rate if he received$4,500 in interest in one year? How do I do this
how to square
easiest way to find the square root of a large number?
Jackie
the accompanying figure shows known flow rates of hydrocarbons into and out of a network of pipes at an oil refinery set up a linear system whose solution provides the unknown flow rates (b) solve the system for the unknown flow rates (c) find the flow rates and directions of flow if x4=50and x6=0


text:
Solve the following :
Question:

A uniform wheel of radius $R$ is set into rotation about its axis at an angular speed $\omega$. This rotating wheel is now placed on a rough horizontal surface with its axis horizontal. Because of friction at the contact, the wheel accelerates forward and its rotation decelerates till the wheel starts pure rolling on the surface. Find the linear speed of the wheel after it starts pure rolling.

Solution:

By angular momentum conservation at bottom point since ${ }^{\tau_{e x t}}=0$

$L_{i}=L_{f}$

$I \omega=m v^{\prime} R+I \omega^{\prime}$

$\left(\frac{m R^{2}}{2}\right) \omega=m v^{\prime} R+\left(\frac{m R^{2}}{2}\right)\left(\frac{v y}{R}\right)$

$v^{p}=\frac{\omega R}{3}$

format: plain


text:
Article Contents
Article Contents

# Optimization of a model Fokker-Planck equation

• We discuss optimal control problems for the Fokker--Planck equation arising in radiotherapy treatment planning. We prove existence and uniqueness of an optimal boundary control for a general tracking--type cost functional in three spatial dimensions. Under additional regularity assumptions we prove existence of a continuous necessary first--order optimality system. In the one--dimensional case we analyse a numerical discretization of the Fokker--Planck equation. We prove that the resulting discrete optimality system is a suitable discretization of the continuous first--order system.
Mathematics Subject Classification: Primary: 85A25, 76P05; Secondary: 49J20, 92C50.

 Citation:


text:
1. May 16, 2015

### applied ahmed

i need thee the derivation of relativistic doppler shift. i found its derivation in the book of Serway, but it is not in detail and step by step.
in the book there is given that:

can anyone give me the step after eq#1.13? how eq#1.13 converted in the form of eq#1.14?

2. May 16, 2015

### wabbit

The step from 1.13 to 1.14 is just $1-\frac{v^2}{c^2}=(1- \frac{v}{c})(1+ \frac{v}{ c})$

3. May 16, 2015

### applied ahmed

but how comes a square root in the denominator of eq#1.14

4. May 16, 2015

### applied ahmed

thanks my problem solved


text:
# Multilevel-Atomic Susceptibility

This tutorial demonstrates Meep's ability to model saturable gain and absorption via multilevel atomic susceptibility. This is based on a generalization of the Maxwell-Bloch equations which involve the interaction of a quantized system having an arbitrary number of levels with the electromagnetic fields. The theory is described in Materials/Saturable Gain and Absorption. This example involves computing the lasing thresholds of a two-level, multimode cavity in 1d similar to the structure described in Figure 2 of Optics Express, Vol. 20, pp. 474-88, 2012.

First, the cavity consists of a high-index medium ($n = 1.5$) with a perfect-metallic mirror on one end and an abrupt termination in air on the other.

resolution = 400
ncav = 1.5        # cavity refractive index
Lcav = 1          # cavity length
dpml = 1          # PML thickness
sz = Lcav + dpad + dpml
cell_size = mp.Vector3(z=sz)
dimensions = 1
pml_layers = [mp.PML(dpml, side=mp.High)]

The properties of the polarization of the saturable gain are determined by the central transition's frequency ω$_a$ and full-width half-maximum Γ as well as the coupling constant between the polarization and the electric field σ. Both ω$_a$ and Γ are specified in units of 2π$c$/$a$. As this example involves comparing results from Meep with the steady-state ab initio laser theory (SALT), we show explicitly how to convert between the different variable nomenclatures used in each method.

omega_a = 40                             # omega_a in SALT
freq_21 = omega_a/(2*math.pi)            # emission frequency  (units of 2\pi c/a)

gamma_perp = 4                           # HWHM in angular frequency, SALT
gamma_21 = (2*gamma_perp)/(2*math.pi)    # FWHM emission linewidth in sec^-1 (units of 2\pi c/a)

theta = 1                                # theta, the off-diagonal dipole matrix element, in SALT
sigma_21 = 2*theta*theta*omega_a         # dipole coupling strength (hbar = 1)

To understand the need for the high resolution, let us calculate the central wavelength of the lasing transition inside the high-index cavity relative to the cavity length:

The cavity contains roughly 10 wavelengths. This is an unphysically small cavity. Thus, to ensure that the electric field within the cavity is properly resolved, we have chosen roughly 40 pixels per wavelength, yielding a resolution of 400.

Next, we need to specify the non-radiative transition rates of the two-level atomic medium we're using as well as the total number of gain atoms in the system $N_0$. The non-radiative transition rates are specified in units of $c$/$a$.

rate_21 = 0.005        # non-radiative rate  (units of a/c)
N0 = 37                # initial population density of ground state
Rp = 0.0051            # pumping rate of ground to excited state

For a two-level atomic gain medium, the effective inversion that this choice of parameters corresponds to in SALT units can be calculated as:

The term in parenthesis on the right-hand side is the definition of $D_0$ in normal units, and the additional factor of $|\theta|^2 / \hbar \gamma_\perp$ converts to SALT's units.

transitions = [mp.Transition(1, 2, pumping_rate=Rp, frequency=freq_21, gamma=gamma_21,
sigma_diag=mp.Vector3(sigma_21,0,0)),
mp.Transition(2, 1, transition_rate=rate_21)]
ml_atom = mp.MultilevelAtom(sigma=1, transitions=transitions, initial_populations=[N0])
two_level = mp.Medium(index=ncav, E_susceptibilities=[ml_atom])

geometry = [mp.Block(center=mp.Vector3(z=-0.5*sz+0.5*Lcav)),
size=mp.Vector3(mp.inf,mp.inf,Lcav), material=two_level)]

Definition of the two-level medium involves the MultilevelAtom sub-class of the E_susceptibilities material type. Each radiative and non-radiative Transition is specified separately. Note that internally, Meep treats pumping_rate and transition_rate identically, and you can use them interchangeably, but it is important to specify the from_level and to_level parameters correctly, otherwise the results will be undefined. The choice of these parameters requires some care. For example, choosing a pumping rate that lies far beyond the first lasing threshold will yield large inversion, and thus large gain, which is not realistic, as most physical devices will overheat before reaching such a regime. Meep will still produce accurate results in this regime though. Additionally, choosing the total simulation time is especially important when operating near the threshold of a lasing mode, as the fields contain relaxation oscillations and require sufficient time to reach steady state.

Also important is the definition of σ. When invoking the MultilevelAtom sub-class of the E_susceptibilities material type, we need to specify the three components of sigma_diag. In this example, this is mp.Vector3(sigma_21,0,0). Internally, Meep defines σ as the product of sigma of the MultilevelAtom sub-class (1 in this example) with sigma_diag of each Transition. Thus, this saturable gain media will only couple to, and amplify, the E$_x$ component of the electric field.

The field within the cavity is initialized to arbitrary non-zero values and a fictitious source is used to pump the cavity at a fixed rate. The fields are time stepped until reaching steady state. Near the end of the time stepping, we output the electric field outside of the cavity.

sim = mp.Simulation(cell_size=cell_size,
resolution=resolution,
boundary_layers=pml_layers,
geometry=geometry,
dimensions=dimensions)

sim.init_sim()

def field_func(p):
return 1 if p.z==-0.5*sz+0.5*Lcav else 0

sim.fields.initialize_field(mp.Ex, field_func)

endt = 7000

def print_field(sim):
print("field:, {}, {}".format(sim.meep_time(), fp))

sim.run(mp.after_time(endt-250, print_field), until=endt)

The spectra of the field intensity is shown below.

There are two lasing modes above threshold in the vicinity of the center transition frequency ω$_a$=40 as we would expect. Remember, when finding the frequency axis that Meep uses a Courant factor of $\Delta t = 0.5 \Delta x$. We have also converted the electric field to SALT units using:

For two-level gain media, $\gamma_\parallel = \gamma_{12} + \gamma_{21}$. We can also verify that the system is not exhibiting relaxation oscillations by directly plotting the electric field as a function of time and looking for very long time-scale oscillations. In the continuum limit, these modes would appear as Dirac delta functions in the spectra. The discretized model, however, produces peaks with finite width. Thus, we need to integrate a fixed number of points around each peak to calculate the correct modal intensity.

By varying $N_0$ or the pumping rate $R_p$, we can change the total gain available in the cavity. This is used to find the laser's modal intensities as a function of the strength of the gain. We can compare the simulated modal intensity with SALT as well as an independent FDTD solver based on the Maxwell-Bloch equations. All three methods produce results with good agreement close to the first lasing threshold.

Further increasing the gain continues to yield good agreement.


text:
# Calculate points of rotated shape

This topic is 1369 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

I have a shape(width and height always the same), looking like this:

[attachment=23668:org.png]

I then rotate it by 45 degrees and want to calculate the edge of each pillar.

[attachment=23669:rot.png]

The top-left corner of the shape is x:0 y:0.

##### Share on other sites

want to calculate the edge..

The edge (i.e., a line) or the location of the red points?

The top-left corner of the shape is x:0 y:0.

Which direction are the axes? +Y up? down? Or +X up? down?

Clarification needed as mentioned.

Edited by Buckeye

##### Share on other sites

The red points is what I want to calculate.

Going down increases Y and moving right increases X.

##### Share on other sites
I'll tell you how to perform the computation in coordinates where the center of rotation is also the origin. We can figure out how to adapt that for your case later. I'll also use the common convention in Math, where y grows going up and x grows going to the right.

Let's identify the point (x,y) with the complex number z = x+y*i. A rotation is also a complex number: r = cos(angle)+sin(angle)*i. The rotated point is simply z' = z*r. If you can use a data type for complex numbers, I would just do it that way. If you can only use real numbers, you can expand the formulas yourself:

x' = real(z*r) = x*cos(angle) - y*sin(angle)
y' = imag(z*r) = y*cos(angle) + x*sin(angle)

In order to rotate around any other point c (again as a complex number), first compute z-c, then multiply by r and finally add c back in.

z' = (z-c)*r+c

You can handle the flip in the y coordinate yourself.

##### Share on other sites

I appreciate the help. But with very limited math skills, this is hard to understand. Particularly the complex-number part and the mathematical terms.

Its just throw me off. The results I get ingame are absurd.

Could you please explain in a way that is more basic?

##### Share on other sites

Let's say you start with the top point of the first image, with coordinates (40,0). First we apply a translation that would bring the center of rotation (40,40) to the origin. That is, we subtract 40 from each coordinate. Our point is now (0,-40). Next we flip the sign of the y coordinate, to adhere to the usual mathematical convention for 2D axes, giving us (0,40). Now we apply the rotation formulas I gave you in my previous post:

x' = x*cos(angle) - y*sin(angle) = 0*cos(45 degrees) - 40*sin(45 degrees) = -28.28
y' = y*cos(angle) + x*sin(angle) = 40*cos(45 degrees) + 0*sin(45 degrees) = 28.28

So the point is now (-28.28,28.28).

Next we undo the flip of the y coordinate: (-28,28,-28.28). Finally, we undo the translation by adding back 40 to each coordinate. The coordinates of the upper-left red point are then (11.72,11.72).

I cannot make it any more basic than that. But the list of steps may seem arbitrary if you don't follow the description on my other post.

##### Share on other sites

The example below returns 11.72, 11.72:

		double rot = Math.toRadians(45);
float unitX = 40;
float unitY = 0;

float x = unitX - unitX;
float y = unitY - unitX;

y = Math.abs(y);

float resX = (float) (x * Math.cos(rot) - y * Math.sin(rot));
float resY = (float) (y * Math.cos(rot) + x * Math.sin(rot));

resY = -resY;
resX += unitX;
resY += unitX;

System.out.println(resX + " " + resY);

But when used in the game, the results are a bit off.

Ingame, replacing 40 and 0 with the entity´s position in the world gave wrong results.
Furthermore, tried replacing them with width and height, and at the end, add the entity´s position. Gave better results, but was about 10 pixels to much:

	private Point2D.Float getSpawnPos(int rotation)
{
float unitX = width; //Entity´s width
float unitY = height; //Entity´s height

float x = unitX - unitX;
float y = unitY - unitX;

y = Math.abs(y);

float resX = (float) (x * Math.cos(rot) - y * Math.sin(rot));
float resY = (float) (y * Math.cos(rot) + x * Math.sin(rot));

resY = -resY;
resX += unitX;
resY += unitX;

resX += currX;//Entity´s position(x)
resY += currY;//Entity´s position(y)

return new Point2D.Float(resX, resY);
}

##### Share on other sites
When I subtracted or added 40 to each coordinate, that's because the center of rotation is (40,40), not because 40 is the x coordinate of the example I used. And I never mentioned using the absolute value.

Try this:
		double rot = Math.toRadians(45);
float unitX = whatever;
float unitY = whatever_else;

float x = unitX - 40.0f;
float y = unitY - 40.0f;

y = -y;

float resX = x * Math.cos(rot) - y * Math.sin(rot);
float resY = y * Math.cos(rot) + x * Math.sin(rot);

resY = -resY;
resX += 40.0f;
resY += 40.0f;

System.out.println(resX + " " + resY);

• 37
• 12
• 10
• 10
• 9
• ### Forum Statistics

• Total Topics
631362
• Total Posts
2999564
×


text:
## Add-ons to Science Survival Guide book

Bram van Ginneken 10 March 2013

## Peer review: don’t let the journals handle it?

Posted in Getting published

Peer review is central to science. But the system is functioning far from perfectly. One issue is that it is difficult to find good reviewers. This was already discussed five years ago on this blog and it was suggested that paying reviewers or making somehow sure that reviewers receive public credit for their efforts might be good ways to alleviate the problem. I agree especially with getting paid, but in my life I’ve only once been offered money to review a research paper. The offer, from a Saudi Arabian journal I had never heard about, surprised me so much that I decided to give it a try. They sent me a terrible paper to review and when I had filed my report, they paid me promptly.

Recently, two companies have launched initiatives that try to overhaul the peer review process. One offers money for reviews, the other more credits to reviewers, and more than that: they both want to take the review process out of the hands of the editorial staff of journals where the author has submitted his or her work. The big potential advantage is that reviews can be re-used when a paper travels from journal to journal in its quest to get published.

I find this idea quite attractive. What I see all the time is that papers rejected by a high impact journal are subsequently submitted to a journal a bit lower on the impact factor ladder, and if they are not accepted there, they are sent to journal number three, and so on. There are so many journals these days that almost every manuscript eventually is published in a journal somewhere. But the journey can be long, frustrating, and along the way many reviewers spend (or should I say waste?) their precious time, looking at the same paper. Often a reviewer gets to review the same paper multiple times! All in all, this is an inefficient process.

Peerage of Science and Rubriq want to change this. You submit a paper to their site, the paper gets reviewed, possibly revised by the authors, and is offered, together with the reviews and everything, to interested journals. Peerage is free and does not pay the reviewers, but as a submitting author you have to pay with credits that you can earn by reviewing papers. Moreover, you can gain a reputation as an excellent reviewer and get your reviews published in an online journal called Proceedings of Peerage of Science. Here is an article about Peerage. Rubriq takes a slightly different approach and pays reviewers $100 per review, so if you review very quickly you could even make a living out of this. Now, isn’t that nice for the postdoc in between jobs? Authors submitting to Rubriq pay$500 to \$700 per manuscript and get a standardized review that Rubriq calls a scorecard and an R-score, all within two weeks. Here is an article about Rubriq.

Will it work? This will largely depend on the willingness of journals to use these services. Scientific journals, especially the ones with high impact factors, are often very conservative and complacent, in my experience. Will they easily embrace a new procedure that could be seen as giving them less power? I’m also not sure if a reviewer can review a paper well if he or she does not know to which journal it is submitted. The supposedly neutral ‘scorecard’ procedure of Rubric should handle this. But I highly doubt if Rubriq will be able to obtain good quality reviews in such a short period of time. That said, I find both initiatives interesting, and potentially advantageous for authors, reviewers, and journals. What do you think?

- - - - - -
If you like this post why don't you email subscribe to our new posts. Or subscribe to our RSS feed.
1. 19 Mar 2013 10:21, Ad Lagendijk

Bram,
thank you. I never heard of this service. It is certainly a pain in the neck to continuously start over and over again a new submission-review cycle. I assume the publishers of high-impact journals will never accept this out-sourced reviewing, unless forced by the scientists. It is certainly worth a try.

Paying referees is also worth a try.

2. 24 Apr 2013 15:14, Frerik van Beijnum

Using the same referee reports for different journals can also have a serious downside. Sometimes one is confronted with a referee that is extremely critical and almost impossible to convince. Especially when it concerns more subjective criteria like novelty, this can be problematic.

As a side remark, a variation could be to ask the referees to suggest a few journals for which the work is suitable in their opinion.

3. 29 Apr 2013 23:03, The Future of Scientific Peer Review | Rubriq Blog

[…] Peer review: don’t let the journals handle it? Bram van Ginneken 10 March 2013 Peer review is central to science. But the system is functioning far from perfectly. One issue is that it is difficult to find good reviewers. This was already discussed five years ago on this blog and it was suggested that paying reviewers or making somehow sure that reviewers receive public credit for their efforts might be good ways to alleviate the problem. Share […]

4. 25 Jul 2013 7:50, Manuscriptedit

Hi,
Nice tips,thanks for sharing such useful information.At present, the peer review process is implemented by a majority of scientific journals.It helps to prevent falsified work from being published.Thanks for this brilliant advice.

XHTML: You can use these tags:
  <acronym title="">
      <q cite=""> <s>

*

By submitting a comment here you grant this site a perpetual license to reproduce your words and name/web site in attribution.

Subscribe without commenting


text:
Getting started with C++ Game Development

This topic is 4248 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

Recommended Posts

Hi, I was wondering, what do I need to make games with C++? I have Borland C++ Builder 6.0 and Bloodshed Dev-C++. I would like to know: 1.What I need to make games 2.Links to tutorials/gamedev.net articles for using the tools I need to make games I already know C++

Share on other sites
Ok - so I need the DirectX SDK to make games?

And can I use the DirectX SDK with Borland C++ Builder 6.0?

Share on other sites
Hi, nice to meet U...

Of course U can... U just need to link the library and header file into the borland then U can compile your program...

Share on other sites
Ok I'm very confused. When I start a new Windows Application in Borland C++ Builder 6.0, I get a blank form with the following code:
//---------------------------------------------------------------------------#include <vcl.h>#pragma hdrstop#include "Unit1.h"//---------------------------------------------------------------------------#pragma package(smart_init)#pragma resource "*.dfm"TForm1 *Form1;//---------------------------------------------------------------------------__fastcall TForm1::TForm1(TComponent* Owner)        : TForm(Owner){}//---------------------------------------------------------------------------

Now what do I do?

(sorry this is very confiusing since I have only ever made command line apps in C++ before)

Share on other sites
If that is the case, I think should go for a "Win32 tutorial" first. Because it is really hard to explain here. At least U must know how to create a blank Window and have some understanding on the message loop.

Sorry about that I didn mention earlier, I am fans of Microsoft. But I do did some work on Borland but with very little knowledge about Borland.

For that piece of code, that is a dialog when U compile it. U can customise the "TForm1 *Form1;" to other name. Eg. TForm1 *My_Form;...

Share on other sites
I would highly recomend that you check out Microsoft Visual C++ Express Edition. It is an IDE and compiler like Dev-C++ and Borland, but it is much better, at least in my opinion and numerous others.

If you want complete easy of use for getting started, check out SDL. SDL handles the creation of windows, 2D graphics, keyboard/mouse/joystick input, CDs, audio, and more. I would recomend this over the Win32 API for a beginner. It would be a great way to at least get started making games, then once you have the hang of it, moving over to Win32 shouldn't be tough.

Share on other sites
ok. how much win32 do I have to learn before I can try games?

Also: another question: Before I installed Borland C++ Builder, I tried MS Visual C++ Express Edition, but my code didn't work!(even in command line). when i opened a default app it outputed to the screen using "Console::WriteLine(L"Hello World")" which I have never heard of! so if your a microsoft fan do u know why my code isnt working?

Share on other sites
Quote:
 Original post by sahanxok. how much win32 do I have to learn before I can try games?Also: another question: Before I installed Borland C++ Builder, I tried MS Visual C++ Express Edition, but my code didn't work!(even in command line). when i opened a default app it outputed to the screen using "Console::WriteLine(L"Hello World")" which I have never heard of! so if your a microsoft fan do u know why my code isnt working?

You need the Platform SDK for Win32 apps. I'm guessing you created a .NET project.

Share on other sites
Quote:
Original post by Omid Ghavami
Quote:
 Original post by sahanxok. how much win32 do I have to learn before I can try games?Also: another question: Before I installed Borland C++ Builder, I tried MS Visual C++ Express Edition, but my code didn't work!(even in command line). when i opened a default app it outputed to the screen using "Console::WriteLine(L"Hello World")" which I have never heard of! so if your a microsoft fan do u know why my code isnt working?

You need the Platform SDK for Win32 apps. I'm guessing you created a .NET project.

No, it was a Win32 project. I installed the SDK, but I think I might have configured VC++ incorrectly. I will try VC++ again.

[Edited by - sahanx on July 7, 2006 5:01:47 AM]

Share on other sites
I would also consider giving Simple Directmedia Layer (SDL) a try.

Share on other sites
Ok - I might try SDL.

Hey would OpenGL mabye be easier than DirectX?

Share on other sites
Good News! Visual C++ works!

I will learn a bit of basic Win32, then try DirectX

Share on other sites
Alot of people seem to think that OpenGL is easier for a beginner than DirectX, but not be a signifigant amount. I would stay away from both OpenGL and DirectX for a while though. SDL or Win32 is enough to create a complete 2D game. I would recomend at least making a Teteris/Pong/Space Invaders clone with just them, not DirectX or OpenGL first.

Share on other sites
Oh no! Problems!

You see, in VC++ I can create Win32 Command Line Apps but Windows Forms Applications are only available for .NET.

What do I do now?

Share on other sites
Ok im learning to use SDL with Dev-C++ but i'd really like to use Visual C++ instead but I can't create win32 windows forms apps!

what do i do now?

Share on other sites

After that everything should work as advertised.

Quote:

Share on other sites
FOr some reason code that works in Dev-C++ still dosent work in VC++. I think I'll just use Dev-C++ for now. Sure, it doesn't have IntelliSense or anything, but it'll do


text:
Lemma 33.7.15. Let $k \subset K$ be an extension of fields. Let $X$ be a scheme over $k$. For every connected component $T$ of $X$ the inverse image $T_ K \subset X_ K$ is a union of connected components of $X_ K$.

Proof. This is a purely topological statement. Denote $p : X_ K \to X$ the projection morphism. Let $T \subset X$ be a connected component of $X$. Let $t \in T_ K = p^{-1}(T)$. Let $C \subset X_ K$ be a connected component containing $t$. Then $p(C)$ is a connected subset of $X$ which meets $T$, hence $p(C) \subset T$. Hence $C \subset T_ K$. $\square$

In your comment you can use Markdown and LaTeX style mathematics (enclose it like $\pi$). A preview option is available if you wish to see how it works out (just click on the eye in the toolbar).


text:
#### Further Information

In addition to our technical support (e.g. via chat), you’ll find resources on our website that may help you with your design using Dlubal Software.

Receive information including news, useful tips, scheduled events, special offers, and vouchers on a regular basis.

• ### Why are the equivalent member designs grayed out in the Stability tab when the plastic designs are activated by means of the partial internal force process (RF- / STEEL Plasticity)?

New FAQ 003582 EN

Since the equivalent member designs of Eurocode 3 have different interactions than are the case for the designs according to the partial internal prescalcision method and a mixture of these different designs is not desired for reasons of clarity, RFEM deactivates the equivalent member designs when using the RF- / STEEL Plasticity add-on.
• ### What is the easiest way to delete the node of two crossing members?

New FAQ 003563 EN

Unfortunately, there is no automated function. In this case, you can use the drag-and-drop function to move the node to one of the corner nodes and then create the crossing members again.
• ### I would like to analyze bending buckling for timber components with imperfections and internal forces according to the second-order analysis. Is it sufficient to activate it in Details in the RF- / TIMBER Pro add-on module, or are other settings necessary?

New FAQ 003544 EN

The setting in Figure 01 only controls the influence on the design side. After activating this function, the buckling designs in the "Effective Lengths" window are deactivated. Thus, only a lateral-torsional buckling analysis is performed.

In order to calculate with the design values of the stiffnesses, they have to be reduced by the partial safety factor according to [1] . To do this, select the marked option in the calculation parameters (see Figure 02).

If the automatic combinatorics was used for the standard EN 1990 + EN 1995, this setting is automatically activated for combinations for the ULS according to the second-order analysis. For combinations for SLS, this option is automatically deactivated as well as for combinations generated according to the 1st order. However, the automatic assignment is only carried out by means of the calculation type in the "Combination Expressions" window (see Figure 03).

If you want to calculate the component stiffnesses with the 5% quantile value of the stiffness parameters divided by the partial safety factor, you have to additionally activate the "Modify Stiffness" function in the calculation parameters and modify the stiffnesses manually.

• ### How can I transfer a field with a node instead of just a single node via the COM interface in VBA?

New FAQ 003542 EN

To transfer several elements, you first have to create a field (array) in VBA:

Dim nodes (0 to 2) as RFEM5.Node

Then, you can transfer all nodes at once to the field (here three elements 0,1,2) with the method IModelData.SetNodes ().

These methods are also available for the following structural elements, for example:

IModelData.SetLines ()IModelData.SetMembers ()IModelData.SetSurfaces ()
• ### I recently purchased RSTAB with the CONCRETE module. Is it possible to perform a stability analysis of reinforced concrete columns?

New FAQ 003532 EN

Yes, the CONCRETE for RSTAB 8 module also includes the nonlinear reinforced concrete design. Thus, you can activate the "Nonlinear design (state II)" in the "Ultimate Limit State" tab.

In the detail settings for the nonlinear design, you can select the "General design method for members subjected to compression according to the second-order analysis".

It is important that you define the imperfections in RSTAB and apply load curves (CO) according to the second-order analysis for the design, no result combinations (RC)!

###### Note on RFEM 5:

In RFEM 5, the same procedure is possible in RF-CONCRETE Members. However, the add-on module RF-CONCRETE NL in RFEM is required for the non-linear reinforced concrete design.

• ### In the global calculation parameters, the option "Special treatment" of members is grayed out and can not be activated. What is the reason for this?

New FAQ 003526 EN

This option is only available even if nonlinear structural elements (for ex Tension members) are contained in the structure. You can easily check if this is the case. Open the global calculation parameters and check the "Nonlinearities" dialog box at the bottom left to see if the option "Members due to member type" or the option "Member Nonlinearities" is available. If they are grayed out, there are no members with these parameters and the "Special treatment" option is accordingly unavailable, because then there will be no failing members.
• ### In which directions do the member types 'Spring' and 'Dashpot' have a stiffness?

New FAQ 003498 EN

Members with the member type 'Spring' or 'Damper' have only axial stiffness, that is, in the direction of the local x-direction. The bending stiffness and the stiffness perpendicular to the longitudinal member axis are negligibly small and are not considered in RFEM and RSTAB.

If a spring should be applied in the structure, it acts only in one direction; in the other two directions (local y- and z-direction), this member type must receive additional support, otherwise, the system becomes unstable.

• ### How many divisions must a member have for the calculation in RFEM so that I get accurate results?

New FAQ 003485 EN

It is not possible to globally answer this question because it depends on the system. There are several divisions to be considered in RFEM.

###### 1. Member divisions for results tables
You can create member divisions for result values by using the menu 'Insert > Model Data > 'Member Divisions'. This division ensures that - e.g. in the RFEM results tables - the internal forces of members can also be displayed at intermediate points. The graphical output remains unaffected.

###### 2. Member divisions
The divisions for the graphical result diagram and the determination of the extreme value can be viewed and influenced in the FE mesh settings (see Figure 1).

For cable, foundation, and tapered members or members with plastic properties, you can specify the number of internal divisions. They lead to a real division of the member by intermediate nodes. However, if a member is arranged on the boundary line of a surface or if the definition line has an FE mesh refinement, the specification has no effect.

Select the 'Activate Internal Member Divisions for Large Deformation Analysis' option to divide also beams by intermediate nodes for the calculation according to large deformation analysis so that these members are calculated with higher accuracy. The number of member divisions is taken over into the input field above.

If using the division even for straight members, which are not integrated into surfaces, FE nodes are generated on all free members and considered for calculations according to the linear static and second-order analysis. The length of the finite elements is either determined by the global target length l FE set in the General dialog section or entered manually.

With the option 'Use Division for Members with Nodes Lying on Them', RFEM generates FE nodes on those locations of the member where end nodes of other members are lying, without having any connection existing between these members.
• ### Is there an easy way to create a spatial structure from a 2D model whereby the nodes in columns and lines will be extruded into walls?

New FAQ 003476 EN

For lines, such an option is already directly accessible in the shortcut menu. For extruding nodes into members and lines in surfaces, it is also possible in the detail settings of Copy/Rotate/Mirror. The new elements will also be created as soon as at least one copy is generated.
In case this feature is not wanted anymore, it should be deactivated in the detail settings again.
• ### Is it possible to display relative member deformation in RFEM?

New FAQ 003467 EN

This function cannot be assessed or determined at the level of the basic program. This issue is fixed at the level of add-on modules such as RF-STEEL EC3 or RF-DEFORM. The second module is generic and can be used for any rod. For more information, visit: https://www.dlubal.com/en-US/products/rfem-and-rstab-add-on-modules/others/rf-deform .

1 - 10 of 118


text:
Department of

# Mathematics

Seminar Calendar
for events the day of Thursday, November 13, 2014.

.
events for the
events containing

Questions regarding events or the calendar should be directed to Tori Corkery.
     October 2014          November 2014          December 2014
Su Mo Tu We Th Fr Sa   Su Mo Tu We Th Fr Sa   Su Mo Tu We Th Fr Sa
1  2  3  4                      1       1  2  3  4  5  6
5  6  7  8  9 10 11    2  3  4  5  6  7  8    7  8  9 10 11 12 13
12 13 14 15 16 17 18    9 10 11 12 13 14 15   14 15 16 17 18 19 20
19 20 21 22 23 24 25   16 17 18 19 20 21 22   21 22 23 24 25 26 27
26 27 28 29 30 31      23 24 25 26 27 28 29   28 29 30 31
30

Thursday, November 13, 2014

10:00 am in 143 Altgeld Hall,Thursday, November 13, 2014

#### Quasiconformal Mappings on Generalized Grushin Planes

###### Colleen Ackermann (UIUC Math)

Abstract: We demonstrate that the complex plane and a class of generalized Grushin planes $G_r$, where $r$ is a function satisfying specific requirements, are quasisymmetrically equivalent. Then using conjugation we are able to develop an analytic definition of quasisymmetry for homeomorphisms on $G_r$ spaces. Next we will show our analytic definition of quasisymmetry is consistent with earlier notions of conformal mappings on the Grushin plane. This leads to several characterizations of conformal mappings on the generalized Grushin planes. Finally, we will conclude with a brief discussion of expanding the theory into higher dimensional Grushin spaces. This talk will be accessible for all graduate students.

11:00 am in 241 Altgeld Hall,Thursday, November 13, 2014

#### Fourier coefficients of modular forms

###### Dipendra Prasad   [email] (Tata Institute of Fundamental Research)

Abstract: Beginning with modular forms of integral and half integral weights on the upper half-plane where many properties of Fourier coefficients have been topics of large studies for centuries, I discuss, in this mostly expository lecture, some of these aspects for modular forms (or, automorphic forms) for larger groups, inspired by a famous theorem of Waldspurger on Fourier coefficients of half-integral weight forms.

1:00 pm in Altgeld Hall 243,Thursday, November 13, 2014

#### Stable Commutator Length in Baumslag-Solitar groups

###### Matt Clay (University of Arkansas)

Abstract: I will talk about computing stable commutator length in Baumslag-Solitar groups and about the spectrum of values it takes. For a certain elements, stable commutator length is computable and takes only rational values. There is a gap in the stable commutator length spectrum: no element of a Baumslag-Solitar group has stable commutator length between 0 and 1/12. Some of these techniques apply more generally to other groups acting on trees. This is joint work with Max Forester and Joel Louwsma. View talk at http://youtu.be/rbDe4Fh0x50

2:00 pm in 347 Altgeld Hall,Thursday, November 13, 2014

#### Some geometric mechanisms for Arnold Diffusion

###### Rafael de la Llave (Georgia Tech, Math)

Abstract: We consider the problem whether small perturbations of integrable mechanical systems can have very large effects. It is known that in many cases, the effects of the perturbations average out, but there are exceptional cases (resonances) where the perturbations do accumulate. It is a complicated problem whether this can keep on happening because once the instability accumulates, the system moves out of resonance. V. Arnold discovered in 1964 some geometric structures that lead to accumulation in carefully constructed examples. We will present some other geometric structures that lead to the same effect in more general systems and that can be verified in concrete systems. In particular, we will present an application to the restricted 3 body problem. We show that, given some conditions, for all sufficiently small (but non-zero) values of the eccentricity, there are orbits near a Lagrange point that gain a fixed amount of energy. These conditions (amount to the non-vanishing of an integral) are verified numerically. Joint work with M. Capinski, M. Gidea, T. M-Seara

2:00 pm in 007 Illini Hall,Thursday, November 13, 2014

#### Supercongruences and CM modular forms

###### Detchat Samart (UIUC Math)

Abstract: In this talk, we will present some results and conjectures about supercongruences related to Fourier coefficients of weight 3 modular forms. More precisely, one can use a result due to Chrisholm et al. to deduce some supercongruences between truncated $_3F_2$-hypergeometric series and $p$th-Fourier coefficients of weight 3 CM newforms, which were originally conjectured by Rodriguez-Villegas and Mortenson. These examples exhibit some interesting connections between the newforms and certain families of elliptic curves.

3:00 pm in 243 Altgeld Hall,Thursday, November 13, 2014

#### Numerical Algebraic Geometry: Theory and Practice

###### Andrew Sommese (Notre Dame)

Abstract: The goal of Numerical Algebraic Geometry is to carry out algebraic geometric calculations in characteristic zero using numerical analysis algorithms. This comes down to numerical algorithms to compute and manipulate solution sets of polynomial systems. Numerical Algebraic Geometry is a natural outgrowth of the continuation methods to compute isolated complex solutions of systems of polynomials with complex coefficients.  There are a wide range of applications including solution of chemical systems, kinematics, numerical solution of systems of nonlinear differential equations, and computation of algebraic geometric invariants. Bertini is open-source C software, developed by Bates (Colorado State U.), Hauenstein (Notre Dame), Sommese (Notre Dame), and Wampler (General Motors R. & D.), to carry out Numerical Algebraic Geometry computations. Bertini will be rewritten to make it a better tool for users.  Bertini dates from over a decade ago, and from this experience we have identified several possibilities for significant improvements. One goal is to change some of the data structures and add internal functionality that will give the user the ability to write scripts and interface with other software. In this talk, I will give an overview of Numerical Algebraic Geometry with an especial focus  on applications to the numerical solution of systems of nonlinear differential equations. I will consider the theoretical algorithms underlying the area in the light of the practical issues that arise when implementing the algorithms in the current and the future Bertini.

4:00 pm in 245 Altgeld Hall,Thursday, November 13, 2014

#### A refined notion of arithmetically equivalent number fields, and curves with isomorphic Jacobians

###### Dipendra Prasad (Tata Institute of Fundamental Research)

Abstract: Number fields with the same zeta functions have been of interest for a long time, inspiring similar constructions in a variety of contexts, the most common of which is the construction of Riemannian manifolds with the same spectrum. By a variant of this, we construct examples of number fields which are not isomorphic but for which their idele class groups are isomorphic. We also construct examples of projective algebraic curves which are not isomorphic but whose Jacobians are.


text:
# All Questions

1answer
200 views

1answer
113 views

### How to securely store data? / How to securely encrypt a file? [closed]

How do I safely encrypt a file? or formulated differentely: How do I safely store the data of my application in a file? Note: Using established tools isn't an option for this. The tasks need to be ...
2answers
340 views

### Is the HMAC construction really neccessary for a fixed length message?

The HMAC Construction is defined as: Hash( (Key XOR opad) || Hash((Key XOR ipad) || Message) ) This was designed because a simpler construction such as: ...
2answers
636 views

### Is One Time Pad considered Chosen-Plaintext Attack Secure?

If we're considering Chosen-Plaintext Attack setting, then the adversary has access to the Encryption Oracle right, and we know that OTP is only considered secure if we use the key only once. How ...
0answers
91 views

### How do I verify a reset token if the token is hashed in DB?

I've been searching around the web for best practice how-to on secure password reset system (email with reset url), and the idea to hash the token in the database, which I did not implement at first, ...
1answer
95 views

### CCA secure or not?

Let $F : \{0,1\}^n \times \{0,1\}^n \rightarrow \{0,1\}^n$ be a PRF. And let the encryption function be $Enc{_k}(m) = r || (F{_k}(m) \bigoplus r \bigoplus 0^n)$ , where r's value is random. Is this ...
1answer
196 views

### Computational indistinguishability with Example

Based on computational indistinguishability definition no PPT algorithm can distinguish $X$ from $Y$, where $X=\{X_n\}_{n \in N}$ and $Y=\{Y_n\}_{n \in N}$ are ensembles of probability ...
0answers
63 views

### Proposed unidirectional authentication scheme

I've been looking around for a way to authenticate a client to the server and deliver a message, but in a unidirectional fashion - that is, the client sends messages to the server, but the server ...
1answer
77 views

### How do we know one-way functions can be iterated?

Suppose we have some one-way function $h$. Without further specification of $h$, how can we be sure that we can define another function $g(n) = h(h(n))$? That is, how do we know the range of $h$ is a ...
2answers
1k views

### Modifying a [CRC32] checksum protected file [closed]

I dont want to ask for help without showing how far I came by myself, so this is what I have so far: The file of interest is an encrypted/obfuscated .bin script, which cotains information on certain ...
1answer
370 views

### Encryting data with password for local storage using libsodium

I want to encrypt data that is stored on the hard disk using a user-entered password. For this I look into the sodium docs and all I can find for symmetric encryption is authenticated encryption. ...
2answers
89 views

### Negilible Function $\frac{1}{n!}$

Is $\frac{1}{n!}$ a negligible function where $n$ is a security parameter? Application: I have a vector of n>100 elements. I permute it and give it to an adversary. The adversary can break it if it ...
1answer
86 views

### Does the plaintext have to be at least as long as the key in Polyalphabetic substituion cipher

In polyalphabetic substitution cipher, if we have a key $k$ (a string of letters) of length $n$ does the plaintext $m$ (also a string of letters) have to satisfy $|m| \geq n$? Also, side question, ...
1answer
187 views

### Authenticate a short message with redundant encryption instead of using a MAC?

I have a short message that’s exactly 128 bits of length. The message serves as a time-limited authorization token for a database. It contains a permission profile ID (64 bits) and an issue timestamp (...
1answer
111 views

### AES process candidates implementations and usages

There were fifteen candidates in the AES selection and I suppose that Rijndael wasn't the single good algorithm. I know that Camellia is an evolution of E2 candidate and can be used as symetric ...
1answer
67 views

### Ephemeral Diffie-Hellman in a symmetric crypto context

I'd like forward secrecy in a case where the two sides have a shared long-term symmetric key. I intend to use AES in GCM. It looks like ephemeral Diffie-Hellman is the best way to generate the session ...
1answer
166 views

### How do we guarantee plaintext is coprime in RSA?

The specifications for RSA state: $P^{\phi(N)} \equiv 1 ~mod~N$ if and only if $P$ and $N$ are coprime. Here $P$ is the plaintext and $N$ is the product of two suitable primes $x_1, x_2$. My question ...
1answer
355 views

### Calculating XOR Key Sizes

I've been playing around with the Matasano crypto challenges (cryptopals.com). I had a couple false-starts on the challenge that has you creating a program to calculate the key size of a XOR encrypted ...
2answers
387 views

### Elliptic curve brute forcing

I have elliptic curve of equation $y^2 \equiv x^3 -x$. And the coordinate of points $Q$ and $P$. I want to solve $Q=[k]P$ (where $k$ is the unknown) by testing all possible $k$. Is this the right ...
2answers
50 views

### what is recommended x length in Diffie Hellman algorithm

According to rfc documents http://tools.ietf.org/html/rfc2412#appendix-E.2 & http://tools.ietf.org/html/rfc3526#section-3, it has defined the prime and the <...
0answers
47 views

### Commitment scheme to share money

I have such problem: party $X$ has an amount of money $M$, which it needs to share with $n$ other parties. Every week the amount of money is different. Let say not, that I am a party A, which is one ...
1answer
204 views

### Why doesn't this defeat RSA?

Apologies for the obviously ridiculous question but I need to know where I'm going wrong here. For RSA, we compute $n=pq$ for primes $p$ and $q$. We then choose an $e$ such that $gcd(e, \varphi(n))=1$...
1answer
636 views

### Why cant Public Key Encryption be perfectly secure? [duplicate]

I would be very grateful for any help. I cant figure out why (probabilistic) public key encryption schemes can never provide perfect secrecy? Any Ideas? Excerpt: In contrast to the private-key ...
2answers
2k views

### Meet-in-the-Middle attack on 3DES [duplicate]

How can I apply the Meet-in-the-Middle attack to the 3DES algorithm, and why does the literature say that 3DES is more secure than DES?
1answer
245 views

### Recovering key length from transposition block cipher ciphertext

First of all I would like to say hello to all StackExchange users. So far I've been stalking the forum for some time, now it's time to leave the shadows. In my master thesis I'm writing about ...
0answers
34 views

### Outsourced Multiparty computation proof in Ideal world

I need to know in an outsourced two party computation where honst $A$ and $B$ outsource their private and secure data to a malicious server, why we need to design a simulator that interacts with an ...
1answer
125 views

### How to exchange authentication keys

I am trying to create a secure Bluetooth Low Energy connection. The peripheral server (the main device other people would connect to) would need to service many clients (users) and due to hardware ...
1answer
241 views

### Generate a list of valid ASCII codes

I have read many pages about encryption but I am really stuck on this. For access control to a building I want to print a 10 character ASCII code on a ticket (as a barcode). The barcode reader (...
3answers
857 views

### Practical Uses for Timing Attacks on Hash Comparisons (e.g. MD5)?

Consider the following code snippet: ...
0answers
129 views

### SHA3 Keccak, absorbing data to the state

I'm working on implementation of keccak algorithm and have one problem. Tell me please, takeing an example "test": will state (before block permutations, but after padding - pad10*1) look like this: {...
1answer
379 views

### where should private and public keys be stored? [closed]

I am kind of confused whether should a newly generated key pair be stored in a keystore or in just a normal plain text file? From what I read from online source, there are serveral explainations ...
0answers
49 views

### Role of trusted party in the Ideal model in Malicious case

Imagine there is a protocol supporting outosurced multi party computation. There are three parties involved in the protocol: client $A$, client $B$ and a server. Client $A$ and $B$ send their private ...
1answer
85 views

### Is there a tangible benefit in keeping the number of PBKDF iterations secret and not storing them with the ciphertext?

Suppose I have a local file and it is encrypted with a symmetric key derived from a strong passphrase, unique salt and $x$ number of PBKDF (e.g. Scrypt) iterations. I am interested in keeping this ...
0answers
66 views

Initially let me state that this is an atypical type of cryptographic encoding. First I break up my key into three parts $k = {W,\overrightarrow{b},\alpha}$. the $W$ is simply a $n \times n$ matrix, $... 2answers 218 views ### DH with AES - is that an acceptable security scheme over UPnP? I'm trying to devise a good security scheme to protect comms over Wi-Fi. Right now, I have 2 devices that already communicate via UPnP but I need to secure this communication. I've come up with this: ... 1answer 101 views ### what is the public information in Elliptic curve cryptosystems [closed] Currently my knowledge about Elliptic curve is quite limited to the textbook and I don't know how a practical Elliptic curve cryptosystem works. I read an example about key exchange using Elliptic ... 2answers 646 views ### Is HMAC-MD5 still secure for commitment or other common uses? MD5 collisions have been out for some time. In spite of this, HMAC-MD5 is still secure for authenticating data1. This illustrates a strength of the HMAC construction, it does not require that the hash ... 1answer 91 views ### How are messages from server secured when using SSL certificate In case of using SSL the certificate server has a primary key and a public key that is published to all clients - as far as I understood. So in this case when message is encrypted by public key (on ... 1answer 100 views ### Second generator for secp256k1 curve I want to get a group element$h$on the elliptic curve secp256k1. The important thing is that no one should know the discrete logarithm of$h$with respect to$g$. That is,$h$should be created from ... 1answer 852 views ### ECC vs RSA: how to compare key sizes? I know and I have understood the details of RSA, elliptic curve cryptography, (EC)DH and (EC)DSA. I keep reading everywhere that (if we don't consider non-deterministic computers) "ECC can achieve ... 0answers 115 views ### Avoiding known plaintext attacks with an additional XOR-Layer Can a cipher that is vulnerable to an known plaintext attack be made secure by adding an additional XOR-encryption? That is: suppose I have an (w.l.o.g. symmetric) encryption algorithm E were the ... 3answers 140 views ### Is what i'm trying to do safe? What both parties have: Server Master Secret (MS) Server supported versions (Svers) Agreed upon version (ver) Client Master Secret (MS) Client supported versions (Cvers) Agreed upon version (Ver) ... 0answers 32 views ### AES_GMAC implementation [closed] I need to implement AES_GMAC encryption and decryption in c/c++ programming language. For the implementation, I have referred following document: http://csrc.nist.gov/groups/ST/toolkit/BCM/documents/... 1answer 285 views ### Affine cipher: calculate the key from a known plaintext/ciphertext pair Suppose I have a ciphertext that I know is encrypted using an affine cipher in$\mathbb{Z}_{26}$. The plaintext begins with es and the corresponding ciphertext is <... 1answer 149 views ### how does an initialization vector work? [duplicate] Can somebody please explain how an initialization vector works. My current understanding is that it is used to prevent 2 of the same messages looking identical after encryption, but isn't this the ... 3answers 109 views ### with RSA encryption, how do I find the md5sum of the private key from the public key? This is a purely mathematical question on RSA encryption. Having$e$as the public key exponent and$n$the modulus of a public key. Can I recover the md5sum of the private key$d$(inverse of$d$... 1answer 94 views ### Segmenting encryption to get the same results with the same key The given examples below are dummy and in English. They are mainly for place holding as this is a concept question rather specific example based Given AES has a block size of 128 bit (16 letters of ... 2answers 138 views ### Reciprocal block ciphers I'm interested in the property of involution in block ciphers and how one would go about constructing one. Creating a cipher where$E_K(E_K(M))=M$for any$M$and$K$isn't an obvious task and the use ... 1answer 129 views ### RSA: How to calculate the private exponent? I have this problem: In RSA algorithm considering$n=33$(modulus) and public exponent$e=3$, calculate the corresponding private exponent$d$. I know that$d = e^{-1} \pmod{\varphi(n)}$and$\varphi(...

15 30 50 per page


text:
# commons-dev mailing list archives

##### Site index · List index
Message view
Top
From Bruce A Johnson <johns...@umbc.edu>
Subject Re: [math] Convolution
Date Thu, 23 Aug 2012 12:52:46 GMT

On Aug 23, 2012, at 8:31 AM, Clemens Novak wrote:

> On 2012-08-20 19:25, Luc Maisonobe wrote:
>> Le 20/08/2012 17:00, Clemens Novak a écrit :
>>> Dear all,
>>
>> Hi Clemens,
>>
>>>
>>> I would like to work on some signal processing functions (as indicated
>>> on the wiki WishList) and started with the convolution of 2 sequences
>>> (represented as RealVector). I have completed a first working version
>>> (some error checking code, formatting, unit tests etc are missing); I am
>>> unsure of how to continue: Is the next step to create a new Jira ticket
>>> and upload my final code there (for further discussion/review/...)?
>>
>> Yes, you can do that.
>>
>>>
>>> Thanks for your help & kind regards - Clemens
>>
>> Thanks for your interest and contribution.
>>
>> Luc
>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>>> For additional commands, e-mail: dev-help@commons.apache.org
>>>
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>> For additional commands, e-mail: dev-help@commons.apache.org
>
> Dear all,
>
> besides the ongoing discussions in MATH-851, I would like to discuss some extensions
of this library in the area of discrete-time signal processing:
>
> (1) convolution of 1D and 2D sequences based on (i) straightforward calculation of the
convolution sum and (ii) using the FFT.
>
> (2) filter functions for 1D sequences, i.e. y[n] = \sum_{l=0}^{L-1} b_l x[n-l] - \sum_{m=1}^{M-1}
a_m y[n-m]
>
> (3) window functions (such as raised cosine, blackmann...) used in conjunction with FFTs
>
> (4) possibly some basic filter design (such as window method, Parks-McClellan algorithm...)
>
> However, first I want to ensure that you think these topics belong in Commons math -
I have been reading the intro (... is a library of lightweight, self-contained mathematics
and statistics components addressing the most common problems...) and I am not perfectly sure
whether these topics really fit here?
>
> In MATH-851 we shortly touched whether using RealVector or a simple double array is better.
What's your opinion here? The double array might be better in terms of performance; when based
on RealVector, however, more basic functionality would be provided out of the box. Has anyone
made a performance comparison between arrays and RealVector in order to have some guidelines
here?
>
> Kind regards - Clemens
>

I use Commons Math extensively in signal processing applications so I, for one, would love
to see more features in this area.

cheers,

Bruce

> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org


text:
## What are activation functions? Why are they used?

Activation functions decide how strong of a signal an individual neuron should give. In some cases, the signal gets completely removed (the result of applying the function is 0).

You do dot-product operations between a data vector and a weight matrix when training your Neural Network. Even in a multi-layer model, you'll do dot-product that result in a linear operation. Activation functions break that linearity. To do that, you need to pick a function that does not satisfy the expression:

$f(\alpha x_1 + \beta x_2) = \alpha f(x_1) + \beta f(x_2)$

A Neural Network without an activation function would not be able to learn non-linear relationships.

A wide variety of activation functions exist, some of which are 30+ years old. Here, we'll have a look at the most common ones. They also have some slight variations that try to improve some aspects of the original one.

## Sigmoid

One of the first well-known activation functions is the Sigmoid. Its definition is:

$Sigmoid(x) = \frac{e^x}{1 + e^x}$

Unfortunately, the gradient values become very small at the tail of the function. The result is too small weight update when training the model.

## ReLU

ReLU is currently the most popular activation function. It zeroes out negative numbers and keeps untouched the positive ones:

$Relu(x) = \max(0, x)$

Computing the ReLU is done very efficiently (compared to other activation functions) - it is simple thresholding. But zeroing out the parameter values results in their "death" - will not be ignored during training.

## Softmax

Softmax is used as an "output normalizer" when doing classification and you want the probability for each class.

The softmax forces the sum of values for each output neuron to be 1. The definition is:

$\text{Softmax}(x_{i}) = \frac{\exp(x_i)}{\sum_j \exp(x_j)}$

It applies the exponential function to each element of the input vector $x_i$. Normalization is ensured by dividing by the sum of all exponentials.


text:
# Math Help - Proof on the summation of a finite series

1. ## Proof on the summation of a finite series

Need help on the proof of $\sum^{n}_{r=1}r^2=\frac{1}{6}n(n+1)(2n+1)$

The series of the squares of the first n natural numbers , ie

$\sum^{n}_{r=1}r^2=1^2+2^2+3^2+...+(n-1)^2+n^2$

I know this identity is needed to complete the proof :

$
(r+1)^3=r^3+3r^3+3r+1

$

From here onwards , i am not sure what to do ..

Not sure how to proof this as well :

$
\sum^{n}_{r=1}r^3=\frac{1}{4}n^2(n+1)^2
$

2. Hi

There are several ways to prove that $\sum^{n}_{r=1}r^2=\frac{1}{6}n(n+1)(2n+1)$

One is induction but obviously the beginning of your proof suggests another one.

Write the equality from (r+1) down to 1
$(r+1)^3=r^3+3r^2+3r+1$
$r^3=(r-1)^3+3(r-1)^2+3(r-1)+1$
etc ...
$2^3=1^3+3\cdot 1^2+3\cdot 1+1$
$1^3=0^3+3\cdot 0^2+3\cdot 0+1$

Then sum all these equalities and simplify, some terms being on both sides

3. ## Re :

My book says :

By using this identity

$(r+1)^3=r^3+3r^2+3r+1$

By adding the terms of the identity one by one with values of r from r=n to r=1 , we get

$\sum^{n}_{r=1}[(r+1)^3-r^3]=3\sum^{n}_{r=1}r^2+3\sum^{n}_{r=1}r+\sum^{n}_{r=1 }1$

The LHS side of this identity can be written as :

$[(n+1)^3-n^3]+[n^3-(n-1)^3]+...+(3^3-2^3)+(2^3-1^3)=(n+1)^3-1$

MY question is why is
$[(n+1)^3-n^3]+[n^3-(n-1)^3]+...+(3^3-2^3)+(2^3-1^3)=(n+1)^3-1$

$[(n+1)^3-n^3]+[n^3-(n-1)^3]+...+(3^3-2^3)+(2^3-1^3)=(n+1)^3-1$


text:
# How do you solve 5/3=x/4?

Jan 14, 2017

Multiply each side of the equation by $\textcolor{red}{4}$ to solve for $x$ and keep the equation balanced. See full process below:

#### Explanation:

Multiply each side of the equation by $\textcolor{red}{4}$ to solve for $x$ and keep the equation balanced. See full process below:

$\textcolor{red}{4} \times \frac{5}{3} = \textcolor{red}{4} \times \frac{x}{4}$

$\frac{20}{3} = \cancel{\textcolor{red}{4}} \times \frac{x}{\textcolor{red}{\cancel{\textcolor{b l a c k}{4}}}}$

$\frac{20}{3} = x$

$x = \frac{20}{3}$


text:
If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

Main content

# Basic derivative rules: find the error

AP.CALC:
FUN‑3 (EU)
,
FUN‑3.A (LO)
,
FUN‑3.A.2 (EK)

## Video transcript

- [Voiceover] So we have two examples here of someone trying to find the derivative of an expression. On the left-hand side, it says "Avery tried to find the derivative, "of seven minus five x using basic differentiation rules. "Here is her work," and on the right-hand side it says "Hannah tried to find the derivative, "of negative three plus eight x, "using basic differentiation rules, "here is her work." And these are two different examples of differentiation rules exercise on Khan academy, and I thought I would just do them side by side, because we can kind of think about what each of these people are doing correct or incorrect. So these are similar expressions, we have a constant and then we have a first degree term, a constant and then first degree term. So they're gonna take the derivative, so let's see, step one for Avery. She took, she's separately taking the derivative of seven, and separately taking the derivative of five x. So this my spider senses already going off here, because what happened to this negative right over here? So it would've sense for her to do the derivative of seven, and she could've said minus the derivative, of five x, that's one possibility that she could've done. The derivative of a difference is equal to the difference of the derivatives, we've seen that property. Or, she could've said, the derivative, she could've said this was equal to the derivative of seven, plus the derivative with respect to x of negative five x. These two things would've been equivalent to this one. But for this one, she somehow forgot to, include the negative. So I think she had a problem right at step one. Now, if you just follow her logic after step one, let's see if she makes any more mistakes. So, she takes the derivative of a constant, so constant isn't going to change with respect to x. So that makes sense, that that derivative is zero. And so we still have the derivative of five x, and remember, it should've been negative five x, or minus the derivative of five x. And let's see what she does here. So that zero disappears, and now she takes the constant, she takes the constant out, and that's true, the derivative of a constant times something, is equal to the constant times the derivative of that something. And then, she finds the derivative with respect to x of x is one, and that's true, if the slope, if you had the graph of y equals x, the slope there is one, or what's the rate of change at which x changes with respect to x? Well, that's gonna be one for one. So that the slope here is one, so this is gonna be five times one. Which is equal to five, and at the end they just say, at what step did Avery make a mistake? So she clearly made a mistake at step one, this right of here, should've been a negative, that's a negative, then that would've been a negative. And this would've been a negative. And that would've been a negative. And then her final answer should have been, should have been a negative five. Now let's go back to Hannah. To see if she made any mistakes and where. So she's differentiating a similar expression, so first she takes the derivative of the constant, plus the derivative of the first degree term. Derivative of constant is zero, that looks good. So you get the zero, and then you have the derivative of the first degree term. That's what she's trying to figure out. And then, let's see, she's taking... Let's see, so this seems off. She is assuming that the derivative of a product is equal to the product of the derivatives. That is not the case. And especially, and if you have a constant here, there's actually a much simpler way of thinking about it. Frankly the way that Avery thought about it, Avery had made a mistake at step one, but this is actually going to be equal to the derivative of a constant times an expression, is equal to the same thing as the constant times the derivative of, of the expression. So this would've been the correct way to go, and the derivative of x with respect to x, well that's just going to be one. So this should've all simplified to eight. What she did is, she is assuming, she tried to take the derivative of eight and multiply that times the derivative of x, that is not the way it works. In the future you will learn something called the product rule, but you won't even have to apply that here, because one of these, one of these components I guess you could say, is a constant. So this is the wrong step. This is where Hannah makes a mistake. And you could see, instead of getting a final answer of eight, she is getting a final answer of, she assumes well the derivative of eight is zero, times the derivative of x is one, zero times one. And she gets zero, which is not the right answer. So she makes a mistake at step three, and Avery made a mistake at step one.


text:
# How can I show that $P\{|(X-\mu_X)+(Y-\mu_Y)| \ge k\sigma\} \le (2(1+\rho))/k^2$?

Let $$\sigma^2$$ be the common variance of the random variables $$X$$ and $$Y$$, with their correlation coefficient being $$\rho$$.

Show that $$\forall k>0$$, $$P\{|(X-\mu_X)+(Y-\mu_Y)| \ge k\sigma\} \le (2(1+\rho))/k^2$$.

I know this looks similar to the Chebyshev Inequality: $$P\{|X-\mu_x| \ge k\sigma \} \le 1/k^2$$. However, I am struggling to find a way to apply Chebyshev's Inequality to show the above inequality. Would I need to use a different inequality, like the covariance inequality or Minkowski Inequality? How many I go about doing this?

• $2(1+\rho)\sigma^2$ is the variance of $Z=X+Y.$ Apply Chebyshev to $Z.$
– whuber
Nov 3 '19 at 22:10
• This was a great comment. Can I accept it as an answer? Nov 5 '19 at 3:12

Just to expand on whuber's comment (and give you an official answer), suppose you take $$Z=X+Y$$ and then find the mean and variance of this random variable. You have mean:
$$\mathbb{E}(Z) = \mathbb{E}(X+Y) = \mathbb{E}(X) + \mathbb{E}(Y) = \mu_X + \mu_Y,$$
$$\mathbb{V}(Z) = \mathbb{V}(X+Y) = \mathbb{V}(X) + 2 \cdot \mathbb{C}(X,Y) + \mathbb{V}(Y) = \sigma^2 + 2 \rho \sigma^2 + \sigma^2 = 2(1+\rho) \sigma^2.$$
Applying Chebychev's inequality to $$Z$$ yields the desired inequality.


text:
# Acceleration of gravity

Acceleration of gravity calculation on the surface of a planet. It's possible to calculate the acceleration above the surface by setting the sea level. But it won't be possible under the surface - this is a wrong formula.

### This page exists due to the efforts of the following people:

#### Timur

Created: 2015-12-02 20:11:20, Last updated: 2021-02-12 11:21:38

This content is licensed under Creative Commons Attribution/Share-Alike License 3.0 (Unported). That means you may freely redistribute or modify this content under the same license conditions and must attribute the original author by placing a hyperlink from your site to this work https://planetcalc.com/1758/. Also, please do not modify any references to the original work (if any) contained in this content.

Written under the influence of Larry Niven's story "There Is a Tide." Try to calculate the force of gravity on the surface of a spherical piece of a neutron star with a mass 500 000 times less than the Earth's mass but with a 3 meters diameter ...

### Theory

Acceleration of gravity g — an acceleration given to the body in a vacuum by the force of gravity, that is, the geometric sum of the planet's gravitational pull (or another celestial body) and inertial forces resulting from its rotation. According to Newton's second law, gravity's acceleration is equal to the force of gravity acting on the unit mass object.

Acceleration of gravity is made up of two components: gravitational acceleration and centrifugal acceleration. The calculator only calculates the gravitational acceleration.

The value of the gravitational acceleration on the surface can be approximated by imagining the planet as point mass M and calculating the gravitational acceleration at a distance of its radius R:

$g=G\frac{M}{(R+h)^{2}}$
where:
G — gravitational constant ($6.6742*10^{-11}$ m^3, s^-2, kg^-1).
h — altitude above sea level

#### Acceleration of gravity

Altitude above "sea level" of the planet (m)
Digits after the decimal point: 6
Acceleration of gravity (m/s^2)

Acceleration of gravity in g (1g - on the surface of the Earth)

URL copied to clipboard
PLANETCALC, Acceleration of gravity


text:
# Logistic regression or GLM?

#### yamaneko

##### New Member
Hi everyone:

I have a question about using logistic regression or GLM with only categorical variables as independent variables.

The dependent variable y is shown as binary coded data where 1=males and 0=females. Each corresponding to an excrement. The independent variables are as follows x1=habitat type (NF,SF,CP,RM,CV), x2=elevation (a,b,c,d), x3=forest road (FoR, FaR, MPR) and X4=region (A,B,C,D,E). I would like to know if there are any differences in distribution between males and females among these variables.
Would there be any type of GLM using only categorical variables as independent variables or would logistic regression be my best option?
Below is the dataset:

y X1 X2 X3 X4
1 NF c FoR B
0 NF c FoR B
0 NF b FoR B
1 SF b MPR B
0 SF a MPR C
0 SF a MPR D
1 CP a MPR D
0 SF a FaR A
1 CV a FaR A
0 CV a FaR A
0 SF a FaR A
0 SF a FaR D
1 SF b FaR E
0 CP a FaR A
0 CP a FaR A
1 SF a FaR B
1 CP a FaR A
0 CP a FaR A
1 NF c FoR B
1 NF d FoR B
1 CV a FaR E
0 SF a FaR E
1 CP b FaR A
1 CP a FaR A
1 CP a FaR A
1 RM a FaR A
1 CP a FaR A
0 CV a FaR A
0 SF a MPR D
1 NF c FoR B
1 NF d FoR B
0 SF a FaR E
0 CV a FaR A
1 CP a FaR A
1 CP a FaR A
1 CP a FaR A
1 RM a FaR C
1 NF a FoR B
1 NF d FoR B
0 NF c FoR B
1 SF a FaR B
1 CP a FaR A
0 CV a FaR A
0 NF a FoR C
0 SF a FaR C
0 CV a FaR E
0 CV a FaR E
0 CV a FaR A
0 CV a FaR C
0 SF a FoR C
1 CP a MPR D
1 SF a FaR E
1 CP b FaR A
1 CV a FaR A
1 CP b FaR A
0 CP a FaR A
0 RM a FaR C
1 SF a FaR C
1 NF d FoR B

#### ledzep

##### Point Mass at Zero
GLM is broad/flexible and can handle different data types.
And Logistic regression is a special type of GLM with Logit Link.

#### yamaneko

##### New Member

To narrow my question: I would like know what kind of GLM with Logit Link can categorical variables be used as independent variables. The only examples that I find are GLMs with measurement variables as independent variables.

#### ledzep

##### Point Mass at Zero

To narrow my question: I would like know what kind of GLM with Logit Link can categorical variables be used as independent variables. The only examples that I find are GLMs with measurement variables as independent variables.
Your response is binary (0/1). Hence, you can use logistic regression for your analysis with all your Xs as dependent variable in your model.
Code:
## If you were using R: it would look like this:
model<-glm(y~factor(x1)+factor(x2)+factor(x3)+factor(x4),data=my.data, family="binomial") ## Here family=binomial is telling that our data is binary.
GLM can fit a wide range of responses (gaussian/normal, binary, count,..). GLM uses something called link functions which links mean with the variance parameters. In case of binomial, the default (and canonical) link is logit, which is log-odds of the probability.

HTH

#### ledzep

##### Point Mass at Zero
The dependent variable y is shown as binary coded data where 1=males and 0=females. Each corresponding to an excrement.
Wait, I think I know where your problem lies.
what is your response variable? Y (1/0) ? But shouldn't gender be dependent variable instead? I wouldn't expect gender to be something of your response.
I think your response is excrement? how do you measure it?
What does Y (0/1) mean? excretion=yes/no or Gender=M/F?

#### yamaneko

##### New Member
Thank you for your response ledzep.

Yes. excrement is the dependent variable. 1= M; 0= F

Ive been studying r lately and was using testing with the poisson family. Something like this: fit<-glm(y1~x1+x2+x3+x4+x5+x6+x7,family=poisson(link = "log"),data=waterpots.

Does it make sense?

Ill also try the binomial family


text:
# Drag Equation - Level 1

Young scholars, after reading the Drag Equation page from the NASA Web site, demonstrate an understanding of this equation and how drag is dependent on the variables included in the equation.


text:
# Storing User Data

## Introduction

Let’s travel back to the time of the dinosaurs when the Internet was first created. At the time, web browsers like Firefox and Chrome didn’t exist, and moreover, people actually had to memorize all of their login information to their user accounts on different websites. If you’re like me and have horrible memory, this would prove to be an impossible task. Today, we’ll see if we can write a Java program that keeps track of all of our different user accounts.

Your task for today will be to write a Java program that helps you (and me) keep track of all of our different user accounts. In doing so, you’ll practice many of the things we’ve talked about in Java over the past few weeks, including…

• Arrays and the List Interface
• for/while loops
• Conditional statements
• Abstraction and good programming practice

## Getting Set Up

Clone the project repository at this link. If you’re unfamiliar with what a repository is, read a brief description here. Download both of the files in the src directory, which will serve as our template code for this project.

## Starting the Project

All of the code that we need to write for this project should only modify the LoginInfo.java source file. In other words, don’t touch the Application.java file, which serves to set up the graphical user interface (GUI). In starting any project, the first thing to always do is to go through all of the files and have a sense of what the files are individually doing. Go ahead and do this now.

In the LoginInfo.java template code, you can see that the functions that we need to write have already been outlined for us. I’ve attached a snippet of it here:

public class LoginInfo {
// TODO: Add any relevant fields here.

// TODO: f is a .txt file that will store all the login
// information. Do whatever you need to do here.
}

/*
* This function adds a new login information entry with the argument
*/
// TODO: Feel free to change the return variable type if you
// want.

return;
}

/*
* This function retrieves an existing login entry with the argument
* URL. The username is optional. If a username is provided, the
* insensitive.
*/
// TODO: Return type should be a String array of length 2.
// The 0th argument should be the retrieved username.
// The 1st argument should be the retrieved password.
// If no username and password are found, then return the array
// { "No URL Match.", "No URL Match." }.

return null;
}

/*
* This function should update the password for the account
* associated with the argument URL.
*/
// update was successful and argument URL was found. Otherwise,
// return "No URL entry found.".

return null;
}
}

An outline for the code has already been provided. Feel free to add any additional helper methods or even additional Java classes as needed!

Your task is to fill in the functions with code that does the required objective of the function written in the comments above each of the respective functions. Feel free to add any additional helper functions or additional Java classes when necessary.

Note that we expect that you will not already know all of the necessary methods that are needed for this assignment! We haven’t even introduced the idea of what a Java File class, Scanner, or a bunch of other things are. This assignment is therefore also an exercise in (1) identifying exactly what you want your code to do, (2) looking up how to do this on Google, and (3) reading documentation and community answers on what to implement in your own code.

Once you think that your code is working as expected, run your code using the following terminal input while in the src directly:
$javac *.java$ java Application

An example of the solution code can be found in the sol directory within the linked repository from above.


text:
## 507 – Advanced Number Theory (Syllabus)

May 14, 2010

Section 1.
Instructor:
Andrés E. Caicedo.
Contact Information: See here.
Time: MWF 12:40-1:30 pm.
Place: M/G 124.
Office Hours: MF 11:40 am-12:30 pm 10:40-11:30 am (or by appointment).

The (admittedly impossible) goal is to discuss the following topics:

1. Divisibility
2. Congruences
3. Primitive roots
5. Prime numbers
6. Waring’s problem
7. Geometry of numbers
8. Transcendental number theory
10. Integer partitions

Recommended background: Mathematics 306: Number theory, or equivalent. It is highly desirable that you have taken prior courses in analysis and abstract algebra.

Textbook: Elementary methods in number theory. By Melvin Nathanson. Springer-Verlag (2000), ISBN: 0-387-98911-9.

At the end, this was a matter of personal taste, as my list of topics leans more towards the “analytic” than the “algebraic” side of things. This list is somewhat nonstandard. Here are some additional suggested references, both for the course and for number theory in general. I will add suggestions through the course, depending on the topic being covered:

1. A classical introduction to number theory. By Kenneth Ireland and Michael Rosen. Springer-Verlag (1990), ISBN: 0-387-97329-X. Highly recommended, this could have been our textbook.
2. Algebraic number theory and Fermat’s last theorem. By Ian Stewart and David Tall. A K Peters (2002), ISBN: 978-1568811192. This would be a nice textbook for a first course in algebraic number theory, but it requires background in Galois theory.
3. Multiplicative number theory. By Harold Davenport, revised by Hugh Montgomery. Springer-Verlag (2000), ISBN: 0-387-95097-4. This is a very nice book, but it definitely requires background in complex analysis.
4. Making transcendence transparent: an intuitive approach to classical transcendental number theory. By Edward Burger and Robert Tubbs. Springer-Verlag (2004), ISBN: 978-0387214443.
5. Additive number theory: The classical bases. By Melvyn Nathanson. Springer-Verlag (1996), ISBN: 978-0387946566.
6. Additive number theory: Inverse problems and the geometry of sumsets. By Melvyn Nathanson. Springer-Verlag (1996), ISBN: 0-387-94655-1.
7. Integer partitions. By George Andrews and Kimmo Eriksson. Cambridge University Press (2004), ISBN: 0-521-60090-1. Andrews also authored a more advanced textbook on partition theory, that requires complex analysis.

May 12, 2010

Here it is.

## 187 – On Ramsey theory

May 4, 2010

Given a natural number ${n}$, write ${K_n}$ for the complete graph on ${n}$ vertices, and ${E_n}$ for the edgeless graph on ${n}$ vertices.

As explained in problem 47.10 from the textbook, given natural numbers ${a,b,n}$, the notation

$\displaystyle n\rightarrow(a,b)$

means that ${n}$ is so large that whenever ${G}$ is a graph on ${n}$ vertices, either ${G}$ contains a copy of ${K_a}$ as a subgraph, or a copy of ${E_b}$ as an induced subgraph.

We denote the negation of this statement by ${n\not\rightarrow(a,b)}$. In detail, this means that there is a graph ${G=(V,E)}$ on ${n}$ vertices such that for any collection of ${a}$ vertices of ${G}$, at least one of the edges between them is not in ${E}$, and also for any collection of ${b}$ vertices of ${G}$, at least of the edges between them is in ${E}$.

Note that if ${n\rightarrow(a,b)}$ then also:

• ${n\rightarrow(b,a)}$,
• ${m\rightarrow(a,b)}$ for any ${m\ge n}$, and
• ${n\rightarrow(a,c)}$ for any ${c\le b}$.

Clearly, ${0\rightarrow(m,0)}$ and ${1\rightarrow(m,1)}$ for any ${m}$. It is also clear that ${m\rightarrow(m,2)}$ for any ${m}$. When ${a,b\ge3}$, however, the determination of the smallest ${n}$ such that ${n\rightarrow(a,b)}$ is a subtle and difficult problem. This ${n}$ is called the Ramsey number of ${a,b}$. We will denote it ${R(a,b)}$, so

$\displaystyle R(a,b)\rightarrow(a,b)$

and, if ${m, then ${m\not\rightarrow(a,b)}$. Read the rest of this entry »

## 403/503 – Lagrange's four squares theorem

May 1, 2010

It is a theorem of Lagrange that every natural number is the sum of 4 squares. (Since 7 is not a sum of 3 squares, 4 is best possible. Gauss showed that a number is a sum of 3 squares iff it is not of the form $4^a(8k+7).$)

Although there are elementary proofs of this result (elementary here means in the sense of number theory. It is not a synonym for easy), I have always found the proof sketched in problem 1 of this pdf (from a course I taught a few years ago) to be quite charming. It uses a bit of the ideas we have recently discussed, so I figured you may be interested in taking a look at it.


text:
# Parameter estimation from a Normal distribution

Please can you check if am I correct?

I have a random variable $X$ normally distributed with mean $\mu$ and variance $\sigma^2$. I generate two independent sample $T_1$ and $T_2$ with $T_1 < T_2$ where $\bar{X}_1$ and $\bar{X}_2$ are the sample means respectively.

1)The proposed estimators below for $\mu^2$ are biased or unbiased?

• $\bar{X}_1^2$

• $\bar{X}_2^2$

• $(\bar{X}_1^2+\bar{X}_2^2)/2$

• $\bar{X}_1\times\bar{X}_2$

I think that in order to solve this question I have to use the property $Var(X) = E(X^2)-(E(X))^2$ and the fact that the sample mean $\bar{X} \sim (\mu,\sigma^2/T)$.

Therefore,

First estimator $\bar{X}_1^2$,

$E(X^2)= (E(X))^2 + Var(X) \rightarrow E(\bar{X_1}^2) = (E(\bar{X_1}))^2 + Var(\bar{X_1})$

which implies that $E(\bar{X_1}^2) = \mu^2 +\sigma^2/T_1\neq\mu^2 \Rightarrow$ BIASED

Second estimator $\bar{X}_2^2$, the same as the first one. BIASED.

Third estimator $\frac{\bar{X}_1^2+\bar{X}_2^2}{2}$, using also information above

$E\left(\frac{\bar{X}_1^2+\bar{X}_2^2}{2}\right)=E\left(\frac{\bar{X}_1^2}{2}+\frac{\bar{X}_1^2}{2}\right)=E\left(\frac{\bar{X}_1^2}{2}\right)+E\left(\frac{\bar{X}_1^2}{2}\right)=\frac{\mu^2+\sigma^2/T_1}{2}+\frac{\mu^2+\sigma^2/T_2}{2}= \mu^2 + \frac{\sigma^2}{2}\times\left({\frac{1}{T_1}+\frac{1}{T_2}}\right)$ BIASED

Forth estimator $\bar{X}_1\times\bar{X}_2$ ,

$E(\bar{X}_1\times\bar{X}_2) = E(\bar{X}_1)\times E(\bar{X}_2)$ because the two samples are independent.

Therefore, $E(\bar{X}_1\times\bar{X}_2) = \mu\times\mu=\mu^2$ UNBIASED

2) Now show that both the sample mean are unbiased estimator for $\mu$, that is, $E(\bar{X}_1) = \mu$ and $E(\bar{X}_2) = \mu$.

It's straight forward because the sample mean of a normal is normal distributed, $\bar{X} \sim (\mu,\sigma^2/T)$.

3) Now Define the follow estimator of $\mu$ and check if it biased or unbiased estimator of $\mu$, $\bar{X}_3 = \frac{(T_1\bar{X}_1+T_2\bar{X_2})}{T_1+T_2}$

So, $E\left(\frac{(T_1\bar{X}_1+T_2\bar{X_2})}{T_1+T_2}\right)$=$\frac{1}{T_1+T_2}\times E\left(T_1\bar{X}_1+T_2\bar{X}_2\right)=\frac{1}{T_1+T_2}\times T_1 E(\bar{X}_1)+T_2\times E(\bar{X}_2)=$

$\frac{1}{T_1+T_2}\times (T_1 +T_2)\times\mu=\mu$

4) You known that an unbiased estimator is more efficient compared to an other unbiased if its variance is smaller. What of $\bar{X_1}$, $\bar{X_2}$, $\bar{X_3}$ has the smallest variance?

Of course it depends by sample size T, $\bar{X}\sim\left(\mu,\frac{\sigma^2}{T}\right)$ and in this case we have $T_3>T_2>T_1$ therefore $\bar{X}_3$ is the estimator with the smallest variance.

• This is an homework, right?! I have added the hopefully correct flag! – Xi'an May 4 '12 at 17:15
• I'd say your answers to 2 and 4 involve a little handwaving. For 2, I'd go back to $\bar{X}_1 = (1/T)\sum X_i$ and work from there. For 4, I'd do the same for $\bar{X}_3$. It seems to me you know the stuff, you're just not doing the proofs at a sufficient level of detail. – jbowman May 4 '12 at 19:03
• Dear Jbowman, thank you for your reply. What do you mean "at a sufficient level of detail", the sample mean is an unbiased estimator for the mean of the true population. So you're right that $\bar{X}=\frac{1}{T}\sum X_i$ but I don't see the reason to include in the proof. I think all we need for the proof is the properties of the expectation operator, variance and the sample mean distribution (asymptotic distribution of the estimator mean). Or Am I wrong? – Marco May 4 '12 at 21:10
• Well, that depends on the expectations of the grader. It could be that the prof. or t.a. thinks that stating $\bar{X} \sim \text{N}(\mu, \sigma^2) \to \mathbb{E}\bar{X} = \mu$ isn't a proof, but merely restating the fact. Why is the mean of the Normal equal to $\mu$, the mean of the data? Similarly in part 4 you have a weighted average of sample means, but that doesn't imply (without some further detail in the proof) that the weighted average has variance $\sigma^2/(T_1+T_2)$. But this is imposing what I would consider adequate proof on your grader, not necessarily correct. – jbowman May 4 '12 at 22:24
• Ok, I get your point. So I show that $E(\bar{X})=\frac{1}{T}\sum E(X_i)$ therefore $E(\bar{X})=\frac{1}{T}\sum \mu$ concluding $E(\bar{X})=\frac{1}{T}T \mu = \mu$. The same for the variance and also for the property. – Marco May 5 '12 at 7:55


text:
How to describe delta convolution using integral expression

yefj

Hello, We express the radiation from a source by the expression bellow:
$U(x,y)=\frac{e^{jkz}e^{\frac{k}{2z}(x^2+y^2)}}{j\lambda z}\iint_{-\infty}^{+\infty}u(x',y')e^{-j\frac{2\pi}{\lambda z}(x'x+y'y)}dx'dy'$
the fourier transform is $f_x=\frac{x}{\lambda z} and f_y=\frac{y}{\lambda z}$.\
Our system bellow has two apartures which has distance between them.
each aparture has fourier transform of sinc $F(rect(ax)rect(by))=\frac{1}{|ab|}sinc(\frac{f_x}{a})sinc(\frac{f_y}{b})$. \
$F(\delta(f_x-\frac{a}{2},f_y-\frac{b}{2}))=e^{[i\pi(ax+by)]}$. \
I know that convolution with delta is a shift in space.
how to find using the integral expression shown above the fourier transform of the shape bellow?
Thanks.

Super Moderator
Staff member
Looks similar to a double-slit experiment which produces interference patterns. Does that concept have equations which relate to your equations?

Replies
9
Views
2K
Replies
3
Views
5K
Replies
4
Views
2K
Replies
2
Views
1K
Replies
4
Views
8K