text:
# Gmulti

0th

Percentile

##### Marked Nearest Neighbour Distance Function

For a marked point pattern, estimate the distribution of the distance from a typical point in subset I to the nearest point of subset $J$.

Keywords
spatial, nonparametric
##### Usage
Gmulti(X, I, J, r=NULL, breaks=NULL, …,
disjoint=NULL, correction=c("rs", "km", "han"))
##### Arguments
X

The observed point pattern, from which an estimate of the multitype distance distribution function $G_{IJ}(r)$ will be computed. It must be a marked point pattern. See under Details.

I

Subset of points of X from which distances are measured.

J

Subset of points in X to which distances are measured.

r

Optional. Numeric vector. The values of the argument $r$ at which the distribution function $G_{IJ}(r)$ should be evaluated. There is a sensible default. First-time users are strongly advised not to specify this argument. See below for important conditions on $r$.

breaks

This argument is for internal use only.

Ignored.

disjoint

Optional flag indicating whether the subsets I and J are disjoint. If missing, this value will be computed by inspecting the vectors I and J.

correction

Optional. Character string specifying the edge correction(s) to be used. Options are "none", "rs", "km", "hanisch" and "best". Alternatively correction="all" selects all options.

##### Details

The function Gmulti generalises Gest (for unmarked point patterns) and Gdot and Gcross (for multitype point patterns) to arbitrary marked point patterns.

Suppose $X_I$, $X_J$ are subsets, possibly overlapping, of a marked point process. This function computes an estimate of the cumulative distribution function $G_{IJ}(r)$ of the distance from a typical point of $X_I$ to the nearest distinct point of $X_J$.

The argument X must be a point pattern (object of class "ppp") or any data that are acceptable to as.ppp.

The arguments I and J specify two subsets of the point pattern. They may be any type of subset indices, for example, logical vectors of length equal to npoints(X), or integer vectors with entries in the range 1 to npoints(X), or negative integer vectors.

Alternatively, I and J may be functions that will be applied to the point pattern X to obtain index vectors. If I is a function, then evaluating I(X) should yield a valid subset index. This option is useful when generating simulation envelopes using envelope.

This algorithm estimates the distribution function $G_{IJ}(r)$ from the point pattern X. It assumes that X can be treated as a realisation of a stationary (spatially homogeneous) random spatial point process in the plane, observed through a bounded window. The window (which is specified in X as Window(X)) may have arbitrary shape. Biases due to edge effects are treated in the same manner as in Gest.

The argument r is the vector of values for the distance $r$ at which $G_{IJ}(r)$ should be evaluated. It is also used to determine the breakpoints (in the sense of hist) for the computation of histograms of distances. The reduced-sample and Kaplan-Meier estimators are computed from histogram counts. In the case of the Kaplan-Meier estimator this introduces a discretisation error which is controlled by the fineness of the breakpoints.

First-time users would be strongly advised not to specify r. However, if it is specified, r must satisfy r[1] = 0, and max(r) must be larger than the radius of the largest disc contained in the window. Furthermore, the successive entries of r must be finely spaced.

The algorithm also returns an estimate of the hazard rate function, $\lambda(r)$, of $G_{IJ}(r)$. This estimate should be used with caution as $G_{IJ}(r)$ is not necessarily differentiable.

The naive empirical distribution of distances from each point of the pattern X to the nearest other point of the pattern, is a biased estimate of $G_{IJ}$. However this is also returned by the algorithm, as it is sometimes useful in other contexts. Care should be taken not to use the uncorrected empirical $G_{IJ}$ as if it were an unbiased estimator of $G_{IJ}$.

##### Value

An object of class "fv" (see fv.object).

Essentially a data frame containing six numeric columns

r

the values of the argument $r$ at which the function $G_{IJ}(r)$ has been estimated

rs

the reduced sample'' or border correction'' estimator of $G_{IJ}(r)$

han

the Hanisch-style estimator of $G_{IJ}(r)$

km

the spatial Kaplan-Meier estimator of $G_{IJ}(r)$

hazard

the hazard rate $\lambda(r)$ of $G_{IJ}(r)$ by the spatial Kaplan-Meier method

raw

the uncorrected estimate of $G_{IJ}(r)$, i.e. the empirical distribution of the distances from each point of type $i$ to the nearest point of type $j$

theo

the theoretical value of $G_{IJ}(r)$ for a marked Poisson process with the same estimated intensity

##### Warnings

The function $G_{IJ}$ does not necessarily have a density.

The reduced sample estimator of $G_{IJ}$ is pointwise approximately unbiased, but need not be a valid distribution function; it may not be a nondecreasing function of $r$. Its range is always within $[0,1]$.

The spatial Kaplan-Meier estimator of $G_{IJ}$ is always nondecreasing but its maximum value may be less than $1$.

##### References

Cressie, N.A.C. Statistics for spatial data. John Wiley and Sons, 1991.

Diggle, P.J. Statistical analysis of spatial point patterns. Academic Press, 1983.

Diggle, P. J. (1986). Displaced amacrine cells in the retina of a rabbit : analysis of a bivariate spatial point pattern. J. Neurosci. Meth. 18, 115--125.

Harkness, R.D and Isham, V. (1983) A bivariate spatial point pattern of ants' nests. Applied Statistics 32, 293--303

Lotwick, H. W. and Silverman, B. W. (1982). Methods for analysing spatial processes of several types of points. J. Royal Statist. Soc. Ser. B 44, 406--413.

Ripley, B.D. Statistical inference for spatial processes. Cambridge University Press, 1988.

Stoyan, D, Kendall, W.S. and Mecke, J. Stochastic geometry and its applications. 2nd edition. Springer Verlag, 1995.

Van Lieshout, M.N.M. and Baddeley, A.J. (1999) Indices of dependence between types in multivariate point patterns. Scandinavian Journal of Statistics 26, 511--532.

Gcross, Gdot, Gest

• Gmulti
##### Examples
# NOT RUN {
trees <- longleaf
# Longleaf Pine data: marks represent diameter

# }
# NOT RUN {
Gm <- Gmulti(trees, marks(trees) <= 15, marks(trees) >= 25)
plot(Gm)
# }

Documentation reproduced from package spatstat, version 1.59-0, License: GPL (>= 2)

### Community examples

Looks like there are no examples yet.


text:
# Electronic – Why can an oscilloscope only find frequencies 1/10 of the sampling frequency, despite Nyquist

frequencyoscilloscope

The oscilloscope at my university states both its sampling frequency and the maximum frequency that it can detect. However, the maximum frequency is just 1/10 of the sampling frequency! Nyquist's theorem states that all frequencies up to half the sampling frequency can be reconstructed.

What kind of problems are the oscilloscope constructors expecting?

There are a few reasons for this:

1. Nyquist's theorem applies to reconstruction of sinusoidal signals of infinite duration from jitter-free, perfectly accurate samples. Real measurement device clocks have jitter and fixed frequencies, real samples have measurement error and real signals are not infinite sinusoids.

• Jitter is the difference between a sample's recorded measurement time and the actual measurement time. When the display overlays several periods of a signal to create a picture, jitter makes the trace spread out or smear. Other factors will do this as well.
• The period at which a device samples is not an exact half-multiple of the original -- it's the sampling frequency, and it's not going to change in relation to the input frequency.
• Sinusoidal reconstruction is sensitive to measurement error and noise near Nyquist's rate. I'd really rather not do any \$\frac{d(freq.)}{dV}\$ right now, but there it is. This error is reduced by averaging samples, which reduces the effective sample rate.
• Real signals are more than a single tone. They carry information, noise, and Christmas Spirit. A single-frequency sinusoid measurement is of little value, since that was never the original signal. It'd be like expecting anyone who looks at the Orion constellation to immediately interpret a hunter with a club.
==> ???
2. The measurement device (DSO) uses several staggered-clock, lower frequency parallel processes to achieve its impressive sample rate. Not all steps can be done in parallel, however, which can introduce bandwidth bottlenecks. These are largely a thing of the past in high-end equipment with the development of special-purpose ASICs, and fast GPUs and memory.

3. Several DSO manufacturers have found it more profitable to develop and manufacture a single or only a few high-end circuits, then introduce limitations such as lower frequency clocks and anti-aliasing filters for their mid and lower-end offerings, instead of developing and manufacturing a different design for each target consumer. The 'scope you were looking at may indeed be originally designed to measure higher maximum frequencies than stated, but is somehow handicapped.

Though I am far from an authority on the subject, I have heard the "10X" rule of thumb enough times to be repeating it here: an effective sample rate of at least 10X the signal frequency is required for intelligent reconstruction and analysis. As the listed sample rate on your school's 'scope is exactly that, I imagine the actual sample rate, taking into account the above considerations, is several times higher yet, but it all boils down to 10 samples of limited jitter and measurement error.

format: plain


text:
# Instructions for Compiling VXL

[The following are instructions that I have found to be incredibly helpful in getting VXL set up and working.  These instructions are a direct copy-paste of a blog post, which in turn seems to be a copy with some added detail of instructions used by a research group at Brown.  These instructions are not my words and not my work, and are posted here for educational purposes. -Nate]

BEGIN VERBATIM COPY

I’ve been working the last days with VXL, it is a collection of libraries for computer vision. It includes numeric, imaging, geometry, streaming and more libraries. When one started looking at the code impresses the amount of work people put into it. Also, it has a lot of good features and it is really easy to use, once you know how to compile it and the projects using it.

I struggle a few days trying to compile VXL itself and then linking the projects. Because of that I want to summarize a few tips to do it smoother.

Compiling VXL on Windows

I will describe the Windows steps, but if you are using other OS you can find some info here.

1. First, you need to install
2. First create a folder for the VXL libraries. For example, could be “C:\vxl” or whatever you want. Inside that folder create two more:
• A sources folder “C:\vxl\vxl,” from now on $VXLSRC. • A binary folder “C:\vxl\bin,” from now on $VXLBIN.
3. I download VXL from their site, but I have some trouble because the libraries were bugged. Therefore, I suggest you to use the SVN sources. So, lets check out the latest revision.
• Right click on $VXLSRC, choose the “SVN Checkout” option. • In the “URL of repository” box, type in: https://vxl.svn.sourceforge.net/svnroot/vxl/trunk. • In the “Checkout directory” box, the folder path $VXLSRC.
• In the “Checkout depth“, choose “Fully recursive.”
• In the “Revision” box, choose “Head revision.”
• Click “OK.”
• Tortoise SVN should now download the souce code.
4. Now, we need to prepare the Visual Project using CMake. CMake it is a tool that creates all the dependencies and resolve links necessary to build the sources.
• Open CMake program (from Start menu).
• In the “Where is the source” box, browse to $VXLSRC. • In the “Where to build the binaries” box, browse to $VXLBIN.
• Click “Configure” (in bottom left of the window).
• A window will show up, asking for the type of compiler. Choose the version of Visual Studio you’re using. Stay away from “Win64” option for now.
• CMake will run a whole bunch of tests to determine the settings of the machine, compilers, packages, etc. The progress is shown in bottom of the window. This may take up to several minutes.
• Once this is done, a window shows up, with a lot of red rows.
• Scroll to find “BUILD_VGUI.” If it is unchecked,  check it. Click “Configure” again.
• Scroll to find “VGUI_USE_MFC” (should be in red). If it is unchecked,  check it. Click “Configure.” If you can’t find this option, that means Microsoft Visual Studio was not installed properly. Ask someone.
• Now the option “Generate” should be active, click it. CMake will now make all the “Projects” and “Solution” files for Microsoft Visual Studio in the $VXLBIN. • We finish with CMake for now, you can close it. 5. Compile VXL code • Go to $VXLBIN.
• Double-click on “vxl.sln.” This will open Microsoft Visual Studio.
• From top menu, View –> Solution Explorer.
• Right-click on “ALL_BUILD,” click on “Build.” This will build ALL projects in VXL. You can selectively build individual projects by right-click and “Build” that project, if you only need that one.
• This process can take a while, up to a couple hours, depending on how fast the machine is.
• After this is done, VXL is ready to use.

