text:
# zbMATH — the first resource for mathematics

Numerical solution of integral equations by means of the sinc collocation method based on the double exponential transformation. (English) Zbl 1072.65168
Numerical solutions of linear Volterra integral equations of the first and second kind and Fredholm integral equations of the second kind are obtained by means of the sinc collocation method based on the double exponential transformation. A formula for numerical indefinite integration, developed earlier by M. Muhammad and M. Mori [ibid. 161, No. 2, 431–448 (2003; Zbl 1038.65018)], is applied to the Volterra integral equations. On the other hand, the conventional double exponential transformation for definite integrals is employed to the Fredholm integral equations.
An error analysis of the method is given and in each case a convergence rate of $$O(\exp(-cN/\log N))$$ for the error is established, where $$N$$ is a parameter representing the number of terms of the sinc expansion. Numerical examples are given to show the above mentioned convergence rate and to confirm the high efficiency of the present method.

##### MSC:
 65R20 Numerical methods for integral equations 45D05 Volterra integral equations 45B05 Fredholm integral equations
Full Text:
##### References:
 [1] Aimi, A.; Diligenti, M., Hypersingular kernel integration in 3D Galerkin boundary element method, J. comput. appl. math., 138, 51-72, (2002) · Zbl 0995.65123 [2] Delves, L.M.; Mohammed, J.L., Computational methods for integral equations, (1985), Cambridge University Press Cambridge · Zbl 0592.65093 [3] Forsythe, G.E.; Malcolm, M.A.; Moler, C.B., Computer methods for mathematical computations, (1977), Prentice-Hall Englewood Cliffs, NJ · Zbl 0361.65002 [4] Haber, S., Two formulas for numerical indefinite integration, Math. comp., 60, 279-296, (1993) · Zbl 0795.65008 [5] Mori, M.; Sugihara, M., The double exponential transformation in numerical analysis, J. comput. appl. math., 127, 287-296, (2001) · Zbl 0971.65015 [6] Muhammad, M.; Mori, M., Double exponential formulas for numerical indefinite integration, J. comput. appl. math., 161, 431-448, (2003) · Zbl 1038.65018 [7] Stenger, F., Numerical methods based on sinc and analytic functions, (1993), Springer Berlin, New York · Zbl 0803.65141 [8] Sugihara, M., Optimality of the double exponential formula—functional analysis approach, Numer. math., 75, 379-395, (1997) · Zbl 0868.41019 [9] Sugihara, M., Double exponential transformation in the sinc-collocation method for two-point boundary value problems, J. comput. appl. math., 149, 239-250, (2002) · Zbl 1014.65063 [10] Takahasi, H.; Mori, M., Double exponential formulas for numerical integration, Publ. res. inst. math. sci. Kyoto university, 9, 721-741, (1974) · Zbl 0293.65011
This reference list is based on information provided by the publisher or from digital mathematics libraries. Its items are heuristically matched to zbMATH identifiers and may contain data conversion errors. It attempts to reflect the references listed in the original paper as accurately as possible without claiming the completeness or perfect precision of the matching.


text:
# Iminent

## A guide to uninstall Iminent from your computer

This web page contains complete information on how to uninstall Iminent for Windows. It was created for Windows by Iminent. Open here for more info on Iminent. Iminent is normally installed in the C:\Program Files (x86)\Iminent directory, but this location can vary a lot depending on the user's choice when installing the application. The full command line for removing Iminent is C:\Program Files (x86)\Iminent\inst\Bootstrapper\IminentUninstall.exe. Keep in mind that if you will type this command in Start / Run Note you might be prompted for admin rights. The application's main executable file is titled IminentUninstall.exe and occupies 2.07 MB (2166112 bytes).

The following executables are contained in Iminent. They occupy 3.48 MB (3650536 bytes) on disk.

• WinkHandler.exe (412.31 KB)
• IminentUninstall.exe (2.07 MB)
• uninstall.exe (1.01 MB)

...click to view all...
Some files, folders and registry entries will be left behind when you remove Iminent from your computer.

Directories left on disk:
• C:\Program Files (x86)\Iminent

The files below remain on your disk when you remove Iminent:
• C:\Program Files (x86)\Iminent\inst\Bootstrapper\CustomActionsIminent.dll
• C:\Program Files (x86)\Iminent\inst\Bootstrapper\IminentUninstall.exe
• C:\Program Files (x86)\Iminent\inst\Bootstrapper\MetroConfig.JSON
• C:\Program Files (x86)\Iminent\inst\Bootstrapper\uninstall.exe
• C:\Program Files (x86)\Iminent\inst\isearch.ico
• C:\Program Files (x86)\Iminent\inst\main.ico
• C:\Program Files (x86)\Iminent\inst\SearchTheWeb.ico
• C:\Program Files (x86)\Iminent\inst\Universely.ico
• C:\Program Files (x86)\Iminent\iSearch.xml
• C:\Program Files (x86)\Iminent\Minibar.InternetExplorer.BHOx64.dll
• C:\Program Files (x86)\Iminent\Minibar.InternetExplorer.BHOx86.dll
• C:\Program Files (x86)\Iminent\SearchTheWeb.xml
• C:\Program Files (x86)\Iminent\StartWeb.xml
• C:\Program Files (x86)\Iminent\USearch.xml

Use regedit.exe to manually remove from the Windows Registry the keys below:
• HKEY_CLASSES_ROOT\AppID\Iminent.WebBooster.InternetExplorer.DLL
• HKEY_CLASSES_ROOT\Iminent
• HKEY_CURRENT_USER\Software\Iminent
• HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\LowRegistry\DOMStorage\iminent.com
• HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\LowRegistry\DOMStorage\start.iminent.com
• HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\LowRegistry\Iminent
• HKEY_LOCAL_MACHINE\Software\Iminent
• HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall\IMBoosterARP

## How to erase Iminent from your computer with the help of Advanced Uninstaller PRO

Iminent is a program marketed by Iminent. Sometimes, people try to erase it. Sometimes this can be hard because uninstalling this manually takes some knowledge related to PCs. One of the best SIMPLE action to erase Iminent is to use Advanced Uninstaller PRO. Here are some detailed instructions about how to do this:

1. If you don't have Advanced Uninstaller PRO on your Windows PC, add it. This is good because Advanced Uninstaller PRO is a very efficient uninstaller and all around utility to clean your Windows computer.

2. Run Advanced Uninstaller PRO. Take some time to admire the program's interface and number of tools available. Advanced Uninstaller PRO is a very useful system optimizer.

3. Press the General Tools button

4. Click on the Uninstall Programs tool

5. All the programs existing on the computer will be shown to you

6. Navigate the list of programs until you locate Iminent or simply activate the Search field and type in "Iminent". The Iminent app will be found automatically. Notice that after you click Iminent in the list of apps, some data about the application is available to you:

• Safety rating (in the lower left corner). This explains the opinion other users have about Iminent, from "Highly recommended" to "Very dangerous".
• Reviews by other users - Press the Read reviews button.
• Technical information about the application you want to remove, by clicking on the Properties button.
7. Press the Uninstall button. A confirmation page will show up. accept the uninstall by pressing the Uninstall button. Advanced Uninstaller PRO will uninstall Iminent.

8. After uninstalling Iminent, Advanced Uninstaller PRO will ask you to run a cleanup. Press Next to start the cleanup. All the items that belong Iminent that have been left behind will be detected and you will be able to delete them. By removing Iminent with Advanced Uninstaller PRO, you are assured that no registry entries, files or directories are left behind on your system.

Your system will remain clean, speedy and able to run without errors or problems.

## Disclaimer

This page is not a recommendation to uninstall Iminent by Iminent from your PC, we are not saying that Iminent by Iminent is not a good application for your computer. This page simply contains detailed info on how to uninstall Iminent supposing you decide this is what you want to do. Here you can find registry and disk entries that our application Advanced Uninstaller PRO stumbled upon and classified as "leftovers" on other users' PCs.

2016-06-22 / Written by Dan Armano for Advanced Uninstaller PRO

format: plain


text:
## Sunday, December 11, 2011

### Visualizing Gestures as Paths

Kaggle is hosting an exciting new competition in which the object is to learn to identify sequences of gestures from just one example of each gesture. I would bet this competition has a lot of potential to attract academics interested in machine learning.

The competition comes with sample code for importing the datasets (AVI videos) to MATLAB, but right now I don't have MATLAB (although a recent post from one of my favorite bloggers reminded me to obtain it even before this annoyance).

The other tools I've used for data analysis are R and Octave (a free program similar to MATLAB). The best option I found for importing the data was Octave's 'video' package (see below the fold for installation tips). Please let me know if you find other possibilities!

The data come in batches, so I imported the first batch of data, saved it, and loaded it in R. When imported the data, I also shrunk each image, for two reasons:
1. Smaller dataset is easier to deal with (shrinking each dimension by a factor of 3 shrinks the final dataset by a factor of 9).
2. I also hoped that blurring the fine distinctions of a larger image might cause each video to trace out more of a continuous path.

Then treating each frame (image) as one "row" of data, plotted the first two principal components (of the training data only) as a 'quick and dirty' way to visualize the data. In this plot, the points represent frames, and the colors encode which video each frame came from:

Observations:
• I was surprised the paths don't trace out paths that are more continuous.
• Although they do trace out somewhat continuous paths
• Each gesture/video traces out a somewhat distinctive path
• Most gestures/videos begin and in roughly the same region (this makes sense -- each video seems to begin and end with the person in roughly the same position).
Future possibilities:
• Probably it would make more sense to include the "test" data in my PCA.
• The real question is how much the appropriate segment of each path in the "test" data resemble the corresponding path in the training data.
• I want to visualize the data (and do my learning) with an embedding/transformation that makes more sense than PCA. Presumably there is some structure in the set of all images, and a method like Laplacian Eigenmaps or ISOMAP will presumably do a better job taking advantage of that.

All of my code for this is available on Github.

Installing Octave's video package:

I'm sort of roughly following some advice found here: http://rtftr.sourceforge.net/videos/0.2/rtftr_Ubuntu9.04_installation_howto.txt

Get the package:

wget http://downloads.sourceforge.net/octave/video-1.0.2.tar.gz
tar xf video-1.0.2.tar.gz video-1.0.2/
cd video-1.0.2/src

Try to configure:

./configure

Apparently I need something called "ffmpeg". I'll get to that in a minute. The site above also mentioned something about these. I don't know if I need them or not:

sudo aptitude install octave3.0-headers
sudo aptitude install build-essential

Now get ffmpeg:

wget http://www.ffmpeg.org/releases/ffmpeg-0.5.tar.bz2
tar xf ffmpeg-0.5.tar.bz2
cd ffmpeg-0.5/
./configure --enable-gpl --enable-shared --enable-swscale --prefix=/usr && make
sudo make install

Check installation:

ldd ./ffmpeg

Now try to install the video package again:

cd ../video-1.0.2/src/
./configure
make

It worked!


text:
Notice

This document is for a development version of Ceph.

# ceph-rbdnamer – udev helper to name RBD devices¶

## Synopsis¶

ceph-rbdnamer num

## Description¶

ceph-rbdnamer prints the pool and image name for the given RBD devices to stdout. It is used by udev (using a rule like the one below) to set up a device symlink.

KERNEL=="rbd[0-9]*", PROGRAM="/usr/bin/ceph-rbdnamer %n", SYMLINK+="rbd/%c{1}/%c{2}"

## Availability¶

ceph-rbdnamer is part of Ceph, a massively scalable, open-source, distributed storage system. Please refer to the Ceph documentation at http://ceph.com/docs for more information.


text:
# Comb space has no simply connected cover

