text:
# RDP 2020-07: How Many Jobs Did JobKeeper Keep? 6. Results

## 6.1 Difference-in-differences Estimates

A graphical summary of our results is given in Figure 2. The top panel of Figure 2 shows the share of the treatment group (pink) and control group (blue) that were employed in each month from November 2019 to July 2020, conditional on being employed in February. In May around 74 per cent of the longer-tenure group were still in employment, while only 67 per cent of the shorter-tenure group remained in employment. The difference between these employment rates – shown in the bottom panel of Figure 2 – is our estimate of the effect of being worker eligible for JobKeeper on employment. This is our estimate of $\delta$ in Equation (2), for the month of May (after multiplying by 100 to convert to percentage terms). In May, the size of that effect is 7 percentage points, which is statistically significant at the 5 per cent level.[31]

The employment rates of both groups rose in June and July, in line with the broader rise in employment (Figure 2). However, the difference between the employment rates of the two groups remained large at around 8 to 10 percentage points. Note that we are not limiting ‘employment’ to remaining at the same firm as in February – if a person was dismissed but subsequently found a new job, they would be treated as having remained in employment.

The absence of a statistically significant effect in April may seem surprising at first, given that JobKeeper was announced on 30 March and came into effect immediately. However, it is important to note that JobKeeper was announced during the period referenced by the April survey (29 March to 11 April). In addition to this timing issue, the ABS's approach to measuring employment means that some changes in employment will be captured with a lag.[32]

## 6.2 The Effect of JobKeeper on Employment

Our estimates suggest that being worker-eligible for JobKeeper in itself raised the likelihood a person stayed employed by 7 percentage points in May. But because not all worker-eligible employees actually received JobKeeper, the 7 percentage point estimate understates the effect of receiving JobKeeper on employment.

To infer what our estimates imply about the effect of receiving JobKeeper on employment, we scale them up to account for the estimated probability of actually receiving JobKeeper among worker-eligible employees (the ‘take-up rate’). Although we do not observe this probability in the LFS micro data, we can infer it using other sources. To estimate the take-up rate, we divide total JobKeeper recipients (3.5 million over the April to May period according to administrative data cited by Treasury (2020b)) by the total number of people who passed the worker-eligibility test (10.26 million according to our own calculations using the LFS micro data). More specifically, the number of people who passed the worker-eligibility test is the total number of employed people in Australia in February 2020, less those who were casual employees with fewer than 12 months of job tenure or otherwise ineligible based on their industry of employment (the same sample exclusion criteria as we used in our regression analysis). Our calculation suggests that one-third of all worker-eligible individuals received JobKeeper.

We provide a detailed discussion of this scaling approach in Appendix B, which is similar in many ways to the approach used by Autor et al (2020) in their evaluation of the PPP scheme in the United States. In short, to obtain an estimate of the causal effect of JobKeeper on employment, ${\stackrel{^}{\tau }}_{IV}$, we estimate Equation (2) and then divide the difference-in-differences estimate, $\stackrel{^}{\delta }$, by the take-up rate,

(3) $τ ^ IV = δ ^ 1 3$

This suggests that receiving JobKeeper increased a person's probability of remaining employed by over 20 percentage points in May, June and July, relative to the counterfactual of not receiving JobKeeper. As we discuss later, these effects are quantitatively large, both in aggregate and on a bang-for-buck basis.

It is important to note that our estimate of the take-up rate is imperfect because it pertains to a broader population than what we studied to estimate the effects of worker eligibility on employment. However, our overall conclusions are largely unchanged when we consider alternative calculations of the take-up rate designed to provide a closer match to the population used in the difference-indifferences analysis (i.e. casual employees with limited job tenure; see Appendix B).[33]

## Footnotes

Table C2 provides the month-by-month regression estimates of Equation (2) in table format. [31]

This lag occurs for two reasons. First, the survey asks about a given reference week. A worker who loses their job midway through that week is classified as employed if they worked at least one hour at the start of the week. This is important for interpreting the April survey, because a number of high-frequency data sources suggest a large amount of job shedding occurred during the reference weeks of the April LFS. There is also evidence for this in the sharp rise in the number of people reporting fewer than their usual hours during the April reference week(s) because they ‘lost or left a job’ during that week. These job losses did not flow through to employment until May. Second, people who are stood down without pay continued to be classified as employed for at least four weeks after being stood down (see Section 5.5). While this treatment of unpaid stand downs is consistent with the best-practice guidelines set out by the International Labour Organization, it differs to the treatment in Canada and the United States where such layoffs lead to an immediate decline in employment. [32]

Future work using administrative data should seek to better understand the relationship between eligibility and take-up across different employment types (e.g. casual or non-casual) and different ranges of job tenure. [33]


text:
# Show that $\operatorname{End}_A(P)$ is a central, simple $K$-algebra if $P$ is a f.g. projective $A$-module

Let $A$ be a central, simple $K$-algebra and let $P$ be a finitely generated projective $A$-module.

I want to show that the endomorphism ring $\operatorname{End}_A(P)$ is also a central, simple $K$-algebra.

I know that $P$ is a semisimple $A$-module since $A$ is a simple, Artinian ring and I tried using Wedderburn's theorem on $\operatorname{End}_A(A^n)$ where $P\oplus Q\cong A^n$ but I couldn't get very far.

Would someone be able to provide a proof of this?

Many thanks.

• Do you assume that $A$ is finite-dimensional over $K$ ? – Captain Lama Apr 26 '16 at 20:54
• Yes I am assuming this. – eddie Apr 26 '16 at 20:55

