How do you solve this [1,5,9,4] pair numbers problem?

So given an array of [1,5,9,4], find all pairs of numbers that can sum/subtract/divide/multiply to another number in the array(that number is not part of the pair), and return the total count of pairs satisfying this condition. (If a pair has 2 math operators that fit to the same number or if a pair can combine to 2 different numbers, dont count it twice).

How do I start this? and how do I explain my asymptotic complexity(Im a noob wit this)?

All topic

Alpha over compositor problem

enter image description hereI’m trying to add a fog glow to the blue circles behind Susan using the compositor but so far not being able to make it, the fog glow is applied to all the image but no the blue circles or sometimes the blue circles appear on top of Susan lol
Thanks guys for your help, I’m new to the compositing world of Blender.
Blender file attached*

All topic

The Disco Ball Problem

Let me first give some of a background as to where I got this problem: I had a math teacher ask me a few months ago “how many 1 unit by 1 unit squares could one fit on a sphere with a radius of 32 units”, the only problem was that it was a high school math course, and that I, as a high school student, had no way of answering the question in its true sense, as the teacher simply wanted a division of surface area.

But the problem remains unanswered, and it has been bothering me for some time now. How many mirrors can you fit on a disco ball?

Here is the problem in its entirety:

If you have a sphere of radius r and squares of length l, then how many squares can you fit on it in tangent with the sphere with only the centers of each square touching the sphere, and with no square overlap?

This is a disco ball so the parameters get a bit tight:

  1. The squares can only be attached by their centers

  2. The squares can’t overlap

  3. The squares can’t go into the sphere

  4. The squares can’t be broken or bent (don’t want bad luck)

The question is too difficult to be answered by me, so I hope that one of you could help.

Oh, and if you’re wondering, I already asked my math teacher.

All topic

Is there a problem when the lower and upper limits of a confidence interval are the same?

I have done the bootstrap technique and I want to make inference. I have calculated the 95% confidence intervals, however, for one of the variables in my regression model its lower and upper limits are equal, is this a problem?

All topic

(Hard) Counting problem with recurrence

Let f(n) be the number of sequences which start with 0, end with 0 and every two adjacent numbers in the sequence has the difference of 1 (e.i for every 1≤i≤n-1 : |a(i)-a(a+1)|=1, numbers can be also negative)

a) find the formula and the expression for f(n)

b) find f(n) under the condition |a(i)-a(i+1)|≤1 for every i

Thanks a lot if someone can help me!

All topic

Strange Photoshop Problem: Can not select, zoom, paint, option button ‘locked’

I have a very strange problem with Photoshop. I can not use any of the tools, since the cursor appears ‘locked’. If I select v on my keyboard, it goes to the zoom tool, but the cursor does not change. If I select the paintbrush tool, I can only paint if I hold down the option key.

This is what the cursor look like (I had to paint it since I couldn’t capture it). It is a rectangle with two lines through it.

What the cursor looks like

I am running Photoshop CS4 on a Macbook Pro with Mac OS X 10.6.6. Using both the trackpad and an external Logitech MX5000 mouse I see the same issue.

This started when I fired up Photoshop today for the first time in a while. I can’t remember changing any options or doing anything that could cause this.

Is it possible that the option key is somehow locked in place, or there is some equivalent of num lock on? Very strange problem, I would appreciate any help anybody can offer.

Edit: To add, the icon remains the same within all the menu options – it never goes back to being just a normal mouse cursor. Also, right click works fine, and if I hold down option, the cursor goes back to normal and I can paint with it. I can’t use Marquee, Lasso, Crop, Type etc. even with option held down.

When I go into Bridge, it is the same icon.

All topic

Facing Problem when i call onclickserver in html it cantnot build any event

i am facing the problem when i call html input tag on C# it doesnt give me any event can you please push your advise the below
html code and c# code

  


 protected void BtnBeforeOk_ServerClick(object sender, EventArgs e)
    {

        Label1.Text = "Youhana";

                  }


    }

All topic

Hölder isoperimetric problem

Denote by $S_r$ the usual circle of radius $r$, with the path metric ($d(x,y) = rtheta$, where $theta$ is the angle between the vectors $x$ and $y$), and let $alpha in (1/2,1)$. Consider the collection of mappings $f: S_r rightarrow mathbb{R}^2$ satisfying $|f(x) – f(y)| leq d(x,y)^alpha$ for all $x,y in mathbb{R}^2$ (no other assumptions on $f$). It makes sense to talk about the area enclosed by $f(S_r)$, basically by taking the integral over $mathbb{R}^2$ of the winding number relative to $f(S_r)$. Notice that the constraints on $alpha$ imply that $f(S_r)$ has zero area.

The question then is: what mapping $f$ maximizes this enclosed area? Thinking about the problem for a few minutes would suggest that this would be a circle, as in the classical isoperimetric problem, though with a different radius (which, it seems, is usually impossible to write down explicitly).

The problem seems difficult. The difficulty is that it’s inherently global: starting from a given $f$, one can usually expand at a point $x$ without violating the Hölder condition locally, though this might violate the Hölder condition for $x$ relative to a point far away.

I’m curious if it this question has been asked before and whether it would be a tractable problem.

All topic

Problem with simple inverse Laplace transform

I have the function:

$$F(s) = frac{s^4+3s^3+2s^2+4s+4}{(s+3)(s^2+1)}$$

and I have to make inverse Laplace. I tried to collect $s^3$ from the first and second element of the numerator in order to obtain:

$$frac{2s^2+4s+4}{(s+3)(s^2+1)} + frac{s^3}{s^2+1}$$

for the first, I calculated residues and for the second, I made a polynomial division. I obtained

$$frac{1}{s+3} + frac{1}{s^2+1} + s – frac{s}{s^2+1}$$

When I calculated the inverse I obtained:
$$e^{-3t}H(t) + sin(t)H(t) + delta_0′ – cos(t)H(t)$$

But, in the solution there isn’t $cos(t)H(t)$

All topic

How to work around “Release file expired” problem on a local mirror

I have a local mirror (created with debmirror), and when I run apt-get update after a few days, I get this:

E: Release file expired, ignoring file:/home/wena/.repo_bin/dists/sid/Release (invalid since 14h 31min 45s)

How do I work around that?

All topic