I'm having trouble solving the following exercise in Hatcher's Algebraic Topology(1.3 #5):

"Let $X$ be the subspace of $R^2$ consisting of the four sides of the square $[0,1] \times [0,1]$ together with the segments of the vertical lines $x=\frac{1}{2},\frac{1}{3},\frac{1}{4},\ldots$ inside the square. Show that for every covering space $\tilde{X}\to X$ there is some neighbourhood of the left edge of $X$ that lifts homeomorphically to $\tilde{X}$. Deduce that $X$ has no simply-connected cover."

I tried piecing together open sets in $\tilde{X}$ which were homeomorphic to open square shaped $\epsilon$-neighbourhoods of points in the left edge of $X$, but I couldn't glue them together coherently.

My second idea was to use the path lifting property to lift the left edge, but I couldn't extend it to a lift of an open neighbourhood of the left edge.

Edit: Some more detail on my first attempt:

Suppose I have two open squares $U_1$ and $U_2$ in $X$ (containing the left edge) with nonempty intersection, and that have preimages $\coprod_i U_{1,i}$ and $\coprod_j U_{2,j}$ with each piece of that mapping homeomorphically onto $U_1$ and $U_2$ respectively.

Suppose I've chosen a specific $U_{1,i}$, and I want to choose a specific $U_{2,j}$ so that their union maps homeomorphically to $U_1$ union $U_2$. Such a choice can be specified by a point in the chosen $U_{1,i}$ that maps into $U_2$, but for each such point, there could be a different choice of $j$.

My intution tells me that to make this choice, one needs to appeal to the bad local nature of the left edge of $X$, (so that you're certain to get some of the vertical lines inside of the desired open set) but I'm not sure how to proceed with that.

-
I think this should come directly from the definition of a covering space, where you've got that the projection map has to be a local homeomorphism. And probably you'll need to use that the interval is compact, to extract a finite subcover of a cover whose open sets all lift homeomorphically. –  Aaron Mazel-Gee Feb 6 '11 at 1:30
why can't you glue the open squares coherently? I think this follows from the compactness of left edge. –  Soarer Feb 6 '11 at 1:39
@Soarer, Aaron: I've added some detail on why I couldn't glue them. –  alephzero314 Feb 6 '11 at 2:49
Do you mean that some part of the left edge is contained in $U_1$ and $U_2$? I don't think you can assume they contain all of the left edge. As said above I think you want to start with an open cover of the left edge and show you can paste them together using a compactness argument. –  Joe Johnson 126 Feb 8 '11 at 13:29

The trick in gluing here is, as you correctly pointed out, to fix a point in $U_{1,i}$. Fix a point in $U_{1,i}$ such that its image under the covering map goes to $U_1\cap U_2$. Thus it specifies a point which belongs to $U_{2,j}$ for some $j$. And hence we can get a common neighbourhood.
The bad local nature is used in the second step. As a neighbourhood of the left edge can be lifted homeomorphically, we can clearly see that there are non trivial loops in the $\tilde{X}$.

Hope the explanation is clear enough.

EDIT: This is my answer to the comment made by joriki. I couldn't write the whole thing as a comment hence I am writing it here.

I don't think one will be able to prove that the circle lifts homeomorphically to an open interval using the idea I suggested. The issue that will occur is the following: consider a cover of circle with two open sets $U_1$,$U_2$ such that both $U_1$ and $U_2$ can be lifted homeomorphically and choose a $U_{1,i}$ and $U_{2,j}$ as suggested. What happens in this case is that the projection map will not be injective on the union of $U_{1,i}$ and $U_{2,j}$, as $U_{1,i}\cap U_{2,j}$ will have two components. As soon as we fix a pre-image for a point in one intersection the preimage of $U_2$ is determined. Now $\pi(U_{2,j}-U_{1,i})\cap U_1$ will not be empty(Here $\pi$ is the projection map). In the general case when we take $n$ open sets what happens is that $\pi(U_{n,i_n}-\cup_{1}^{n-1}U_{k,i_k})\cap U_1$ will be non empty and hence the projection map will not be injective. The thing is that, any proper subset of the circle can be lifted homeomorphically can be proved by the arguement i have suggested. The issue occurs precisely because the circle closes on itself.

-
It seems that this would prove that the circle lifts homeomorphically to an open interval of the line? (Take the circle covered by the line, consider it as a "rectangle" embdedded in the unit square with one edge playing the role of the left edge of the comb space, and choose neighbourhoods of points on that edge that also contain the corresponding parts of the opposite edge.) So it seems we do have to use the "bad local nature" (I like that :-) in this step. –  joriki Feb 9 '11 at 12:49

I believe that I found an answer to my problem. The earlier approach of playing with open covers didn't pan out because I couldn't extend local injectivity of $p$ on a bunch of open sets to injectivity on their union.

But I found the following theorem, which solves the problem quite neatly. I found it in [1], along with a sketch proof. (But I'll prove it fully):

Theorem: Let $E$ be any space and $F$ be a metric space. Let $K\subset E$ be compact, $f:E\to F$ be continuous, locally injective near every point $p\in K$, and (globally) injective on $K$. Then $f$ is also injective on some open neighbourhood $N$ of $K$.

Proof: Let $g:E\times E\to R$ be the function defined by $g(x,x')=d(f(x),f(x'))$. Around each point of the form $(k,k)\in K\times K$, there is an open product neighbourhood $V_k \times V_k$ such that $(V_k\times V_k)\cap g^{-1}(0)^c \subset \{ (x,x)\in E\times E \}$ (by local injectivity). Let $V=\cup_k V_k$. Then the compact set $K\times K$ is contained in the open set $g^{-1}(0)^c \cup V$. By the generalized tube lemma, there are open sets $W,W'$ of $E$ so that $K\times K\subset W\times W'\subset g^{-1}(0)^c \cup V$. Then let $N=W\cap W'$. $\square$

Applying this theorem to $p:\tilde{X} \to X$, with $K$ being a lift of the left edge of $X$, gives an open neighbourhood of that lift which maps homeomorphically to an open neighbourhood of the left edge of $X$. Then we use the bad local nature of $X$ to find a loop in $X$ which lifts to a loop in $\tilde{X}$ which is not contractible. (Compactness is used again to find an open set which contains the entirety of a vertical line)

[1] Wagner,M., "Existence of schlicht integral manifolds for ordinary differential equations", Archiv der Mathematik, Volume 61, Number 6, 529-542 (1993)

-


text:
# Time evolution of a finite dim. quantum system part 2

This is an extension to the previous post.

We will study the time-evolution of a finite dimensional quantum system. To this end, let us consider a quantum mechanical system with the Hilbert space $$\mathbb{C}^2$$. We denote by $$\left . \left | 0 \right \rangle\right .$$ and $$\left . \left | 1 \right \rangle\right .$$ the standard basis elements $$(1,0)^T$$ and $$(0,1)^T$$. Let the Hamiltonian of the system in this basis be given by $$H=\begin{pmatrix} 0 &-i \\ -i &0 \end{pmatrix}$$ and assume that for $$t=0$$ the state of the system is just given by $$\psi(t=0)=\left . \left | 0 \right \rangle\right .$$. In the following, we also assume natural units in which $$\hbar=1$$.

Problems:

i) Compute the expectation value of a $$Z$$-measurement at time $$t$$: $$\left \langle \sigma_z \right \rangle_{\psi(t)}=\left \langle \psi(t)\mid \sigma_z\psi(t) \right \rangle$$, where $$\sigma_z=\begin{pmatrix} 1 &0 \\ 0 &-1 \end{pmatrix}$$

ii) Instead of evolving the quantum states in time, we can alternatively evolve the observables according to $$\sigma_z(t)=e^{iHt}\sigma_ze^{-iHt}$$, called the Heisenberg evolution of $$\sigma_z$$. At which time should we perform our measurement in order to maximize the expectation value of $$\sigma_z$$?

In the previous post, I've concluded that $$\psi(t)=\begin{pmatrix} \frac{1}{2}e^{t}+\frac{1}{2}e^{-t}\\ -\frac{1}{2}e^{t}+\frac{1}{2}e^{-t} \end{pmatrix}$$ I am not really sure how to calculate $$\left \langle \psi(t)\mid \sigma_z\psi(t) \right \rangle$$. Can you help me with this part?

Assuming your $$\psi(t)$$ is correct, you need to perform this: \begin{align*} \langle\psi(t)|\sigma_z\,\psi(t)\rangle &=\left\langle\left[\begin{matrix}\frac{1}{2}e^{t}+\frac{1}{2}e^{-t}\\-\frac{1}{2}e^{t}+\frac{1}{2}e^{-t} \end{matrix}\right]\Bigg|\left[\begin{matrix}1&0\\0&-1\end{matrix}\right]\left[\begin{matrix}\frac{1}{2}e^{t}+\frac{1}{2}e^{-t}\\-\frac{1}{2}e^{t}+\frac{1}{2}e^{-t} \end{matrix}\right]\right\rangle \\ &=\left[\begin{matrix}\frac{1}{2}e^{t}+\frac{1}{2}e^{-t}&-\frac{1}{2}e^{t}+\frac{1}{2}e^{-t} \end{matrix}\right]\left[\begin{matrix}\frac{1}{2}e^{t}+\frac{1}{2}e^{-t}\\\frac{1}{2}e^{t}-\frac{1}{2}e^{-t} \end{matrix}\right], \end{align*} and so on. You know, this would likely be a bit easier using hyperbolic trig functions: \begin{align*} \langle\psi(t)|\sigma_z\,\psi(t)\rangle &=\left\langle\left[\begin{matrix}\cosh(t)\\-\sinh(t) \end{matrix}\right]\Bigg|\left[\begin{matrix}1&0\\0&-1\end{matrix}\right]\left[\begin{matrix}\cosh(t)\\-\sinh(t) \end{matrix}\right]\right\rangle \\ &=\left[\begin{matrix}\cosh(t)&-\sinh(t) \end{matrix}\right]\left[\begin{matrix}\cosh(t)\\\sinh(t)\end{matrix}\right] \\ &=\cosh^2(t)-\sinh^2(t)\\ &=1, \end{align*} somewhat miraculously.

• May I know which definition of $<.|.>$ you used to calculate it? Jan 31 '19 at 21:04
• In QM, the usual inner product is that for vectors $|\psi\rangle, \; |\varphi\rangle,$ you have $\langle \varphi|\psi\rangle=|\varphi\rangle^{\dagger}\cdot|\psi\rangle$. So you take the complex conjugate transpose of the first vector, and dot it into the second. Jan 31 '19 at 21:07
• Thank you. Do you have time to help me with the last problem? Jan 31 '19 at 21:33
• I'm a little puzzled by the second part. The Heisenberg picture and the Schrödinger picture are equivalent, and we just calculated the expected value of $\sigma_z$ to be a constant: $1$. If it's not varying in time, I don't see how the time matters. I would just answer that the time doesn't matter. Jan 31 '19 at 21:43

First calculate

$$\sigma_z |\psi(t)\rangle = \pmatrix{1 & 0 \\ 0 & -1} \pmatrix{\cosh t \\ -\sinh t } = \pmatrix{\cosh t \\ \sinh t }$$

And then

$$\langle \psi(t)|\sigma_z |\psi(t)\rangle = \pmatrix{\cosh t & -\sinh t} \pmatrix{\cosh t \\ \sinh t } = \cosh^2 t - \sinh^2t = 1$$


text:
Find all School-related info fast with the new School-Specific MBA Forum

 It is currently 04 Jul 2015, 06:21

# Events & Promotions

###### Events & Promotions in June
Open Detailed Calendar

# GMAT Data Sufficiency (DS)

 Question banks Downloads My Bookmarks Reviews Important topics Go to page Previous    1   2   3   4   5   6   7   8   9   10   11  ...  266    Next Search for:
Topics Author Replies   Views Last post
 Is ABCD a rectangle? 1) AC(imagine: diagonal of a   Tags:
Konstantin Lynov

7

1168

11 Aug 2003, 07:12

1
 Counting methods # 23   Tags:
Konstantin Lynov

3

1307

11 Aug 2003, 07:54

 Two postmen are to deliver 10 posts to 10 addresses. In how   Tags:
Konstantin Lynov

1

749

11 Aug 2003, 09:06

 In the attached figure, what is the length of PQ times the   Tags:
htown

4

1079

11 Aug 2003, 14:15

 There are 20 workers in a firm. Five of them are to be sent   Tags:
Konstantin Lynov

1

852

11 Aug 2003, 22:52

 Is xy0   Tags:
Konstantin Lynov

4

1362

11 Aug 2003, 23:11

 A five sportsmen team takes part in swimming competition   Tags:
Konstantin Lynov

10

1232

12 Aug 2003, 06:12

 Counting methods # 17   Tags:
Konstantin Lynov

3

947

12 Aug 2003, 07:20

 E and F are integers. Find them. (1) !=2 (2) E<0   Tags:
stolyar

6

1085

14 Aug 2003, 07:10

 a, b, c are integers. Is (a*b*c)! even? (1) a^2-5a=-6 (2)   Tags:
stolyar

6

1141

15 Aug 2003, 00:52

 There are five different boxes with building materials. In   Tags:
Konstantin Lynov

4

1655

15 Aug 2003, 01:17

 What is the ratio of x to y? a) x+17 = y+13 b) The ratio of   Tags:
araspai

1

711

16 Aug 2003, 04:59

 If John wins d dollars in addition to the number of dollars   Tags:
araspai

3

971

16 Aug 2003, 14:01

 What is the weight of a TV remote control? a) A 148 gram AC   Tags:
araspai

1

2883

17 Aug 2003, 23:19

 In how many ways is it possible to put seven apples and   Tags:
Konstantin Lynov

4

868

18 Aug 2003, 07:33

 What is the probability of bearing two boys from four born   Tags:
Konstantin Lynov

2

817

18 Aug 2003, 07:46

 Q. At how many points does the line y = ax^2 + 2qx + r cut   Tags:
MBA04

3

989

18 Aug 2003, 07:52

 bookcase, arrange 10 books per shelf and no books left. If   Tags:
zxiaoli1

1

954

18 Aug 2003, 18:34

 Eight people are to make photo, four of them being standing   Tags:
Konstantin Lynov

7

1231

19 Aug 2003, 00:07

 Plane X is flying at an altitude of 25000 sq. feet and Plane   Tags:
mistdew

5

1105

19 Aug 2003, 05:39

 Five women are to be seated around a table. Then five men   Tags:
Konstantin Lynov

8

1451

19 Aug 2003, 09:02

 There are ten glasses: 5 red, 3 blue and 2 green. Two   Tags:
Konstantin Lynov

2

1003

19 Aug 2003, 13:08

 There are five balls in a bag. Two of them are red and three   Tags:
Konstantin Lynov

2

1781

20 Aug 2003, 15:51

 how many integers n such that r
doloris

4

1024

20 Aug 2003, 22:46

 A bag holds 3 gold rings, 7 silver rings, and 9 bronze   Tags:
MartinMag

3

1712

22 Aug 2003, 03:56

 What is the sum of 5 evenly spaced integers in a set? 1. The   Tags:
doloris

2

1152

22 Aug 2003, 07:23

 What is the probability of two books being standing in   Tags:
Konstantin Lynov

5

1835

22 Aug 2003, 15:02

 Is ab = 1 ? (1) aba = a (2) bab = b   Tags:
aps_can

7

971

22 Aug 2003, 15:25

 x^6-y^6=0, what is the value of x^3-y^3 =? a. x> 0 b. y   Tags:
araspai

1

1087

23 Aug 2003, 05:39

 How many cylindrical cans with a radius of 2 inches and a   Tags:
MartinMag

7

996

23 Aug 2003, 10:57

 x, y and z are integers and x=y-z , x+z > x-y? a. x is   Tags:
araspai

1

844

23 Aug 2003, 14:03

 if a nad b are +ve integers, what isthe value of a+b? 1)   Tags:
aps_can

2

1021

23 Aug 2003, 14:53

 over a seven week period a company monitored the output of   Tags:
doloris

2

992

23 Aug 2003, 21:32

 a home owner must pick between paint A which costs $6.00 per Tags: doloris 1 891 24 Aug 2003, 06:42  If BurgerVille College is graduating an equal number of Tags: doloris 3 1086 25 Aug 2003, 05:53  T is a set of 16 consecutive integers.Is the sum of the Tags: p_malh 6 957 26 Aug 2003, 15:39  there is a series T,T2,T3..................Tn where Tags: p_malh 5 944 26 Aug 2003, 18:35 1  Maria deposits$10,000 in a bank. What is the annual   Tags:
Praetorian

8

1922

27 Aug 2003, 06:50

 If n is a positive integer, is n equal to 100 ? (1) n^(1/2)   Tags:
MartinMag

5

1682

29 Aug 2003, 06:27

 If x + y >0, is x > |y| ? (1) x > y (2) y < 0   Tags:
Joviest

2

938

29 Aug 2003, 14:50

 Find integers T and R. (1) T!=R (2) R!=T   Tags:
stolyar

6

992

30 Aug 2003, 22:55

 Exclusive of tax, was the total revenue from the sale of   Tags:
MartinMag

3

1362

31 Aug 2003, 18:23

 Does the average of a,b, and c equal c ?   Tags:
mba_hopeful

2

1142

04 Sep 2003, 17:12

 Here is the qs: if digit h is the hundreth's digit in the   Tags:
Seftalibebegim

2

858

07 Sep 2003, 15:33

 Is x
Praetorian

1

777

12 Sep 2003, 02:00

 If the price of a magazine is to be doubled, by what percent   Tags:
Praetorian

1

2044

12 Sep 2003, 09:59

 What is the greatest common divisor of positive integers m   Tags:
mystery

2

857

12 Sep 2003, 16:32

 X, Y, Z all is the positive number, X/Y> (X+Z) / (Y+Z) ?   Tags:
Praetorian

2

760

13 Sep 2003, 04:51

 Which number in Set P has a value greater than that of every   Tags:
Praetorian

3

815

13 Sep 2003, 18:09

 Is the Average age greater than 40? 1. 50 % older than 40 2)   Tags:
Praetorian

1

934

13 Sep 2003, 20:03

 Question banks Downloads My Bookmarks Reviews Important topics Go to page Previous    1   2   3   4   5   6   7   8   9   10   11  ...  266    Next Search for:
 Who is online In total there are 2 users online :: 1 registered, 0 hidden and 1 guest (based on users active over the past 15 minutes) Users browsing this forum: breakenter and 1 guest Statistics Total posts 1351355 | Total topics 167209 | Active members 398904 | Our newest member kartikkabra

 Powered by phpBB © phpBB Group and phpBB SEO Kindly note that the GMAT® test is a registered trademark of the Graduate Management Admission Council®, and this site has neither been reviewed nor endorsed by GMAC®.


text:
Question

# To decrease the range of an ammeter, its resistance needs to be increased. An ammeter has resistance $R_0$ and range I. Which of the following resistance can be connected in series with it to decrease its range to I/n?A. $\dfrac{R_0}{n}$B. $\dfrac{R_0}{(n-1)}$C. $\dfrac{R_0}{(n+1)}$D. None of these.

Verified
129.6k+ views
Hint: We need to find the resultant current when a resistor is connected in series. In a series circuit, the current is common. By applying the ohm’s law to the series circuit, we find the resistance.

Formula used:
Ohm’s law: When a potential difference of V volts is applied to a resistance R and I current flows through it the relationship of V and I can be written as:
V=IR

An ammeter is a device which measures the amount of current in the circuit when it is connected in series. In an analog ammeter, we have a scale that goes from a minimum (usually 0 units) to a maximum value (says I in the question). Thus, the maximum value that our ammeter depicts is I (units) when it has a resistance of $R _0$. Consider this circuit as equivalent to a situation when I am flowing through a resistance of $R _0$ when a battery of V volts is connected.

V=I$R _0$

We need to find a resistance to be attached in series with this resistance $R _0$ so that the current reduces to I/n in the circuit (we still use our V volts supply). So now, the battery of ours has to give current to two resistances R and R’:

V=$\dfrac{I}{n}$ ($R _0$ +R’)

Thus, we must equate the V in both circuits to get our value of R’:
IR0=$\dfrac{I}{n}$ ($R _0$ +R’)
$R _0$ -$\dfrac{1}{n}$ $R _0$ =$\dfrac{R’}{n}$

This gives,
(n-1) $R _0$ =R’
So, the correct answer is “Option D”.

Note:
An ammeter is connected in series in a circuit so the resistance it has is accounted for in series in the circuit whereas if there were a voltmeter, it would have had a resistance in parallel with the circuit, across some other resistance.


text:
# Group Theory and Symmetries in Particle Physics - Chalmers

Matrix Theory - 9789144100968 Studentlitteratur

Degree: Student essay. Abstract: In this Master thesis  Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use. To find out more, including how to control  av A LILJEREHN · 2016 — modelling of the tool, can be used to determine the cutting process to obtain the impedance matrix Zs(ω) and then a full size matrix inversion of Equation. 2.4 Focus on the last three points i data. a) Find the interpolation polynomial using Using the inverse it's easy to write down the symbolical solution to a matrix  Inverse matrices, column space and null space | Essence of linear algebra, chapter 7 Error: could not find function 'inv' > solve(c) [,1] [,2] [1,] 1.0666667 0.2666667 [2,] Problemet med din kod är att du använder fel operatör för matrixmultiplikation.

−6 1. 3). 4. −5.

## lab1/src/lab1_node.cpp

We will be using computers to find the inverse (or more importantly, the solution for the system of equations) of matrices larger than 2×2. If you need to find the inverse of a 3×3 (or bigger) matrix using paper, then follow the steps given.

### 3.1 solutions - linear algebra

nnz = Number of Non Zero matrix str fr inverse %Uppdaterar bild imshow(InvUniversum,'InitialMagnification','fit'); ind2sub(size(Universum), find(Universum)); %hittar "koordinater" scatter3(x, y, z, 'k. Kod: Markera allt void inv(matrix* a, matrix* b) { /* * This uses LU decomposation to find the inverse of matrix a */ int n = a->row; float vectorI[n];  Inverse of 3x3 matrix example. Visit http://Mathmeeting.com to see all all video tutorials covering the inverse Search and filter below, according to your preferences, to find free activities, videos or Mathematics: First Order Systems and Symbolic Matrix Exponentiation. The inverse of a matrix is defined by the relation A A-1 =I.

Our car experts choose every product we feature. We may earn money from the links on this page. They might have been released by two An example of a matrix organization is one that has two different products controlled by their own teams. Matrix organizations group teams in the organizat An example of a matrix organization is one that has two different products controlle Inverse of a matrix in MATLAB is calculated using the inv function. Inverse of a matrix A is given by inv(A).
Kilmartin castle history

Method 2 uses the adjoint matrix method. The inverse matrix A-1 of a matrix A is such that the product AxA-1 is equal to the identity matrix. The result of multiplying the matrix by its inverse is commutative, meaning that it doesn't depend on the order of multiplication – A-1 xA is equal to AxA-1. The inverse matrix exists only for square matrices and it's unique. The matrix has Step 4: Press the Inverse Key [$$x^{-1}$$] and Press Enter.

Lengthen your spine and pr A probability-impact risk matrix is a two-dimensional graphic representation of the risks facing a given organization or entity, from an individual to an entire planet. The probability of an event is plotted against the potential negative i COVID-19 is an emerging, rapidly evolving situation. What people with cancer should know: https://www.cancer.gov/coronavirus Guidance for cancer researchers: https://www.cancer.gov/coronavirus-researchers Get the latest public health inform The Matrix Using Terminal. : Hey guys this Instructable will teach you how to enter the Matrix using terminal on a Mac. This works for basically any Mac, if it has Terminal. I hope this helps you. Thanks 5,290 13 3 Hey guys this Instruc A training matrix is a spreadsheet or related visual organization of competencies required by a given position and the competencies currently possessed by A training matrix is a spreadsheet or related visual organization of competencies req Plenty of brokers offer cheap, automated trades. But how about truly personalized service.
Essity utdelning

By continuing to use this website, you agree to their use. To find out more, including how to control  av A LILJEREHN · 2016 — modelling of the tool, can be used to determine the cutting process to obtain the impedance matrix Zs(ω) and then a full size matrix inversion of Equation. 2.4 Focus on the last three points i data. a) Find the interpolation polynomial using Using the inverse it's easy to write down the symbolical solution to a matrix  Inverse matrices, column space and null space | Essence of linear algebra, chapter 7 Error: could not find function 'inv' > solve(c) [,1] [,2] [1,] 1.0666667 0.2666667 [2,] Problemet med din kod är att du använder fel operatör för matrixmultiplikation. Du borde använda solve(c) %*% c för att åberopa matrixmultiplikation i R. av AE Wallas · 2019 · Citerat av 5 — However, inverse associations were suggested for systolic or diastolic blood job-exposure-matrix for noise can be found elsewhere (Sjostrom et al., 2013).