Note that since $A$ is not only semi-simple but also simple, there is a unique simple $A$-module. Call it $I$. Then any finitely generated $A$-module is isomorphic to $I^n$ for some $n$ (in particular they are all projective).
Then $\operatorname{End}_A(P) \simeq \operatorname{End}_A(I^n) = M_n(\operatorname{End}_A(I))$ (the last equality is valid for any module and any ring).
Now for any $K$-algebra $A$ and any simple module $I$, $\operatorname{End}_A(I)$ is a division algebra ; call it $D$.So $\operatorname{End}_A(P)\simeq M_n(D)$.
The fact that $D$ is central can be seen by taking $P=A$ : if $A\simeq I^r$, $A^{op} = \operatorname{End}_A(A) = M_r(D)$ is central and $Z\left( M_r(D)\right) = Z(D)$, so $D$ is central.
Then $\operatorname{End}_A(P)\simeq M_n(D)$ with $D$ a central division algebra over $K$ : it's easy to check that this implies $\operatorname{End}_A(P)$ is central simple.
• No, it's actually not that obvious, and now that I think about it I don't see how to prove it without paraphrasing the demonstration of the Artin-Wedderburn structure theorem (from which it follows easily : if you have two non-isomorphic simple modules then $A$ is a direct product, which is of course impossible if it's simple). – Captain Lama Apr 26 '16 at 22:00
• Is it because a simple $A$-module is always isomorphic to a minimal left $A$-ideal and if you have two non-isomorphic simple modules then by Wedderburn's theorem, $A$ would have at least two components (as a regular module over itself), hence it would not be a simple ring? I assume the proof then proceeds as above? Regards – eddie Apr 29 '16 at 15:30

format: plain


text:
56 views

In the figure shown, the output ܻ$Y = AB + \overline{C}\:\:\overline{D}$ is required to be ܻ The gates $G1$ and $G2$ must be, respectively,

1. NOR, OR
2. OR, NAND
3. NAND, OR
4. AND,NAND


text:
# -4x+y=8;4x-y=8

## Simple and best practice solution for -4x+y=8;4x-y=8. Check how easy it is, to solve this system of equations and learn it for the future. Our solution is simple, and easy to understand, so dont hesitate to use it as a solution of your homework.

If it's not what You are looking for type in the system of equations solver your own equations and let us solve it.
Remember to put linear equations with variables x and y.
for example:
2x+y=8
x+3y=14

## Solution for -4x+y=8;4x-y=8 system of equations:

We try to solve the equation: We insert the solution into one of the initial equations of our system of equationsWe get a system of equations:The system of equations does not have any solution`

## Related pages

5s and 3c0.08333 as a fractiongraph 5x 4y 20x2 6x 4 02x2 2xexpxleast common denominator generator205-16724.5fraction and decimal least to greatest calculator4x2 5x 63.14 x 12tan 3pi 4gcf of 36 and 1204x 5y 20www.njatc.utk.edugreatest common factor of 48 and 60prime factorization 99derivative of x asimplify square root of 150differentiating ln xx 5y graphgraph y tan xconvert 0.85 to a fractionroman numerals 92103-20dividing mixed number fractions calculatorsin 2x derivativey 2 sinxgraph x 4ygreatest prime factor of 6811111111 to decimalthe square root of 1296cosx cos3xsolve for h v lwhgcf of 635i 7ialgebra fraction calculator with steps0.125 as fractionfactor the expression 6x 2 5x 1prime factorization of 114greatest common factor of a polynomial calculator5000 naira in dollarssqrt 1-x 2-y 2fraction multiplier calculator4x 2y 6decimal fraction and percentagesolve y 2x 44x 3y 8mx b calculatorderivative of ln 9xarcsin 1.5roman numerals conversion3.14159262log5sin 3x graphsinus piwhat is the gcf of 841995 roman numerals24-85simplify the square root of 1695x 2 10xderivative of sin 3 xfinding derivatives of ln92-52x 4y 20greatest common factor of 651680 combine60 percent of 765graph 4x 2ax b 0 solve for x2.1.9sin 5xwhat is the prime factorization for 902n312sibx 2 cubed66ycommon multiples of 2 and 7derivative of tan 3xprime factorization for 108what is 30 percent of 2800


text:
Monday, June 28, 2010

Minimum Reciprocal Length

Given a triangle $ABC$, and point $P$ in its interior. Find points $X,Y$ on $AB$ and $AC$ (or their extensions) such that $XY$ passes through $P$ and
$$\frac{1}{PX} + \frac{1}{PY}$$ is maximized.


text:
# Redirect incoming traffic based on referrer or random number

This working script directs incoming traffic to different locations depending on the value present in the session for referring URI. If there is a present value, it sends the user back to their original location. If not, then a random number is generated, checked against and used to direct the visitor to one of two possible locations, each with a likelihood of 50%.

It satisfies the basic requirement but I'm wondering if there might not be a better approach.

We have two sub directories, each one with a file within it, and one file at the root. Traffic generally hits the files in the sub dirs, but I wanted to create a root file to handle an event where a user might strip out everything in the URL but the domain.

Each of the files in the sub dirs use this logic to set the referrer:

function strleft($s1,$s2) {
return substr($s1, 0, strpos($s1, $s2)); } function selfURL() { if(!isset($_SERVER['REQUEST_URI'])) {
$serverrequri =$_SERVER['PHP_SELF'];
} else {
$serverrequri =$_SERVER['REQUEST_URI'];
}
$s = empty($_SERVER["HTTPS"]) ? '' : ($_SERVER["HTTPS"] == "on") ? "s" : "";$protocol = strleft(strtolower($_SERVER["SERVER_PROTOCOL"]), "/").$s;
$port = ($_SERVER["SERVER_PORT"] == "80") ? "" : (":".$_SERVER["SERVER_PORT"]);$_SESSION['ref'] = $protocol."://".$_SERVER['SERVER_NAME'].$port.$serverrequri;
}
selfURL();

The file at the root uses this logic to direct traffic:

$refurl =$_SESSION['ref'];
if (isset($refurl)) { header("Location: " .$refurl);
} else {
$loc1 = "dir1/file.php";$loc2 = "dir2/file.php";
$num = mt_rand(1, 100); if ($num > 50) {
header("Location: " . $loc1); } else { header("Location: " .$loc2);
}
}

• Are you trying to reimplement PHP sessions? What is the purpose? You might want to read this: php.net/manual/en/book.session.php Aug 10 '11 at 19:07
• is there any way "$_SERVER['REQUEST_URI']" wont be set? Aug 11 '11 at 7:15 • This is pretty much decent code from my read. Don't expect you to get a lot of comments or answers as this is basically clean and proper from a language agnostic design perspective.. Aug 14 '11 at 3:13 ## 1 Answer null coalesce does exist in php according to the google (per: https://stackoverflow.com/questions/1013493/coalesce-function-for-php ) $s = $_SERVER["HTTPS"] ?: "";$protocol = strleft(strtolower($_SERVER["SERVER_PROTOCOL"]), "/").$s;

I'm not super familiar with php, but I think this should work from what I understand you're doing here.

• nice! very useful, indeed. Dec 14 '11 at 8:44


text:
# Prove Inequality using Mean Value Theorem

1. Oct 28, 2008

### Khayyam89

1. The problem statement, all variables and given/known data
Essentially, the question asks to use the mean value theorem(mvt) to prove the inequality: abs(sina - sinb) $$\leq$$ abs(a - b) for all a and b

3. The attempt at a solution

I do not have a graphing calculator nor can I use one for this problem, so I need to prove that the inequality basically by proof. What I did was to look at the mvt hypotheses: if the function is continous and differetiable on closed and open on interval a,b, respectively. However, the problem I am having is that I am getting thrown off by the absolute values and the fact that I've never used mvt on inequalities. I know the absolute value of the sin will look like a sequence of upside-down cups with vertical tangents between them. Hints most appreciated.

Last edited: Oct 28, 2008
2. Oct 28, 2008

### boombaby

Assume a>b, then sina-sinb=(a-b)cosc, for some b<c<a, which gives the inequality with no problems.

3. Oct 28, 2008

### Khayyam89

Wait, are you considering that abs(...) = absolute value of the sum?

4. Oct 28, 2008

### Dick

The mean value theorem tells you (sin(a)-sin(b))/(a-b)=sin'(c)=cos(c) for some c between a and b, as boombaby said. Take the absolute value of both sides and use that |cos(c)|<=1.


text:
# Does waverider have much lower drag than Sears Haack body?

I tried to calculate drag for hyper velocity project using this paper for Sears Haack revolution body. Some parameters:

Diameter: 160mm (round number for simulating 155mm projectile)

Fineness ratio: 13.2, which means projectile's length is 2112mm

From the paper, the assumed wing area $$S$$ is

$$0.077 \cdot l^2 = 0.077 \cdot (2.112)^2 = 0.3435 \ [m^2]$$

From the Figure 15 in the paper, the total Cd at 2km/s is about 0.004

So total drag at sea level $$D = 0.5 \cdot v^2 \cdot \rho \cdot S \cdot C_D$$

$$D = 0.5 \cdot 2000^2 \cdot 1.23 \cdot 0.3435 \cdot 0.004 = 3380 \ [N]$$

From the paper, the volume $$V$$ of the projectile is

$$V = 0.002655 \cdot l^3 = 0.025 \ [m^3]$$ Assume it is filled with aluminum, then the mass $$m$$ is about $$0.025 \cdot 3000 = 75 \ [kg]$$

So the drag is about 4.5g.

On the other hand, there is an empirical formula for hypersonic lift to drag ratio is:

$$\frac{L}{D} = \frac{4 \cdot (M + 3)}{M} = \frac{4 \cdot (6 + 3)}{6} = 6$$

It seems that if the projectile is shaped as a good waverider then drag can be as low as 1/6 of its weight, assuming the waverider is the best shape for hypersonic lift to drag ratio.

There is of course the problem about scaling where mass is increased at cubed speed, while area only increases at squared speed. While I don't have an complete computational model of waverider to compare directly with SH body, but it seems at the first glance, the waverider can get much lower drag than even the most aerodynamic shape, 1/6g vs 4.5g.

So is it true that the waverider has much lower drag than a SH body?

A waverider will prevent the compressed air under the airframe from escaping sideways. An equivalent view is that the sideways component of the air displaced by the body is used for lift creation by straightening it and pushing it down at the wingtips. This allows it to fly at a lower angle of attack for the same lift, which reduces supersonic lift-related drag linearly with the reduction in angle of attack.

The drag of a Sears-Haack body is the lowest for a given volume and a given fineness ratio. Increasing the fineness (essentially, the local inclination times the circumference of each body section) will reduce drag. This increased fineness, however, will now cause less sideways displacement of airflow which could be used for the waverider effect.

In the end, the question as asked is not answerable. What can be said is:

• A blunt Sears-Haack body will profit the most from the waverider effect.
• A waverider is still a Sears-Haack body if it has the right cross section distribution over length.
• A waverider will maybe lower drag by 20% or 30% in a realistic configuration and at Mach numbers between Mach 3 to 5.

The empirical equation for the L/D of a waverider looks suspicious. Without knowing the constraints of its validity, I would not trust its results. Also, the drag coefficient of your Sears-Haack body looks like the zero-lift drag. You might need to add the lift-related drag to arrive at the complete drag.

And the biggest mistake is to operate it at ground level - 2000 m/s would be appropriate in 30 km altitude. Get the drag figure there and you will arrive at a much lower drag just by operating it in the appropriate density.


text:
# Why is this not working?

• December 21st 2012, 02:01 PM
jakncoke
Why is this not working?
$f(x) = a_3 x^3$
results in an invalid equation error.
• December 21st 2012, 02:37 PM
fkf
Re: Why is this not working?
$f(x) = a_3 x^3$

I've had some problems with the TEXtags. I think on my computer the best way is to write the equation etc. and then mark the equation and press on the sigmabutton in advanced mode to wrap the equation with the TEXtags.
• December 22nd 2012, 12:13 AM
BobP
Re: Why is this not working?
Me too. Things that have worked earlier now producing a whole lot of invalid equations.


text:
# Is it \catcode or \catcode?

I've noticed that \catcode is poorly documented in the TeXbook. The primitive is defined as \catcode but every time it is used, it is used as \catcode ... the backquote is never discussed.  itself is not active (right?) so I don't understand its function. Is it required for \catcode to work properly?

-

The backquote notation is discussed in the TeXbook, page 44.

\catcode takes as its first argument the character code of the character you want to change the catcode of. For example,

\catcode65=\active

will make ‘A’ an active character.

Instead of inserting the number ‘65’ directly, TeX allows the character code of a character to be inserted with the backtick notation you're referring to:

\catcodeA=\active

You need to escape the character if it happens to have a special catcode, though: \%, for instance.

This backtick notation can be used wherever TeX expects a number. E.g.,

\numberA

will typeset ‘65’.

-
Beat me to it by moments, Will. Just to add, this is described in the TeXbook, page 44. – Lev Bishop Sep 21 '10 at 1:59
Feel free to fix up any of my clunky statements. My explaining-brain feels like mush today. – Will Robertson Sep 21 '10 at 2:23
I guess it should read \catcode'A=\active in your example (of course with a backtick; don't know how to put a backtick into the middle of a code sample.) – Hendrik Vogt Sep 21 '10 at 7:45
Oh yes, that was quoted incorrectly. Thanks for spotting the error. – Will Robertson Sep 21 '10 at 11:30
Thanks for that informative explanation. To recap: in situations where TeX is looking for a number, it will interpret ` as "the character code of the next character". You have to admit, sometimes it's hard to navigate the TeXbook! – Brandon Kuczenski Sep 21 '10 at 21:08


text:
Preparing NOJ

# Cuckoo Hashing

1000ms 65536K

## Description:

One of the most fundamental data structure problems isthe dictionary problem: given a set D of words you want to

be able to quickly determine if any given query string q is
present in the dictionary D or not. Hashing is a well-known
solution for the problem. The idea is to create a function
h
: Σ[0..n 1] from all strings to the integer range
0, 1,..,n 1, i.e. you describe a fast deterministic program
which takes a string as input and outputs an integer between
0 and n1. Next you allocate an empty hash table T of size
n and for each word w in D, you set T[h(w)] = w. Thus, given a query string q, you only
need to calculate h(q) and see if T[h(q)] equals q, to determine if q is in the dictionary.
Seems simple enough, but aren’t we forgetting something? Of course, what if two words
in D map to the same location in the table? This phenomenon, called collision, happens
fairly often (remember the Birthday paradox: in a class of 24 pupils there is more than
50% chance that two of them share birthday). On average you will only be able to put
roughly n-sized dictionaries into the table without getting collisions, quite poor space
usage!
A stronger variant is Cuckoo Hashing1. The idea is to use two hash functions h1 and
h2. Thus each string maps to two positions in the table. A query string q is now handled
as follows: you compute both h1(q) and h2(q), and if T[h1(q)] = q, or T[h2(q)] = q, you
conclude that q is in D. The name “Cuckoo Hashing” stems from the process of creating
the table. Initially you have an empty table. You iterate over the words d in D, and
insert them one by one. If T[h1(d)] is free, you set T[h1(d)] = d. Otherwise if T[h2(d)] is
free, you set T[h2(d)] = d. If both are occupied however, just like the cuckoo with other
birds’ eggs, you evict the word r in T[h1(d)] and set T[h1(d)] = d. Next you put r back
into the table in its alternative place (and if that entry was already occupied you evict
that word and move it to its alternative place, and so on). Of course, we may end up
in an infinite loop here, in which case we need to rebuild the table with other choices of
hash functions. The good news is that this will not happen with great probability even if
D contains up to n/2 words!

## Input:

On the first line of input is a single positive integer 1 t 50 specifying the number oftest cases to follow. Each test case begins with two positive integers 1 m n 10000on a line of itself, m telling the number of words in the dictionary and n the size of the hash table in the test case. Next follow m lines of which the i:th describes the i:th word di in the dictionary D by two non-negative integers h1(di) and h2(di) less than n giving
the two hash function values of the word di. The two values may be identical.

## Output:

For each test case there should be exactly one line of output either containing the string successful hashing” if it is possible to insert all words in the given order into the table, or the string “rehash necessary” if it is impossible.

## Sample Input:

23 30 11 22 05 62 33 11 25 12 5

## Sample Output:

successful hashingrehash necessary

## Note:

undefined

Info

Provider NOJ

Code NOJ1523

Tags

Submitted 1

Passed 1

AC Rate 100%

Date 04/20/2019 10:03:10

Related

Nothing Yet


text:
# More Instructions on Installing a Wolfram Engine Kernel for Jupyter

Posted 1 year ago
9983 Views
|
|
10 Total Likes
|

The attached notebook is the product of a lot of errors on my part. And I hear that even very sophisticated Wolfram Language users are having difficulty with the installation. Here's my effort to clarify some of the hidden steps you may need to take. If you like it, let people know. If it has errors or incompleteness, let people know. I think the ability to access the Wolfram Language through Jupyter is a great thing for the Wolfram Ecosystem. The more people who can take advantage of the opportunity without a soul gutting out-of-box experience, the better.

## Step 1 : Figure out where the heck Jupyter is installed on your system

You might as well do this first. If you don' t where Jupyter is, all of this is unlikely to work. On my Mac I use Jupyter through Anaconda. So I kind of thought it was there. I ultimately found a command called jupyter_mac.command in this directory where /Users/sethchandler is my "home" directory.

jupyterLocation = "/Users/sethchandler/anaconda3/bin";

Now we have to fiddle with the "Path Environment" for this session. Here's my current environment.

initialEnvironment = GetEnvironment["PATH"]

"PATH" -> "/usr/bin:/bin:/usr/sbin:/sbin"

It' s a bunch of directory paths separated by colons.

Now let' s change it.

SetEnvironment["PATH" -> StringJoin["PATH" /. initialEnvironment, ":", jupyterLocation]]

Check if it worked

GetEnvironment["PATH"]

"PATH" -> "/usr/bin:/bin:/usr/sbin:/sbin:/Users/sethchandler/anaconda3/bin"

## Step 2 : Get the Wolfram Language code you will need; it' s in a file

1. Browse to here: https://github.com/WolframResearch/WolframLanguageForJupyter/blob/master/configure-jupyter.wls
2. Press the Raw button.
3. Go the browser menu and click Save Page As or whatever saves files. Put the file somewhere you will remember it. Now a bunch of Wolfram Language code is on your local machine.

## Step 3 : Get the Paclet

1. Browse to here : https : // github.com/WolframResearch/WolframLanguageForJupyter/releases
2. Click on Assets
3. Click on WolframLanguageForJupyter-0.9 .1.paclet or whatever the current number is. This should start a standard download process. Stick the file somewhere on your machine where you will remember it.

## Step 4 : Install the Paclet

I stuck my paclet in the Downloads directory of my user directory.

PacletInstall["/Users/sethchandler/Downloads/WolframLanguageForJupyter-0.9.1.paclet"]

## Step 5: Load up the Package that was in the Paclet

Needs["WolframLanguageForJupyter"]

## Step 6 : Do it!

Invoke whatever form of secular of divine imprecations work best for you and run this :

ConfigureJupyter["Add"]
`

If nothing happens after about 5 seconds, that' s perfect. Look below to "prove" that it worked.

Attachments:


text:
How can I generate mazes that often have multiple “forks” or choices?

The basic algorithm for procedurally generating mazes goes something like this:

1. Choose a random available direction from the current square.
2. If there is one, go there and repeat from step 1.
3. Otherwise, backtrack to the previous square and repeat from step 1.

This is a fairly good algorithm, but the problem is that it typically generates easy mazes. They usually only have one option or path, and alternate paths don't appear very often and reach dead-ends quickly.

How could I alter the algorithm (or change it entirely) to create more branching?

• The easiest way is to enforce branching at random points that don't require it otherwise, progressing all active branches simultaneously (or in round-robin pattern). As for choices, just scrap a number of walls, but these tend to be easier than single-correct-route mazes. – SF. May 20 '14 at 9:49

The algorithm you've mentioned is called depth-first generation, and actually, it's quite easy to intuitively demonstrate a way to do this.

If you have a maze generated via a depth-first algorithm, there is one and only one way to each square. DFS generates a "perfect" maze - one without any closed loops, without inaccessible areas, and is simply connected. There is one and only one path from any point to any other point. Thus, the maze has exactly one solution.

Now take adjacent - but walled - points A and B. There exists a path from the entrance to point A, and there exists a path from point B to the exit. However, because there is a wall between points A and B, there also exists a path which does not go through both A and B that leads to the exit. By removing the wall between A and B, you create a new (second) path through both A and B that leads to the exit, thus creating an alternate path.

Thus, if you remove any wall in the maze, you create another path, or multiple valid paths.

Note that this makes your maze imperfect by definition, as there are now two paths from the start to the exit.

• Actually I'm pretty sure both of you were talking about labyrinths (the imperfect ones being mazes). There's even a detailed post on English.SE about it: english.stackexchange.com/questions/144052/… – lynxlynxlynx May 15 '14 at 21:11
• This puzzle could easily be implemented in an OO programming language. Were you referring to a breadth-first algorithm in your answer when you provided your answer? – pyler May 16 '14 at 0:49
• [needs to insert actual answer to question] – durron597 May 21 '14 at 14:28
• @durron597 Er...? I have answered the question? I can replace my other comment with something more helpful, but... do you have an actual reason for downvoting this answer? – user20 May 21 '14 at 14:29
• The question was essentially "how can I modify the standard DFS algorithm to make it more branching". Your answer just describes the process of how DFS to generate a labyrinth works in general. It is possible to create perfect DFS mazes with more branching, as described by SF's comment. – durron597 May 21 '14 at 14:33

First I want to question your premise a bit. Your goal is to create harder mazes, but you suggest that the method is to increase the branching factor.

You are right up to a point; more branches is often associated with higher difficulty, but if you go too far you run into the problem that Joe Z. hinted at - you'll have lots of very short dead-ends, which to a human is very easy to spot.

For the ultimate maze/labyrinth creation resource, I often go to Think Labyrinth by Walter D. Pullen. On his Maze Classification page, he lists a relevant metric for you, river:

River: The "river" characteristic means that when creating the Maze, the algorithm will look for and clear out nearby cells (or walls) to the current one being created, i.e. it will flow (hence the term "river") into uncreated portions of the Maze like water. A perfect Maze with less "river" will tend to have many short dead ends, while a Maze with more river will have fewer but longer dead ends.

I think what you want is a moderate amount of "river"; lots of branches but not so many that will cause the dead ends to be too small and easy to spot.

Compare the following mazes generated by different algorithms:

Recursive backtracker (very high river)

Eller's Algorithm (moderate river)

Prim's Algorithm (very low river)

Note that your algorithm is pretty much the recursive backtracker. Try a different algorithm!

Ok - you want your Algorithm to create more challenging mazes? Change it to a BFS - You start with your normal algorithm, but you always pick random where you continue and not just after you have reached the goal...

1. Initialize path-list with one active square at the starting location.
2. Pick a random active squares: Referred to as 'current square'
3. Pick a random free square around the current square (if there are non skip to 5)
4. Connect the chosen free square to the current square and mark it NOT free and
add it to the list of active squares.
5. If the current square has no empty squares around remove it from the list
6. If the new Square is next to the Goal, connect it to the goal
7. Goto 2 until there are no more active paths left.

This will give you a labyrinth with a single path to the goal, but many paths which look just as promising. This should be pretty hard. If you want more than a single path to the goal, you can add a switch in step 3, which can also chose an occupied square and open up a connection to it (but doesn't add it to the list of active squares)

Then you will get a labyrinth with round-trips and (possibly) multiple ways to the goal

There are multiple maze generation algorithms. The one you describe the basic DFS algorithm. I'm aware of two other maze algorithms, both of which produce a lot more branching: Prim's algorithm and Kruskal's algorithm. Both of these algorithms are actually algorithms to find the minimum spanning tree of an undirected weighted graph.

Suppose you have a grid of points, which are connected horizontally and vertically to their direct neighbours. Then, assign each edge a random weight, and run Prim's algorithm to find the minimum spanning tree of this grid. Ta-dah, you have a randomly generated maze.

Now, the problem with mazes like this, from testing and experience, is that they branch a little too much. Most of the branches are one-square to three-square ordeals, and it's really easy to determine which branches lead to dead ends most of the time. You want somebody to be able to follow the maze for a little while before reaching dead ends.

So what you can do is to tweak the algorithm a little bit. One of the easiest alternate algorithms you can make is a "bounded DFS", in which you only go a certain distance inward on your search for a path before forcing a backtrack and branching again. This will create mazes with nice long stray paths most of the time.

As for modifying Prim and Kruskal, I don't know enough about graph theory to ascertain whether this method will actually work, but consider making it so that when generating the random graph at the start, the weights of edges touching the same point have to be within a certain distance of each other.


text:
# Question #e7441

Jul 31, 2017

Atomic radius generaly decreases as we move from left to right.

#### Explanation:

The radius of Noble gases is the greatest as :

vanderwall radius$>$metallic radius$>$covalent radius

As we move from left to right, the effective nuclear charge(${Z}_{e f f}$)
increases but there is no change in shielding effect($\sigma$) of electrons as they are added to the outermost shell of atom.Hence the nucleus pulls the electrons closer to itself decreasing the atomic radius


text:
# The Hartree Potential¶

PDF version

The Hartree potential is defined as the electrostatic potential from the electron charge density and must be calculated from the Poisson equation:

${\bf \nabla}^2 V_{H}[n]({\bf r}) = - 4 \pi n({\bf r}).$

The Poisson equation is a second-order differential equation and a boundary condition is required in order to fix the solution. Molecular systems have the boundary condition that the potential goes asymptotically to zero. In bulk systems, the boundary condition is that the potential is periodic.

Note

Periodic boundary conditions only determine the Hartree potential up to an additive constant, which reflects the physics that the bulk electrostatic potential does not have a fixed value relative to the vacuum level. Experimentally, this can be measured through the different work functions of different facets of a crystal.

## Solving the Poisson equation using a Fourier transform¶

For systems with periodic boundary conditions and no dielectric and metallic regions, the Poisson equation can be solved using the FastFourierSolver, which is the most efficient FFT solver in the QuantumATK package.

## Solving the Poisson equation with a real-space solver¶

For general systems, the Poisson equation is solved using an algebraic MultigridSolver or DirectSolver. The system is enclosed in a bounding box, and the Hartree potential is defined on a regular grid inside the bounding box. Different boundary conditions can be imposed on the solution at the bounding box surface by using the keyword boundary_conditions:

poisson_solver = MultigridSolver(
boundary_conditions=[[PeriodicBoundaryCondition(),  PeriodicBoundaryCondition()],
[DirichletBoundaryCondition(), DirichletBoundaryCondition()],
[PeriodicBoundaryCondition(),  PeriodicBoundaryCondition()]]
)

DirichletBoundaryCondition:
The Hartree potential is zero at the boundary.
NeumannBoundaryCondition:
The negative gradient of the Hartree potential, e.g. the electric field, is zero at the boundary.
PeriodicBoundaryCondition:
The potential has identical values on opposite faced boundaries.
MultipoleBoundaryCondition:
The potential at the boundary is determined by calculating the monopole, dipole and quadrupole moments of the charge distribution inside the box, and using these moments to extrapolate the value of the electrostatic potential at the boundary of the box.

It is possible to include an electrostatic interaction with a continuum of metallic or dielectric material inside the bounding box. The continuum metals are handled by constraining the Hartree potential within the metallic region to a fixed value. Dielectric materials are handled by introducing a spatially dependent dielectric constant, $$\epsilon({\bf r})$$, where $$\epsilon({\bf r}) = \epsilon_K$$ inside the dielectric material with dielectric constant $$\epsilon_K$$, and $$\epsilon({\bf r}) = \epsilon_0$$ outside the dielectric material.

It is possible to perform calculations of solvents. In this case, the volume of the configuration is defined by inscribing each atom in a sphere with a size given by the van der Waals radius of the element. Inside the volume of the configuration, the dielectric constant is 1, and outside the volume of the configuration, the dielectric constant is equal to the value of solvent_dielectric_constant.


text:
# Abrazolica

### Blogroll

John Baez
John D Cook
Englishmen and Frenchmen

A reader of our combinatorics books emailed us recently about a group of problems in the fifth edition (1901) of Whitworth's "Choice and Chance". The first of these problems (Problem 786 on pg 276) is as follows: Six Englishmen and six Frenchmen stand in a row so that every man has a compatriot next to him. Show that the number of possible arrangements is 34.

This problem can be solved using the methods outlined in our book Combinatorics II Problems and Solutions: Counting Patterns.

The automaton for this problem is

where S is the start state, E1 represents the start of a group of Englishmen, F1 represents the start of a group of Frenchmen. E2 and F2 represent subsequent Englishmen and Frenchmen in a group. The end states are E2 and F2. From this automaton we can construct an adjacency matrix, with $x =$ E and $y =$ F, which is:

$\mathbf{A}=\begin{bmatrix} 0 & x & 0 & y & 0\\ 0 & 0 & x & 0 & 0\\ 0 & 0 & x & y & 0\\ 0 & 0 & 0 & 0 & y\\ 0 & x & 0 & 0 & y \end{bmatrix}$

where the rows and columns consecutively show transitions to states S, E1, E2, F1, and F2. Defining matrix B as

$\mathbf{B}=(\mathbf{I}-\mathbf{A})^{-1}$

then the generating function we want is a sum of two matrix elements of B

$g(x,y)=\mathbf{B}_{13}+\mathbf{B}_{15}$

where $\mathbf{B}_{13}$ represents starting at S and ending at E2, and $\mathbf{B}_{15}$ represents starting at S and ending at F2.

The generating function works out to be

$g(x,y)=\frac{2x^2y^2-x^2y-xy^2+x^2+y^2}{1-x^2y^2+xy-x-y}$

A Taylor series expansion will give you the answer for this problem and the next three problems (Problems 786-789). It will actually give you the answer to any problem involving $n$ Englishmen and $m$ Frenchmen. The answer is the coefficient of $x^ny^m$ in the expansion. The coefficient of $x^6y^6$ is $34$, which is the answer to Problem 786. The coefficient of $x^7y^7$ is $84$, which is the answer to Problem 787. The coefficient of $x^8y^8$ is $208$, which is the answer to Problem 788, and the coefficient of $x^8y^7$ is $129$, which is the answer to Problem 789.

What we've just shown is by far the easiest way to solve the problem. You can also solve it by combinatorial reasoning. Let's say we have $n$ Englishmen and $m$ Frenchmen. An acceptable arrangement will consist of $k$ groups of Englishmen, where each group has at least two members, surrounded by either $k-1$, $k$, or $k+1$ groups of Frenchmen that have at least two members each. Let $\Box$ represent a group of Englishmen and $\triangle$ represent a group of Frenchmen then for $k=3$ the acceptable arrangements are

$\begin{matrix} \Box & \triangle & \Box & \triangle & \Box & &\\ \triangle & \Box & \triangle & \Box & \triangle & \Box &\\ \Box & \triangle & \Box & \triangle & \Box & \triangle &\\ \triangle & \Box & \triangle & \Box & \triangle & \Box & \triangle \end{matrix}$

The number of ways to divide a group of $n$ objects into $k$ groups is

$\binom{n+k-1}{k-1}$

If each of the $k$ groups has to have at least two objects in it then you subtract $2k$ from $n$. The number of ways to divide a group of $n$ objects into $k$ groups with at least two objects in each group is then

$\binom{n-k-1}{k-1}$

Using this expression for partitioning the Englishmen and the corresponding expression for partitioning the Frenchmen, you get the following formula for arranging $n$ Englishmen and $m$ Frenchmen such that each has at least one compatriot next to him.

$a(n,m)=\sum_{k}\binom{n-k-1}{k-1}\left[\binom{m-k}{k-2}+2\binom{m-k-1}{k-1}+\binom{m-k-2}{k}\right]$

If you do the calculation you will find that $a(n,m)$ is equal to the coefficient of $x^ny^m$ in the Taylor series expansion of $g(x,y)$.

Counting Restricted Necklaces

This is a continuation of the previous post where now we are counting restricted necklaces. A restricted necklace is one where the symbols have to follow some rule. A simple example of this is not allowing the sequence $11$ to appear in a binary necklace composed of $0$'s and $1$'s. Obviously the number of such necklaces will be less than the total number of binary necklaces. The first step in counting them is to find the number of circular binary words that do not contain the sequence $11$. If $f(k)$ is the number of these words of length $k$ then the number of necklaces of length $n$ is given by

$\frac{1}{n}\sum_{d|n} \phi(d)f(n/d)$

Notice that this is essentially the cycle index polynomial for the cyclic group $C_n$ with $z_{d}^{n/d}$ replaced by $f(n/d)$.

Now what about the somewhat more difficult problem of counting how many of the necklaces have exactly $k$ $1$'s? Once again this starts with counting circular words. The automaton for generating binary words that do not contain the sequence $11$ is shown below.

Let $x$ represent $0$ and $y$ represent $1$ then the adjacency matrix for this automaton is

$\mathbf{A}=\begin{bmatrix} x & y\\ x & 0 \end{bmatrix}$

The generating function for the number of circular words is

$g(x,y)=\mathrm{Tr}\;(\mathbf{I}-\mathbf{A})^{-1}=\frac{2-x}{1-x-xy}$

The Taylor series expansion out to order $4$ is

$g(x,y)=2+x+(x^{2}+2xy)+(x^{3}+3x^{2}y)+(x^{4}+4yx^{3}+2y^{2}x^{2})+\cdots$

The term $(x^{4}+4yx^{3}+2y^{2}x^{2})$ in the expansion is the generating function for strings of length $4$. It says there is one circular word with all $0$'s, four words with a single $1$ and three $0$'s, and two words with two $1$'s and two $0$'s. Let $f_{n}(x,y)$ be the generating function for the number of circular words of length $n$. Then these polynomials obey the recursion

$f_{n}=xf_{n-1}+xyf_{n-2}$

with $f_{0}=2$, $f_{1}=x$, and $f_{2}=x^{2}+2xy$. The recursion can be solved to get the following expression for $f_{n}(x,y)$.

$f_{n}(x,y)=\frac{(x+\sqrt{x^{2}+4xy})^{n}+(x-\sqrt{x^{2}+4xy})^{n}}{2^n}$

Now we can use this in the cycle index polynomial. Replace $z_{d}$ with $f_{n/d}(x^{d},y^{d})$

$p_{n}(x,y) = \frac{1}{n}\sum_{d|n} \phi(d)f_{n/d}(x^{d},y^{d})$

This is the generating function for binary necklaces of length $n$ that do not contain the sequence $11$.

The same basic procedure can be used for necklaces with other kinds of restrictions.

Counting Necklaces

To define a necklace start with the idea of a circular word. These are strings of symbols where the last symbol is followed by, or is adjacent to, the first symbol. If the binary string $0011$ is circular then the last $1$ is followed by the first $0$. You can think of these strings as being labels on a circle. So there is no first or last symbol. Necklaces are sets of circular strings where no two strings are related by a circular shift of the symbols. In other words the strings $011$, $0110$, $1100$, $1001$ are all just different representations of the same necklace. When counting the number of binary necklaces of length $4$ only one of these strings is counted. In total, there are $6$ unique binary necklaces of length $4$. They are $0000(1)$, $0001(4)$, $0011(4)$, $0101(2)$, $0111(4)$, $1111(1)$. The numbers in parentheses are the number of unique ways each necklace can be represented. If you add up those numbers you get $16$, the number of binary strings of length $4$.

In this case it was fairly easy to count the number of necklaces by just writing them down. But this quickly becomes impossible for longer necklaces with more symbols, especially when there are restrictions on the kinds of substrings that can appear. It is fairly easy however to solve most necklace counting problems by using the cycle index polynomials for the cyclic groups. For necklaces of length $n$ the cycle index of the cyclic group $C_n$ is

$p(z_{1},z_{2},\ldots,z_{n}) = \frac{1}{n}\sum_{d|n} \phi(d)z_{d}^{n/d}$

This is a polynomial in the variables $z_{1},z_{2},\ldots,z_{n}$. The sum is over all the divisors of $n$ and $\phi(d)$ is the euler totient function, equal to the number of integers from $1$ to $n$ that are relatively prime to $n$, i.e. integers $k$ such that $\gcd(n,k)=1$ and $1\le k \le n$.

The number of necklaces of length $n$ using $m$ symbols is gotten from the cycle index by setting all the $z$ variables equal to $m$.

$p_{n}(m) = \frac{1}{n}\sum_{d|n} \phi(d)m^{n/d}$

These are now polynomials in $m$, the first few of which are:

$p_{1}(m) = m$ $p_{2}(m) = \frac{1}{2}(m^{2}+m)$ $p_{3}(m) = \frac{1}{3}(m^{3}+2m)$ $p_{4}(m) = \frac{1}{4}(m^{4}+m^{2}+2m)$

The table below shows the number of necklaces of length $n=2,3,\ldots,12$ using $m=2,3,4,5,6$ symbols.

n 2 3 4 5 6
2 3 6 10 15 21
3 4 11 24 45 76
4 6 24 70 165 336
5 8 51 208 629 1560
6 14 130 700 2635 7826
7 20 315 2344 11165 39996
8 36 834 8230 48915 210126
9 60 2195 29144 217045 1119796
10 108 5934 104968 976887 6047412
11 188 16107 381304 4438925 32981556
12 352 44368 1398500 20346485 181402676

To get the number of necklaces of length $n$ using two symbols, let $x$ and $y$ represent the symbols, and set $z_{d}=x^{d}+y^{d}$ in the cycle index.

$p_{n}(x,y) = \frac{1}{n}\sum_{d|n} \phi(d)(x^{d}+y^{d})^{n/d}$

For the case of $n=6$ we get the polynomial

$p_{6}(x,y)=y^{6}+xy^{5}+3x^{2}y^{4}+4x^{3}y^{3}+3x^{4}y^{2}+x^{5}y+x^{6}$

which says that there is one necklace with all $y$ symbols, one with $5$ $y$ and $1$ $x$, three with $4$ $y$ and $2$ $x$, four with $3$ $y$ and $3$ $x$, and so on. The information in $p_{6}(x,y)$ however, is redundant since if we know there are $k$ $x$ symbols then the number of $y$ symbols must be $6-k$. So a polynomial in just $x$ is enough. To get $p_{n}(x)$ set $z_{d}=x^{d}+1$ in the cycle index.

$p_{n}(x,y) = \frac{1}{n}\sum_{d|n} \phi(d)(x^{d}+1)^{n/d}$

The table below shows the number of binary necklaces of length $n=2,3,\ldots,12$ with $k=0,1,\ldots,n$ $x$ symbols.

n 0 1 2 3 4 5 6 7 8 9 10 11 12
2 1 1 1 . . . . . . . . . .
3 1 1 1 1 . . . . . . . . .
4 1 1 2 1 1 . . . . . . . .
5 1 1 2 2 1 1 . . . . . . .
6 1 1 3 4 3 1 1 . . . . . .
7 1 1 3 5 5 3 1 1 . . . . .
8 1 1 4 7 10 7 4 1 1 . . . .
9 1 1 4 10 14 14 10 4 1 1 . . .
10 1 1 5 12 22 26 22 12 5 1 1 . .
11 1 1 5 15 30 42 42 30 15 5 1 1 .
12 1 1 6 19 43 66 80 66 43 19 6 1 1

The extension to $k$ symbols is obvious. You just let $z_{d}=x_{1}^{d}+x_{2}^{d}+\cdots+x_{k}^{d}$ in the cycle index where $x_i$ represents the $i^{th}$ symbol. What is not so obvious is how to count the necklaces with restricted patterns such as not allowing adjacent $x$ symbols. I will show how to do that in the next post.

Musical Chords

In music, the most harmonious frequency interval is the octave. Two notes are separated by an octave if one is twice the frequency of the other. In western music, the octave is divided into $12$ notes, with the frequency ratio between adjacent notes being $2^{1/12}$. A frequency interval with this ratio is called a semitone. The $12$ notes that divide the octave are called the chromatic scale. The following table shows the frequency ratio of each note to the first note. The notes are numbered from $0$ to $12$. Note $12$ is one octave up in frequency from note $0$.

Note Frequency Ratio Rational approx
0 2^0 = 1.0 1/1
1 2^(1/12) = 1.059463094359295 18/17 = 1.0588
2 2^(1/6) = 1.122462048309373 9/8 = 1.125
3 2^(1/4) = 1.189207115002721 6/5 = 1.2
4 2^(1/3) = 1.259921049894873 5/4 = 1.25
5 2^(5/12) = 1.334839854170034 4/3 = 1.3333
6 2^(1/2) = 1.414213562373095 7/5 = 1.4
7 2^(7/12) = 1.498307076876682 3/2 = 1.5
8 2^(2/3) = 1.587401051968199 8/5 = 1.6
9 2^(3/4) = 1.681792830507429 5/3 = 1.67
10 2^(5/6) = 1.781797436280679 9/5 = 1.8
11 2^(11/12) = 1.887748625363387 15/8 = 1.875
12 2^(1) = 2.0 2/1

Two notes with frequency ratios that can be approximated as a ratio of small integers will be the most harmonious. So note $0$ and note $7$ will be the most harmonious, since their frequency ratio is approximately $3/2$. The next most harmonious combination is note $0$ and $5$ which has a ratio of $4/3$. Two notes next to each other are the most dissonant.

Let's take a $12$ bead necklace with beads of two colors (also called binary) to represent chords (simultaneously played notes) of the chromatic scale. Using colors black and white, there are $30$ binary necklaces with no two adjacent beads being black, ignoring the one with all white beads. These are shown below.

If we take the rightmost bead to be the $C$ note, and label beads counterclockwise with the $12$ notes (C,C#,D,D#,E,F,F#,G,G#,A,A#,B) in ascending order of frequency, taking a black bead to mean the corresponding note is played, we can listen to these $30$ necklaces as chords below.

30 chords with no adjacent notes

© 2010-2017 Stefan Hollos and Richard Hollos


text:
# Simple string matching algorithm

Simple string matching

Algorithmic problem: One-dimensional string matching

## Abstract view

Type of algorithm: loop

Auxiliary data An ordered sequence $I$ of natural numbers.

Invariant: After $i\ge 0$ iterations:

1. In ascending order, $R$ contains exactly the start indexes of all occurrences of $T$ in $S$ that lie completely in the substring $(S[1],...,S[i])$ of $S$. In other words, $R$ contains the start indexes in the range $S[1],...,S[i-m+1]$.
2. In ascending order, $I$ contains exactly the start indexes of all "candidates," that is, all occurrences of $T$ in $S$ that lie partially in the substring $(S[1],...,S[i])$ of $S$. In other words, $I$ contains the start indexes in the range $S[i-m+2],...,S[i]$.

Variant: $i$ increases by $1$.

Break condition: $n$ iterations completed.

## Induction basis

Abstract view: $R$ and $I$ have to be empty.

Implementation: obvious.

Proof: Nothing to show.

## Induction step

Abstract view:

1. For each start index $j$ in $I$, we decide whether this is still a candidate, that is, whether $S[i]=T[i-j+1]$. If not, we remove this start index from $I$.
2. Afterwards:
1. If $S[i]=T[1]$, $i$ is a new candidate and is thus appended at the tail of $I$.
2. If $I\neq\emptyset$ and $i-m+1$ is the head element of $I$, this start index is removed from $I$ and appended at the tail of $R$.

Implementation: Obvious.

Correctness:

1. Due to the second invariant, the induction hypothesis implies that all elements of $I$ immediately before the $i$-th iteration must be from the set $\{i-m+1,...,i-1\}$. Therefore, if $i-m+1$ is in $I$, it is the smallest element. Since the elements of $I$ are in ascending order, $i-m+1$ is then at the head of $I$.
2. A start index $j$ in $I$ is to be dropped if, and only if, it turns out not to be a promising candidate anymore. As the induction hypothesis implies $(S[j],...,S[i-1])=(T[1],...,T[i-j])$, this is the case if, and only if, $S[i]\neq T[i-j+1]$.
3. Clearly, it would be incorrect to transfer any element of $I$ except $i-m+1$ to $R$. Thus, we are right to focus on $i-m+1$ in Step 2.2. Now, $i-m+1$ is in $I$ if, and only if, (1) it was present immediately before the $i$-th iteration and (2) it has survived the first step of the $i$-th iteration. The induction hypothesis implies $(S[i-m+1],...,S[i-1])=(T[1],...,T[m-1])$, so it is correct to transfer $i-m+1$ to $R$ if, and only if, it is $S[i]=T[m]$ as well.
4. Clearly, it would also be incorrect to add any element to $I$ except $i$. So we are right to focus on $i$ in Step 2.1.By induction hypothesis, all elements of $I$ are less than $i$, so we are also right to append $i$ at the tail of $I$ in case $S[i]=T[1]$.

## Complexity

Statement: Let $r\in \mathbb{N}$ denote the maximal number of candidates to be considered simultaneously. Then the worst-case run time is in $\mathcal{O}(n\cdot r)\subseteq\mathcal{O}(n\cdot m)$.

Proof: Obviously, the first step of an iteration takes $\mathcal{O}(r)$ time, and the other steps take constant time. The loop has $n$ iterations. Of course, it is $r\leq m$.


text:
# Program to count number of ways we can throw n dices in Python

ProgrammingPythonServer Side Programming

Suppose we have a number n, number of faces, and a total value, we have to find the number of ways it is possible to throw n dice with faces each to get total. If the answer is very large mod the result by 10**9 + 7.

So, if the input is like n = 2 faces = 6 total = 8, then the output will be 5, as there are 5 ways to make 8 with 2 6-faced dice: (2 and 6), (6 and 2), (3 and 5), (5 and 3), (4 and 4).

To solve this, we will follow these steps −

• m := 10^9 + 7

• dp := a list of size (total + 1) then fill with 0

• for face in range 1 to minimum of faces, update in each step by total + 1, do

• dp[face] := 1

• for i in range 0 to n - 2, do

• for j in range total to 0, decrease by 1, do

• dp[j] := sum of all dp[j - f] for f in range 1 to faces + 1 when j - f >= 1

• return last element of dp mod m

Let us see the following implementation to get better understanding −

## Example

Live Demo

class Solution:
def solve(self, n, faces, total):
m = 10 ** 9 + 7
dp = [0] * (total + 1)

for face in range(1, min(faces, total) + 1):
dp[face] = 1
for i in range(n - 1):
for j in range(total, 0, -1):
dp[j] = sum(dp[j - f] for f in range(1, faces + 1) if j - f >= 1)
return dp[-1] % m
ob = Solution()
n = 2
faces = 6
total = 8
print(ob.solve(n, faces, total))

## Input

2,6,8

## Output

5
Updated on 07-Oct-2020 12:40:00


text:
# What is Data Center ?

An operation engineer overseeing a network operations control room of a data center

data center is a facility used to house computer systems and associated components, such as telecommunications and storage systems. It generally includes redundant or backup power supplies, redundant data communications connections, environmental controls (e.g., air conditioning, fire suppression) and various security devices. Large data centers are industrial scale operations using as much electricity as a small town.

## History

Data centers have their roots in the huge computer rooms of the early ages of the computing industry. Early computer systems, complex to operate and maintain, required a special environment in which to operate. Many cables were necessary to connect all the components, and methods to accommodate and organize these were devised such as standard racks to mount equipment, raised floors, and cable trays (installed overhead or under the elevated floor). A single mainframe required a great deal of power, and had to be cooled to avoid overheating. Security became important – computers were expensive, and were often used for military purposes. Basic design-guidelines for controlling access to the computer room were therefore devised.
During the boom of the microcomputer industry, and especially during the 1980s, users started to deploy computers everywhere, in many cases with little or no care about operating requirements. However, as information technology (IT) operations started to grow in complexity, organizations grew aware of the need to control IT resources. The advent of Unix from the early 1970s led to the subsequent proliferation of freely available Linux-compatible PC operating-systems during the 1990s. These were called "servers", as timesharing operating systems like Unix rely heavily on the client-server model to facilitate sharing unique resources between multiple users. The availability of inexpensive networking equipment, coupled with new standards for network structured cabling, made it possible to use a hierarchical design that put the servers in a specific room inside the company. The use of the term "data center", as applied to specially designed computer rooms, started to gain popular recognition about this time.
The boom of data centers came during the dot-com bubble of 1997–2000. Companies needed fast Internet connectivity and non-stop operation to deploy systems and to establish a presence on the Internet. Installing such equipment was not viable for many smaller companies. Many companies started building very large facilities, called Internet data centers (IDCs), which provide commercial clients with a range of solutions for systems deployment and operation. New technologies and practices were designed to handle the scale and the operational requirements of such large-scale operations. These practices eventually migrated toward the private data centers, and were adopted largely because of their practical results. Data centers for cloud computing are called cloud data centers (CDCs). But nowadays, the division of these terms has almost disappeared and they are being integrated into a term "data center".
With an increase in the uptake of cloud computing, business and government organizations scrutinize data centers to a higher degree in areas such as security, availability, environmental impact and adherence to standards. Standards documents from accredited professional groups, such as the Telecommunications Industry Association, specify the requirements for data-center design. Well-known operational metrics for data-center availability can serve to evaluate the commercial impact of a disruption. Development continues in operational practice, and also in environmentally-friendly data-center design. Data centers typically cost a lot to build and to maintain.


text:
# 7.9.7.2. The dialog Keyword¶

Use the dialog keyword to add a GEL function to the Scripts menu and to create a dialog window for Parameters entry. When you select the function from the Scripts menu, a dialog window appears to prompt you for the Parameters to enter. The strings beside the Parameters in the function declaration are for Parameters descriptions in the dialog box.

The syntax of a dialog GEL function is as follows:

dialog funcName( paramName1 "param1 definition", paramName2 "param2 definition", ... )
{
statements
}

paramName[1-6]: Parameter variable name that is used inside the function

param1 definition: Parameter description that is printed on the dialog window beside the field

You can pass up to six Parameters to the added GEL function through the dialog window. The following example shows how you can use the dialog keyword to add two menu items.

menuitem "My Functions";
{
statements
}
{
statements
}


text:
## Precalculus (6th Edition)

(a) Standard form $y=-4$ (b) Slope-intercept form $y=-4$
RECALL: (1) The standard form of a line's equation is $Ax+By=C$. (2) The slope-intercept form of a line's equation is $y=mx+b$ where $m$=slope and $(0, b)$ is the line's y-intercept. (3) Vertical lines and horizontal lines are perpendicular to each other. (4) Horizontal lines have points that share the same y-coordinate. The line is perpendicular to the vertical line $x=-2$. This means the line we are looking for is a horizontal line. Since the the horizontal line contains the point $(4, -4)$, and a horizontal line's points share the same y-coordinate, then the equation of the line must we are looking for is $y=-4$. (a) Standard form $y=-4$ (b) Slope-intercept form $y=-4$


text:
If 0.225 mol of tin combines with 0.450 mol of sulfur, what is the empirical formula of the tin sulfide product?

Well, clearly it is $S n {S}_{2}$. Why?
By definition, the empirical formula is the simplest whole numer ratio that defines constituent atoms in a species. Normally we are given percentages, and use this mass percent to determine the elemental composition. Here, we are explicitly given the molar ratios, i.e. $S n : S , 1 : 2$.


text:
The rsurfer package contains functions to aid the importing and manipulation of data generated by the software suite, 'Freesurfer'. 'Freesurfer' is an open-source software suite involving the segmentation of brain MRIs (see http://freesurfer.net/ for more information). This package provides functionality to import the data generated by 'Freesurfer', specifically the data generated by the cortical restruction function of 'Freesurfer' (recon-all). Once this data is imported, rsurfer provides functions to easily manipulate the data; and also provides brain specific normalisation commonly used when studying structural brain MRIs (a number of intra-cranial volume normalisation methods are provided). This package has been designed using an installation of and data generated from 'Freesurfer' version 5.3 - it may function with older/newer versions but it is untested.

If you would like to request features then please look at the rsurfer repository on GitHub (see https://github.com/AlexDiru/rsurfer), in particular the Issues tab, where bug reports and feature requests can be made. Additionally if you would like to write the functionality yourself and merge it with rsurfer, please email me at: alexspedding271@gmail.com.

# Importing Data Generated by Freesurfer

You need to download the MRI scans you want to analyse, for example MRI scans from the Alzheimer's Disease Neuroimaging Initiative (ADNI; see: http://adni.loni.usc.edu/).

## Process the MRI Data With Freesurfer

With Freesurfer version 5.3, the data can be processed using the the command (adjusting the file locations and ID as to what corresponds with your data):

recon-all -i /input_data/MRI_IMAGE.nii.gz -sd /output_data/ -subjid SUBJECT_ID -all -hippo-subfields

This will then create a subfolder in “output_data” ready to be imported with rsurfer. For more information regarding this step, please use the Freesurfer website: http://freesurfer.net/

## Import with rsurfer

Now that the data has been generated we can begin to use R and rsurfer. If you do not have any MRI data to import please skip this step.

First install rsurfer if you have not done so already: library(rsurfer)

Then there are two lines of code which will import the data:

setfshome("/Applications/freesurfer")
mri_data <- fsimport("/output_data/")

The first line uses the function setfshome which points rsurfer to your Freesurfer installation. My Freesurfer installation is installed in “/Applications/freesurfer” so you would need to replace this with where Freesurfer is located on your system. The second line uses the function fsimport which given an input directory it will import all of the subdirectories in this directory into a dataframe and returns the data frame from the function, it will treat every subdirectory as a subject, so it will likely fail if you have subdirectories which are not generated as a result of Freesurfer's cortical reconstruction command.

If you are importing a large number of processed subjects into R it may take some time to run fsimport. Handily rsurfer has a in-built function which will run fsimport and then serialise the output to a file. When this function is run again, it will see the existence of the serialised file and just load that.

setfshome("/Applications/freesurfer")
mri_data <- fsimport.serialise("/output_data/", "serialised.rds")

The second line uses the function fsimport.serialise, similar to fsimport this points to the output directory of subjects to import. The second parameter refers to the file where the serialised data will be stored. If the serialised file exists then the function will deserialise the data and return that, otherwise it will call the fsimport function and once that is complete it will then serialise the data.

I found that when importing my generated data, some of the rows and columns of the data table are what I would call abnormal (such as missing values or columns where all values are zero). There is a function provided to clean up the imported data.

mri_data <- eliminateabnormalities(mri_data, verbose = T)

The verbose flag is set to true so you will be aware of which rows and columns are removed in case you want to investigate further.

## Generating Random Data With rsurfer

If you have your own MRI data to use, you can skip this step. Otherwise, if you do not have any data to use with rsurfer, you can generate random data that is structured as if it was generated by 'Freesurfer' (note that all the fields have random values but the columns are what is expected as a result from fsimport).

mri_data <- generaterandomsubjects()

This function will generate 40 subjects, but you can input a number of subjects to generate as an input parameter, for example: generaterandomsubjects(100) will generate 100 subjects.

# Manipulating Data Generated by Freesurfer

If you are importing real MRI data generated from Freesurfer, your code should look similar to:

setfshome("/Applications/freesurfer")
mri_data <- fsimport.serialise("/output_data/", "serialised.rds")

And if you are generating random data, it will look similar to:

mri_data <- generaterandomsubjects()

## Error Checking

If the Freesurfer data fails to import then potentially something has gone wrong in the Freesurfer processing step. rsurfer provides a function which checks for any missing files which may the import function to fail. The function require the filepath of the subjects' directory and will check every subfolder there thus it can perform error checking on every subject in one call.

fsdirectorycheck("/output_data/")

## Extracting Groups of Features

This section will discuss functions you can use to extract groups of features of the data.

extract.brain.features(mri_data) # Extracts all measurements generated by Freesurfer (this is useful when the data has been augmented with other features)

extract.volumes(mri_data) # Extracts all volumetric measurements generated by Freesurfer

extract.hippocampalvolumes(mri_data) # Extracts all the hippocampal volumes generated with the -hippo-subfields flag

extract.cortical(mri_data) # Extracts all the cortical measurements (areas, volumes, thicknesses and standard deviations of thicknesses) from the data

extract.corticalvolumes(mri_data) # Extracts all the cortical volume measurements

extract.corticalsurfaceareas(mri_data) # Extracts all the cortical surface area measurements

extract.corticalthicknesses(mri_data) # Extracts all the cortical thicknesses

extract.corticalthicknessstddevs(mri_data) # Extracts all the standard deviations of the cortical thicknesses

extract.subcorticalvolumes(mri_data) # Extracts all the subcortical volumes generated by Freesurfer

All of the above functions, allow a second parameter to be passed which is a vector of strings determining any additional features to keep. For example if we were to add an age and gender feature to our data:

## Proportional Intracranial Volume Normalisation

This is the most commonly used method, and is the easiest to implement. the aim is to express a volume as the proportion of the brain it occupies and it is computed by:

$v' = \frac{v}{ICV}$

Where $$v$$ is the unnormalised volume of the patient, $${ICV}$$ is the intra cranial volume of the patient and $$v'$$ is the normalised volume of the patient. This method is completely independent of any other subjects.

normalise(mri_data, "normalisation.proportional")

## Residual Intracranial Volume Normalisation

The residual method assumes a linear relation between the volumes and the subject's ICV and estimates the relationship such that: $${v' = v - w_1(ICV - \overline{ICV})}$$ where $${\overline{ICV}}$$ is the average intra cranial volume across all subjects being considered, and $${w_1}$$ is a coefficient computed by solving the linear regression problem of $${v' = w_1ICV + w_0}$$.

normalise(mri_data, "normalisation.residual")

The residual method can be further refined by assuming a different relationship between male and female subjects' volumes and their ICVs such that if the subject is male: $${v_{MALE}‘ = v - w_{1,MALE}(ICV-\overline{ICV_{MALE}})}$$ where $${w_{1,MALE}}$$ is found by solving the linear regression problem of $${v’ = w_{1,MALE}ICV + w_{0,MALE}}$$ where only male subjects are considered. And a similar problem for female patients where in the above example, males are replaced by females: $${v_{FEMALE}‘ = v - w_{1,FEMALE}(ICV-\overline{ICV_{FEMALE}})}$$ where $${w_{1,FEMALE}}$$ is found by solving the linear regression problem of $${v’ = w_{1,FEMALE}ICV + w_{0,FEMALE}}$$ only considering female subjects.

normalise(mri_data, "normalisation.residualgender")

## Covariate Intracranial Volume Normalisation

The covariate method \cite{Nordenskjold2013355} is similar to the residual method but it considers gender at the linear relationship level such that gender is another variable in the linear regression. The normalised volume is computed via $${v' = v - w_1(ICV - \overline{ICV}) + w_2(Gender - \overline{Gender})}$$ where $${w_1}$$ and $${w_2}$$ are found by solving the linear regression problem: $${v' = w_0 + w_1ICV + w_2Gender}$$.

normalise(mri_data, "normalisation.covariate")

## Power Proportional Intracranial Volume Normalisation

The power proportion method \cite{liu2014power} computes the normalised volume as $${v'=\frac{v}{ICV^{w_1}}}$$ where $${w_1}$$ is computed by the power regression problem: $${v'=w_0ICV^{w_1}}$$. Note that this power regression problem can be converted to a linear regression problem by taking the natural logarithm of both sides to create $${\ln(v') = w_1\ln(ICV)+\ln(w_0)}$$.

normalise(mri_data, "normalisation.powerproportion")

# Alzheimer's Disease Neuroimaging Initiative Data

The Alzheimer's Disease Neuroimaging Initiative (ADNI) is a database which collects various data (including structural MRIs) to be used in the prediction of Alzheimer's Disease. The structural MRIs belong to patients who are healthy or diagnosed with mild cognitive impairment or Alzheimer's disease. The structural MRIs can be processed with Freesurfer however the output data does not contain any information about the subject such as their age, gender or what they were diagnosed with. ADNI provides this data in two CSV files: ADNIMERGE.csv and DXSUM_ PDXCONV_ ADNIALL.csv. And requires you to extract various data from the files. rsurfer automates this process for baseline scans:

mri_data <- adni.mergewithfreesurferoutput(mri_data) # Merges data assuming unchanged subject IDs (the row names)

# Information Extraction from Images Data

Information Extraction from Images (IXI) is a database which collects structural MRIs of healthy subjects from a wide age range. Similar to the ADNI functionality, rsurfer provides methods to merge the subject's age and gender with their structural MRI data.

ixi.setfile("IXI.csv") # Point rsurfer to the IXI file
mri_data <- ixi.mergewithfreesurferoutput(mri_data) # Merges data assuming unchanged subject IDs (the row names)


text:
# How can I get the dimensions of a newly-created material node via Python?

I am using a Python startup script to add repetitious details to a scene. Arranging the nodes of the network for a new Cycles material is cleaner if I know the size of each node as it is created. The height and width attributes are not correct, but the dimensions attribute is accurate — once it is set up.

What I am looking for is a way to get the dimensions attribute updated right after the node is created. (My current workaround uses a table of node sizes.)

If I run the equivalent of

    import bpy
mats = bpy.data.materials
mat = mats['GlossyGreenMaterial']
nods = mat.node_tree.nodes

to set up the node and then immediately execute

    print('newNode.dimensions: ', newNode.dimensions)

it will display

    newNode.dimensions:  <Vector(0.0000, 0.0000)>

If I bring up the Node Editor so the node is drawn and then execute the print statement again it provides the expected

    newNode.dimensions:  <Vector(150.0000, 142.0000)>

Is there some update routine I could call as each node is added that would cause the dimensions attribute to be set?

Thanks,
Roy Earle

There seems to be a solution to this (see below). Keep in mind, though, that while in general this approach is not recommended, in some cases it may work just fine.

Add this call to your script to force a re-draw, which will update the node’s dimensions properly.

bpy.ops.wm.redraw_timer(type='DRAW_WIN_SWAP', iterations=1)

Tip: if you add multiple nodes to the hierarchy (via your script) it may be smarter to add all nodes first then call this only once to minimize messing with blender’s drawing loop.


text:
Jump to content

# Winamp

## Recommended Posts

i have installed using your method my own Winamp 503 pro edition.

-> i have installed it, then back up the winamp directory in C:\

-> i did exactly what your said in your method => i obtain winamp.msi & winamp1.cab

-> i bring them & put them to C:\Hotfixes\Winamp\ (my test directory, cause i use %systemdrive%\Hotfixe\Winamp\ in my unattended XP)

-> i made an enregistrement.reg file (in english ~ 'recording' : to put in the registry my name & my key for Winamp)

-> i made a batch file to test if the install work silently :

here is the code :

CLS@echo offecho Install of Winamp 5.03 Proecho Plz wait...start /wait %systemdrive%\Hotfixes\Winamp\Winamp.msi VA=0 G=0 /qnPAUSEecho ...product key...REGEDIT /S %systemdrive%\Hotfixes\Winamp\enregistrement.regPAUSEecho ...skins...copy /Y %systemdrive%\Hotfixes\Winamp\Skins\Act3scene2_-_prototype.wal %systemdrive%\"Program Files"\winamp\Skins\Act3scene2_-_prototype.walcopy /Y %systemdrive%\Hotfixes\Winamp\Skins\Classix_10k_Modern.wal %systemdrive%\"Program Files"\winamp\Skins\Classix_10k_Modern.walcopy /Y %systemdrive%\Hotfixes\Winamp\Skins\RemoteSensing.wal %systemdrive%\"Program Files"\winamp\Skins\RemoteSensing.walcopy /Y %systemdrive%\Hotfixes\Winamp\Skins\The_Punisher.wal %systemdrive%\"Program Files"\winamp\Skins\The_Punisher.walPAUSEecho OK.

After that, i launch Winamp to see how it looks...

Ok it's good

There are some 'things' that are not as before, for example i want to set a personal skin instead of the modern default.

+, i will install the MPC plugin & the MAD plugin (for great sound on Audigy 2 ZS sound cards because it can make MP3s in 24bit audio).

+, the icons are not as i want, so in the options after installation, i go to change them (but i don't really know if these icons in taskbar, systray, files & playlists can be pre-choosen...)

But, instead of these 'things i have to change after', the silent install works perfectly.

One last detail, the Uninstall icon isn't shown in the Winamp directory. To uninstall winamp i have to go in the Add/Suppress menu to uninstall it.

Very good job.

##### Share on other sites

u can change the icons by editing the winamp.ini

I use these

whichicon=3

whichicon2=9

for the skin u can also use the winamp.ini

skin= (I don't use any )

##### Share on other sites

Thanks, r0sWell.

Then you configured Winamp as you usually do after installation. And you preferred using a reg file for registering Winamp instead of the switches K and N.

To uninstall Winamp, you use "Add or Remove Programs" in your Control Panel.

Thank you for feedback.

##### Share on other sites

no problem

i have to thank you for your method.

for the reg file, i had already made it before trying your silent install method. So i kept it.

thx XtremeMaC i will try this.

##### Share on other sites

r0sWell

I have a good suggestion for you and for others who like to install something additional like skins or visualizations.

It works for apps that have no setup routine like the skins you added to your installation.

And you'll have the ability to uninstall what you installed via "Add or Remove Programs" as usual.

Would you like something like this?

##### Share on other sites

r0sWell

I have a good suggestion for you and for others who like to install something additional like skins or visualizations.

It works for apps that have no setup routine like the skins you added to your installation.

And you'll have the ability to uninstall what you installed via "Add or Remove Programs" as usual.

Would you like something like this?

what type of file can use it ?

& it can be useful

so,

here is my pre-final batch for Winamp :

echo Installation of WinAMP 5.03 Proecho Wait...start /wait %systemdrive%\Hotfixes\Winamp\Winamp.msi VA=0 G=0 /qnecho -Done.echo ...product key...REGEDIT /S %systemdrive%\Hotfixes\Winamp\enregistrement.regecho -Done.echo ...copying skins...copy /Y %systemdrive%\Hotfixes\Winamp\Skins\Act3scene2_-_prototype.wal %systemdrive%\"Program Files"\winamp\Skins\Act3scene2_-_prototype.walcopy /Y %systemdrive%\Hotfixes\Winamp\Skins\Classix_10k_Modern.wal %systemdrive%\"Program Files"\winamp\Skins\Classix_10k_Modern.walcopy /Y %systemdrive%\Hotfixes\Winamp\Skins\RemoteSensing.wal %systemdrive%\"Program Files"\winamp\Skins\RemoteSensing.walcopy /Y %systemdrive%\Hotfixes\Winamp\Skins\The_Punisher.wal %systemdrive%\"Program Files"\winamp\Skins\The_Punisher.walecho -Done.echo ...installation of MPC and MAD plugins...start /wait %systemdrive%\Hotfixes\Winamp\in_mpc_0.99d.exe /Sstart /wait %systemdrive%\Hotfixes\Winamp\in_MAD_0.14.2b.exe /Secho -Doneecho ...parameters...copy /Y %systemdrive%\Hotfixes\Winamp\Winamp.ini %systemdrive%\"Program Files"\winamp\Winamp.iniecho OK.

i don't already had the time to do an install with VMware but i tested it (without plugins installation) and it works well.

##### Share on other sites

Additional skins and visualizations, or any other add-ons and plugins, for Winamp can be packed inside a separate MSI.

This can be done on condition that those add-ons are not EXE files. These skins, for example, can be packed the way I mean:

- Act3scene2_-_prototype.wal

- Classix_10k_Modern.wal

- RemoteSensing.wal

- The_Punisher.wal

If you are interested in packing all your add-ons of that type (not exe) in one MSI file, then consider using the simple utility "msicreate" downloadable from here:

http://www.cornerhouse.ca/download/msicreate.msi

msicreate is free for non-commercial use and 464 KB in size. It needs no experience in MSI editing, at all.

Put the files you need to pack in their intended locations like C:\Program Files\Winamp\Skins\MySkins, for example.

Then, run msicreate and add the files. After you finish adding all your files, click "Build" on the toolbar, and that's it.

The resulting file is "somename.msi" that can be run in silent mode with the switch /qn, installing your files to where you added them from.

You can uninstall those files again from your Control Panel as usual, in case you have a newer version of them that you want to replace.

##### Share on other sites

very interesting, not only for skins

thx for the link, i'll try this tool.

##### Share on other sites

wow cool!! thanks !!

##### Share on other sites

There are other simple tools on the same site, too.

##### Share on other sites

no i had not known about it... I'm sure there are plenty of tools that I don't know of...

##### Share on other sites

All I did was add this to my RunOnceEx:

REG ADD %KEY%\050 /VE /D "Winamp 5" /f

REG ADD %KEY%\050 /V 1 /D "%CDROM%\Software\Winamp\winamp501_full.exe /S /install=RFQ" /f

REG ADD %KEY%\050 /V 2 /D "taskkill.exe /F /IM winamp.exe" /f

Then add this to my clean-up:

RD /S /Q "%systemdrive%\Program Files\Winamp\AOD

DEL "%systemdrive%\Documents and Settings\All Users\Desktop\Internet Service $9.95.lnk DEL "%systemdrive%\Documents and Settings\All Users\Start Menu\Internet Service$9.95.lnk"

DEL "%systemdrive%\Documents and Settings\Administrator\Favorites\Internet Service $9.95.lnk DEL "%systemdrive%\Documents and Settings\Administrator\Favorites\Links\Internet Service$9.95.lnk

##### Share on other sites

Good work. Winamp can be installed silently in different ways. Sure, you're right.

Still, my MSI provides the possibility of deciding what to install and what to exclude.

You're absolutely free in how to install Winamp. Thanks.

##### Share on other sites

• 1 year later...

hello,

this guide is very interesting!
But I have a question?
Can I create with the help of this guide a Winamp 5.21 Installation?
The guide is very old and so i don`t know it.
Thank you for your help!!!
danswu

---I know, my english is very bad!!

##### Share on other sites

Your first post and you bump a 2 years old topic.

There are newer topics about winamp unattended installation. Try the search bar.

## Create an account or sign in to comment

You need to be a member in order to leave a comment

## Create an account

Sign up for a new account in our community. It's easy!

Register a new account

## Sign in

Already have an account? Sign in here.

Sign In Now
• ### Recently Browsing   0 members

• No registered users viewing this page.

×
×
• Create New...


text:
# An equilateral triangle

The perimeter of an equilateral triangle is 33cm. How long is each side?

Result

a =  11 cm

#### Solution:

$p = 33 \ cm \ \\ \ \\ p = a+a+a = 3a \ \\ \ \\ a = p/3 = 33/3 = 11 = 11 \ \text { cm }$

Leave us a comment of this math problem and its solution (i.e. if it is still somewhat unclear...):


text:
# Significance of asymptotes in root locus

What is the significance of asymptotes in the root locus of a linear time invariant system. Does it say that for that particular pole on which it is starting doesn't have a practical pole in the closed loop if the open loop gain is taken to infinity?


text:
# Introduction to Similar Figures

### Introduction to Similar Figures

Similar figures are two figures (or shapes) that have the same angles and proportional dimensions. In this lesson we look at how to find the similarity ratio (or similitude), and using that to determine the lengths of the side a of similar polygons, and how to find the height of a tree from its shadow.

## What are Similar Figures?

What does it mean when we say we have 2 similar figures? Similar figures can be thought of as a figure and an enlargement or reduction of that figure, without any distortions. Scale models are one way that the concepts of similar figures is used.

For two polygons to be considered similar, their corresponding angles must have the same measurement and their corresponding sides need to be proportional.

The ratio of the lengths of corresponding sides in two similar figures is the similarity ratio (or similitude).

Let’s start by looking at the parallelograms CATS and BIRD. We can tell they are similar because all the angles are equal and the similarity ratios for the corresponding sides are equal.

$\dfrac{CS}{BD}=\dfrac{2.1}{3.15} = \dfrac{2}{3}$  (or   $0.\overline{6}$)    and    $\dfrac{ST}{DR}=\dfrac{3}{4.5}= \dfrac{2}{3}$  (or   $0.\overline{6}$)

## Similar Figures: How is it useful?

The parallelogram FOXZ is similar to CATS and BIRD.

So, what do we know about $m\angle F$?

Well, $\angle F$ corresponds to $\angle B$, so the measurement must be $110^o$.
Likewise, $\angle Z$ corresponds to $\angle D$, so the measurement must be $70^o$.

How can we find the value of $\overline{OX}$?

The similarity ratio for $\frac{CATZ}{FOXZ}=\frac{3}{5}$, since $\overline{ST}$ and $\overline{OX}$ are corresponding parts. $\overline{OX}=n$ is located on the polygon FOXZ, so we would put it across from the $5$ in our ratio, and the corresponding side on CATS is $\overline{AT}=2.1$ so we will put it across from the $3$.

$\dfrac{CATS}{FOXZ}=\dfrac{2}{3} =\dfrac{2.3}{n}$

Now we can solve for the length of $n$ by cross multiplying.
$3n = 5\ast2.1$
$3n = 10.5$
$n = 3.5$

How to find the height of a tree, using similar figures.

Well, we are going to be looking at the ratio of the yardstick to the tree.
That ratio is equal to the yard stick’s shadow, which is 5 ft., to the tree’s shadow, which is 35 ft.

$\dfrac{yardstick}{tree}=\dfrac{5}{35} =\dfrac{1}{7}$

And that would be equal to the ratio of the height of the yard stick to the height of the tree, which is what we are trying to find out.

$\dfrac{yardstick}{tree}=\dfrac{1}{7} =\dfrac{3}{n}$

We can now use equivalent fractions to find the height of the tree.

$\dfrac{yardstick}{tree}=\dfrac{1\ast 3}{7 \ast 3} =\dfrac{3}{\color{red}{21}}$

So, the tree is 21 ft tall.


text:
# Congruence of Intergers and modular arthimetic

1. Nov 21, 2009

### doggie_Walkes

Hey im just wondeirng if I have to prove a congruence,

such as

c^3 is congruent to d modulo 7,

where d is set of {0,1 ,7}

So in this problem to prove this example all I need to do is prove that it is a equivalence relation?

So it is reflexsive, symmetric, and transitive?

Is this correct?

2. Nov 21, 2009

### Staff: Mentor

Assuming c is an integer, I believe that what you're trying to prove is that
$$c^3 \equiv 0~mod~7$$
or
$$c^3 \equiv 1~mod~7$$

If so, it's not true. 33 = 27 $\equiv$ 6 mod 7, and 53 = 125$\equiv$ 6 mod 7.

3. Nov 21, 2009

### doggie_Walkes

Thanks mark. I just had a bit of another question if I could ask you ask well?

It just how do i show

b^3 +b^2 +1 does not divide by 5

how do i prove it.

Im thinking this way,
cause i know that b^3 +b^2 +1 is not congruent to 0(mod5)

therefore we use contradition to prove it. im just not sure how to use contradition? or maybe im looking at this in a completely bad light? maybe there is another method?

4. Nov 21, 2009

### HallsofIvy

Staff Emeritus
If you meant "$c^3$ is congruent to one of 0, 1, 6 (mod 7)" then a perfectly valid way to do it is to look at all 7 possibilities: $0^3= 0$, $1^3= 1$, $2^3= 8= 1$, $3^3= 27= 6$, $4^3= 64= 1$, $5^3= 125= 6$, $6^3= 216= 6$, all "mod 7".

5. Nov 21, 2009

### Staff: Mentor

If b^3 + b^2 + 1 is divisible by 5, the ones' digit in b^3 + b^2 + 1 has to be 0 or 5. Another way to say this is that b^3 + b^2 + 1 $\equiv$ 0 mod 5.

Work with the integers modulo 5.
If b $\equiv$ 0 mod 5, then b^3 $\equiv$ 0 mod 5, b^2 $\equiv$ 0 mod 5, so b^3 + b^2 + 1 $\equiv$ 1 mod 5. This means that the ones' digit has to be either 1 or 9.

If b $\equiv$ 1 mod 5, then b^3 $\equiv$ 1 mod 5, b^2 $\equiv$ 1 mod 5, so b^3 + b^2 + 1 $\equiv$ 3 mod 5. This means that the ones' digit has to be either 3 or 8. Because b^3 + b^2 + 1 is always odd, you'll never get an 8 digit in the ones' place, so for this case, the ones' digit has to be 3.

Continue this process for the other three equivalence classes to complete this proof.

6. Nov 27, 2009

### doggie_Walkes

Hey mark, sorry for the late reply,

Im just wondering what you mean by ones' digit

7. Nov 27, 2009

### Staff: Mentor

In the decimal number system, each digit in the numeric representation indicates a power of 10. For example, 435 = 4 * 102 + 3 * 101 + 5 * 100. So 435 is 4 hundreds + 3 tens + 5 ones. The digit in the ones' place is 5 for this number.


text:
Published on

# Regex for two digit number

A digit is a numerical symbol used in mathematical notation to represent a number. In the decimal number system, which is the most common number system used in the world today, there are ten digits- 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9. These digits are used to represent all possible numbers, including integers (whole numbers), fractions, and decimals. In this article let's understand how we can create a regex for two digit number and how regex can be matched for a given digit/number.

Regex (short for regular expression) is a powerful tool used for searching and manipulating text. It is composed of a sequence of digit/numbers that define a search pattern. Regex can be used to find patterns in large amounts of text, validate user input, and manipulate strings. It is widely used in programming languages, text editors, and command line tools.

# Structure of two digit numbers

The two digit number should have the following criteria and structure-

• value of a digit should be - 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9.
• it should contain two digit numbers.

# Regex for checking if two digit number is valid or not

Regular Expression for digit number-

/^\d{2}$/gm  Test string examples for the above regex- Input StringMatch Output aedoes not match 213456does not match 22matches 46matches 77matches Here is a detailed explanation of the above regex- /^\d{2}$/gm

^ asserts position at start of a line
\d matches a digit (equivalent to [0-9])
{2} matches the previous token exactly 2 times
$asserts position at the end of a line Global pattern flags g modifier: global. All matches (don't return after first match) m modifier: multi line. Causes ^ and$ to match the begin/end of each line (not only begin/end of string)
i modifier: insensitive. Case insensitive match (ignores case of [a-zA-Z])

Hope this article was useful to check if the string is a valid two digit number or not.


text:
# Help/Hint required.

Q1)Find the number of 4 digit numbers with distinct digits chosen from the set {0, 1, 2, 3, 4, 5} in which no two adjacent digits are even.

I'm not sure about the answer. I'm getting 60. There's a high chance I may be wrong.

Q2) Let a, b, c > 0. If $$\dfrac 1 c , \dfrac 1 b \quad and \dfrac 1 a$$ are in arithmetic progression, and if $$a^2+b^2,b^2+c^2,c^2+a^2$$ are in a geometric progression, prove that a=b=c