Using VXL on a project

Now that we compiled the libraries we can use them in our projects. There are two ways to use them (1) with CMake to create the project or (2) linking the libraries manually.

1. Using CMake for the project. CMake is a tool that creates the projects and solutions for us. It support projects in Visual Studio.
• First we should create two folders in the project folder. Similar to the steps when compiling VXL with CMake, one for the sources and one for the binaries, from now on I will call them $PRJSRC and $PRJBIN, respectively.
• Now, we need to create a configuration file to tell CMake all the requirements we need. I will give here a basic one, for more details you can check here.
 01 # The name of your project. This will be the name of the solution
 02 PROJECT( test )
 03
 04 # Automatic setting of the VXL libraries
 05 FIND_PACKAGE(VXL)
 06 IF(VXL_FOUND)
 07   INCLUDE(${VXL_CMAKE_DIR}/UseVXL.cmake)  08 ENDIF(VXL_FOUND)  09 # Another option is to set the path directly:  10 # SET( VXL_DIR D:\vxl\bin )  11  12 # Here you tell to CMake which files to include  13 IF( VXL_VGUI_FOUND )  14  INCLUDE_DIRECTORIES(${VXL_VGUI_INCLUDE_DIR} )
 15   SET( test_sources ${test_sources}  16  # Put all your source code here: code and headers  17  test.cpp  18  )  19 ENDIF( VXL_VGUI_FOUND )  20  21 # Specify the executable to be built  22 ADD_EXECUTABLE( test${test_sources} )
 23
 24 # Specify any other dependent libraries
 25 IF( VXL_VGUI_FOUND )
 26   TARGET_LINK_LIBRARIES( test ${VXL_VGUI_LIBRARIES} )  27 ENDIF( VXL_VGUI_FOUND ) • Place the configuration file and all your source code in the $PRJSRC folder.
• Open CMake and put the sources and destination folders to $PRJSRC and $PRJBIN, respectively (The steps are the same as the VXL compilation).
• Click “Configure” button. The “Generate” button should be active afterward, then click it.
• Now you can go to $PRJBIN and compile the project. 2. If you don’t want to use CMake or you cannot use it because you have a project already, you need to include the libraries and link them manually. • In Visual Studio Tools–>Options, go to the “Projects and Solutions” option. Then in that tree under “VC++ Directories” change the option “Show directories for:” and choose “Include files.” Then add the paths • $VXLSRC\vcl
• $VXLSRC\core • $VXLBIN\vcl
• $VXLBIN\core • Now, in the same place change the option “Show directories for:” to “Library files” and add $VXLBIN\lib
• If you are using any non-core library you should add them too. For example, if you are using vsol in contrib/gel then you should add $VXLSRC/contrib/gel. • Click “OK.” • In the Solution Explorer, right-click to your project and choose “Properties.” Go to Configuration Properties–>Linker • Under “General,” in the option “Additional Library Directories” add $VXLBIN\lib\Debug
• Under “Input,” in the option “Additional Dependencies” add vcl.lib, at least. Then link against all the libraries you used or the ones the compiler complains about. For example, if you use $VXLBIN\vil libraries add vil.lib, or if you use $VXLBIN\vil\algo libraries add vil_algo.lib.
• Click “OK.”


text:
# code help

Mike Hollis zzflop at embarqmail.com
Fri Nov 26 08:23:18 PST 2010

On Fri, Nov 26, 2010 at 11:27:01AM +0100, Aleix wrote:
> On Tuesday 16 November 2010 00:49:35 Mike Hollis wrote:
<jest>
> >  I ran across this code in a C tutorial. It compiles without error but I
> > having trouble understanding the output. Perhaps someone could
> help me
> > out.
<\end jest>
<snip>
> > ---- Mike Hollis ----
>
> This is a version of the code a little bit more readable with the same
> output:
>
> #include <stdio.h>
<snip>
> I tried to debug it with gdb but i didn't understand nothing,
> I'm sorry, the most misterious is the form that enter the text:
> ciao
> Aleix Ortí
> --
I tried with gdb,strace, and ltrace to try to get some handle on how
the Twelve Days of Christmas was printed from that tangle of spagetti
code, but it is beyond my expertise and for me will remain a mystery.

I think the author of the tutorial included  as a jest for his students
and didn't really expect them to decipher it and that is the spirit in
which I posted it. I just got a kick out of it and thought someone else
might too.

But if you figure it out, Please let me know !

--- Mike Hollis ---


text:
# How to argue that time travel to past would not be possible even in future?

I am a science fiction writer.

I know how to time travel to the future (using black hole or speed). But I need to argue in my novel that time travel to the past might not be possible. Is there a way to do this without using a formula? And how basic would argument look like ?

-
Look at this one my answer's to similar question. I have explained with example why time travel to the pas will not be possible physics.stackexchange.com/q/74181 – Dimensionless Sep 22 '13 at 17:04
In your novel, who is making the argument? Does this person have the advantage of 30th century physics, or other information not available to the reader in the real world? – Beta Sep 23 '13 at 2:54
The fact that we're not overrun by tourists from the future, while not a conclusive argument, might be a good intuitive argument for your readers. – Olin Lathrop Sep 23 '13 at 12:32
You seem to be changing your profession to science-fact writer;-) Stick with Science fiction it's more fun and can become fact in the future. I'll even give you a plot. Now that the Higgs boson is popular you can have your scientist invent an anti-Higgs ray that endows objects with negative/imaginary mass and forces them to move faster than light and backwards in time. – Jitter Sep 23 '13 at 12:33
possible duplicate of Is time travel possible? Is it possible to go back in time? – Ben Crowell Sep 23 '13 at 21:16

Time travel is difficult to prove or reject, even by using a formula (at this time there is no decisive proof for or against it). There are solutions of Einstein's equations which allow closed timelike curves, like Gödel's universe, Kerr black holes, wormholes, etc.

As mentioned in other answers, chronology protection conjecture, grandfather paradox and other causality paradoxes, and the absence of visitors from the future are the most used arguments against time travel. Each of them can be avoided, by creating alternative universes in which you don't exist because you killed your grandfather, or by protecting the past using Novikov's self-consistency principle, or a time patrol or similar solutions, etc.

Also, there are arguments against particular time travel methods. For instance, that you can't use wormholes, because they will become singular or/and self-destroy. There are theorems suggesting that in reasonable conditions closed timelike curves are accompanied by singularities, so if there are no singularities, there is no time travel.

Alternatively, you can make the characters discover fictional laws forbidding time travel.

I am very curious why a science fiction writer would want to reject time travel.

Update

If you are interested in various aspects of time travel (involving formulae), check this conference, The Time Machine Factory, 2012. The proceedings just appeared and are available online.

Update 2

The introduction of this paper by Seth Lloyd et. al. contains a brief review of many results concerning time travel, and references.

-
I am very curious why a science fiction writer would want to reject time travel. - Only in one direction. For one possibility, it creates "you can never return" internal conflicts, which can act as a metaphor for growing up. – Izkata Sep 23 '13 at 1:52

Well, the most trivial one is "Where the hell are all the time travellers from the future today?"

-
What if Jesus was time travaller ? – BioHazard Sep 22 '13 at 19:28
@BioHazard: Michael Moorcock en.wikipedia.org/wiki/Behold_the_Man_%28novel%29, and also Ilya Varshavsky has a short story, with the subject that Jesus Christ was time traveler. – Cristi Stoica Sep 22 '13 at 20:34
How do you know those geniuses are not time travellers? They won't tell us that. – scaaahu Sep 23 '13 at 10:13
Because we lack the technology for them to come here. Once we have the technology to receive messages sent from the future things like this could go quick. Some experiments actually show very interesting results where a signal is received a fraction of a second before it is actually sent. But for a novel this would be a good explanation. – Menno Gouw Nov 14 '13 at 9:50

One additional nice feature to consider in rejecting time travel is global entropy of the universe. As far as it is known today, in the past universe had lower entropy and it is impossible to reduce the entropy of the system without dumping the "excess entropy" (plus, whatever additional entropy created in the process) elsewhere.

The same consideration applies to why we can not precisely reconstruct the past (that is, perfect historical knowledge is not possible, no matter how hard we try). Entropy will always prevail and eat some of the precious information.

http://en.wikipedia.org/wiki/Entropy_(arrow_of_time)

-

The most basic argument I can think of is the Chronology protection conjecture. In essence, any time machine allows a quantum feedback cycle that will result in the immediate destruction of the machine.

-

One theory states that time travel requires cooperation from both sides, which explains why no time travelers have been seen yet. You can only travel as far back as the invention of the first time machine. And even then, it would be restricted to places and times where a "receiver" was set up.

That's of course very convenient for SF writers; it gives them a degree of freedom in deciding precisely where and when time travel fits the plot.

-

Have a look at http://en.wikipedia.org/wiki/Grandfather_paradox. I think you can find a nice argument there. You can use the argument that past is unchangeable so it is pointless to go to the past if it can't be changed. Or you can use the parallel universe argument, meaning that somebody who goes in the past and alter something there ends up in a parallel universe where the effect of his alteration creates a completely different present than the present he left from. The parallel universe is different than ours where he can't return to ours.

For clarity, those are NOT scientific arguments. Those are arguments which were made to solve the Grandfather paradox.

-
"it is pointless to go to the past if it can't be changed" — That is far, far from the only reason to visit the past. Just to pick one at random, who wouldn't want to spend their vacation riding an apatosaurus? – jwodder Sep 22 '13 at 22:03
I didn't think of that! it is wonderful. But still that counts as changing. Just like butterfly effect – Gotaquestion Sep 22 '13 at 22:20
It's not changing the past if you already rode the apatosaurus 150 mya, which you obviously did if you travel back then from now and ride it. – jwodder Sep 22 '13 at 22:24
@jwodder I am really confused now. – Lescai Ionel Sep 23 '13 at 15:02
@LescaiIonel right, this is the point of time paradox :) – Ruslan Sep 24 '13 at 14:47

## protected by Qmechanic♦Sep 23 '13 at 1:27

Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.


text:
# Probing the mass, structural, statistical, and environmental evolution of massive galaxies

Series:
Astronomy Unit Seminars
Speaker:
Dr Francesco Shankar (U. Southampton)
Host:
Richard Nelson
Date:
March 20th, 2015 at 14:30
Room:
GO Jones Room 610
Abstract:

One of the most important, but still highly debated, issues in contemporary cosmology, is the formation and evolution of massive spheroidal galaxies. Extensive semi-analytic galaxy formation models (SAMs), still debate whether mergers have played a major role in the assembly of ellipticals, or other in-situ'' processes, such as strong, dissipative early bursts of star formation, and/or clumpy accretion, have played an equally important role. In this talk, I will discuss the global evolution of massive spheroids, adopting hierarchical state-of-the-art SAMs, as well as advanced semi-empirical models.
In particular, I will discuss the predicted shape, normalization, scatter, and environmental dependence of the local size-stellar mass relation for massive early-type galaxies.
I will then move on discussing the role of progenitor bias and environment in the overall structural evolution of massive galaxies. I will conclude with the additional constraints obtainable from lensing measurements on the global profile of galaxies.
http://www.astro.soton.ac.uk/people/francesco_shankar.html