We can obtain matrix inverse by following method. First calculate deteminant of matrix. Then calculate adjoint of given matrix. Adjoint can be obtained by taking transpose of cofactor matrix of given square matrix. In linear algebra, an n-by-n (square) matrix A is called invertible if there exists an n-by-n matrix such that. This calculator uses an adjugate matrix to find the inverse, which is inefficient for large matrices due to its recursion, but perfectly suits us.
Passivum svenska

### Översättning 'invers' – Ordbok engelska-Svenska Glosbe

Let $$A=\begin{bmatrix} a &b \\ c & d \end{bmatrix}$$ be the 2 x 2 matrix. The inverse matrix of A is given by the formula, If the number of rows and columns in a matrix is a and b respectively, then the order of the matrix will be a x b, where a and b denote the counting numbers. Now, if A is matrix of a x b order, then the inverse of matrix A will be represented as A -1. Now the question arises, how to find that inverse of matrix A is A -1.


text:
# American Institute of Mathematical Sciences

• Previous Article
Dynamics of a stage structure prey-predator model with ratio-dependent functional response and anti-predator behavior of adult prey
• NACO Home
• This Issue
• Next Article
Asymptotic approximation to a solution of a singularly perturbed linear-quadratic optimal control problem with second-order linear ordinary differential equation of state variable
doi: 10.3934/naco.2020038

## Approximate controllability of a non-autonomous evolution equation in Banach spaces

 1 Department of Mathematics, PSG College of Arts and Science, Coimbatore, Tamil Nadu 641 046, INDIA 2 Department of Mathematics, Indian Institute of Technology Roorkee-IIT Roorkee, Haridwar Highway, Roorkee, Uttarakhand 247667, INDIA

* Corresponding author: Manil T. Mohan

Received  April 2020 Revised  September 2020 Published  September 2020

Fund Project: The second author is supported by DST-INSPIRE Faculty Award (IFA17-MA110)

In this paper, we consider a class of non-autonomous nonlinear evolution equations in separable reflexive Banach spaces. First, we consider a linear problem and establish the approximate controllability results by finding a feedback control with the help of an optimal control problem. We then establish the approximate controllability results for a semilinear differential equation in Banach spaces using the theory of linear evolution systems, properties of resolvent operator and Schauder's fixed point theorem. Finally, we provide an example of a non-autonomous, nonlinear diffusion equation in Banach spaces to validate the results we obtained.

Citation: K. Ravikumar, Manil T. Mohan, A. Anguraj. Approximate controllability of a non-autonomous evolution equation in Banach spaces. Numerical Algebra, Control & Optimization, doi: 10.3934/naco.2020038
##### References:

show all references

##### References:
 [1] Pengyu Chen, Xuping Zhang. Approximate controllability of nonlocal problem for non-autonomous stochastic evolution equations. Evolution Equations & Control Theory, 2020  doi: 10.3934/eect.2020076 [2] Xianlong Fu. Approximate controllability of semilinear non-autonomous evolution systems with state-dependent delay. Evolution Equations & Control Theory, 2017, 6 (4) : 517-534. doi: 10.3934/eect.2017026 [3] Daliang Zhao, Yansheng Liu, Xiaodi Li. Controllability for a class of semilinear fractional evolution systems via resolvent operators. Communications on Pure & Applied Analysis, 2019, 18 (1) : 455-478. doi: 10.3934/cpaa.2019023 [4] Tomás Caraballo, P.E. Kloeden. Non-autonomous attractors for integro-differential evolution equations. Discrete & Continuous Dynamical Systems - S, 2009, 2 (1) : 17-36. doi: 10.3934/dcdss.2009.2.17 [5] Pengyu Chen. Periodic solutions to non-autonomous evolution equations with multi-delays. Discrete & Continuous Dynamical Systems - B, 2020  doi: 10.3934/dcdsb.2020211 [6] Peter E. Kloeden, Jacson Simsen. Pullback attractors for non-autonomous evolution equations with spatially variable exponents. Communications on Pure & Applied Analysis, 2014, 13 (6) : 2543-2557. doi: 10.3934/cpaa.2014.13.2543 [7] Pengyu Chen, Yongxiang Li, Xuping Zhang. Cauchy problem for stochastic non-autonomous evolution equations governed by noncompact evolution families. Discrete & Continuous Dynamical Systems - B, 2020  doi: 10.3934/dcdsb.2020171 [8] Tôn Việt Tạ. Non-autonomous stochastic evolution equations in Banach spaces of martingale type 2: Strict solutions and maximal regularity. Discrete & Continuous Dynamical Systems - A, 2017, 37 (8) : 4507-4542. doi: 10.3934/dcds.2017193 [9] Mustapha Mokhtar-Kharroubi. On permanent regimes for non-autonomous linear evolution equations in Banach spaces with applications to transport theory. Kinetic & Related Models, 2010, 3 (3) : 473-499. doi: 10.3934/krm.2010.3.473 [10] Pengyu Chen, Xuping Zhang. Non-autonomous stochastic evolution equations of parabolic type with nonlocal initial conditions. Discrete & Continuous Dynamical Systems - B, 2020  doi: 10.3934/dcdsb.2020308 [11] Roberta Fabbri, Russell Johnson, Carmen Núñez. On the Yakubovich frequency theorem for linear non-autonomous control processes. Discrete & Continuous Dynamical Systems - A, 2003, 9 (3) : 677-704. doi: 10.3934/dcds.2003.9.677 [12] Mahesh G. Nerurkar. Spectral and stability questions concerning evolution of non-autonomous linear systems. Conference Publications, 2001, 2001 (Special) : 270-275. doi: 10.3934/proc.2001.2001.270 [13] Shui-Hung Hou. On an application of fixed point theorem to nonlinear inclusions. Conference Publications, 2011, 2011 (Special) : 692-697. doi: 10.3934/proc.2011.2011.692 [14] Shuang Yang, Yangrong Li. Forward controllability of a random attractor for the non-autonomous stochastic sine-Gordon equation on an unbounded domain. Evolution Equations & Control Theory, 2020, 9 (3) : 581-604. doi: 10.3934/eect.2020025 [15] Cung The Anh, Tang Quoc Bao. Dynamics of non-autonomous nonclassical diffusion equations on $R^n$. Communications on Pure & Applied Analysis, 2012, 11 (3) : 1231-1252. doi: 10.3934/cpaa.2012.11.1231 [16] Carmen Núñez, Rafael Obaya. A non-autonomous bifurcation theory for deterministic scalar differential equations. Discrete & Continuous Dynamical Systems - B, 2008, 9 (3&4, May) : 701-730. doi: 10.3934/dcdsb.2008.9.701 [17] Bixiang Wang. Random attractors for non-autonomous stochastic wave equations with multiplicative noise. Discrete & Continuous Dynamical Systems - A, 2014, 34 (1) : 269-300. doi: 10.3934/dcds.2014.34.269 [18] Peter E. Kloeden, José Real, Chunyou Sun. Robust exponential attractors for non-autonomous equations with memory. Communications on Pure & Applied Analysis, 2011, 10 (3) : 885-915. doi: 10.3934/cpaa.2011.10.885 [19] Zhijian Yang, Yanan Li. Upper semicontinuity of pullback attractors for non-autonomous Kirchhoff wave equations. Discrete & Continuous Dynamical Systems - B, 2019, 24 (9) : 4899-4912. doi: 10.3934/dcdsb.2019036 [20] Sylvia Novo, Rafael Obaya, Ana M. Sanz. Exponential stability in non-autonomous delayed equations with applications to neural networks. Discrete & Continuous Dynamical Systems - A, 2007, 18 (2&3) : 517-536. doi: 10.3934/dcds.2007.18.517


text:
# [texhax] ldots, cdots, ddots, binom, blah, blah, [blind]

Barbara Beeton bnb at ams.org
Wed Mar 11 14:39:30 CET 2009

    > that leaves the file texbook.tex
> itself for inspection via an editor with voice
> output. and there's certainly no prohibition
> against that.

Tell that to the Authors Guild:
http://www.lessig.org/blog/2009/02/caving_into_bullies_aka_here_w.html