Somehow, I managed to get a=b=c. but I'm not really confident of my approach.

Q3) Let n be a positive integer such that 2n + 1 and 3n + 1 are both perfect squares. Show that 5n + 3 is a composite number.

I tried this

Let $$2n+1=k^2$$ and $$3n+1=m^2$$

$$5n+3=m^2+k^2+1$$

Then I used modulo to bash it out. am I on the right track? Because this doesn't seem to lead to the answer.

Thanks!

Note by Mehul Arora
3 years, 1 month ago

MarkdownAppears as
*italics* or _italics_ italics
**bold** or __bold__ bold
- bulleted- list
• bulleted
• list
1. numbered2. list
1. numbered
2. list
Note: you must add a full line of space before and after lists for them to show up correctly
paragraph 1paragraph 2

paragraph 1

paragraph 2

[example link](https://brilliant.org)example link
> This is a quote
This is a quote
    # I indented these lines
# 4 spaces, and now they show
# up as a code block.

print "hello world"
# I indented these lines
# 4 spaces, and now they show
# up as a code block.

print "hello world"
MathAppears as
Remember to wrap math in $$...$$ or $...$ to ensure proper formatting.
2 \times 3 $$2 \times 3$$
2^{34} $$2^{34}$$
a_{i-1} $$a_{i-1}$$
\frac{2}{3} $$\frac{2}{3}$$
\sqrt{2} $$\sqrt{2}$$
\sum_{i=1}^3 $$\sum_{i=1}^3$$
\sin \theta $$\sin \theta$$
\boxed{123} $$\boxed{123}$$

Sort by:

Q1) Let the odd digit be $$O$$ and even digit be $$E$$.So by product rule we can work out each case. So hereby I give the possible combinations:

$OEOO = 3\times 3 \times 2 \times 1 = 18 \\ OOEO = 3\times 2 \times 3 \times 1 =18 \\ EOOO = 2\times 3 \times 2 \times 1 = 12 \\ OOOE = 3\times 2 \times 1 \times 3 = 18 \\ EOOE = 2\times 3 \times 2 \times 2 = 24 \\ OEOE = 3\times 3 \times 2 \times 2 = 36 \\ EOEO = 2\times 3 \times 2 \times 2 = 24 \\ \Rightarrow 18+18+12+18+24+36+24 = \boxed{150}$

- 3 years, 1 month ago

Thanks Nihar! :D

- 3 years, 1 month ago

Saale dost ko thanks bolta hain :P

- 3 years, 1 month ago

Ahahahahahh xD

Chal nahi bolta thanks xD

Waapas liya thanks xD

- 3 years, 1 month ago

For the record, here are the numbers:

 1 3210,,5210,,1230,,5230,,1250,,3250,,3410,,5410,,1430,,5430,,1450,,3450,,3012,,5012,,3412,,5412,,1032,,5032,,1432,,5432,,1052,,1452,,3052,,3452,,3014,,5014,,3214,,5214,,1034,,5034,,1234,,5234,,1054,,3054,,1254,,3254,,5031,,5231,,5431,,3051,,3251,,3451,,5013,,5213,,5413,,1053,,1253,,1453,,3015,,3215,,3415,,1035,,1235,,1435,,2301,,2501,,2341,,2541,,2103,,2503,,2143,,2543,,2105,,2145,,2305,,2345,,4301,,4501,,4321,,4521,,4103,,4503,,4123,,4523,,4105,,4305,,4125,,4325,,5301,,3501,,5321,,3521,,5341,,3541,,5103,,1503,,5123,,1523,,5143,,1543,,3105,,3125,,3145,,1305,,1325,,1345,,2310,,2510,,2130,,2530,,2150,,2350,,2314,,2514,,2134,,2534,,2154,,2354,,4310,,4510,,4130,,4530,,4150,,4350,,4312,,4512,,4132,,4532,,4152,,4352,,2531,,2351,,2513,,2153,,2315,,2135,,4531,,4351,,4513,,4153,,4315,,4135,,5310,,3510,,5130,,1530,,3150,,1350,,5312,,3512,,5132,,1532,,3152,,1352,,5314,,3514,,5134,,1534,,3154,,1354,