text:
# jax.numpy.dstack¶

jax.numpy.dstack(tup)[source]

Stack arrays in sequence depth wise (along third axis).

LAX-backend implementation of dstack(). Original docstring below.

This is equivalent to concatenation along the third axis after 2-D arrays of shape (M,N) have been reshaped to (M,N,1) and 1-D arrays of shape (N,) have been reshaped to (1,N,1). Rebuilds arrays divided by dsplit.

This function makes most sense for arrays with up to 3 dimensions. For instance, for pixel-data with a height (first axis), width (second axis), and r/g/b channels (third axis). The functions concatenate, stack and block provide more general stacking and concatenation operations.

Parameters

tup (sequence of arrays) – The arrays must have the same shape along all but the third axis. 1-D or 2-D arrays must have the same shape.

Returns

stacked – The array formed by stacking the given arrays, will be at least 3-D.

Return type

ndarray

concatenate()

Join a sequence of arrays along an existing axis.

stack()

Join a sequence of arrays along a new axis.

block()

Assemble an nd-array from nested lists of blocks.

vstack()

Stack arrays in sequence vertically (row wise).

hstack()

Stack arrays in sequence horizontally (column wise).

column_stack()

Stack 1-D arrays as columns into a 2-D array.

dsplit()

Split array along third axis.

Examples

>>> a = np.array((1,2,3))
>>> b = np.array((2,3,4))
>>> np.dstack((a,b))
array([[[1, 2],
[2, 3],
[3, 4]]])

>>> a = np.array([[1],[2],[3]])
>>> b = np.array([[2],[3],[4]])
>>> np.dstack((a,b))
array([[[1, 2]],
[[2, 3]],
[[3, 4]]])


text:
Contents

• For Solution

You are given a positive integer NN. You have to print exactly N+1N+1 positive integers satisfying the following conditions:

• Exactly one value should appear twice, all the remaining values should appear only once.
• Sum of all these values should be equal to 2N2N.

You have to print the values in non-decreasing order. If there are multiple solutions, you can print any of them.

Exactly N plus 1 Values solution codechef

• The first line of the input contains a single integer TT denoting the number of test cases. The description of TT test cases follows.
• The first and only line of each test case contains a single integer NN.

Exactly N plus 1 Values solution codechef

For each test case, print a single line containing N+1N+1 positive integers in non-decreasing order that satisfy the given conditions. If there are multiple solutions, you may print any of them.

Exactly N plus 1 Values solution codechef

• 1T601≤T≤60
• 1N601≤N≤60

• Subtask 1 (100 points): Original constraints

Exactly N plus 1 Values solution codechef

2
3
4

Sample Output 1

1 2 2 3
1 2 3 3 7

Exactly N plus 1 Values solution codechef

Test Case 11: 22 is repeated twice and the remaining elements occurred only once and the sum of all the elements is equal to 88, which is 2323.

Test Case 22: 33 is repeated twice and the remaining elements occurred only once and the sum of all the elements is equal to 1616, which is 2424.


text:
Dissemination of IT for the Promotion of Materials Science (DoITPoMS)

# • Plane stress

In plane stress, one of the principal stresses is zero but there are three finite strains. An example of this is the surface of a thin walled, pressurised cylinder, where the principal stress normal to the surface has a value of zero. More generally, plane stress conditions occur in sheet metal forming when a thin sheet is subjected to uniaxial or biaxial tension.

### Plastic deformation in plane stress

Consider the uniaxial tensile behaviour of a sheet.

Plastic flow will result once a critical stress is reached. Due to the constraint of neighbouring elastic material, the plastically deforming material forms in a band across the sheet at a characteristic angle to the axis of loading.

${\sigma _1} \ne 0{\rm{ , }}{\sigma _{\rm{2}}} = {\sigma _3} = 0$

At the boundary between the elastic and the yielded material, longitudinal strains must match for continuity. Therefore, they must be zero since strain is effectively zero in the elastic regions.

Plastic strain along v is zero: δεvv= 0

From the Levy-Mises equations ${{\delta {\varepsilon _1}} \over {{\sigma _1}}} = {{\delta {\varepsilon _2}} \over { - {\raise0.5ex\hbox{\scriptstyle 1} \kern-0.1em/\kern-0.15em \lower0.25ex\hbox{\scriptstyle 2}}{\sigma _1}}} = {{\delta {\varepsilon _3}} \over { - {\raise0.5ex\hbox{\scriptstyle 1} \kern-0.1em/\kern-0.15em \lower0.25ex\hbox{\scriptstyle 2}}{\sigma _1}}}$, and so $$\delta {\varepsilon _1} = - 2\delta {\varepsilon _2}$$ in the plane of the sheet.

Hence if we let δε1= +2 units of plastic strain, δε2= –1 unit of plastic strain.

Therefore, on a Mohr's circle, we have:

and the longitudinal strain δε is zero, i.e. δεvv= 0, at an angle θ with respect to the direction parallel to σ1.

From the diagram,

$\cos \left( {180 - 2\theta } \right) = {{0.5} \over {1.5}} = {1 \over 3}$

$\Rightarrow {\rm{ }}\theta = {\raise0.5ex\hbox{\scriptstyle 1} \kern-0.1em/\kern-0.15em \lower0.25ex\hbox{\scriptstyle 2}}{\cos ^{ - 1}}\left( { - {\raise0.5ex\hbox{\scriptstyle 1} \kern-0.1em/\kern-0.15em \lower0.25ex\hbox{\scriptstyle 3}}} \right) = {54.74^ \circ }$

and so the longitudinal strain increment is δεvv = 0 at an angle of with respect to σ1.

This phenomenon is well known in mild steel. The bands created are known as Lüders bands. These bands require less stress for their propagation than for their formation because of the freeing of dislocations from their solute atmospheres.

(Lüders bands formation in steel, contributed by Mike Meier, University of California, Davis.)

It is worth noting that Lüders bands occur in certain types of steel, such as low carbon steel (mild steel), but not in other metallic alloys, such as aluminium alloys or titanium alloys. This is because plastic strain localisation is normally suppressed by work hardening, which tends to make plastic flow occur rather uniformly in a metal, particularly in the early stages of plastic flow, i.e., just after yield has taken place.

However, in certain types of low carbon steel at room temperature, Cottrell atmospheres of carbon atoms which have been able to segregate preferentially to dislocation cores pin dislocations until the upper yield point is reached. Once the upper yield point is reached, there is a load drop and then a sudden burst of plastic straining at a constant externally applied load, as cascades of dislocations are able escape their Cottrell atmospheres. This is clearly rather specialised behaviour, caused by the ability of carbon atoms to diffuse relatively easily interstitially in these steels, but it is actually necessary behaviour for the formation of Lüders bands.

Conventional work hardening in metallic alloys in the early stages of plastic deformation makes any strain localisation (as demonstrated by the formation of Lüders bands) unlikely. This is also the case for pure metals, and for metals at high temperature, where large plastic strains can occur without a significant load increase once plastic deformation begins.

Therefore, Lüders bands only form if a limited burst of plastic straining is able to take place at constant load. Mild steels heated to sufficiently high temperatures (> 400 °C) and then tensile tested do not exhibit Lüders bands.


text:
Five factorial, which is equal to five times four times three times two times one, which, of course, is equal to, let's see, 20 times six, which is equal to 120. The mapping can be written as for a shift of places. permutations as a histogram and the observed value as a vertical black line. exactbool, optional. Development of analytical and computational skills is emphasized, and worked examples provide step-by-step methods for solving basic problems II, the mathematical requirements are introduced, while in Sec. To count the permutations of a list is to count Calling lu for numeric arguments that are not symbolic objects invokes the MATLAB lu function..

Probability and statistics Matrix algebra. The structures of the subgroups play an important role in the study of the nature of symmetric For a general nn matrix A, we assume that an LU decomposition Out [2]=. To calculate the number of possible permutations of r non-repeating elements from a set of n types of elements, the formula is: The above equation can be said to express the number of ways for picking r unique ordered outcomes from n possibilities. The parity of a permutation, as defined by wikipedia, is as follows: The sign or signature of a permutation is denoted sgn () and defined as +1 if is even and 1 if is odd. Select a Web Site. A determinant of second order consists of two rows and two columns. where U is a product of elementary unit upper triangular and permutation matrices, and D is a symmetric block diagonal with blocks of order 1 or 2. Matrices are subject to standard operations such as addition and multiplication. QUICK REFERENCE: Number Theoretic Functions . Nov 1, 2016 at 15:02. The notation that Mathematica uses assumes the set the permutation operates on is indexed by {1, .., n}. The BMMC permutations include commonly used permutations such as matrix transposition, bit-reversal permutations (used in performing FFTs), vector-reversal permutations, hypercube permutations, matrix reblocking, and permutations used by fast cosine transforms (FCTs). A permutation is an ordering of the elements in a linear sequence. is the permutation form of the permutation matrix. Now, in performing matrix multiplication, one essentially forms the dot product of each row of the first matrix with each column of the second. In this instance, we will be forming the dot product of each row of this matrix with the vector of elements we want to permute. A permutation matrix is a matrix obtained from an identity matrix by permuting the rows of the matrix. Monthly 90(5), 301312, 1983 Nicholas J. Higham, Accuracy and Stability of Numerical Algorithms, second edition, Society Mathematics. Math. (n r)! 1 Answer Sorted by: 0 If you request only those permutations of length 2, Mathematica can return the result rather quickly. Parameters. Writing each X. pappus graph image. In the example, your answer would be. For a set with elements , , , , a 23. (The former is used in the blue boxes 14 and 15, the latter in a.b Dot or matrix product Cross[a,b] Cross product Norm[a] Euclidean norm IdentityMatrix[n] n nidentity matrix Diagonal[m] Diagonal of m Diagonal[m,k] kth elem in diagonal of m Converts l to a permutation where runs over all elements of the group .For example, for the permutation group, the orbits of 1 and 2 are and the orbits of 3 and 4 are .. A group fixed point is an orbit consisting of a single element, i.e., an element that is sent to itself under all elements of the group.

A permutation is a bijection, which means that every permutation has an inverse function. Wolfram|Alpha computes a permutations inverse and writes it in cycle notation. Then it gives the order of the permutation (when written in disjoint cycle form, the order is simply the least common multiple of the length of the cycles). eigenvalue) corresponds to ith column of matrix V.That is the the higher value of D(i,i) the more important the corresponding eigenvector.. MatLab function eig(X) sorts eigenvalues in the acsending order, so you need to take the last two colmns of matrix V. Also do remember that if you try to perform factor analysis you can simply permutations as a histogram and the observed value as a vertical black line. That is, [A] = [L][U] Doolittles method provides an alternative way to factor A into an LU decomposition without going through the hassle of Gaussian Elimination. This result is readily obtained by expanding the Cartesian equation of such a Enter a custom list Get Random Combinations It may take a while to generate large number of combinations. 2 possible results. matrix, a set of numbers arranged in rows and columns so as to form a rectangular array. I'm following some projects ideas from the book "Exploring Linear Algebra in Analysis on the Properties of a Permutation Group. Hi!! The notation that SymPy Apply it both to rows and columns. cycle notation. This permutation calculator consider this formula for all the permutation calculations for the elements of small as well as large dataset. The difference between permutation and combination is that for permutation the order of the members is taken into consideration but for combination orders of members does not matter. 15.7. The spacing is between the prescript and the following character is kerned with the help of \mkern.. inversions. Anyway, for an order N square matrix, the array must be declared A(N,N), and specifically not something like A(100,100) with usage only of elements up to N = 7, say, because the locations in storage of elements in use would be quite different from those used by an array declared A(7,7). Compute answers using Wolfram's breakthrough technology & Another from disjoint cycles. Definition. Permutation FromInversions ( Int32 [] inv) Construct an array from a sequence of inversions. A permutation which shifts all elements of a set by a fixed offset, with the elements shifted off the end inserted back at the beginning. Both views of permutations are relevant to the theory of symmetric operads. different possible distict variations of the Karlo. matrix of the permutation (3 1 2 5) Natural Language; Math Input; Extended Keyboard Examples Upload Random. Non-landmark To calculate permutations in Python, use the itertools.permutation () method.

