formal languages ​​- does | xy | ≤ p in the pumping slogan count for all i?

While learning about pumping the slogan, I found the following question:

Since the language is L $$a ^ n (0 | 1) ^ *$$ with $$c_0 cdot c_1 = n$$, where $$c_0$$ Indicate the number of zeros present, use the pumping motto to prove that this language is not regular. Examples of valid words in L are `0`, `one`, `a01`, `aa001`, etc …

In regular English: a word with a leader. `a`s, followed by any amount of any `0` or `one` characters, where the number of zeros multiplied by the number of ones needs to match the number of zeros `a`s.

My first attempt was the following:

• Pick up w as $$a ^ p0 ^ p1$$. This obviously remains from $$p cdot 1 = p$$.
• Divide w in xyz as $$x = epsilon$$, $$y = a ^ p$$, $$z = 0 ^ p1$$.
• Show that $$xy ^ 2z = a ^ {2p} 0 ^ p1$$ can not stand, because $$p cdot 1 ne 2p$$.

However, the answer key chooses to introduce two new variables. $$m geq 0$$, $$n gt 0$$, then it is divided into $$x = a ^ m$$, $$y = a ^ n$$, $$z = a ^ {p-n-m} 0 ^ p1$$ (dividing the sequence of a into three parts). So, they also use $$i = 2$$ to show that $$xy ^ 2z = a ^ m to 2n a ^ p-n-m} 0 ^ p1 = a ^ p + n} 0 ^ p1$$, that is not a member of the language (since n was more than 0).

From what I can see, my attempt sticks to the $$| xy | leq p$$ Condition of the pumping motto: x is empty and $$| and | = p$$. As such, I had the impression that my answer was correct.

However, the enormous increase in the complexity of the response in the response key leads me to believe that this is not a valid approach. I suspect that this is because in reality my answer make violate the $$| xy | leq p$$ condition.

Is my attempt a correct way to prove that the language is not regular? If not, what error / mistake did I make on the road?

\$ f (x, y) = begin {cases} frac {xy ^ 2} {x ^ 2 + y ^ 2} text {if} (x, y) not = (0,0) \ 0 text {if} (x, y) = (0,0) end {cases} \$ differentiable?

$$f (x, y) = begin {cases} frac {xy ^ 2} {x ^ 2 + y ^ 2} text {if} (x, y) not = (0,0 ) \ 0 text {if} (x, y) = (0,0) end {cases}$$

Is this function of two variables differentiable in (0,0)?

python – Error with Image.putpixel (). return self.im.putpixel (xy, value) TypeError: the function takes exactly 1 argument (3 dice)

Here is the code:

``````import numpy as np
import matplotlib.pyplot as plt
from PIL import image
#from Scipy Import Misc
import cv2

i = Image.open ("originalfit.jpg")
w = Image.open ("originalfit_wiener.jpg")
r = Image.open ("binary_img.png")

pre = Image.open (& # 39; preprocessed.png & # 39;)

# Get properties of the image.
h, w, bpp = np.shape (rcv)

# iterate over the entire image.
for p and in range (0, h):
for px in range (0, w):
if r.getpixel ((px, p and)) == 0 and i.getpixel ((px, p and p)) - w.getpixel ((px, p and p))> 0:
pre.putpixel ((px, p and p), w.getpixel ((px, p and p)))
plus:
pre.putpixel ((px, py), i.getpixel ((px, py)))
``````

Here is the error message:

Tracking (recent calls latest):
File "preprocessing.py", line 23, in
pre.putpixel ((px, py), i.getpixel ((px, py)))

File "/usr/local/lib/python3.5/dist-packages/PIL/Image.py", line 1696, in putpixel
returns self.im.putpixel (xy, value)

TypeError: the function takes exactly 1 argument (3 dice)

Algorithms – How to check if a list of XY coordinates meets the safety distance between them?

My record is not CS, so I regret the use of an inappropriate term. But basically I want to verify if a point in the XY plane is "too close" to other points, and do it with each point. In other words, if I draw a circle with radius R at each point, any circle will cross other circles in the plane.

I want to code this in Python, if that matters.

position: describing the movement of the hand sliding in 3D like a curve in an XY plane

I am trying to describe a 3D sliding gesture (only vertical or horizontal, without diagonals) on a given flat surface using so much conventional geometry or similar dissimilar learning techniques (the hidden Markov model is hidden, artificial neural networks, etc.) ) as possible. From the multiple observations of the data recovered from the device, I came to the conclusion that a hit can be described "easily" as a curve (or in some cases as a really straight line). With this question, I would like to know how you can describe a curve and a curved movement in simple geometric terms in the most efficient way (mainly speed, but also memory).