Staff - 3 years, 1 month ago

Comp. Science Gawd is here. _/_

- 3 years, 1 month ago

For the 2nd one, We get that $$b=2ac/a+c$$ Substitute this in the second equation, $$( {b}^2+{c}^2)/({a}^2+{b}^2)=({ c}^2+{a}^2)/({b}^2+{c}^2)$$ By simplifying we get, a=b=c

- 3 years, 1 month ago

Oh, I like question 3. The main way to show that a number is composite, is to factorize it and then show that the factors are not $$\pm1$$

Staff - 3 years, 1 month ago

Wait in Q1 when there asking for no two adjacent digits are even, doesn't that mean none of the digits are even ? O.O

- 3 years, 1 month ago

Not necessarily I guess. The placement of the digits could be OEOO

- 3 years, 1 month ago

Oh, so no two adjacent digits are both even?

- 3 years, 1 month ago

Exactly :P

- 3 years, 1 month ago

In that case I got 150 as an answer :(.

550 doesn't make sense because the maximum number of four digit numbers with distinct digits from the given set is $$5 \cdot 5 \cdot 4 \cdot 3 = 300$$ , which is less than your answer.

- 3 years, 1 month ago

I got 60 as the answer. Could you please elaborate on how you got 150?

- 3 years, 1 month ago

Oh! I guess i mistook the question for a,b,c and d not necessarily being distinct. Lemme work this one out. Till then, please work the other questions :)