A general permutation matrix is not symmetric. A permutation is a bijection on a set of n elements. Like the Combinations Calculator the Permutations Calculator finds the number of subsets that can be taken from a larger set. Let me write this down.

2. Explore well-known graphs using natural-language input: In [3]:=. Functions De ned by positroids 4 3.1 Operations on Permutations Labeling Positroids 4 3.2 Positroid Coordinates and Matrix Representatives 10 3.3 Drawing On-Shell (Plabic) Graphs and Left-Right Paths 13

I've been having some touble with trying to find a function that lets me permute the row of a matrix. This is often referred to as a "two by three matrix", a "23-matrix", or a matrix of dimension 23.Without further specifications, matrices represent Sci. We construct the general permutation invariant Gaussian two-matrix model for matrices of arbitrary size D.The parameters of the model are given in terms of variables defined using the representation theory of the symmetric group S D.A correspondence is established between the permutation invariant polynomial functions of the matrix variables (the Quick Info Born 21 August 1789 Paris, France Died 23 May 1857 Sceaux (near Paris), France Summary Augustin-Louis Cauchy pioneered the study of analysis, both real and complex, and the theory of permutation groups. Visualize with graphs. A permutation matrix is a matrix obtained by permuting the rows of an nn identity matrix according to some permutation of the numbers 1 to n. Every row and column therefore contains precisely a single 1 with 0s everywhere else, and every permutation corresponds to a unique permutation matrix. Out [2]=. Permutation (parent, l, check_input = True) . The Permutations Calculator finds the number of subsets that can be created including subsets of the same items in different orders. Definition A matrix is a permutation matrix if and only if it can be obtained from the identity matrix by performing one or more interchanges of the rows and columns of . 2 = [ n ( n 1) This is a list of important publications in mathematics, organized by field.. The "pMatrix" class is the class of permutation matrices, stored as 1-based integer permutation vectors.. Matrix (vector) multiplication with A matrix is a rectangular array of numbers (or other mathematical objects), called the entries of the matrix. Arguments: proc is a matrix of 2D or 3D landmarks that have been Procrustes superimposed. For 3D landmarks dims must be set to 3. Example of Permutation and Combination. Work with built-in named groups. This thesis presents additional work at the parallel disk level of abstraction. Featured pages. If the equations a 1 x + b 1 = 0, a 2 x + b 2 = 0 are satisfied by the same value of x, then a 1 b 2 a 2 b 1 = 0. Stay on top of important topics and build connections by joining Wolfram Community groups relevant to III, there is a brief review of quantum mechanical concepts that are required to understand the paper.Section IV includes a description of a mathematical framework, the Fock-Liouville space Tutorial for Mathematica & Wolfram Language. The entries are given by the scalar products of u and permutation.action(v), where u is a vertex in the underlying Yang-Baxter graph and v is a is a matrix with two rows and three columns. A - 1 = 1/ det (A) adj (A) Where: A-1 is the inverse of matrix A. det (A) is the determinant of the given matrix. X. pappus graph image. The Wolfram Language also includes functions for combinatorics, probability, integer sequences and much more. Out [3]=. I have gotten some great help recently on Hamiltonian simulation, and am interested in using Hamiltonian simulation to explore (classical) random walks on large graphs, but I'm running up against limitations on my knowledge of linear algebra and matrix exponentials. A permutation which shifts all elements of a set by a fixed offset, with the elements shifted off the end inserted back at the beginning. Stack Exchange Network Stack Exchange network consists of 180 Q&A communities including Stack Overflow , the largest, most trusted online In this example, we start by defining a column-major sparse matrix type of double SparseMatrix, and a triplet list of the same scalar type Triplet.A triplet is a simple object representing a non-zero entry as the triplet: row index, column index, value. There would be exactly 24 (4!) Number of things. The default kerning between the prescript and P is -3mu, and -1mu with C, which can be changed by using the optional argument of all three macros.. Code In English we use the word "combination" loosely, without thinking if the order of things is important. But in the Rubiks cube, only 1 3 of the permutations have the rotations of the corner cubies correct. Ordering objects, counting permutations, the factorial function. Some reasons why a particular publication might be regarded as important: Topic creator A publication that created a new topic; Breakthrough A publication that changed scientific knowledge significantly; Influence A publication which has significantly influenced the world or has had a massive We focus on permutation matrices over a finite field and, more concretely, we compute the minimal annihilating polynomial, and a set of linearly independent eigenvectors from the decomposition in disjoint cycles of the permutation naturally associated to the matrix. More formally, given a permutation 24. The itertools.permutations () method takes a list, dictionary, tuple, or other iterators as a parameter and returns the permutations of that list. A = { {1, 2, 3}, {-1, -2, -3}} % // MatrixForm. Permutations [ list, n] gives all permutations containing at most n The Mathematica code to nd the number of non-attacking Queen positions for a general nis in the homework Permutations. AbsoluteTiming [Permutations [Range This won't create a matrix, it will create a list containing two MatrixForms. the sum of all the numbers will be the same for every permutation i.e. Wolfram Community forum discussion about Indexing an array in Mathematica. The notation that SymPy uses assumes the set is indexed by {0, , n - 1}. As with the observed data, diagonal cells were also ignored for these permutations. Cayley two line notation. In other words: "My Remember from lecture two that multiplying a matrix from the left side with a permutation matrix exchanges its rows. and Graph Theory with Mathematica, Addison-Wesley, Reading, 20-24. 2. Calculator Use. What is the permutation matrix of the inverse permutation? Theorem 3 A circle with center (, ) and radius corresponds to the generalized circle (1, (2 , (2 , 2 +2 (2). Permutations Permutations Permutations [ list] generates a list of all possible permutations of the elements in list. Step 2: We now have row 1 as 0,,0,1,,1, that is, a block An inversion of a permutation is a pair (i,j) of positions where the entries of a permutation are in the opposite order: < and >. ElementaryDecompositions.m is a package for factoring matrices with entries in a Euclidean ring as a product of elementary matrices, permutation matrices, and a diagonal matrix. A permutation is a mathematical technique that determines the number of possible arrangements in a set when the order of the arrangements matters. The permutation is an important operation in combinatorics and in other areas of mathematics. In the main function, we declare a list coefficients of triplets (as a std vector) and the right hand side

Since interchanging two rows is a self-reverse operation, every elementary permutation matrix is invertible and agrees with its inverse, P = Bases: sage.combinat.combinat.CombinatorialElement A permutation. So a descent is just an inversion at two adjacent positions. not having the same number of columns for each matrix sympy.combinatorics.permutations.Permutation for the further information of how to create a permutation object. When perm is given in cyclic form Cycles [ { cyc 1 , cyc 2 , } ] , a cycle { p 1 , p 2 , } moves the Permutation matrices Description. Combinations and Permutations What's the Difference? Convergence in distribution; Mean square convergence; Multivariate normal distribution; Wishart distribution; Set estimation; Heaps algorithm is used to generate all permutations of n objects. The permutation perm can be given in disjoint cyclic form or as a permutation list. The purpose of this paper is to provide basic knowledge about the Lindblad master equation. How to write a permutation like this ? As automorphisms : X X \sigma : X \to X in Set, the permutations of X X naturally form a group under composition, called the symmetric group (or permutation group) on X X. The set of inversions to construct the permutation from. Some examples one line notation. For the A permutation matrix is any n n matrix which can be created by rearranging the rows and/or columns of the n n identity matrix. The idea is to generate each permutation from the previous permutation by choosing a pair of elements to Generalizing the concept of permutation, counting k-permutations. Symbolic representation for permuting matrix rows or columns. 10 6 = 1, 000, 000 {\displaystyle 10^ {6}=1,000,000} Then click on 'download' to download all combinations as a txt file. He also researched in convergence and divergence of infinite series, differential equations, determinants, probability and mathematical The simplest permutation matrix is I, the identity matrix. Click on Go, then wait for combinations to load. Man-Duen Choi, Tricks or treats with the Hilbert matrix, Amer. In many statistical applications, the null and alternative hypotheses of interest can be paraphrased in the following simple terms: Ho :Any patterns appearing in the data are due to chance alone. Find elements, generators, order. If you have a calculator handy, this part is easy: Just hit 10 and then the exponent key (often marked x y or ^ ), and then hit 6. Create groups. J. Most commonly, a matrix over a field F is a rectangular array of elements of F. A real matrix and a complex matrix are matrices whose entries are respectively real numbers or Enter the email address you signed up with and we'll email you a reset link. function returns three values: the matrix correlation, the proportion times the real matrix correlation was greater than the n random permutations, and the P-value that the correlation Eigenvalues and eigenvectors feature prominently in the analysis of linear transformations. permutation matrices, we get at most ( n!) The numbers are called the elements, or entries, of the matrix. Example: Find the number of permutations and combinations if n is given as 12 and r as 2. However, the order of the subset matters. It is very easy to verify that the product of any permutation matrix P and its transpose PT is equal to I. QUICK REFERENCE: Discrete Mathematics . Number of elements taken. scalar_product_matrix (permutation = None) Return the scalar product matrix corresponding to permutation. The prefix eigen-is adopted from the German word eigen (cognate with the English word own) for "proper", "characteristic", "own". Some ideas: - typeset the matrix in a smaller fontsize; - tell that it is a diagonal matrix that is zero except for the diagonal (and you give the diagonal elements); - start the matrix on a new line. Either way, the idea is clear. Let P be a permutation matrix that interchange rows 1 and 2 and also interchange rows 3 and 4: A permutation is a bijection on a set of n elements. Let P be a permutation matrix ass ociated to a permutation w hich is a disjoint product of cycles. ( n!) The key facts about permutation matrices P are: The inverse of P is its transpose: P-1 = P T. where A is the matrix representation of T and u is the coordinate vector of v.. Overview. & Math. We call this two-line notation. Originally used to study principal axes of the rotational motion To demonstrate, the following snippet groups permutations of $(1\;2\;3\;4)$ by whether they yield the same companion matrix for a quartic polynomial: Doolittle Algorithm : It is always possible to factor a square matrix into a lower triangular matrix and an upper triangular matrix. In Sec. Solve for the number of permutations. This simply means that at the first entry is a $6$, at the second there is a $1$ and so on, while in cycle notation this means that $6 \to 1 \to 4 \to 3$ and so on. ( 1 2 3 1 2 3) B = { {4, 5, 6}, {-4, -5, -6}} (A*B) // TraditionalForm. The Mathematica Package positroids 3 2.1 Obtaining the positroids Package and Demonstration Notebook 3 2.2 Using the positroids Package 3 3. X. Gu, Jianqiang Sun. If exact is False, then floating point precision is used, otherwise exact long integer is computed. What I could notice in the problem was that the number of sums that we are supposed to make distinct is $9 \times 6 = 54$ and the last sum i.e. If you use 'matrix' instead of 'vector', then lu returns permutation matrices, as it does by default.. L and U are nonsingular if and only if A is nonsingular. To permute a list is to rearrange its elements. The notation that Mathematica uses assumes the set the permutation operates on is indexed by {1, .., n}. We have already covered this in a previous video. class sage.combinat.permutation. Permutation matrices and matrix equivalence over a finite field,Internat. Math. Non-landmark data may be substituted, but the option dims must be set to 1 and permuteby must be set to Variables. 2017. Matrices have wide applications in engineering, physics, economics, and statistics as well as in various branches of mathematics. It's generally a bad idea to wrap an expression inside MatrixForm[] and assign it to a variable. Every permutation matrix is an orthogonal matrix: \( {\bf P}^{-1} = {\bf P}^{\mathrm T} . Thus: P 1 = P T. and P is an Since we sometimes need to do row exchanged to do elimination, the last ten minutes of lecture are spent on permutation matrices. Math. If P is a n by n matrix, p is n^2 by 1 (assuming you do column by column appending). Using this online calculator is quite painless. permutation of edge pieces has 212 arrangements. r is the number you select from this dataset & n P r is the number of permutations. There are two ways to draw arrows in the chosen matrix, one similar to two-line and the other to cycle notation.