The publication is divided into two parts: one that provides information on the data used and another that provides an overview of what I have found so far. I am sorry in advance for my poor painting skills. :RE

3D position data

The device that I am using, transmits 3D points that represent the position of the hand at a given moment. I can capture and evaluate these. The following image displays the diagram of the data from two different perspectives: top to bottom and isometric (more or less):

• Flat view XY (on the left, aka top-down view) – for each sample only the values ​​along the X and Y axes are taken into account. This view represents the surface of the device above which the movement of the hand is detected.
• XYZ view (on the right, aka isometric view) – for each sample, the three axes are taken into consideration. This view represents the complete 3D movement in a volume on the surface of the device that defines the space where gestures can be detected

In the following image I have added the movement of the hand as detected by the device:

The real movement looks more like this:

Based on the observation of the real movement and that detected by the device, I can mark almost half of the samples that the device has given me as invalid, that is, all the edge values ​​(along each axis, one position can be between 0 and 65534), which does not describe the actual movement of the hand from the user's perspective of the device (in the image below, the invalid data is represented as the part of the trajectory that is covered by a polygon):

Of course, sometimes the "valid" part of the trajectory is quite small compared to the invalid data:

The algorithm I described below does not care how much of the valid data, as long as there are at least 2 samples that meet the requirement of not being edge positions, which means that X and Y are different from 0 and 65534. This is a problem. that I will detail in the next part of this post.

Describing the movement

I've thought about it a bit and this is what I came up with:

1. Extract only the set of valid samples that excludes all those that have an edge position

2. For each sample, generate a local XY coordinate system that is aligned with the XY coordinate system of the device surface (to make things easier :)):

3. Next, I'm thinking about calculating the vector between the current and the next sample (if present) and calculating the angle between that vector and the X axis (you can also do it with the Y axis):

4. Using the magnitude of each angle, I can determine if the movement between the current and the next sample is tilted more toward a horizontal or vertical one and also in which direction.

This should allow me to determine the general direction of the sliding movement, as well as the position on the surface. I have swept a lot: D but since I want to describe this in a more formal way, obviously I need to describe my findings, hence the need to find a way to describe and classify a curve according to its properties. Maybe calculate the curvature of the entire trajectory?

Of course, there are some problems with this algorithm that came to my mind:

I searched online before I started thinking about creating the algorithm I described earlier, but I could not find anything. Even the issue of curves classification seems not to be as popular or the search terms I used are too broad / restrictive. The classification here is not so essential (unlike what follows) but it would still be good to be able to divide the resulting curves into sets, each representing a sliding gesture.

The next thing I've been thinking about is the curve adjustment. I have read articles about this but, frankly, along with a couple of assignments at my university during the math course, I have not thought much about it, except Bezier's curves. Can anyone tell me if the adaptation of curves is a plausible solution for my case? Since it is curved suitable it would be wise to assume that we need an initial curve against which we want to make our adjustment. This would require gathering sliding movements and then extracting a possible optimal curve that is something like an "average" of all the curves for a given slip. I can use the first algorithm I described earlier to get a compact description of a curve and then store and analyze multiple curves for a given stroke to get the "perfect" curve. How do you proceed when handling the classification of curves?

partial derivative: particle that moves along the unit circle centered on the origin of the xy plane

A particle moves along the unit circle centered on the origin of the xy plane. Find the address of $$nabla times mathbf v$$.

My intent:

I found that $$displaystyle frac { partial v_x} { partial and}> 0$$ Y $$displaystyle frac { partial v_y} { partial x} <0$$. As $$v_z equiv 0$$, its partial derivatives with respect to $$x$$ Y $$and$$ They are also zero. But how do I find the signs of $$displaystyle frac { partial v_x} { partial z}$$ Y $$displaystyle frac { partial v_y} { partial z}$$?