- 3 years, 1 month ago

Well I just took it in cases. You need at least one even and at most two evens.

So you just work from there.

- 3 years, 1 month ago

Oh okay, thanks! :D

- 3 years, 1 month ago

- 3 years, 1 month ago

1) 278

- 3 years, 1 month ago


text:
How do you solve the system of equations 5x + y = 11 and - 3x - 7y = - 13?

Mar 24, 2017

$x = 2$

$y = 1$

Explanation:

The plan is to eliminate either one of the variables; $y$ seems easier.

Eqn 1: $\text{ } 5 x + y = 11$

Eqn 2: $\text{ } - 3 x - 7 y = - 13$

Multiply eqn 1 by $7$ to make it eqn 3:

$35 x + 7 y = 77$

Add eqn 3 + eqn 2:

$32 x = 64$

Dividing both sides by $32$, we get

$x = 2$

Substitute $x = 2$ into any of the equations, let's say eqn 1 in this case

$5 \cdot \left(2\right) + y = 11$

$10 + y = 11$

$y = 1$


text:
1 joint paper of Martin Huber with Shelah

HHSh:91
Hiller+Huber+Shelah, The structure of ${\rm Ext}(A, {\bf Z})$ and $V=L$ -- Math Zeitschrift 162 (1978) 39-50