text:
Question 21

# A candidate obtains 60% marksin the first paper and 70% marks aggregate in two papers. What percentage marks he got in the second paper,if the fullmarks for two papersare in the ration of 2:3.

• Get 300+ previous papers with solutions PDF


text:
# How do you write 1 3/8 as a decimal?

Then teach the underlying concepts
Don't copy without citing sources
preview
?

#### Explanation

Explain in detail...

#### Explanation:

I want someone to double check my answer

6
Aug 5, 2017

$1 \frac{3}{8} = 1.375$

#### Explanation:

Decimal notation is a way of writing fractions which have their denominators as powers of $10$

Change $1 \frac{3}{8}$ into a fraction with a power of $10$ in the denominator.

It helps to know that $8 \times 125 = 1000$

$1 + \textcolor{b l u e}{\frac{3}{8} \times \frac{125}{125}} = 1 + \textcolor{b l u e}{\frac{375}{1000}}$

The whole number is $1$ and the fraction part is $\frac{375}{1000}$

$1 \frac{3}{8} = 1.375$

Then teach the underlying concepts
Don't copy without citing sources
preview
?

#### Explanation

Explain in detail...

#### Explanation:

I want someone to double check my answer

3
Aug 10, 2017

See below

#### Explanation:

To turn a fraction to a decimal you need to know some rules.
$1 \frac{3}{8}$ must be turned into an improper fraction.

To do this you need to:

$1$ get the denominator (bottom number)
$2$ multiply it by your whole number and
$3$ add the numerator (top number) .

So step $1 \mathmr{and} 2$

$8 \times 1$ will give you $8$

Step $3$
$8 + 3$ will give you $11$

The next rule is to keep your denominator the same as it is on your given fraction which is $8$ and on top for the numerator you need to have your total answer which is $11$

Therefore:
$\frac{11}{8}$ is your fraction that needs to be turned into a decimal.

To do this you simply d1vide 11 by 8

$\frac{11}{8} = 1.375$

Hope this gave you an idea of how to turn any fraction into a decimal. You can do this with any fraction.
E.g. $\frac{4}{8} = 0.5$
$\frac{9}{45} = 0.2$
$\frac{7}{49} = 0.143$

Then teach the underlying concepts
Don't copy without citing sources
preview
?

#### Explanation

Explain in detail...

#### Explanation:

I want someone to double check my answer

1
Aug 10, 2017

$1.375$

#### Explanation:

First, we have to convert it to a fractional number.

=> $1 \frac{3}{8}$

=> $\frac{\left(1 \cdot 8\right) + 3}{8}$

=>$\frac{8 + 3}{8}$

=> $\frac{11}{8}$

Now we can easily convert it to a decimal by dividing by $8$

The answer in decimal is $1.375$

• 8 minutes ago
• 9 minutes ago
• 10 minutes ago
• 11 minutes ago
• 30 seconds ago
• 2 minutes ago
• 2 minutes ago
• 3 minutes ago
• 4 minutes ago
• 8 minutes ago
• 8 minutes ago
• 9 minutes ago
• 10 minutes ago
• 11 minutes ago


text:
# Does a = v dv/dx hold when moving in a plane?

1. Apr 13, 2016

### Feynman's fan

Not exactly homework in my case but I guess it fits the level.

We know that a = v dv/dx holds when moving on a line. Does it hold when moving on a plane?

If yes, what would be the exact formulation of the statement. I mean, I read a = v dv/dx as a(x) = v(x) dv/dx(x) (or are they functions of t?) but since on a plane a(x), v(x) and dv/dx(x) are all vectors, how do we define the product?

2. Apr 13, 2016

### Ssnow

In one dimension you can use the rule $a=\frac{dv}{dt}=\frac{dv}{dx}\frac{dx}{dt}=v\frac{dv}{dx}$ but in dimension greater than one you must do attention to use the analogue tools ...


text:
##### The following is comment written for a C function:GATE:2011