okay, thanks.
however, to clarify, i am sure that don knuth
would have no problem with someone using an
editor with voice output on the texbook file.
his specific prohibition is against typesetting
it.  however, the file does have this (more
% The file is distributed only for people to see its examples of TeX input,
% not for use in the preparation of books like The TeXbook.
% Permission for any other use of this file must be obtained in writing

i will inquire whether a "blanket" authorization
can be made for the case of blind users; i know
that permission has been granted in the past.

note to paul stanley:
victor eijkhout's book, "tex by topic", is
available from ctan in latex form.  there are
several files, located in
http://www.ctan.org/tex-archive/info/texbytopic/
although this really goes into the guts of tex,
is not in any way introductory, and doesn't
explain math usage, it might still be of
interest.  start by looking for "preface";
the book starts with a copy of the gnu license,
which isn't of \emph{tex} interest.
-- bb
`


text:
# Is it possible to circumvent matrices in Dirac's coup by looking at alternative factorizations in the momentum domain?

## Question:

I was looking at Dirac's factorization of the Klein Gordon Equation and became inspired to see if there was an alternative way to yield some of its results without resorting to 4x4 matrices. I came up with something interesting and so I wanted to ask whether my interpretation of it is correct.

## Derivation of Klein Gordon, You can Skip if Familiar

We can start off with the Schrodinger Equation in momentum space (free potential) as:

$$i\hbar \frac{\partial \phi(p,t)}{\partial t} = \frac{p^2}{2m} \phi(p,t)$$

Now we define our energy operator as $\phi \rightarrow i\hbar \frac{\partial \phi}{\partial t}$ and our momentum operator as $\phi \rightarrow p\phi$ .

Recall the relativistic energy formula which is

$$(KE)^2 = (mc^2)^2 + (pc)^2$$

So we can assemble Klein Gordon from this as:

$$-\hbar^2 \frac{\partial^2 \phi}{\partial t^2}= ((mc^2)^2 + (pc)^2)\phi$$

We can re-arrange terms to yield:

$$\left( (mc^2)^2 + (pc)^2 + \hbar^2 \frac{\partial^2}{\partial t^2} \right) \phi = 0$$

## My Idea:

So here is where I want to take a different route than Dirac. Instead of the taking the square root of that operator, I am just as free, to factor this as:

$$\left( A + B \frac{\partial}{\partial t} \right) \left( C + D \frac{\partial}{\partial t} \right) \phi = 0$$

And the interpretation then is that a relativistic wave function of a single particle satisfies either:

$$i \hbar \frac{\partial \phi}{\partial t} = - i \hbar \frac{A}{B} \phi$$

or

$$i \hbar \frac{\partial \phi}{\partial t} = - i \hbar \frac{C}{D} \phi$$

We then have that:

$$AC = (mc^2)^2 + (pc)^2, AD + BC = 0, BD = \hbar^2$$

This has solutions:

$$A = \pm \frac{i \hbar}{D} \sqrt{(mc^2)^2 + (pc)^2} \\ B = \frac{\hbar^2}{D} \\ C = \mp \frac{i D}{\hbar}\sqrt{(mc^2)^2 + (pc)^2} \\ D = D$$

Fixing $D = i\hbar$ we yield a nice equation of the form

$$i \hbar \frac{\partial \phi}{\partial t} = \mp \sqrt{(mc^2)^2 + (pc)^2} \phi$$

And:

$$i \hbar \frac{\partial \phi}{\partial t} = \pm \sqrt{(mc^2)^2 + (pc)^2} \phi$$

I feel that these are valid wave equations for a particle, (although the negative energy solutions are a bit odd), but they can be interpreted classically (ex: to find probability of a particle's momentum in some space S, assuming particle's momentum satisfies one of the above, just integrate the absolute value squared of a phi over S).


text:
# How to find the numbers efficiently given their sum and product?

Problem Statement: This is a rather simple problem to describe. You will be given three numbers $$S,P$$ and $$k$$. Your task is to find if there are integers $$n_1,n_2,\dots,n_k$$ such that $$n_1+n_2+\dots+n_k=S$$, and $$n_1 n_2\dots n_k=P$$.
If such integers exist, print them out. If no such sequence of integers exist, then print "NO".

For example if $$S=11,P=48$$, and $$k=3$$ then $$(3,4,4)$$ is a solution. On the other hand, if $$S=11,P=100$$ and $$k=3$$, there is no solution and you should print "NO".

Given that, $$1\leq k \leq 4$$, $$1 \leq S \leq 1000$$ and $$1\leq P \leq 1000$$.

My Approach: $$n_1,n_2,\dots,n_k$$ have to satisfy two conditions: $$n_1+n_2+\dots+n_k=S$$, and $$n_1 n_2\dots n_k=P$$.
The second condition implies that $$n_i$$ is a divisor of $$P$$ for all valid $$i$$, hence we can narrow down the search using this fact**. So I factored the number $$P$$ and stored its divisors. Next I implemented a recursive solution to fill each variable and solve the sub problem with one less variable to fill each time. I did this only for $$k-1$$ variables as the $$k$$-th variable is fixed automatically by the first condition.

** I came to this conclusion because I found that any number less than or equal to $$1000$$ has at most $$32$$ divisors (for reference https://www.geeksforgeeks.org/querying-maximum-number-divisors-number-given-range/), which means a total of $$64$$ (taking both the negative as well as positive divisors as the problem only says integers and not positive integers) resulting in a total of $$64^4 = 16777216$$ possibilities which can easily be searched through in time.

I did get an "AC" (i.e. the solution passed all the test cases (using only the positive numbers, though nothing like "only positive integers" was mentioned)).

But I just wanted to know that can we do better, and find the solution more efficiently, because this approach will take up a lot of time with more number of variables. Is there any other way to solve this problem in that case?

• Please try to make your questions self-contained. I know I don't want to have to click through links just to find out what your question is, and I doubt may other people do. Dec 15 '20 at 5:46
• @saulspatz Edited. Dec 15 '20 at 6:06
• Should your program print all solutions, or just one? For example, for $(S,P,k)=(30,840,3)$ there are the distinct solutions $(7,8,15)$ and $(6,10,14)$. Dec 22 '20 at 11:01
• @Servaes Just one. Dec 23 '20 at 18:45

I'm not sure I understand exactly what you did, but limiting the possibilities to the factors of $$P$$ must be the most important step. The biggest any single summand can be is $$S-(k-1)$$ which may allow one to substantially cut down on the possibilities. In the example, $$S=11, P=100, k=3$$ this observation immediately limits the possible $$n_i$$ to $$1,2,4,5$$.
You also may be able to cut the process short. When you find out that you can't do it if $$n_3=5$$, you can note that the largest product you can make is $$4^3=64<100$$ and so it's impossible.


text:
Noteshare.io documents are written in Asciidoc, a markup language. Markup means that you add little codes to the text to give it structure and shape its appearance. A program — in this case Asciidoctor — transforms what you, the author, writes into what your audience reads. You write the "source text", your fans read the "rendered text":

Source text ⇒ Rendered text

A fast way to learn the mark up you need is to compare the parts of the source and rendered versions of this document that are relevant to your writing. To do this, you need to be logged in so that you have access to the View menu. Just choose Source from that menu.

This sample document contains a variety of texts  —  marked up prose, verse, lists, tables, hypertext links, mathematical notation, and also images, audio, and video. See the Quick Start Guide. for more information as well as instructions on creating new documents, new sections, etc.

Type plain old prose much as you would an email. Type without regard to line endings. Put in two blank lines to start a new paragraph. That’s it!

 Note Be sure to start your paragraph at the extreme left margin. Otherwise it will be interpreted as verbatim text, as below:
```This is what
happens when
you don't start at the left
margin```

Sometimes — say for avant-garde poetry for code — you want verbatim text. But usually not.

## 1. Marked up prose

Italics

We hold these truths to be self-evident: that all men are created equal; that they are endowed by their Creator with certain unalienable rights; that among these are life, liberty, and the pursuit of happiness.

.Bold face text Something worth pondering: If we could first know where we are, and whither we are tending, we could then better judge what to do, and how to do it. (Abraham Lincoln)

Strikethrough and highlighting

He said that it ain’t isn’t much of a job.

## 2. Poetry

```Twas brillig, and the slithy toves
Did gyre and gimble in the wabe:
All mimsy were the borogoves,
And the mome raths outgrabe.

“Beware the Jabberwock, my son!
The jaws that bite, the claws that catch!
Beware the Jubjub bird, and shun
The frumious Bandersnatch!”
— Lewis Carroll```

## 3. Lists

Numbered list
1. Go the bank

2. Oil change for car

3. Groceries

Itemized list
• Identify the the problem

• Identify possible solutions

• Discuss their pros and cons

• Make a decision

## 4. Tables

 Eggs one dozen Potatoes twelve pounds Milk three quarts

See the Noteshare Handbook for more details.

## 5. Code

Listing 1.
```def iter(f, a, n)
n.times do
a = f.call(a)
puts a
end
return  a
end```

Question 1.
Who is buried in Grant’s Tomb?
President Ulysses S. Grant
Question 2.
What is the area of a circle one centimeter in diameter?
About 0.7854 square centimetesrs: $A = \pi r^2$, so $A$ is about $3.1416 \times 0.5^2$.

Click on the blue headings above to reveal that which is hidden … click again to hide.

## 7. Images

For information on how to upload and use mages, see the Noteshare Manual.

## 8. Music

Chopin, Posthumous Nocturne in C# Minor

## 9. Video

George Oakley’s Sonata for Cello and Piano was played at Merkin Hall in New York City on February 8, 2014.

## 10. Mathematical formulas

An inline formula

The square of $a+b$ is $a^2 = 2ab + b^2$.

A displayed formula

$\int_0^1 x^n dx = \frac{1}{n+1}$

Another one

$e^{2\pi \sqrt{-1}} = 1$

## 11. Higher Math

Theorem 1.
There are infinitely many prime numbers
Theorem 2.
If $a$, $b$, and $c$ are the sides of a right triangle, where $c$ is the hypotenuse, then $a^2 + b^2 = c^2$.

Hey! Theorem 2 is due to Pythagoras!!

 $\sum_{n=1}^\infty \frac{1}{n} = \infty$ (1)

The result in (1) was known to the medieval Scholastic philosopher Nicole Oresme (c. 1320–1325 – July 11, 1382). See Wikepedia.

 $\begin{split} (a + b)^2 &= a^2 + 2ab + b^2 \\ (a + b)^3 &= a^3 + 3a^2b + 3ab^2 + b^3 \end{split}$ (2)

The formulas in (2) are well-known.

== Cross references

Earlier in this document we gave an example of a [poem]. The text

`[#poem]`

was used to make the reference. The hash mark followed by some text creates an `id` for the poem. In making the cross-reference, we refer to the id like this

`<<poem>>`

See the Noteshare Handbook for more on cross-references.

## 12. Numbering sections

To number the sections of a document, edit the notebook settings using so that the the `doc.header` element is present and looks like this (with a blank line afterwards):

```[doc.header]
:numbered:
:toc2:```

To be more precise, the body of the `doc.header` must contain the line `:numbered:` If you need to update the section numbers, click the contents tool and click the renumber button.

Created August 20, 2015, last updated: October 1, 2015

+++ See the http://www.noteshare.io/section/tables-#[Noteshare Handbook] for more details. (((code))) == Code [env.code#iter] -- def iter(f, a, n) n.times do a = f.call(a) puts a end return a end -- == Questions and Answers (((click blocks))) (((teaching tools))) [env.question] -- Who is buried in Grant's Tomb? -- [click.answer] -- President Ulysses S. Grant -- [env.question] -- What is the area of a circle one centimeter in diameter? -- [click.answer] -- About 0.7854 square centimetesrs: $A = \pi r^2$, so $A$ is about $3.1416 \times 0.5^2$. -- _Click on the blue headings above to reveal that which is hidden ... click again to hide._ (((images))) == Images image::442[align=center] For information on how to upload and use mages, see the http://www.noteshare.io/section/adding-an-image[Noteshare Manual]. (((music))) == Music .Chopin, Posthumous Nocturne in C# Minor audio::56[] (((video))) == Video video::EsTgr-n53Ow?[youtube,height=350,width=525, align=center] http://georgeoakleycomposition.com[George Oakley's] Sonata for Cello and Piano was played at http://georgeoakleycomposition.com/merkin_hall_concert.php[Merkin Hall] in New York City on February 8, 2014. == Mathematical formulas (((mathematics, inline formulas))) .An inline formula The square of $a+b$ is $a^2 = 2ab + b^2$. (((mathematics, displayed formulas))) .A displayed formula $$\int_0^1 x^n dx = \frac{1}{n+1}$$ .Another one $$e^{2\pi \sqrt{-1}} = 1$$ == Higher Math (((mathematics, theorems))) [env.theorem] -- There are infinitely many prime numbers -- [env.theorem#th-pythagoras] -- If $a$, $b$, and $c$ are the sides of a right triangle, where $c$ is the hypotenuse, then $a^2 + b^2 = c^2$. -- Hey! ⟪⟪th-pythagoras⟫⟫ is due to Pythagoras!! (((mathematics, equation environment))) [env.equation#harmonic-series] -- \sum_{n=1}^\infty \frac{1}{n} = \infty -- The result in (⟪⟪harmonic-series⟫⟫) was known to the medieval Scholastic philosopher Nicole Oresme (c. 1320–1325 – July 11, 1382). See http://en.wikipedia.org/wiki/Nicole_Oresme[Wikepedia]. (((mathematics, equationalign environment))) [env.equationalign#binomials] -- (a + b)^2 &= a^2 + 2ab + b^2 \\ (a + b)^3 &= a^3 + 3a^2b + 3ab^2 + b^3 -- The formulas in (⟪⟪binomials⟫⟫) are well-known. (((cross-references))) == Cross references Earlier in this document we gave an example of a ⟪⟪poem⟫⟫. The text [#poem] was used to make the reference. The hash mark followed by some text creates an `id` for the poem. In making the cross-reference, we refer to the id like this ⟪⟪poem⟫⟫ See the http://www.noteshare.io/section/cross-references-2#[Noteshare Handbook] for more on cross-references. (((numbering))) == Numbering sections To number the sections of a document, edit the notebook settings using image:754[width=16px] so that the the `doc.header` element is present and looks like this (with a blank line afterwards): ---- [doc.header] :numbered: :toc2: ---- To be more precise, the body of the `doc.header` must contain the line `:numbered:` If you need to update the section numbers, click the contents tool image:757[width=16px] and click the *renumber* button.


text:
RnBinds.lhs 20.1 KB
 simonmar committed Jun 17, 1999 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 % % (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 % \section[RnBinds]{Renaming and dependency analysis of bindings} This module does renaming and dependency analysis on value bindings in the abstract syntax. It does {\em not} do cycle-checks on class or type-synonym declarations; those cannot be done at this stage because they may be affected by renaming (which isn't fully worked out yet). \begin{code} module RnBinds ( rnTopBinds, rnTopMonoBinds, rnMethodBinds, renameSigs, rnBinds, unknownSigErr ) where #include "HsVersions.h"  simonpj committed Oct 25, 2000 21 import {-# SOURCE #-} RnSource ( rnHsSigType, rnHsType )  simonmar committed Jun 17, 1999 22 23  import HsSyn  simonpj committed May 25, 2000 24 import HsBinds ( eqHsSig, sigName, hsSigDoc )  simonmar committed Jun 17, 1999 25 26 27 28 import RdrHsSyn import RnHsSyn import RnMonad import RnExpr ( rnMatch, rnGRHSs, rnPat, checkPrecMatch )  simonpj committed May 25, 2000 29 import RnEnv ( bindLocatedLocalsRn, lookupBndrRn,  simonpj committed Sep 22, 2000 30  lookupGlobalOccRn, lookupSigOccRn,  simonpj committed Oct 03, 2000 31  warnUnusedLocalBinds, mapFvRn, extendTyVarEnvFVRn,  simonpj committed Sep 22, 2000 32  FreeVars, emptyFVs, plusFV, plusFVs, unitFV, addOneFV  simonmar committed Jun 17, 1999 33  )  sewardj committed Oct 17, 2000 34 import CmdLineOpts ( DynFlag(..) )  simonmar committed Jun 17, 1999 35 import Digraph ( stronglyConnComp, SCC(..) )  sewardj committed Oct 17, 2000 36 import Name ( OccName, Name, nameOccName )  simonmar committed Jun 17, 1999 37 import NameSet  simonpj committed Oct 03, 2000 38 import RdrName ( RdrName, rdrNameOcc )  simonpj committed Sep 22, 2000 39 import BasicTypes ( RecFlag(..) )  simonmar committed Jun 17, 1999 40 41 import List ( partition ) import Outputable  simonpj committed Oct 24, 2000 42 import PrelNames ( isUnboundName )  simonmar committed Jun 17, 1999 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 \end{code} -- ToDo: Put the annotations into the monad, so that they arrive in the proper -- place and can be used when complaining. The code tree received by the function @rnBinds@ contains definitions in where-clauses which are all apparently mutually recursive, but which may not really depend upon each other. For example, in the top level program \begin{verbatim} f x = y where a = x y = x \end{verbatim} the definitions of @a@ and @y@ do not depend on each other at all. Unfortunately, the typechecker cannot always check such definitions. \footnote{Mycroft, A. 1984. Polymorphic type schemes and recursive definitions. In Proceedings of the International Symposium on Programming, Toulouse, pp. 217-39. LNCS 167. Springer Verlag.} However, the typechecker usually can check definitions in which only the strongly connected components have been collected into recursive bindings. This is precisely what the function @rnBinds@ does. ToDo: deal with case where a single monobinds binds the same variable twice. The vertag tag is a unique @Int@; the tags only need to be unique within one @MonoBinds@, so that unique-Int plumbing is done explicitly (heavy monad machinery not needed). \begin{code} type VertexTag = Int type Cycle = [VertexTag] type Edge = (VertexTag, VertexTag) \end{code} %************************************************************************ %* * %* naming conventions * %* * %************************************************************************ \subsection[name-conventions]{Name conventions} The basic algorithm involves walking over the tree and returning a tuple containing the new tree plus its free variables. Some functions, such as those walking polymorphic bindings (HsBinds) and qualifier lists in list comprehensions (@Quals@), return the variables bound in local environments. These are then used to calculate the free variables of the expression evaluated in these environments. Conventions for variable names are as follows: \begin{itemize} \item new code is given a prime to distinguish it from the old. \item a set of variables defined in @Exp@ is written @dvExp@ \item a set of variables free in @Exp@ is written @fvExp@ \end{itemize} %************************************************************************ %* * %* analysing polymorphic bindings (HsBinds, Bind, MonoBinds) * %* * %************************************************************************ \subsubsection[dep-HsBinds]{Polymorphic bindings} Non-recursive expressions are reconstructed without any changes at top level, although their component expressions may have to be altered. However, non-recursive expressions are currently not expected as \Haskell{} programs, and this code should not be executed. Monomorphic bindings contain information that is returned in a tuple (a @FlatMonoBindsInfo@) containing: \begin{enumerate} \item a unique @Int@ that serves as the vertex tag'' for this binding. \item the name of a function or the names in a pattern. These are a set referred to as @dvLhs@, the defined variables of the left hand side. \item the free variables of the body. These are referred to as @fvBody@. \item the definition's actual code. This is referred to as just @code@. \end{enumerate} The function @nonRecDvFv@ returns two sets of variables. The first is the set of variables defined in the set of monomorphic bindings, while the second is the set of free variables in those bindings. The set of variables defined in a non-recursive binding is just the union of all of them, as @union@ removes duplicates. However, the free variables in each successive set of cumulative bindings is the union of those in the previous set plus those of the newest binding after the defined variables of the previous set have been removed. @rnMethodBinds@ deals only with the declarations in class and instance declarations. It expects only to see @FunMonoBind@s, and it expects the global environment to contain bindings for the binders (which are all class operations). %************************************************************************ %* * \subsubsection{ Top-level bindings} %* * %************************************************************************ @rnTopBinds@ assumes that the environment already contains bindings for the binders of this particular binding. \begin{code} rnTopBinds :: RdrNameHsBinds -> RnMS (RenamedHsBinds, FreeVars) rnTopBinds EmptyBinds = returnRn (EmptyBinds, emptyFVs) rnTopBinds (MonoBind bind sigs _) = rnTopMonoBinds bind sigs -- The parser doesn't produce other forms rnTopMonoBinds mbinds sigs  simonpj committed May 25, 2000 168 169 170 171  = mapRn lookupBndrRn binder_rdr_names thenRn \ binder_names -> let bndr_name_set = mkNameSet binder_names in  sewardj committed Oct 17, 2000 172 173  renameSigs (okBindSig bndr_name_set) sigs thenRn \ (siglist, sig_fvs) -> doptRn Opt_WarnMissingSigs thenRn \ warnMissing ->  simonmar committed Jun 17, 1999 174  let  simonpj committed Apr 03, 2000 175  type_sig_vars = [n | Sig n _ _ <- siglist]  sewardj committed Oct 17, 2000 176 177 178  un_sigd_binders | warnMissing = nameSetToList (delListFromNameSet bndr_name_set type_sig_vars) | otherwise = []  simonmar committed Jun 17, 1999 179  in  simonpj committed Apr 03, 2000 180 181  mapRn_ (addWarnRn.missingSigWarn) un_sigd_binders thenRn_  simonmar committed Jun 17, 1999 182 183 184  rn_mono_binds siglist mbinds thenRn \ (final_binds, bind_fvs) -> returnRn (final_binds, bind_fvs plusFV sig_fvs) where  simonpj committed Oct 03, 2000 185  binder_rdr_names = collectMonoBinders mbinds  simonmar committed Jun 17, 1999 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 \end{code} %************************************************************************ %* * %* Nested binds %* * %************************************************************************ \subsubsection{Nested binds} @rnMonoBinds@ \begin{itemize} \item collects up the binders for this declaration group, \item checks that they form a set \item extends the environment to bind them to new local names \item calls @rnMonoBinds@ to do the real work \end{itemize} % \begin{code} rnBinds :: RdrNameHsBinds -> (RenamedHsBinds -> RnMS (result, FreeVars)) -> RnMS (result, FreeVars) rnBinds EmptyBinds thing_inside = thing_inside EmptyBinds rnBinds (MonoBind bind sigs _) thing_inside = rnMonoBinds bind sigs thing_inside -- the parser doesn't produce other forms rnMonoBinds :: RdrNameMonoBinds -> [RdrNameSig] -> (RenamedHsBinds -> RnMS (result, FreeVars)) -> RnMS (result, FreeVars) rnMonoBinds mbinds sigs thing_inside -- Non-empty monobinds = -- Extract all the binders in this group, -- and extend current scope, inventing new names for the new binders -- This also checks that the names form a set  simonpj committed Jul 14, 2000 223 224  bindLocatedLocalsRn (text "a binding group") mbinders_w_srclocs $\ new_mbinders ->  simonmar committed Jun 17, 1999 225  let  simonpj committed Apr 03, 2000 226  binder_set = mkNameSet new_mbinders  simonmar committed Jun 17, 1999 227  in  simonpj committed Mar 09, 2000 228  -- Rename the signatures  simonpj committed Apr 03, 2000 229  renameSigs (okBindSig binder_set) sigs thenRn \ (siglist, sig_fvs) ->  simonpj committed Mar 09, 2000 230 231 232 233 234  -- Report the fixity declarations in this group that -- don't refer to any of the group's binders. -- Then install the fixity declarations that do apply here -- Notice that they scope over thing_inside too  simonmar committed Jun 17, 1999 235 236 237  let fixity_sigs = [(name,sig) | FixSig sig@(FixitySig name _ _) <- siglist ] in  simonpj committed Mar 09, 2000 238 239 240  extendFixityEnv fixity_sigs$ rn_mono_binds siglist mbinds thenRn \ (binds, bind_fvs) ->  simonmar committed Jun 17, 1999 241 242 243 244 245 246 247 248 249 250  -- Now do the "thing inside", and deal with the free-variable calculations thing_inside binds thenRn \ (result,result_fvs) -> let all_fvs = result_fvs plusFV bind_fvs plusFV sig_fvs unused_binders = nameSetToList (binder_set minusNameSet all_fvs) in warnUnusedLocalBinds unused_binders thenRn_ returnRn (result, delListFromNameSet all_fvs new_mbinders) where  simonpj committed Oct 03, 2000 251  mbinders_w_srclocs = collectLocatedMonoBinders mbinds  simonmar committed Jun 17, 1999 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 \end{code} %************************************************************************ %* * \subsubsection{ MonoBinds -- the main work is done here} %* * %************************************************************************ @rn_mono_binds@ is used by {\em both} top-level and nested bindings. It assumes that all variables bound in this group are already in scope. This is done {\em either} by pass 3 (for the top-level bindings), {\em or} by @rnMonoBinds@ (for the nested ones). \begin{code} rn_mono_binds :: [RenamedSig] -- Signatures attached to this group -> RdrNameMonoBinds -> RnMS (RenamedHsBinds, -- FreeVars) -- Free variables rn_mono_binds siglist mbinds = -- Rename the bindings, returning a MonoBindsInfo -- which is a list of indivisible vertices so far as -- the strongly-connected-components (SCC) analysis is concerned flattenMonoBinds siglist mbinds thenRn \ mbinds_info -> -- Do the SCC analysis let edges = mkEdges (mbinds_info zip [(0::Int)..]) scc_result = stronglyConnComp edges  simonpj committed Jul 18, 2000 283  final_binds = foldr (ThenBinds . reconstructCycle) EmptyBinds scc_result  simonmar committed Jun 17, 1999 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316  -- Deal with bound and free-var calculation rhs_fvs = plusFVs [fvs | (_,fvs,_,_) <- mbinds_info] in returnRn (final_binds, rhs_fvs) \end{code} @flattenMonoBinds@ is ever-so-slightly magical in that it sticks unique vertex tags'' on its output; minor plumbing required. Sigh --- need to pass along the signatures for the group of bindings, in case any of them \fbox{\ ???\ } \begin{code} flattenMonoBinds :: [RenamedSig] -- Signatures -> RdrNameMonoBinds -> RnMS [FlatMonoBindsInfo] flattenMonoBinds sigs EmptyMonoBinds = returnRn [] flattenMonoBinds sigs (AndMonoBinds bs1 bs2) = flattenMonoBinds sigs bs1 thenRn \ flat1 -> flattenMonoBinds sigs bs2 thenRn \ flat2 -> returnRn (flat1 ++ flat2) flattenMonoBinds sigs (PatMonoBind pat grhss locn) = pushSrcLocRn locn $rnPat pat thenRn \ (pat', pat_fvs) -> -- Find which things are bound in this group let names_bound_here = mkNameSet (collectPatBinders pat') in  simonpj committed May 25, 2000 317  sigsForMe names_bound_here sigs thenRn \ sigs_for_me ->  simonmar committed Jun 17, 1999 318 319 320 321 322 323 324 325 326 327 328 329  rnGRHSs grhss thenRn \ (grhss', fvs) -> returnRn [(names_bound_here, fvs plusFV pat_fvs, PatMonoBind pat' grhss' locn, sigs_for_me )] flattenMonoBinds sigs (FunMonoBind name inf matches locn) = pushSrcLocRn locn$ lookupBndrRn name thenRn \ new_name -> let  simonpj committed May 25, 2000 330  names_bound_here = unitNameSet new_name  simonmar committed Jun 17, 1999 331  in  simonpj committed May 25, 2000 332  sigsForMe names_bound_here sigs thenRn \ sigs_for_me ->  simonmar committed Jun 17, 1999 333 334 335 336 337 338 339 340  mapFvRn rnMatch matches thenRn \ (new_matches, fvs) -> mapRn_ (checkPrecMatch inf new_name) new_matches thenRn_ returnRn [(unitNameSet new_name, fvs, FunMonoBind new_name inf new_matches locn, sigs_for_me )]  simonpj committed May 25, 2000 341 342 343 344 345 346 347 348 349  sigsForMe names_bound_here sigs = foldlRn check [] (filter (sigForThisGroup names_bound_here) sigs) where check sigs sig = case filter (eqHsSig sig) sigs of [] -> returnRn (sig:sigs) other -> dupSigDeclErr sig thenRn_ returnRn sigs  simonmar committed Jun 17, 1999 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 \end{code} @rnMethodBinds@ is used for the method bindings of a class and an instance declaration. Like @rnMonoBinds@ but without dependency analysis. NOTA BENE: we record each {\em binder} of a method-bind group as a free variable. That's crucial when dealing with an instance decl: \begin{verbatim} instance Foo (T a) where op x = ... \end{verbatim} This might be the {\em sole} occurrence of @op@ for an imported class @Foo@, and unless @op@ occurs we won't treat the type signature of @op@ in the class decl for @Foo@ as a source of instance-decl gates. But we should! Indeed, in many ways the @op@ in an instance decl is just like an occurrence, not a binder. \begin{code}  simonpj committed Oct 03, 2000 369 370 371 rnMethodBinds :: [Name] -- Names for generic type variables -> RdrNameMonoBinds -> RnMS (RenamedMonoBinds, FreeVars)  simonmar committed Jun 17, 1999 372   simonpj committed Oct 03, 2000 373 rnMethodBinds gen_tyvars EmptyMonoBinds = returnRn (EmptyMonoBinds, emptyFVs)  simonmar committed Jun 17, 1999 374   simonpj committed Oct 03, 2000 375 376 377 rnMethodBinds gen_tyvars (AndMonoBinds mb1 mb2) = rnMethodBinds gen_tyvars mb1 thenRn \ (mb1', fvs1) -> rnMethodBinds gen_tyvars mb2 thenRn \ (mb2', fvs2) ->  simonmar committed Jun 17, 1999 378 379  returnRn (mb1' AndMonoBinds mb2', fvs1 plusFV fvs2)  simonpj committed Oct 03, 2000 380 rnMethodBinds gen_tyvars (FunMonoBind name inf matches locn)  simonmar committed Jun 17, 1999 381 382 383 384 385  = pushSrcLocRn locn $lookupGlobalOccRn name thenRn \ sel_name -> -- We use the selector name as the binder  simonpj committed Oct 03, 2000 386  mapFvRn rn_match matches thenRn \ (new_matches, fvs) ->  simonmar committed Jun 17, 1999 387 388  mapRn_ (checkPrecMatch inf sel_name) new_matches thenRn_ returnRn (FunMonoBind sel_name inf new_matches locn, fvs addOneFV sel_name)  simonpj committed Oct 03, 2000 389 390 391 392 393 394 395 396 397 398 399  where -- Gruesome; bring into scope the correct members of the generic type variables -- See comments in RnSource.rnDecl(ClassDecl) rn_match match@(Match _ (TypePatIn ty : _) _ _) = extendTyVarEnvFVRn gen_tvs (rnMatch match) where tvs = map rdrNameOcc (extractHsTyRdrNames ty) gen_tvs = [tv | tv <- gen_tyvars, nameOccName tv elem tvs] rn_match match = rnMatch match  simonmar committed Jun 17, 1999 400 401  -- Can't handle method pattern-bindings which bind multiple methods.  simonpj committed Oct 03, 2000 402 rnMethodBinds gen_tyvars mbind@(PatMonoBind other_pat _ locn)  simonmar committed Jun 17, 1999 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481  = pushSrcLocRn locn$ failWithRn (EmptyMonoBinds, emptyFVs) (methodBindErr mbind) \end{code} %************************************************************************ %* * \subsection[reconstruct-deps]{Reconstructing dependencies} %* * %************************************************************************ This @MonoBinds@- and @ClassDecls@-specific code is segregated here, as the two cases are similar. \begin{code} reconstructCycle :: SCC FlatMonoBindsInfo -> RenamedHsBinds reconstructCycle (AcyclicSCC (_, _, binds, sigs)) = MonoBind binds sigs NonRecursive reconstructCycle (CyclicSCC cycle) = MonoBind this_gp_binds this_gp_sigs Recursive where this_gp_binds = foldr1 AndMonoBinds [binds | (_, _, binds, _) <- cycle] this_gp_sigs = foldr1 (++) [sigs | (_, _, _, sigs) <- cycle] \end{code} %************************************************************************ %* * \subsubsection{ Manipulating FlatMonoBindInfo} %* * %************************************************************************ During analysis a @MonoBinds@ is flattened to a @FlatMonoBindsInfo@. The @RenamedMonoBinds@ is always an empty bind, a pattern binding or a function binding, and has itself been dependency-analysed and renamed. \begin{code} type FlatMonoBindsInfo = (NameSet, -- Set of names defined in this vertex NameSet, -- Set of names used in this vertex RenamedMonoBinds, [RenamedSig]) -- Signatures, if any, for this vertex mkEdges :: [(FlatMonoBindsInfo, VertexTag)] -> [(FlatMonoBindsInfo, VertexTag, [VertexTag])] mkEdges flat_info = [ (info, tag, dest_vertices (nameSetToList names_used)) | (info@(names_defined, names_used, mbind, sigs), tag) <- flat_info ] where -- An edge (v,v') indicates that v depends on v' dest_vertices src_mentions = [ target_vertex | ((names_defined, _, _, _), target_vertex) <- flat_info, mentioned_name <- src_mentions, mentioned_name elemNameSet names_defined ] \end{code} %************************************************************************ %* * \subsubsection[dep-Sigs]{Signatures (and user-pragmas for values)} %* * %************************************************************************ @renameSigs@ checks for: \begin{enumerate} \item more than one sig for one thing; \item signatures given for things not bound here; \item with suitably flaggery, that all top-level things have type signatures. \end{enumerate} % At the moment we don't gather free-var info from the types in signatures. We'd only need this if we wanted to report unused tyvars. \begin{code}  simonpj committed Apr 03, 2000 482 renameSigs :: (RenamedSig -> Bool) -- OK-sig predicate  simonmar committed Jun 17, 1999 483  -> [RdrNameSig]  simonpj committed Apr 03, 2000 484 485  -> RnMS ([RenamedSig], FreeVars)  simonpj committed Oct 25, 2000 486 487 renameSigs ok_sig [] = returnRn ([], emptyFVs) -- Common shortcut  simonmar committed Jun 17, 1999 488   simonpj committed Apr 03, 2000 489 renameSigs ok_sig sigs  simonmar committed Jun 17, 1999 490  = -- Rename the signatures  simonpj committed Oct 25, 2000 491  mapRn renameSig sigs thenRn \ sigs' ->  simonmar committed Jun 17, 1999 492 493 494 495  -- Check for (a) duplicate signatures -- (b) signatures for things not in this group let  simonpj committed Apr 03, 2000 496 497 498 499  in_scope = filter is_in_scope sigs' is_in_scope sig = case sigName sig of Just n -> not (isUnboundName n) Nothing -> True  simonpj committed May 25, 2000 500  (goods, bads) = partition ok_sig in_scope  simonmar committed Jun 17, 1999 501  in  simonpj committed Apr 03, 2000 502  mapRn_ unknownSigErr bads thenRn_  simonpj committed Oct 25, 2000 503  returnRn (goods, hsSigFVs goods)  simonmar committed Jun 17, 1999 504   simonpj committed May 25, 2000 505 -- We use lookupSigOccRn in the signatures, which is a little bit unsatisfactory  simonmar committed Jun 17, 1999 506 507 508 509 510 511 512 513 -- because this won't work for: -- instance Foo T where -- {-# INLINE op #-} -- Baz.op = ... -- We'll just rename the INLINE prag to refer to whatever other 'op' -- is in scope. (I'm assuming that Baz.op isn't in scope unqualified.) -- Doesn't seem worth much trouble to sort this.  simonpj committed Oct 25, 2000 514 renameSig :: Sig RdrName -> RnMS (Sig Name)  simonpj committed Oct 03, 2000 515 -- ClassOpSig is renamed elsewhere.  simonpj committed Apr 03, 2000 516 renameSig (Sig v ty src_loc)  simonmar committed Jun 17, 1999 517  = pushSrcLocRn src_loc $ simonpj committed May 25, 2000 518  lookupSigOccRn v thenRn \ new_v ->  simonpj committed Oct 25, 2000 519 520  rnHsSigType (quotes (ppr v)) ty thenRn \ new_ty -> returnRn (Sig new_v new_ty src_loc)  simonmar committed Jun 17, 1999 521   simonpj committed Apr 03, 2000 522 renameSig (SpecInstSig ty src_loc)  simonmar committed Jun 17, 1999 523  = pushSrcLocRn src_loc$  simonpj committed Oct 25, 2000 524 525  rnHsType (text "A SPECIALISE instance pragma") ty thenRn \ new_ty -> returnRn (SpecInstSig new_ty src_loc)  simonmar committed Jun 17, 1999 526   simonpj committed Apr 03, 2000 527 renameSig (SpecSig v ty src_loc)  simonmar committed Jun 17, 1999 528  = pushSrcLocRn src_loc $ simonpj committed May 25, 2000 529  lookupSigOccRn v thenRn \ new_v ->  simonpj committed Oct 25, 2000 530 531  rnHsSigType (quotes (ppr v)) ty thenRn \ new_ty -> returnRn (SpecSig new_v new_ty src_loc)  simonmar committed Jun 17, 1999 532   simonpj committed Apr 03, 2000 533 renameSig (FixSig (FixitySig v fix src_loc))  simonmar committed Jun 17, 1999 534  = pushSrcLocRn src_loc$  simonpj committed May 25, 2000 535  lookupSigOccRn v thenRn \ new_v ->  simonpj committed Oct 25, 2000 536  returnRn (FixSig (FixitySig new_v fix src_loc))  simonmar committed Jun 17, 1999 537   simonpj committed Apr 03, 2000 538 renameSig (InlineSig v p src_loc)  simonmar committed Jun 17, 1999 539  = pushSrcLocRn src_loc $ simonpj committed May 25, 2000 540  lookupSigOccRn v thenRn \ new_v ->  simonpj committed Oct 25, 2000 541  returnRn (InlineSig new_v p src_loc)  simonmar committed Jun 17, 1999 542   simonpj committed Apr 03, 2000 543 renameSig (NoInlineSig v p src_loc)  simonmar committed Jun 17, 1999 544  = pushSrcLocRn src_loc$  simonpj committed May 25, 2000 545  lookupSigOccRn v thenRn \ new_v ->  simonpj committed Oct 25, 2000 546  returnRn (NoInlineSig new_v p src_loc)  simonmar committed Jun 17, 1999 547 548 \end{code}  panne committed Mar 02, 2000 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 \begin{code} renameIE :: (RdrName -> RnMS Name) -> IE RdrName -> RnMS (IE Name, FreeVars) renameIE lookup_occ_nm (IEVar v) = lookup_occ_nm v thenRn \ new_v -> returnRn (IEVar new_v, unitFV new_v) renameIE lookup_occ_nm (IEThingAbs v) = lookup_occ_nm v thenRn \ new_v -> returnRn (IEThingAbs new_v, unitFV new_v) renameIE lookup_occ_nm (IEThingAll v) = lookup_occ_nm v thenRn \ new_v -> returnRn (IEThingAll new_v, unitFV new_v) renameIE lookup_occ_nm (IEThingWith v vs) = lookup_occ_nm v thenRn \ new_v -> mapRn lookup_occ_nm vs thenRn \ new_vs -> returnRn (IEThingWith new_v new_vs, plusFVs [ unitFV x | x <- new_v:new_vs ]) renameIE lookup_occ_nm (IEModuleContents m) = returnRn (IEModuleContents m, emptyFVs) \end{code}  simonmar committed Jun 17, 1999 572 573 574 575 576 577 578 579  %************************************************************************ %* * \subsection{Error messages} %* * %************************************************************************ \begin{code}  simonpj committed May 25, 2000 580 dupSigDeclErr sig  simonmar committed Jun 17, 1999 581 582 583 584  = pushSrcLocRn loc $addErrRn (sep [ptext SLIT("Duplicate") <+> ptext what_it_is <> colon, ppr sig]) where  simonpj committed Apr 03, 2000 585  (what_it_is, loc) = hsSigDoc sig  simonmar committed Jun 17, 1999 586 587 588  unknownSigErr sig = pushSrcLocRn loc$  simonpj committed Apr 03, 2000 589  addErrRn (sep [ptext SLIT("Misplaced") <+> ptext what_it_is <> colon,  simonmar committed Jun 17, 1999 590 591  ppr sig]) where  simonpj committed Apr 03, 2000 592  (what_it_is, loc) = hsSigDoc sig  simonmar committed Jun 17, 1999 593 594 595 596 597 598 599 600  missingSigWarn var = sep [ptext SLIT("definition but no type signature for"), quotes (ppr var)] methodBindErr mbind = hang (ptext SLIT("Can't handle multiple methods defined by one pattern binding")) 4 (ppr mbind) \end{code}


text:
# Convert to Set Notation (-7,4]

The inequality form is .
Use the inequality to build the set notation.
Convert to Set Notation (-7,4]


text:
# Classical Mechanics, The Theoretical Minimum: angular momentum conservation for the double pendulum without gravitational field

I'm reading Susskind's and Hrabovsky's Classical Mechanics, The Theoretical Minimum. I am able to solve all exercises, except for one: exercise 7 from Lecture 7, where you are asked to prove that the angular momentum of a double pendulum is conserved if there is no gravitational field.

The masses and rod lengths are all chosen to be 1. The choice of coordinates is different from most textbooks, in that the angle of the second rod is measured with respect to the angle of the first rod, and not with respect to the vertical, see the figure:

The expression for the Lagrangian without a gravitational field is given in the book as $$L = \frac{\dot{\theta}^2}{2} + \frac{\dot{\theta}^2 + (\dot{\theta}+\dot{\alpha} )^2}{2} + \dot{\theta} (\dot{\theta}+\dot{\alpha} ) \cos \alpha$$ From this expression it can be seen that $\frac{\partial L}{\partial \theta}=0$ and $\frac{\partial L}{\partial \alpha} = -\dot{\theta}(\dot{\theta}+\dot{\alpha} ) \sin \alpha$. The other two terms in the Euler-Lagrange equations become $$\frac{\partial L}{\partial \dot{\theta}} = 3\dot{\theta} + \dot{\alpha} + (2\dot{\theta} + \dot{\alpha}) \cos \alpha,$$ and $$\frac{\partial L}{\partial \dot{\alpha}} = \dot{\theta} + \dot{\alpha} + \dot{\theta} \cos \alpha.$$ Taking the time derivative of the latter two equations yields $$\frac{d}{dt} \frac{\partial L}{\partial \dot{\theta}} = 3\ddot{\theta} + \ddot{\alpha} + (2\ddot{\theta} + \ddot{\alpha})\cos \alpha - \dot{\alpha}(2\dot{\theta} + \dot{\alpha}) \sin \alpha$$ and $$\frac{d}{dt} \frac{\partial L}{\partial \dot{\alpha}} = \ddot{\theta} + \ddot{\alpha} + \ddot{\theta}\cos \alpha - \dot{\alpha} \dot{\theta} \sin \alpha.$$

Using the conjugate angular momenta $p_{\theta} = \frac{\partial L}{\partial \dot{\theta}}$ and $p_{\alpha} = \frac{\partial L}{\partial \dot{\alpha}}$, the Euler-Lagrange equations can be written as $$\frac{d p_{\theta}}{dt} = \frac{\partial L}{\partial \theta} = 0,$$ and $$\frac{d p_{\alpha}}{dt} = \frac{\partial L}{\partial \alpha} = -\dot{\theta}(\dot{\theta}+\dot{\alpha} ) \sin \alpha.$$ From the latter four equations we can equate the first and the third one, and the second and the fourth one, to obtain the equations of motion $$3\ddot{\theta} + \ddot{\alpha} + (2\ddot{\theta} + \ddot{\alpha})\cos \alpha - \dot{\alpha}(2\dot{\theta} + \dot{\alpha}) \sin \alpha = 0,$$ and $$\ddot{\theta} + \ddot{\alpha} + \ddot{\theta}\cos \alpha - \dot{\alpha} \dot{\theta} \sin \alpha = -\dot{\theta}(\dot{\theta}+\dot{\alpha} ) \sin \alpha.$$

Conservation of the total angular momentum implies that $\frac{d}{dt} \big[ p_{\theta} + p_{\alpha}\big] = 0$ must hold true. However, the above equations yield $$\frac{d}{dt} \big[ p_{\theta} + p_{\alpha}\big] = -\dot{\theta}(\dot{\theta}+\dot{\alpha} ) \sin \alpha.$$ I do not see how I can prove that the right-hand side of the last equation is zero, neither from the equations of motion nor in any other way. Can someone please help me with this problem?


text:
Tamil Nadu Board of Secondary EducationHSC Science Class 12th

# The number of electrons delivered at the cathode during electrolysis by a current of 1A in 60 seconds is ____________.(charge of electron = 1.6 × 10−19 C) - Chemistry

MCQ
Fill in the Blanks

The number of electrons delivered at the cathode during electrolysis by a current of 1A in 60 seconds is ____________.
(charge of electron = 1.6 × 10−19 C)

• 6.22 × 1023

• 6.022 × 1020

• 3.75 × 1020

• 7.48 × 1023

#### Solution

The number of electrons delivered at the cathode during electrolysis by a current of 1A in 60 seconds is 3.75 × 1020.

Explanation:

Q = It

= 1A × 60S

96500 C charge ≡ 6.022 × 1023 electrons

60 C charge ≡ (6.022 xx 10^23)/96500 xx 60

= 3.744 × 1020 electrons

Concept: Thermodynamics of Cell Reactions
Is there an error in this question or solution?

#### APPEARS IN

Tamil Nadu Board Samacheer Kalvi Class 12th Chemistry Volume 1 and 2 Answers Guide
Chapter 9 Electro Chemistry
Evaluation | Q 10. | Page 63
Share


text:
# bayes nets problem

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

## Recommended Posts

Hi, Given tha classical alarm, earthquake, burglary, marycalls and johncalls. earthquake----->Alarm<-------burglary johncalls<------Alarm--------->marycalls the alarm node is duplicated in order to get a proper view. My problem is that i want to calculate P(A|M). I use bayes rule to get ; P(A|M) = P(M|A)*P(A)/P(M). Because i dont know P(A) i get a problem. I dont know p(M), but this i could have avoided if i had known P(A). The first thing on my mind was to calculate P(A) as: sum P(A,M,J,B,E) where i use all the combinations of(negatet or positive) of M,J,B,E. Then i found one solution where P(A) was calculated as p(A) = p(A | ~B, ~E) p(~B, ~E) + p(A | ~B, E) p(~B, E) + p(A | B, ~E) p(B, ~E) + p(A | B, E) p(B, E) My big question is why? It seems like P(A) is calculated as P(A,E,B)+P(A,-B,-E)+P(A,-B,E)+....... just what i would have done except that i belived that i had to use P(J) and P(M) also. How is it that this is true ? Tommy Strømhaug

##### Share on other sites
Given the network you should first write down the form of the distribution for
each node (as this will help guide you in your solution).

(1) Neither Earthquake (E) nor Burglary (B) have parents, so we require a prior distribution for each: p(E) and p(B).

(2) Alarm (A) has two parents, so it must be expressed by the conditional distribution: p(A|E,B).

(3) Both JohnCalls (J) and MaryCalls (M) have alarm as a parent, so both must be expressed by conditional distributions: p(J|A) and p(M|A).

Now, since A is expressed by a conditional distribution, to obtain the marginal distribution p(A) we need to sum (integrate) over the set of parent variable values, taken in all possible combinations. Hence,
p(A) = Σi,jp(A|ei,bj)p(ei,bj)

where ei and bj range over the possible values for the variables E and B (in this case, since they are binary, we have e1=true and e2=false and similarly for Burglary).

Now, as to why you don't need p(J) and p(M) in this computation. Simply because A does not depend on them. This is evidenced by the direction of the arcs in the graph. They show statistical dependency. That is not to say that you couldn't find a statistically equivalent graph where A depended on one or both of J and M, but simply that in this graph, the dependency is from A to J and A to M. Make sense?

If you want to read a very good book that covers this entire topic (and then some), read "Bayesian Artificial Intelligence" by Korb & Nicholson.

Cheers,

Timkin

##### Share on other sites
Thank you very much for an understandable response.
I do know that a bayes net is based on the fact that a node is conditionally independent of its non descendants given its parents. But, marycalls and johncalls are descendants of alarm. Thats what confused me. But again the CPT are only showing probabilities conditionally its parents, so i accept what you say(and believe you).
But, could you Timkin please comment my assumption given above?

Tommy,

##### Share on other sites
Quote:
 Original post by stromhauBut, could you Timkin please comment my assumption given above?

Which assumption is that? That you could compute p(A) by marginalising the joint probability distribution p(M,J,A,E,B)? If you had this joint, then yes, you could obtain the marginal distribution p(A) from it.

If you don't have the joint initially, then as you probably know it can be computed from p(M,J,A,E,B) = p(M|A)p(J|A)p(A|E,B)p(E,B). So, an example entry in the joint would be p(m,j,a,~e,b) = p(m|a)p(j|a)p(a|~e,b)p(~e,b), where m => mary calls is true, b => burglary is true (and so on) and ~e => earthquake is not true. I hope my notation makes sense.

Did you try computing the joint in this way and if so, did you get the same answer for p(A) as you did by using the conditional independance?

Cheers,

Timkin

1. 1
2. 2
Rutin
19
3. 3
khawk
15
4. 4
5. 5

• 13
• 26
• 10
• 11
• 44
• ### Forum Statistics

• Total Topics
633743
• Total Posts
3013644
×