text:
## Lifesaver: Airplane launch: distance needed

On its takeoff roll, the airplane starts from rest and accelerates at $$a=a_{0}-kv^{2}$$ , where $$a_{0}$$ is the constant acceleration due to enginer thrust and -kv^2 is the acceleration due to aerodynamic drag. If a0= 2 m/s^2, k=0.00004(1/m), and v is in meters per second, find distance L needed for the airplane to accelerate initial speed v(0)=0 to rotation speed Vr=250 km/h.


text:
# What power do you raise 3 to to get 9

1. May 11, 2005

### m0286

Hello again..
Alright Im now on the part of 12th grade calculus, dealing with logs and exponents and stuff. I understand if say log39 That its basically what power do you raise 3 to to get 9. Well a question i need to answer is log162. So what power to I raise 16 to to get 2??? I used my calculator just trying to find a number that would work, and i got 0.25. How would I show work for that? all of the solutions they gave for different equations worked different like for the log39They showed 2 ways:
3^x=9
3^x=3^2
x=2
OR
log39=log3(3^2)
=2
None of these solutions work for 16 since 2 is 2^1 and 16^1 is 16 not 2... Im confused.. Is 0.25 even the right answer.
Any Help is appreciated greatly!!!
Thanks ya!!!

Last edited: May 11, 2005
2. May 11, 2005