The following is comment written for a C function:
/* This function computes the roots of a quadratic equation  a.x^2+b.x+c=0. The function stores two real roots in *root1 and *root2 and returns the status of validity of roots. It handles four different kinds of cases.
(i)When coefficient a is zero irrespective of discriminant
(ii) When discriminant is positive
(iii) When discrimanant is zero
(iv) When discrimanant is negative
Only in cases (ii) and (iii) , the stored roots are valid.Otherwise 0 is stored in the roots. the function returns 0 when
the roots are valid and -1 otherwise.
The function also ensures root1 >= root2.
int get_QuadRoots float a, float b, float c,()float *root1, float *root2 ;
*\

Software test engineer is assigned the job of doing black box testing. He comes up with the following test cases, many of which are redundant.

 TEST SET INPUT SET EXPECTED OUTPUT SET
 T no. a b c root1 root2 return value T1 0.0 0.0 7.0 0.0 0.0 -1 T2 0.0 1.0 3.0 0.0 0.0 -1 T3 1.0 2.0 1.0 --1.0 -1.0 0 T4 4.0 -12.0 9.0 1.5 1.5 0 T5 1.0 -2.0 -3.0 3.0 -1.0 0 T6 1.0 1.0 4.0 0.0 0.0 -1

Which one of the following options provide the set of non-redundant tests using equivalence class partitioning approach from input perspective for black box testing?

(A) T1,T2,T3,T6                 (B) T1,T3,T4,T5                 (C) T2,T4,T5,T6                 (D) T2,T3,T4,T5

T3 AND T4  ,in both case discriminant (D) = ${b^2-4ac}$=0


text:
# Pretty diagram of directory structure

In a recent project, I wanted to create a diagram of a repository for the appendix of a paper, including comments to highlight key files and explain how the folders were organised. I found this answer on Stack Exchange by user Gonzalo Medina, which I tweaked to produce the diagram below. The code is below: Continue reading Pretty diagram of directory structure

# Why does it matter to conservation decision-making if alternative Qualitative Modelling methods produce contradictory predictions?

Previously, I have written about how the probabilistic approach to Qualitative Modelling (QM) (e.g. Raymond et al. 2011) can lead to contradictory predictions of species response to a management intervention, and how this is similar to the paradoxes of the Principle of Indifference that we find in the philosophy literature. A reviewer of our new manuscript (Kristensen et al. 2019) asked us an interesting and … Continue reading Why does it matter to conservation decision-making if alternative Qualitative Modelling methods produce contradictory predictions?

# Fixation probability of birth-death process

The goal is to understand where Eq. 2 of the Supplementary section of Sigmund et al. (2010) came from. We are considering a finite population within which individuals are pursuing different game-theoretic strategies. At each timestep, a pair of individuals is chosen at random, and they engage in a social learning process, where individual $$i$$ will adopt the strategy of individual $$j$$ according … Continue reading Fixation probability of birth-death process

# Two new papers about blue tits on Corsica

I recently read two new papers about blue tits in Corsica: Dubuc-Messier et al. (2017 Behav. Ecol.), and Dubuc-Messier et al. (2018 Evol. Biol.). The 2018 paper was interested in whether the differences between the evergreen and deciduous ecotypes on Corsica were genetic or a plastic response to the different habitat types. They took 7-12 day old nestlings and raised them in a common garden, … Continue reading Two new papers about blue tits on Corsica

# Moments for a bivariate beta distribution

A common choice for a probability distribution of a probability is the beta distribution. It has the required support between 0 and 1, and with its two parameters we can obtain a pretty wide qualitative range for the probability density function. What should we do if we want to create correlated probabilities? We might look for some kind of multivariate generalisation of the beta distribution, … Continue reading Moments for a bivariate beta distribution

# Understanding the neigbour-modulated inclusive fitness approach

The goal is to understand Equation 4.2 of Rodrigues and Kokko (2016). To understand the technique, I read through Taylor et al. (2007), and Taylor and Frank (1996), specifically examples 4, 4a and 4b. Very briefly, we begin with a matrix $$A = [w_{i,j} ]$$ whose elements represent the genetic contribution of class $$j$$ to class $$i$$. Then for … Continue reading Understanding the neigbour-modulated inclusive fitness approach

# Evolution of parochialism

Previously I was reading about identity in Singapore, and I found that the government project of creating a national identity is focused upon creating a cosmopolitan mindset (i.e. one of openness and tolerance of difference), and that this interacts in different ways with the two main groups of foreigners, the ‘foreign talent’ and the ‘foreign worker’. The literature review that I did there was focused … Continue reading Evolution of parochialism

# Identity in Singapore, the Internet, and connections to game theory

The following is a literature summary that I undertook as part of my broader interest in modelling social systems, using identity in Singapore as a case study. I should preface all of this by saying that the ideas below are not ‘my own’ as such, but rather my attempt to synthesise the literature and opinions of experts in Singapore. Identity in Singapore Since independence, the … Continue reading Identity in Singapore, the Internet, and connections to game theory


text:
## A Tip for Profiling GHC

Posted on March 26, 2020

GHC developers are often in a situation where we want to profile a new change to GHC to see how it affects memory usage or runtime performance. In this post I will describe quite an ergonomic way of profiling any merge request without having to build the branch yourself from source or in any special mode. We’ll download the bindist from GitLab CI and then compile a simple GHC API application which models the compilation pipeline which we can profile.

## Step 1: Enter an environment with the bindist

I recently wanted to profile one of Sebastian Graf’s great patches, seeing as he put up a merge request on GitLab, CI built his patch and produced a bindist for a large number of platforms. This included a Fedora bindist which can be passed to my tool ghc-head-from in order to enter an environment with his patched version of GHC available.

I found the URL for the bindist for his patch by navigating through the GitLab interface.

ghc-head-from https://gitlab.haskell.org/ghc/ghc/-/jobs/289084/artifacts/raw/ghc-x86_64-fedora27-linux.tar.xz

Once it has finished downloading and installed, which takes a surprising amount of time, the patched version of GHC will be available.

> ghc --version
The Glorious Glasgow Haskell Compilation System, version 8.11.0.20200324

## Step 2: The simple GHC API program

Now we need the program we are going to profile. This is a simple GHC API program which will read arguments from a file called args and then just compile the modules as specified by the arguments.

module Main where

import Lib
import GHC as G
import GHC.Driver.Session as G
import GHC.Driver.Session
import SrcLoc as G

import System.Environment
import System.Mem
import Control.Concurrent
import Outputable

initGhcM :: [String] -> Ghc ()
initGhcM xs = do
df1 <- getSessionDynFlags
let cmdOpts = ["-fforce-recomp"] ++ xs
(df2, leftovers, warns) <- G.parseDynamicFlags df1 (map G.noLoc cmdOpts)
setSessionDynFlags df2
ts <- mapM (flip G.guessTarget Nothing) $map unLoc leftovers setTargets ts pprTraceM "Starting" (ppr ts) void$ G.load LoadAllTargets

main :: IO ()
main = do
xs <- words <$> readFile "args" let libdir = "/nix/store/c7113gcm42jjjzpgygfmmrivdhrxgvvk-ghc-8.11.0.20200324/lib/ghc-8.11.0.20200324" runGhc (Just libdir)$ initGhcM xs

In the program you need to set the libdir to the libdir for the version of ghc we just downloaded.

> ghc --print-libdir
/nix/store/c7113gcm42jjjzpgygfmmrivdhrxgvvk-ghc-8.11.0.20200324/lib/ghc-8.11.0.20200324

The args file contains a list of arguments that you would normally pass to GHC. The wrapper is then compiled as normal, passing both the -package and -prof flags.

ghc Profile.hs -package ghc -prof

## Step 3: The program you want to profile

Say for this example we want to profile a single compilation of Cabal, how do we know what options we should pass to the wrapper program in order to perform the compilation? The easiest way to work this out is to ask cabal to compile the project and then copy the arguments it uses to invoke GHC. So in the locally cloned Cabal repository, we can compile it like normal and pass the -v2 flag to get cabal to print the options it will use to call GHC.

cabal v2-build -v2 Cabal | tee args

Then open the args file and delete everything apart from the arguments for the final call to ghc. The final file should contain a single line with just the options you want to pass to GHC to compile the project.

By using cabal to get the arguments it will also build any necessary dependencies for us.

Note: You might need to fix some of the include paths if you are running the executable in a different directory.

## Step 4: Running the profile

So now we have the program to profile and something to compile, we can profile using any of the normal profiling modes.

-- Run a time profile
./Profile +RTS -p -l-au
-- Run a heap profile
./Profile +RTS -hy -l-au

Then you can use hs-speedscope to view the time profile or eventlog2html to view the heap profile. You will observe that the simplifier is very slow.

# Conclusion

The main disadvantage of this approach is that you can’t add any cost centres into the build. GHC comes with a limited number of hand written cost centres but not covering a lot of functions.

It would be nice in future to automate some of these steps to make it even more seamless to profile a specific MR.


text:
Home > Research > Publications & Outputs > The KMOS Cluster Survey (KCS) I

### Electronic data

• 1708.00454v1

Rights statement: This is an author-created, un-copyedited version of an article accepted for publication/published in The Astrophysical Journal. IOP Publishing Ltd is not responsible for any errors or omissions in this version of the manuscript or any version derived from it. The Version of Record is available online at doi: 10.3847/1538-4357/aa8368

Accepted author manuscript, 3.03 MB, PDF document

## The KMOS Cluster Survey (KCS) I: The fundamental plane and the formation ages of cluster galaxies at redshift $1.4z1.6$

Research output: Contribution to journalJournal articlepeer-review

Published

### Standard

The KMOS Cluster Survey (KCS) I : The fundamental plane and the formation ages of cluster galaxies at redshift $1.4z1.6$. / Beifiori, Alessandra; Mendel, J. Trevor; Chan, Jeffrey C. C.; Saglia, Roberto P.; Bender, Ralf; Cappellari, Michele; Davies, Roger L.; Galametz, Audrey; Houghton, Ryan C. W.; Prichard, Laura J.; Smith, Russel; Stott, John P.; Wilman, David J.; Lewis, Ian J.; Sharples, Ray; Wegner, Michael.

In: The Astrophysical Journal, Vol. 846, No. 2, 120, 10.09.2017.

Research output: Contribution to journalJournal articlepeer-review

### Harvard

Beifiori, A, Mendel, JT, Chan, JCC, Saglia, RP, Bender, R, Cappellari, M, Davies, RL, Galametz, A, Houghton, RCW, Prichard, LJ, Smith, R, Stott, JP, Wilman, DJ, Lewis, IJ, Sharples, R & Wegner, M 2017, 'The KMOS Cluster Survey (KCS) I: The fundamental plane and the formation ages of cluster galaxies at redshift $1.4z1.6$', The Astrophysical Journal, vol. 846, no. 2, 120. https://doi.org/10.3847/1538-4357/aa8368

### APA

Beifiori, A., Mendel, J. T., Chan, J. C. C., Saglia, R. P., Bender, R., Cappellari, M., Davies, R. L., Galametz, A., Houghton, R. C. W., Prichard, L. J., Smith, R., Stott, J. P., Wilman, D. J., Lewis, I. J., Sharples, R., & Wegner, M. (2017). The KMOS Cluster Survey (KCS) I: The fundamental plane and the formation ages of cluster galaxies at redshift $1.4z1.6$. The Astrophysical Journal, 846(2), [120]. https://doi.org/10.3847/1538-4357/aa8368

### Vancouver

Beifiori A, Mendel JT, Chan JCC, Saglia RP, Bender R, Cappellari M et al. The KMOS Cluster Survey (KCS) I: The fundamental plane and the formation ages of cluster galaxies at redshift $1.4z1.6$. The Astrophysical Journal. 2017 Sep 10;846(2). 120. https://doi.org/10.3847/1538-4357/aa8368

### Author

Beifiori, Alessandra ; Mendel, J. Trevor ; Chan, Jeffrey C. C. ; Saglia, Roberto P. ; Bender, Ralf ; Cappellari, Michele ; Davies, Roger L. ; Galametz, Audrey ; Houghton, Ryan C. W. ; Prichard, Laura J. ; Smith, Russel ; Stott, John P. ; Wilman, David J. ; Lewis, Ian J. ; Sharples, Ray ; Wegner, Michael. / The KMOS Cluster Survey (KCS) I : The fundamental plane and the formation ages of cluster galaxies at redshift $1.4z1.6$. In: The Astrophysical Journal. 2017 ; Vol. 846, No. 2.

### Bibtex

@article{8ac8ea303b134d848399c019897d4d36,
title = "The KMOS Cluster Survey (KCS) I: The fundamental plane and the formation ages of cluster galaxies at redshift $1.4z1.6$",
abstract = "We present the analysis of the fundamental plane (FP) for a sample of 19 massive red-sequence galaxies ($M_{\star} >4\times10^{10} M_{\odot}$) in 3 known overdensities at $1.39z 11$) in our sample, we translate the FP zero-point evolution into a mass-to-light-ratio $M/L$ evolution finding $\Delta \log M/L_{B}=(-0.46\pm0.10)z$, $\Delta \log M/L_{B}=(-0.52\pm0.07)z$, to $\Delta \log M/L_{B}=(-0.55\pm0.10)z$, respectively. We assess the potential contribution of the galaxies structural and stellar velocity dispersion evolution to the evolution of the FP zero-point and find it to be $\sim$6-35 % of the FP zero-point evolution. The rate of $M/L$ evolution is consistent with galaxies evolving passively. By using single stellar population models, we find an average age of $2.33^{+0.86}_{-0.51}$ Gyr for the $\log M_{\star}/M_{\odot}>11$ galaxies in our massive and virialized cluster at $z=1.39$, $1.59^{+1.40}_{-0.62}$ Gyr in a massive but not virialized cluster at $z=1.46$, and $1.20^{+1.03}_{-0.47}$ Gyr in a protocluster at $z=1.61$. After accounting for the difference in the age of the Universe between redshifts, the ages of the galaxies in the three overdensities are consistent within the errors, with possibly a weak suggestion that galaxies in the most evolved structure are older.",
keywords = "galaxies: clusters: general, galaxies: elliptical and lenticular, cD, galaxies: evolution, galaxies: formation, galaxies: high-redshift, galaxies: kinematics and dynamics",
author = "Alessandra Beifiori and Mendel, {J. Trevor} and Chan, {Jeffrey C. C.} and Saglia, {Roberto P.} and Ralf Bender and Michele Cappellari and Davies, {Roger L.} and Audrey Galametz and Houghton, {Ryan C. W.} and Prichard, {Laura J.} and Russel Smith and Stott, {John P.} and Wilman, {David J.} and Lewis, {Ian J.} and Ray Sharples and Michael Wegner",
note = "This is an author-created, un-copyedited version of an article accepted for publication/published in The Astrophysical Journal. IOP Publishing Ltd is not responsible for any errors or omissions in this version of the manuscript or any version derived from it. The Version of Record is available online at doi: 10.3847/1538-4357/aa8368",
year = "2017",
month = sep,
day = "10",
doi = "10.3847/1538-4357/aa8368",
language = "English",
volume = "846",
journal = "The Astrophysical Journal",
issn = "0004-637X",
publisher = "Institute of Physics Publishing",
number = "2",

}

### RIS

TY - JOUR

T1 - The KMOS Cluster Survey (KCS) I

T2 - The fundamental plane and the formation ages of cluster galaxies at redshift $1.4z1.6$

AU - Beifiori, Alessandra

AU - Mendel, J. Trevor

AU - Chan, Jeffrey C. C.

AU - Saglia, Roberto P.

AU - Bender, Ralf

AU - Cappellari, Michele

AU - Davies, Roger L.

AU - Galametz, Audrey

AU - Houghton, Ryan C. W.

AU - Prichard, Laura J.

AU - Smith, Russel

AU - Stott, John P.

AU - Wilman, David J.

AU - Lewis, Ian J.

AU - Sharples, Ray

AU - Wegner, Michael

N1 - This is an author-created, un-copyedited version of an article accepted for publication/published in The Astrophysical Journal. IOP Publishing Ltd is not responsible for any errors or omissions in this version of the manuscript or any version derived from it. The Version of Record is available online at doi: 10.3847/1538-4357/aa8368

PY - 2017/9/10

Y1 - 2017/9/10

N2 - We present the analysis of the fundamental plane (FP) for a sample of 19 massive red-sequence galaxies ($M_{\star} >4\times10^{10} M_{\odot}$) in 3 known overdensities at $1.39z 11$) in our sample, we translate the FP zero-point evolution into a mass-to-light-ratio $M/L$ evolution finding $\Delta \log M/L_{B}=(-0.46\pm0.10)z$, $\Delta \log M/L_{B}=(-0.52\pm0.07)z$, to $\Delta \log M/L_{B}=(-0.55\pm0.10)z$, respectively. We assess the potential contribution of the galaxies structural and stellar velocity dispersion evolution to the evolution of the FP zero-point and find it to be $\sim$6-35 % of the FP zero-point evolution. The rate of $M/L$ evolution is consistent with galaxies evolving passively. By using single stellar population models, we find an average age of $2.33^{+0.86}_{-0.51}$ Gyr for the $\log M_{\star}/M_{\odot}>11$ galaxies in our massive and virialized cluster at $z=1.39$, $1.59^{+1.40}_{-0.62}$ Gyr in a massive but not virialized cluster at $z=1.46$, and $1.20^{+1.03}_{-0.47}$ Gyr in a protocluster at $z=1.61$. After accounting for the difference in the age of the Universe between redshifts, the ages of the galaxies in the three overdensities are consistent within the errors, with possibly a weak suggestion that galaxies in the most evolved structure are older.

AB - We present the analysis of the fundamental plane (FP) for a sample of 19 massive red-sequence galaxies ($M_{\star} >4\times10^{10} M_{\odot}$) in 3 known overdensities at $1.39z 11$) in our sample, we translate the FP zero-point evolution into a mass-to-light-ratio $M/L$ evolution finding $\Delta \log M/L_{B}=(-0.46\pm0.10)z$, $\Delta \log M/L_{B}=(-0.52\pm0.07)z$, to $\Delta \log M/L_{B}=(-0.55\pm0.10)z$, respectively. We assess the potential contribution of the galaxies structural and stellar velocity dispersion evolution to the evolution of the FP zero-point and find it to be $\sim$6-35 % of the FP zero-point evolution. The rate of $M/L$ evolution is consistent with galaxies evolving passively. By using single stellar population models, we find an average age of $2.33^{+0.86}_{-0.51}$ Gyr for the $\log M_{\star}/M_{\odot}>11$ galaxies in our massive and virialized cluster at $z=1.39$, $1.59^{+1.40}_{-0.62}$ Gyr in a massive but not virialized cluster at $z=1.46$, and $1.20^{+1.03}_{-0.47}$ Gyr in a protocluster at $z=1.61$. After accounting for the difference in the age of the Universe between redshifts, the ages of the galaxies in the three overdensities are consistent within the errors, with possibly a weak suggestion that galaxies in the most evolved structure are older.

KW - galaxies: clusters: general

KW - galaxies: elliptical and lenticular, cD

KW - galaxies: evolution

KW - galaxies: formation

KW - galaxies: high-redshift

KW - galaxies: kinematics and dynamics

U2 - 10.3847/1538-4357/aa8368

DO - 10.3847/1538-4357/aa8368

M3 - Journal article

VL - 846

JO - The Astrophysical Journal

JF - The Astrophysical Journal

SN - 0004-637X

IS - 2

M1 - 120

ER -


text:
# Floating Tables

Tables are plotting on top of other content within the document that I am creating.

I've tried a series of commands to try to specifically position the tables, and place the tables at the bottom of the page but these do not change the placement.

I've tried:

[h] here, [h!] here, [b] bottom, [!b] bottom, [!bp] bottom page, [htbp], and [htp]

What command should I use to separate the tables and the figures so they display properly? Or possibly a different package that can handle the placement of objects in the floating environment?

This is a 2-column format document. Figure 1 is being plotted on top of Table 1. I believe Table 1 is too long, so it spills into Column 2. Ideally, I would like Table 1 to be positioned to the bottom of the page that it is being referenced on with the document content.

\documentclass[fleqn,usenatbib]{mnras}
\usepackage{graphicx}   % Including figure files
\usepackage{amssymb}    % Extra maths symbols
\usepackage{dblfloatfix}

% Figure_1
\begin{figure}
% To include a figure from a file named example.*
% Allowable file formats are eps or ps if compiling using latex
% or pdf, png, jpg if compiling using pdflatex
\includegraphics[width=\columnwidth]{Figure_1.png}
\caption{Absolute magnitude vs. semimajor axis for (1839) Ragazza, (2373) Immo, (2386) Nikonov, (2521) Heidi and (3860) Plovdiv. Asteroids belonging to the Gefion family from Nesvorny (2012) are depicted as gray circles. As a reference, asteroid (1272) Gefion is also included and depicted with a black circle. The location of the 5:2 mean motion resonance is represented by a vertical dashed line.}
\label{fig:example_figure}
\end{figure}

% Table 1
\begin{table}
\centering
\caption{Observational circumstances for the asteroids observed for this campaign.}
\label{tab:example_table}
\begin{tabular}{|lccccc|} % six columns, alignment for each
\hline
Asteroid Target & Observation Date UTC (GMT) & Solar Analog Star & Airmass & Phase Angle (degrees) & Heliocentric distance (AU)\\
\hline
(1839) Ragazza & 2014/11/24 17:00:00 & SAO 93936 & 1.031 & 21.6 & 2.551\\
(2373) Immo & 2014/09/23 23:00:00 & SAO 93936 & 1.345 & 23.6 & 2.505\\
(2386) Nikonov & 2015/01/17 23:00:00 & SAO 120107 & 1.087 & 17.0 & 3.162\\
(2521) Heidi & 2014/09/04 10:00:00 & SAO 75021 & 1.011 & 15.6 & 3.013\\
(3860) Plovdiv & 2015/09/22 17:00:00 & SAO 93936 & 1.322 & 22.8 & 2.384\\
\hline
\end{tabular}
\end{table}

\end{document}

• Welcome to TeX.SX! Please help us help you and add a minimal working example (MWE) that illustrates your problem. Reproducing the problem and finding out what the issue is will be much easier when we see compilable code, starting with \documentclass{...} and ending with \end{document}. – samcarter_is_at_topanswers.xyz Jul 14 '17 at 19:11
• If I've understood correctly, the behaviour you're describing is not default and is not caused by anything in the code you've shared. So, right now, we can only say that the problem is in the code you haven't shared, which may or may not be helpful. – cfr Jul 14 '17 at 19:45
• The series of commands that I found for adjustment/placement of the floating table did not move or adjust in any way. Ideally, I'd like the table to be displayed at the top or bottom of the page that it is referenced on. The problem I think lies in the floating environment that the table possess. I need to find a way to to adjust the table to be positioned either at the top or bottom of the page that it is referenced on. The MNRAS LaTeX template that I am using does indeed have a 2-column format. – Sonny_McGraw Jul 14 '17 at 20:05
• When the table is printed, it must be printing in Column 1, however the content in Column 2 prints right on top of the over-sized table from Column 1. Refined question would be: How to handle a wide table placement within a two column format? – Sonny_McGraw Jul 14 '17 at 20:15
• thank you for clarifying the question, your initial version didn't even mention that it was two column, or that you were getting over-full box messages that the tables were wider than the column, so was not answerable. – David Carlisle Jul 14 '17 at 21:27

The LATEX float placement commands [htbp] are intentionally disabled. Layout of figures and tables will be adjusted by the publisher during the production process, so authors should not concern themselves with placement to avoid disappointment and wasted effort.
Simply place the LATEX code close to where the figure or table is first mentioned in the text and leave exact placement to the publishers. By default a figure or table will occupy one column of the page. To produce a wider version which covers both columns, use the figure* or table* environment.


text:
Plotting likelihood function of independent variables [closed]

Given iid $$X_i\sim{\rm Exp}\left(\lambda\right)$$ for $$i=1,\ldots,n$$ and an observation $$x=\left(x_1,\ldots,x_n\right)$$, I want to plot the simultaneous density of $$\left(X_1,\ldots,X_n\right)$$ for $$\lambda\in(0,\infty)$$.

What I've got is this

#Define function
fun <- function(obs,lambda){
p <- 1
for (i in 1:10){
p <- p * dexp(obs[i],1/lambda)
}
return(p)
}
#Observation
x <- c(.08,.3,.3,.15,.5,.8,.15,.05,.5,1.2)
#Range of lambda to plot
lambdarng <- seq(0.1,1.9,0.01)
#Plot of likelihood function
plot(
lambdarng,
fun(x,lambdarng),
type='l'
)

which produces the following plot

The way that I have defined the function seems inefficient to me. $$Prod()$$ produces the wrong results given that $$x$$ and $$lambdarng$$ both are vectors.

Any suggestions in regards to making this more efficient would be of great appreciation.

closed as off-topic by whuber♦Feb 10 at 13:04

This question appears to be off-topic. The users who voted to close gave this specific reason:

• "This question appears to be off-topic because EITHER it is not about statistics, machine learning, data analysis, data mining, or data visualization, OR it focuses on programming, debugging, or performing routine operations within a statistical computing platform. If the latter, you could try the support links we maintain." – whuber
If this question can be reworded to fit the rules in the help center, please edit the question.

• Compare this solution: fun <- Vectorize(function(x, lambda) exp(sum(dexp(x, 1/lambda, log=TRUE))), "lambda"). For most statistical work you wouldn't even exponentiate the result: you would stay with the log likelihood. – whuber Feb 10 at 13:18


text:
# Find a sequence of continuous functions

Find a sequence of continuous functions $f_n:[0,1] \rightarrow \mathbb{R}$ with the properties:

1) $\limsup f_n(x)=1\;$ and $\;\liminf f_n(x)=0\;\;\forall x \in [0,1]$.

2) $\lim_{n \rightarrow \infty}\int_{[0,1]}f_n=\infty$.

In this question I don't want to find such a function in a closed form. Instead I want to construct it an describe it geometrically.

Can someone help me with a hint?

• For part 2 do you mean that $\lim_{n\to \infty} \int_{[0,1]} f_n =\infty$? – Matt Nov 30 '16 at 19:04
• yes indeed! i wil edit it better – Marios Gretsas Nov 30 '16 at 19:07
• This sounds like a great exam problem! Can you construct a single sequence of numbers $x_i$ with $\limsup x_n = 1$ and $\liminf x_n = 0$ as a way to get started? – John Hughes Nov 30 '16 at 20:00
• yes i already have constructed a sequence of functions with limsup 1 and liminf 0 and the limit of integrals is zero – Marios Gretsas Nov 30 '16 at 20:05
• i find a little difficulty in the case whre the integral diverges to infinity – Marios Gretsas Nov 30 '16 at 20:06

Here's a "geometric" idea: Choose a strictly increasing sequence $a_n$ in $(0,1)$ with $a_n\to 1.$ For each $n,$ put a triangle of height $n/(a_{n+1}- a_n)$ over the base $[a_n,a_{n+1}].$ That gives you $f_n$ on $[a_n,a_{n+1}];$ define $f_n = 0$ everywhere else. Then $f_n$ is continuous and $f_n\to$ pointwise on $[0,1],$ while $\int_0^1f_n = n/2 \to \infty.$ The sequence $f_1, f_2 + 1, f_3, f_4 + 1, \dots$ will then provide a solution.
I know you said you didn't want a closed form solution, but I can't help myself since it's pretty simple: Define $f_n(x) = n^3x^n(1-x).$ Then $f_n\to 0$ pointwise on $[0,1],$ and $\int_0^1 f_n \sim n \to \infty.$ As above, $f_1, f_2 + 1, f_3, f_4 + 1, \dots$ then gives a solution.


text:
# statsmodels.gam.smooth_basis.BSplines¶

class statsmodels.gam.smooth_basis.BSplines(x, df, degree, include_intercept=False, constraints=None, variable_names=None, knot_kwds=None)[source]

This creates and holds the B-Spline basis function for several components.

Parameters
xarray_like, 1-D or 2-D

underlying explanatory variable for smooth terms. If 2-dimensional, then observations should be in rows and explanatory variables in columns.

dfint

numer of basis functions or degrees of freedom

degreeint

degree of the spline

include_interceptbool

If False, then the basis functions are transformed so that they do not include a constant. This avoids perfect collinearity if a constant or several components are included in the model.

constraints

Constraints are used to transform the basis functions to satisfy those constraints. constraints = ‘center’ applies a linear transform to remove the constant and center the basis functions.

variable_names

The names for the underlying explanatory variables, x used in for creating the column and parameter names for the basis functions. If x is a pandas object, then the names will be taken from it.

knot_kwdsNone or list of dict

option for the knot selection. By default knots are selected in the same way as in patsy, however the number of knots is independent of keeping or removing the constant. Interior knot selection is based on quantiles of the data and is the same in patsy and mgcv. Boundary points are at the limits of the data range. The available options use with get_knots_bsplines are

• knots : None or array interior knots

• spacing : ‘quantile’ or ‘equal’

• lower_bound : None or float location of lower boundary knots, all boundary knots are at the same point

• upper_bound : None or float location of upper boundary knots, all boundary knots are at the same point

• all_knots : None or array If all knots are provided, then those will be taken as given and all other options will be ignored.

Notes

A constant in the spline basis function can be removed in two different ways. The first is by dropping one basis column and normalizing the remaining columns. This is obtained by the default include_intercept=False, constraints=None The second option is by using the centering transform which is a linear transformation of all basis functions. As a consequence of the transformation, the B-spline basis functions do not have locally bounded support anymore. This is obtained constraints='center'. In this case include_intercept will be automatically set to True to avoid dropping an additional column.

Attributes
smootherslist of univariate smooth component instances
basisdesign matrix, array of spline bases columns for all components
penalty_matriceslist of penalty matrices, one for each smooth term
dim_basisnumber of columns in the basis
k_variablesnumber of smooth components
col_namescreated names for the basis columns
 transform(x_new) create the spline basis for new observations


text:
# aliquot

## < a quantity that can be divided into another a whole number of time />

syn uses OS X’s natural language processing tools to tokenize and highlight text. Nice utility to add to my writing stack. It is used by Emacs wordsmith-mode. #emacs


text:
# The Wronskian and diff.equations

1. Aug 29, 2010

### Susanne217

Hi

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

I have differential equation

$$y'' + p(x)\cdot x' + q(x)y = 0$$ which have two solutions $$y_1(x)$$ and $$y_2(x)$$ where $$y_1(x) \neq 0$$

show that $$y_2(t) = y_1(t)\int_{t_0}^{t} \frac{1}{y_1(s)^2} e^{-\int_{t_0}^s p(r) dr} ds$$ is also a solution.

2. Relevant equations

I know that wronskian for this is defined

$$w(y_1,y_2)(t) = c \cdot e^{-\int p(t) dt}$$ according to Abels identity theorem.

3. The attempt at a solution

My question do I use this property of theorem and properties of the Wronskian to derive c?

Last edited: Aug 29, 2010
2. Aug 29, 2010

### Samuelb88

Susanne -

The solution specified for y2 is the general form of a second solution to second order differential equation when the roots to its characteristic equation are repeated. I am not sure what to do when you have functions as coefficients, but perhaps if you can show your second order equation can be reduced to a second order equation with constant coefficients (with repeated roots), then you may assume the solution y2 = F(t)*y1 (F a function to be determined). Twice differentiating y2 and substituting it back into your original second order equation, you should obtain a new equation in terms of F', and F''. Hence you may let g = F' and obtain a first order, separable equation. Solve for g, then back-substitute F' and integrate to solve for F. Finally, since y2 = F(t)*y1, and since F(t) is known, you should get the answer specified for y2. Hope this helps.

- Sam

3. Aug 29, 2010

### Susanne217

does this have any relation to reduction of order tecnique ?

4. Aug 29, 2010

### Samuelb88

Yes, I believe the name of the method I described above is reduction of order. Sorry, I forgot its name.

5. Aug 29, 2010

### Susanne217

Why this isn't in my Calculus book. I don't know :(

Found this is a different textbook, but thanks ;)

Found this note here:

http://en.wikipedia.org/wiki/Reduction_of_order

You seem to me more intelligent than me and therefore is the ansatz mentioned

$$y_2(x) = y_1(x) \cdot v(x)$$ can this be describe as linearcombination of first solution and the abtr function v(x)??


text:
# MATLAB: Do I get this error

rectangular empty matrix

I get this error in the third line
"Improper assignment with rectangular empty matrix."
When I run this code
handles = guidata(hObject);    for j = 1:1:length(handles.cycleList)        maxStrain(j) = max(handles.graphEpsilon(handles.newHighPoints(j)+1:handles.newHighPoints(j+1)));        minStrain(j) = min(handles.graphEpsilon(handles.newHighPoints(j)+1:handles.newHighPoints(j+1)));    end
The length of cycleList is 740. The length of handles.newHighPoints is 778. I read several other forums but could not figure it out. Why am I getting this error?

• My guess is that:
handles.newHighPoints(j)+1
is greater than:
handles.newHighPoints(j+1)
so the colon operator evaluates this as an empty vector (it will not decrement unless you tell it to), and the matrix evaluates as empty.
Consider:
v  = 2:1
evaluates to:
v =   Empty matrix: 1-by-0


text:
# Elimating parameters

## Homework Statement

Eliminate the parameters u and v to obtain a Cartesian equation, thus showing that the given vector equation represents a portion of the surface named. Also, compute the fundamental vector product dr/du x dr/dv in terms of u and v.

## Homework Equations

Ellipsoid
r(u,v) = asinucosvi + bsinusinvj + ccosuk

## The Attempt at a Solution

I can find the cross product easy enough(abcsinu((sinucosv/a)i+(sinusinv/b)j+(cosu/c)k), but how should I go about getting rid of the parameters?


text:
# Is this a valid consequence of Dini's Theorem?

I have an increasing sequence of continuous functions $\{f_n\}_{n \in \mathbb{N}}$ such that $f_n : \mathbb{R} \to \mathbb{R}$ that converges pointwise to a limit $f: \mathbb{R} \to \mathbb{R}$.

Dini's Theorem says that for any compact subset $K \subset \mathbb{R}$, we have that $f_n$ converges uniformly to $f$ and therefore $f$ is continuous on $K$.

Does this imply that $f$ is continuous on all of $\mathbb{R}$? Can't I just say that for any point $x \in \mathbb{R}$, I can find a compact set $K$ around $x$ such that $f$ is continuous on $K$ and therefore continuous around $x$?

• No! Dini's theorem does not say what you say it says! (Yes, it's true that if $f:\Bbb R\to\Bbb R$ and $f|_K$ is continuous for every compact $K$ then $f$ is continuous. This is because $\Bbb R$ is locally compact.) – David C. Ullrich Sep 3 '18 at 18:54

It is one of the assumptions of Dini's theorem that the limit function $f$ is continuous. You can't use Dini's theorem to show that a monotone limit of continuous functions is continuous, because that is not true.

Counterexample: $$f_n(x)=\begin{cases} 0 & x\le 0 \\ x^n & 0<x<1\\ 1 & x\ge 1 \end{cases}$$

• That's a neat example +1 – Alvin Lepik Sep 3 '18 at 18:53

Non-sequitur. We must assume $f$ is continuous, then it is guaranteed the convergence is uniform.


text:
# Open and Short Circuit questions

I am confused on the terms Open, Short, and Closed when talking about circuits. As far as I know:

• a) Open circuit means the wires are cut off so there will be no current flow, but there is voltage.
• b) Closed circuit means the wires are connected so there will be flow of current, but there is no voltage
• c) Short circuit also refers closed circuit.

Is my knowledge (a,b,c) about the question correct?

There is also another thing which confuses me:

• d) Voltage is the force that makes the current flow. How can there be current but no voltage or voltage but no current? (from formula: $V = I \cdot R$)

Please explain a, b, c and d so it won't bother me anymore if I am going to solve circuits..

For (a,b,c) that's more or less correct. In general, there doesn't have to be a voltage/current just because there is a short/open, there just can't be any voltage in a perfect short and there can't be any current in a perfect open.

Another way to re-word these two terms is that a short circuit has 0 resistance (R=0), and an open circuit has infinite resistance (R=infinity).

So in Ohm's law, $V = IR$.

If $R = 0$, then $V = 0$.

If $R = \infty$, then using some mathematical trickery:

$$I = \lim_{R\rightarrow \infty} \frac{V}{R} = 0$$

As far as the force analogy goes, if it's useful think about you pushing on a building. Just because you are applying a force doesn't mean the building is going anywhere. These type of analogies tend to break down when dealing with theoretical 0's and infinities, so I wouldn't rely too heavily on them but rather look at the mathematics.

• +1 for answering the later part of the question, and showing that Ohms law still applies. Questioner do the math. Draw a circuit V10 — r=1 — R=1 — and back to start then: repeat at least 6 times: Multiply the value of R by 10 and recalculate. Observe what happens as R gets big. Now do the same, but this time make R become smaller. – ctrl-alt-delor Feb 23 '14 at 21:41

simulate this circuit – Schematic created using CircuitLab

You are right about open circuit, the wires are disconnected.

In case of short circuit as well as closed circuit, the wires ARE connected but the difference is that in case of short circuit, the resistance between the connection is extremely low so very high current flows as per ohm's law, whereas in case of close circuit, the connection offers considerable resistance, hence no high current issue.

I may be wrong since I did not study this in English, but I see a major difference between b) and c). From a very practical point of view, a closed circuit is good, a short circuit is very bad !

A short circuit is, for instance, connecting a wire directly between the poles of a battery or power supply. Whereas a closed circuit is just a "normal" load between the poles. Oops (let me be careful here, I don't want to get sued or anything), don't actually, physically, do it at home (or anywhere else), the wire might melt, you might burn yourself, start a fire, cause the world to stop revolving, etc...

From $V = RI$ : in theory, for short circuit R=0 (this is never actually the case unless you got superconductors) so that I becomes "infinite". Actually again, your battery will deliver its max current, heat up and die quickly, your PSU will either do that also or shut its output down if sanely designed.

Regarding d), once again, this is the theory: as mentioned above, a wire does have a resistance so there is some voltage (potential) difference when current runs through it. Similarly, there can be leak currents that contradict the "voltage but no current flow".

I learned with hydraulics analogies, it was rather evocative, but that's a little too long to elaborate about here.

There are a few misconceptions in your question, and it might help you understand things if we clear those up. For a) and b), replace "there is" with "there may be". The way you have defined an "open circuit" means that there is effectively an open circuit between any two points in a circuit that are not connected together by an ideal wire. When there is not an ideal wire connecting two points in a circuit then it's possible that those two points will have a different voltage. So, removing and ideal wire from a circuit means that it becomes possible for the voltages at those two points to differ.

Your definition of a "closed circuit" is any two points connected by an ideal wire. By the definition of an ideal wire the voltage at those two points must be the same (the voltage difference must be zero). Current might flow through the wire, depending on where you connected it in the circuit.

For circuit analysis, it can be helpful to use a zero-ampere current source to represent an open circuit and a zero-volt voltage source to replace a short circuit.

The reason that Ohm's law doesn't apply here is that the closed circuit is created using an ideal wire, and Ohm's law only applies to resistors. The ideal wire, by definition, has no resistance.

When considering these circuit analysis concepts it's important to remember that we're talking about ideal circuit elements rather than real circuit elements.

A short is a current path with no resistance. All that is determined by what you are measuring across. The reason why you can read current and voltage across a battery is because batteries have internal resistance. Battery by itself is open. When you put your leads on battery, you complete or close the circuit. Shorts bypass the load straight to ground but is not a complete circuit, like circuit was shorted, you owe him some load. You give him the load and make it even, so the deals is now Closed.

Closed circuit is when everything is connected in the path to ground or reference.

An open is when there is NO current flow. You can have a voltage reading across an open but there is no current because there is no physical path.

Best advice is to take a PSPiCE class. There you learn to plot a circuit using coordinates.