Help with elementary level Test of (xy) ^ 1

A little disconcerted in this test, I continue to reach the dead ends. Any help would be appreciated:

{Proposition 8.6:} For all $$x, and in mathbb {R} – {0 }$$, $$(xy) ^ {- 1} = x ^ {- 1} y ^ {- 1}$$.

floating point: proof that (x-y) (x + y) is more accurate than x²-y²

I kept reading what every computer scientist should know about floating-point arithmetic but I got stuck on proof of Theorem 2 (page 34).

At some point he says:
begin {align} (x otimes x) ominus (and otimes y) & = left[x^2(1 + delta_1) – y^2(1 + delta_2)right](1 + delta_3) \ & = left[(x^2 – y^2)(1 + delta_1) – (delta_1 – delta_2)y^2right](1 + delta_3) \ end {align}
I'm fine with rewriting, but I do not understand the argument that:

When $$x$$ Y $$and$$ they are close, the error term $$( delta_1 – delta_2) and ^ 2$$ can
be as big as the result $$x ^ 2 – y ^ 2$$.

This does not make much sense to me at this time. I understand that if both quantities are close to each other, then the relative error is close to $$1$$. But not why they should be close to each other.

precalculus algebra: show the inequality \$ sum x + 6 ge 2 ( sum sqrt {xy}) \$

Leave $$x; Y; z in R ^ +$$ such that $$x + y + z + 2 = xyz$$. Such that $$x + y + z + 6 ge 2 ( sqrt {xy} + sqrt {yz} + sqrt {xz})$$

This inequality is not homogeneous and look at the condition that I thought
I would replace the variables $$x; Y; z$$ such that

+)$$x ^ 2 + y ^ 2 + z ^ 2 + 2xyz = 1$$. Leave $$x = frac {2a} { sqrt { left (a + b right) left (a + c right)}}$$

+)$$xy + yz + xz + xyz = 4$$. Leave $$a = frac {2 sqrt {xy}} { sqrt { left (y + z right) left (x + z right)}}$$.Leave $$x = frac {2a} {b + c}$$

but failed. Please explain to me how I can obtain this substitution (if I have a solution by substitution)

I also tried to solve it by $$u, v, w$$.Leave $$sum_ {cyc} x = 3u; sum_ {cyc} xy; Pi_ {cyc} a = w ^ 3 (3u + 2 = w ^ 3; u, v, w> 0)$$ so $$u le w ^ 3-3u$$ or $$4u le w ^ 3$$ but stagnant (I'm very bad at $$uvw$$)

calculation and analysis – Can this integral equation problem \$ int_ Gamma frac {e ^ {ik | xy |}} {4 pi | xy |} varphi (y) dy = u_ {x_0} ^ {in} (x) \$ be solved with mathematica?

I am not sure if Mathematica is able to solve integral equations in 2D / 3D, I found this page in the documentation, but this is only for 1D. The following is what I would like to solve, it can be considered an electromagnetic problem, but that is irrelevant. Leave the incident field $$u_ {x_0} ^ {en} (x)$$ Given by a source of points in $$x_0$$:$$u_ {x_0} ^ {in} (x) = frac {e ^ {ik | x-x_0 |}} {4 pi | x-x_0 |},$$
So, I need to find $$varphi in Gamma$$ such that$$S_ Gamma ^ k[varphi](x) = u_ {x_0} ^ {in} (x), forall x in Gamma,$$
where
$$S_ Gamma ^ k[varphi](x): = int_ Gamma frac {e ^ {ik | x-y |}} {4 pi | x-y |} varphi (y) dy$$
Y
$$Gamma in mathbb {R} ^ 3$$ It is the triangle defined by its vertices as $$Gamma: = {v_1, v_2, v_3 },$$
with begin {align} v_1 & = (4,0,0), \ v_2 & = (8,0,0), \ v_1 & = (6,2,0). end {align}

The problem is in 3D, but the domain of integration is a 2D triangle in the $$x$$$$and$$ flat, with a singular integrand when $$x = y$$.

Is it possible to solve this problem with Mathematica?