### inha

hint: 16=2^4

3. May 11, 2005

### dextercioby

Yes.Use this property of the logarithms wrt a change of basis.

$$\log_{16}2=\frac{\ln 2}{\ln 16}=\frac{\ln 2}{4\ln 2}=\frac{1}{4}=0.25$$

Daniel.

4. May 11, 2005

### Corneo

Have you heard of a change of base? You calculator can only do log base 10. Here is the formula

$$\log_b a = \frac {\log_c a}{\log_c b}$$ where c can be anything. But why not set that to 10 so your calculator can crunch it.

5. May 11, 2005

### chroot

Staff Emeritus
0.25 is the correct answer, because 16^(0.25) = 2.

The easiest way to compute logs like $\log_b x$ on a calculator is to compute

$$\log_b x = \frac{\log x}{\log b}$$

where the logs on the right can be any base at all (10, e, whatever). In other words, to find $\log_{16} 2$ on your calculator, punch up (log 2 / log 16).

- Warren

6. May 11, 2005

### m0286

Thanks, but what does the In stand for...

7. May 11, 2005

### dextercioby

I don't think so.Any (scientifical) calculator should have natural logarithm.It's eseential.

Daniel.

8. May 11, 2005

### shmoe

That's probably "ln", the "natural logarithm", and it means the logarithm to the base e=2.1718..., if you haven't met it in your class yet, it's probably not far off.

9. May 11, 2005

### chroot

Staff Emeritus
Dexter's post using natural logs can just as well be done with logs of any base, including 10.

- Warren