text:
Foto: Martina Nolte/Lizenz: Creative Commons CC-by-sa-3.0 de

# Professor of Economics

I am a macroeconomist interested in asset pricing, monetary policy and fiscal policy. My research primarily focuses on economic theory and econometrics at the intersection of macroeconomics, sovereign debt and financial markets with a particular focus on the term structure of interest rate.

## Research

Working Papers
• Resurrecting the New Keynesian Model: (Un)conventional Policy and the Taylor rule
CESifo Working Paper Series No. 6925 (2020). Link
• Estimation of Heterogeneous Agent Models: A Likelihood Approach
with Juan Carlos Parra-Alvarez and Mu-Chun Wang
CESifo Working Paper Series (2020). Link
• On the Estimation of the Volatility-Growth Link
with Andrey Launov and Klaus Wälde
CREATES Research Paper 2012-21 (2019). Link
• Delays in Public Goods
with Santanu Chatterjee and Dennis Wesselbaum
CESifo Working Paper Series No. 6341 (2017). Link
• Measuring Convergence using Dynamic Equilibrium Models: Evidence from Chinese Provinces
with Lei Pan and Michel van der Wel
CREATES Research Paper (2012). Link
• Solving the New Keynesian Model in Continuous Time
with Jesús Fernández-Villaverde and Juan F. Rubio-Ramírez
Unpublished Manuscript, Federal Reserve Bank of Atlanta (2012).
Publications
• Risk Matters: Breaking Certainty Equivalence in Linear Approximations
with Juan Carlos Parra-Alvarez and Hamza Polattimur
Journal of Economic Dynamics and Control (2021): accepted for publication. Link
• Peso Problems in the Estimation of the C-CAPM
with Juan Carlos Parra-Alvarez and Andreas Schrimpf
Quantitative Economics (2021): accepted for publication. Link
• Estimating Dynamic Equilibrium Models using Mixed Frequency Macro and Financial Data
with Bent Jesper Christensen and Michel van der Wel
Journal of Econometrics 194 (2016): S. 116–137. Link
• Numerical Solution of Dynamic Equilibrium Models under Poisson Uncertainty
with Timo Trimborn
Journal of Economic Dynamics and Control 37 (2013): S. 2606-2662. Link
• Explaining Output Volatility: The Case of Taxation
Journal of Public Economics 95 (2011): S. 1589-1606. Link
• On the Link between Volatility and Growth
with Klaus Wälde
Journal of Economic Growth 16 (2011): S. 285-308. Link
• Risk Premia in General Equilibrium
Journal of Economic Dynamics and Control 35 (2011): S. 1557-1576. Link
• Structural Estimation of Jump-Diffusion Processes in Macroeconomics
Journal of Econometrics 153 (2009): S. 196-210. Link

## Research

Working Papers
• Resurrecting the New Keynesian Model: (Un)conventional Policy and the Taylor rule
CESifo Working Paper Series No. 6925 (2020).
Abstract

This paper explores the ability of the New Keynesian (NK) model to explain the recent periods of quiet and stable inflation at near-zero nominal interest rates. We show that temporary and permanent shocks to the natural rate (and inflation) are sufficient for the ability of the simple NK model to explain the recent facts. Based on the identified shocks from a novel approach, we show that the model can replicate key macroeconomic variables in accordance with the term structure of interest rates. We find that the term structure helps to identify permanent shocks. Our analysis is restricted to an active role of monetary policy and the traditional regions of (local) determinacy. We also show that capturing highly nonlinear dynamics can be useful to generate a prolonged period of near-zero interest rates as a policy choice.

• Estimation of Heterogeneous Agent Models: A Likelihood Approach
with Juan Carlos Parra-Alvarez and Mu-Chun Wang
CESifo Working Paper Series No. 6717 (2020).
Abstract

We study the statistical properties of heterogeneous agent models. Using a Bewley-Hugget- Aiyagari model we compute the density function of wealth and income and use it for likelihood inference. We study the finite sample properties of the maximum likelihood estimator (MLE) using Monte Carlo experiments on artificial cross-sections of wealth and income. We propose to use the Kullback-Leibler divergence to investigate identification problems that may affect inference. Our results suggest that the unrestricted MLE leads to considerable biases of some parameters. Calibrating weakly identified parameters allows to pin down the other unidentified parameter without compromising the estimation of the remaining parameters. We illustrate our approach by estimating the model for the U.S. economy using wealth and income data from the Survey of Consumer Finances.

• On the Estimation of the Volatility-Growth Link
with Andrey Launov and Klaus Wälde
CREATES Research Paper 2012-21 (2019).
Abstract

It is common practice to estimate the volatility-growth link by specifying a growth equation such that the variance of the error term appears as an explanatory variable. Hardly any of existing applications of this framework includes exogenous controls in the variance equation. We show that the absence of relevant explanatory variables in the variance equation is not innocuous, leading to an omitted variable problem with an biased and inconsistent estimate of the volatility-growth link. Our simulations suggest that this effect is large and should be addressed in the empirical work. Once the appropriate controls are included consistency is restored.

• Delays in Public Goods
with Santanu Chatterjee and Dennis Wesselbaum
CESifo Working Paper Series No. 6341 (2017).
Abstract

In this paper, we analyze the consequences of delays and cost overruns typically associated with the provision of public infrastructure in the context of a growing economy. Our results indicate that uncertainty about the arrival of public capital can more than offset its positive spillovers for private-sector productivity. In a decentralized economy, unanticipated delays in the provision of public capital generate too much consumption and too little private investment relative to the first-best optimum. The characterization of the first-best optimum is also affected: facing delays in the arrival of public goods, a social planner allocates more resources to private investment and less to consumption relative to the first-best outcome in the canonical model (without delays). The presence of delays also lowers equilibrium growth, and leads to a diverging growth path relative to that implied by the canonical model. This suggests that delays in public capital provision may be a potential determinant of cross-country differences in income and economic growth.

• Measuring Convergence using Dynamic Equilibrium Models: Evidence from Chinese Provinces
with Lei Pan and Michel van der Wel
CREATES Research Paper (2012).
Abstract

We propose a model to study economic convergence in the tradition of neoclassical growth theory. We employ a novel stochastic set-up of the Solow (1956) model with shocks to both capital and labor. Our novel approach identifies the speed of convergence directly from estimating the parameters which determine equilibrium dynamics. The inference on the structural parameters is done using a maximum-likelihood approach. We estimate our model using growth and population data for China’s provinces from 1980 to 2009. We report heterogeneity in the speed of convergence both across provinces and time. The Eastern provinces show a higher tendency of convergence, while there is no evidence of convergence for the Central and Western provinces. We find empirical evidence that the speed of convergence decreases over time for most provinces.

• Solving the New Keynesian Model in Continuous Time
with Jesús Fernández-Villaverde and Juan F. Rubio-Ramírez
Unpublished Manuscript, Federal Reserve Bank of Atlanta (2012).
Abstract

We show how to formulate and solve a New Keynesian model in continuous time. In our economy, monopolistic firms engage in infrequent price setting ́a la Calvo. We introduce shocks to preferences, to factor productivity, to monetary policy and to government expenditure, and show how the equilibrium system can be written in terms of 8 state variables. Our nonlinear and global numerical solution method allows us to compute equilibrium dynamics and impulse response functions in the time space, the collocation method based on Chebychev polynomials is used to compute the recursive-competitive equilibrium based on the continuous-time HJB equation in the policy function space. We illustrate advantages of continuous time by studying the effects on the zero lower bound of interest rates.

Publications
• Risk Matters: Breaking Certainty Equivalence in Linear Approximations
with Juan Carlos Parra-Alvarez and Hamza Polattimur
Journal of Economic Dynamics and Control (2021): accepted for publication.
Abstract

In this paper we use the property that certainty equivalence, as implied by a first-order approximation to the solution of stochastic discrete-time models, breaks in its equivalent continuous-time version. We study the extent to which a first- order approximated solution built by perturbation methods accounts for risk. We show that risk matters economically in a real business cycle (RBC) model with habit formation, and capital adjustment costs and that neglecting risk leads to substantial pricing errors. A first-order approximation in continuous time reduces pricing errors by 90 percent relative to the certainty equivalent linear solution.

• Peso Problems in the Estimation of the C-CAPM
with Juan Carlos Parra-Alvarez and Andreas Schrimpf
Quantitative Economics (2021): accepted for publication.
Abstract

This paper shows that the consumption-based capital asset pricing model (C-CAPM) with low-probability disaster risk rationalizes pricing errors. We find that implausible estimates of risk aversion and time preference are not puzzling if market participants expect a future catastrophic change in fundamentals, which just happens not to occur in the sample (a ‘peso problem’). A bias in structural parameter estimates emerges as a result of pricing errors in quiet times. While the bias essentially removes the pricing error in the simple models when risk-free rates are constant, time-variation may also generate large and persistent estimated pricing errors in simulated data. We also show analytically how the problem of biased estimates can be avoided in empirical research by resolving the misspecification in moment conditions.

• Estimating Dynamic Equilibrium Models using Mixed Frequency Macro and Financial Data
with Bent Jesper Christensen and Michel van der Wel
Journal of Econometrics 194 (2016): S. 116–137.
Abstract

We provide a framework for inference in dynamic equilibrium models including financial market data at daily frequency, along with macro series at standard lower frequency. Our formulation of the macro-finance model in continuous time conveniently accounts for the difference in observation frequency. We suggest the use of martingale estimating functions (MEF) to infer the structural parameters of the model directly through a nonlinear scheme. This method is compared to regression-based methods and the generalized method of moments (GMM). We illustrate our approaches by estimating various versions of the AK-Vasicek model with mean-reverting interest rates. We provide asymptotic theory and Monte Carlo evidence on the small sample behavior of the estimators and report empirical estimates using 30 years of U.S. macro and financial data.

• Numerical Solution of Dynamic Equilibrium Models under Poisson Uncertainty
with Timo Trimborn
Journal of Economic Dynamics and Control 37 (2013): S. 2606-2662.
Abstract

We propose a simple and powerful numerical algorithm to compute the transition process in continuous-time dynamic equilibrium models with rare events. In this paper we transform the dynamic system of stochastic differential equations into a system of functional differential equations of the retarded type. We apply the Waveform Relaxation algorithm, i.e., we provide a guess of the policy function and solve the resulting system of (deterministic) ordinary differential equations by standard techniques. For parametric restrictions, analytical solutions to the stochastic growth model and a novel solution to Lucas' endogenous growth model under Poisson uncertainty are used to compute the exact numerical error. We show how (potential) catastrophic events such as rare natural disasters substantially affect the economic decisions of households.

• Explaining Output Volatility: The Case of Taxation
Journal of Public Economics 95 (2011): S. 1589-1606.
Abstract

This paper presents strong empirical evidence that the observed heterogeneity of output volatility across countries and over time is partly endogenous. In particular, based on a closed-form solution we obtain a (long-run) equilibrium relationship between taxes and output volatility in the stochastic neoclassical model by showing that asymptotically the variance of output growth rates is affected by the level of taxes, without affecting the mean. We estimate the tax semi-elasticities on output volatility and provide convincing empirical evidence that taxes are important to understand differences in output volatility among OECD countries.

• On the Link between Volatility and Growth
with Klaus Wälde
Journal of Economic Growth 16 (2011): S. 285-308.
Abstract

A model of growth with endogenous innovation and distortionary taxes is pre- sented. Since innovation is the only source of volatility, any variable that influences innovation directly affects volatility and growth. This joint endogeneity is illustrated by working out the effects through which economies with different tax levels differ in their volatility and growth process. We obtain analytical measures of macro volatility based on cyclical output and on output growth rates for plausible parametric restrictions. This analysis implies that controls for taxes should be included in the standard growth-volatility regressions. Our estimates show that the conventional Ramey–Ramey coefficient is affected sizeably. In addition, tax levels do indeed appear to affect volatility in our empirical application.

• Risk Premia in General Equilibrium
Journal of Economic Dynamics and Control 35 (2011): S. 1557-1576.
Abstract

This paper shows that non-linearities from a neoclassical production function alone can generate time-varying, asymmetric risk premia and predictability over the business cycle. These empirical key features become relevant when we allow for non-normalities in the form of rare disasters. We employ analytical solutions of dynamic stochastic general equilibrium models, including a novel solution with endogenous labor supply, to obtain closed-form expressions for the risk premium in production economies. In contrast to an endowment economy with constant investment opportunities, the cur- vature of the consumption function affects the risk premium in production economies through controlling the individual’s effective risk aversion.

• Structural Estimation of Jump-Diffusion Processes in Macroeconomics
Journal of Econometrics 153 (2009): S. 196-210.
Abstract

This paper shows how to solve and estimate a continuous-time dynamic stochastic general equilibrium (DSGE) model with jumps. It also shows that a continuous-time formulation can make it simpler (relative to its discrete-time version) to compute and estimate the deep parameters using the likelihood function when non-linearities and/or non-normalities are considered. We illustrate our approach by solving and estimating the stochastic AK and the neoclassical growth models. Our Monte Carlo experiments demonstrate that non-normalities can be detected for this class of models. Moreover, we provide strong empirical evidence for jumps in aggregate US data.

## Code

Programs
• Peso Problems in the Estimation of the C-CAPM
with Juan Carlos Parra-Alvarez and Andreas Schrimpf
Quantitative Economics (2021): accepted for publication. Link
[Matlab implementation]
Notes
• This folder contains programs to simulate rare disaster and long-run risk (LRR) models and estimate C-CAPM parameters using Matlab.
• The file main.m simulates the rare disaster and the LRR models and estimates the traditional C-CAPM parameters based on simulated data. The file can be used to replicate the simulation results in Tables A.6 to A.11.

Type 'help main' for complementary files available in the folder and for details.

• The file empirical_estimates.m estimates the traditional C-CAPM parameters based on empirical data. The file can be used to replicate the empirical results in Tables A.1 an A.2.

Type 'help empirical_estimates' for details.

• Risk Matters: Breaking Certainty Equivalence in Linear Approximations
with Juan Carlos Parra-Alvarez and Hamza Polattimur
Journal of Economic Dynamics and Control (2021): accepted for publication. Link
[Matlab implementation]
Notes Matlab
• The file SGM_PPP_2021_Matlab.m computes a first-order perturbation approximation to the Stochastic Growth Model. It builds a first-order Taylor series expansion to the costates variables using Proposition 1, Theorem 2 and Proposition 3 in the paper.

The model has $$n_x=2$$ state variables ($$x =$$ capital, $$K$$, and productivity, $$A$$) and $$n_y=2$$ costate variables ($$y = V_K$$ and $$V_A$$). The perturbation parameter is denoted by $$\eta \geq 0$$.

The user must provide the following inputs:
*Input 1: Parameter values
*Input 2: Symbolic definition of control and state variables
*Input 3: Coefficients $$a \in \mathbb{R}^{n_x \times 1}$$, $$b \in \mathbb{R}^{n_x \times 1}$$ and $$c \in \mathbb{R}^{n_x^2 \times 1}$$ of the system of quasilinear PDEs
*Input 4: Deterministic steady state, DSS: $$(x,y,\eta) = (x_{ss},y_{ss},0)$$.

Matrices a, b and c define the model class $H(x,y,y_x,y_{xx}) = a(x,y) + y_x b(x,y) + \eta y_{xx} c = 0$ that summarizes the equilibrium in the economy.

The solution is given by the policy function $$y = g(x,\eta)$$ which is approximated as $g(x,\eta) = g(x_{ss},0) + g_x (x-x_{ss}) + g_{\eta}\eta.$

Using the approximation to the costate functions, the code also reports a first-order approximation to the control variables defined by the first order condition $$u = u(x,y)$$. For the Stochastic Growth Model, $$u =$$ consumption. Its approximation is given by $u(x,\eta) = u(x_{ss},0) + u_x (x-x_{ss}) + u_{\eta}\eta.$

• The file SGM_PPP_2021_simple_Matlab.m is a simplified version of SGM_PPP_2021_Matlab.m where only the costate for the capital stock $$y = V_K$$ is approximated. See Section 3.3 of the paper.
Notes Mathematica
• The file SGM_PPP_2021_Mathematica.nb computes a first- and second-order perturbation approximation to the Stochastic Growth Model. The approximations are built using a brute force approach - it successively computes the derivatives of the unknown policy functions $$(y,u)=((V_K,V_A),C)$$ and evaluates them at the $$D_{SS}, (x,y,\eta) = (x_{ss},y_{ss},0)$$.

The first step is to define the functional $$F(x,\eta) = H(x,g(x,\eta),g_x(x,\eta),g_{xx}(x,\eta)) = 0.$$ From there, the code computes successively all the required derivatives to build the approximats to the policy functions:

"Perfect-foresight" component $F_x(x,\eta) = F_{xx}(x,\eta) = F_{xxx}(x,\eta) = F_{xxxx}(x,\eta) = 0$ and "Stochastic" component $F_\eta = F_{x\eta} = F_{xx\eta} = F_{\eta\eta} = 0.$

• Numerical Solution of Dynamic Equilibrium Models under Poisson Uncertainty
with Timo Trimborn
Journal of Economic Dynamics and Control 37 (2013): S. 2606-2662. Link
[Matlab implementation]
Notes
• Choose the directory "Waveform" as current Matlab directory.
• Execute "rbc.m" to start the calculations. The Figures show the policy function, the deviation from the last iteration, and absulte and relative errors (if available).
• To modify the model open "rbc.m" (main file), "funcODE.m" (set of differential equations), and "findss.m" (steady state conditions).

## Contact

Universität Hamburg
Von-Melle-Park 5
20146 Hamburg
Office: Room 2069, VMP 5
Phone: +49 40 42838 4630

## Disclaimer

Contents of the website

The contents of this website were written with due diligence and by the author’s best knowledge. We can be held liable only by general laws, especially for our own contents acc. § 7 TMG (German law on tele-media) and for external contents acc. §§ 8 – 10 TMG. As a Provider of tele-media we can be held liable for external contents only once we have knowledge of a concrete infringement of law. We reserve the right to change or delete contents of this webpage which are not subject to any contractual obligation.

Links on external Websites

Intellectual property rights

All content of this website, especially texts, pictures, images, graphical presentations, music, trademarks, brands and so forth, are subject to copyright laws. The use, reproduction and so on are subject to the individual rights of the respective owner of the copyright or administrator of these rights. If you want to use such content, please let us know and we will establish contact with the respective owner/administrator.

Personal data (usually referred to just as "data" below) will only be processed by us to the extent necessary and for the purpose of providing a functional and user-friendly website, including its contents, and the services offered there.

Per Art. 4 No. 1 of Regulation (EU) 2016/679, i.e. the General Data Protection Regulation (hereinafter referred to as the "GDPR"), "processing" refers to any operation or set of operations such as collection, recording, organization, structuring, storage, adaptation, alteration, retrieval, consultation, use, disclosure by transmission, dissemination, or otherwise making available, alignment, or combination, restriction, erasure, or destruction performed on personal data, whether by automated means or not.

The following privacy policy is intended to inform you in particular about the type, scope, purpose, duration, and legal basis for the processing of such data either under our own control or in conjunction with others. We also inform you below about the third-party components we use to optimize our website and improve the user experience which may result in said third parties also processing data they collect and control.

Our privacy policy is structured as follows:

I. Information about us as controllers of your data
II. The rights of users and data subjects
III. Information about the data processing

I. Information about us as controllers of your data

The party responsible for this website (the "controller") for purposes of data protection law is:

Olaf Posch
Von-Melle-Park 5
20146 Hamburg

Telephone: +49 40 42838 4630
Email: olaf.posch@uni-hamburg.de

II. The rights of users and data subjects

With regard to the data processing to be described in more detail below, users and data subjects have the right

• to confirmation of whether data concerning them is being processed, information about the data being processed, further information about the nature of the data processing, and copies of the data (cf. also Art. 15 GDPR);
• to correct or complete incorrect or incomplete data (cf. also Art. 16 GDPR);
• to the immediate deletion of data concerning them (cf. also Art. 17 DSGVO), or, alternatively, if further processing is necessary as stipulated in Art. 17 Para. 3 GDPR, to restrict said processing per Art. 18 GDPR;
• to receive copies of the data concerning them and/or provided by them and to have the same transmitted to other providers/controllers (cf. also Art. 20 GDPR);
• to file complaints with the supervisory authority if they believe that data concerning them is being processed by the controller in breach of data protection provisions (see also Art. 77 GDPR).

In addition, the controller is obliged to inform all recipients to whom it discloses data of any such corrections, deletions, or restrictions placed on processing the same per Art. 16, 17 Para. 1, 18 GDPR. However, this obligation does not apply if such notification is impossible or involves a disproportionate effort. Nevertheless, users have a right to information about these recipients.

Likewise, under Art. 21 GDPR, users and data subjects have the right to object to the controller's future processing of their data pursuant to Art. 6 Para. 1 lit. f) GDPR. In particular, an objection to data processing for the purpose of direct advertising is permissible.

III. Information about the data processing

Your data processed when using our website will be deleted or blocked as soon as the purpose for its storage ceases to apply, provided the deletion of the same is not in breach of any statutory storage obligations or unless otherwise stipulated below.

Server data

For technical reasons, the following data sent by your internet browser to us or to our server provider will be collected, especially to ensure a secure and stable website: These server log files record the type and version of your browser, operating system, the website from which you came (referrer URL), the webpages on our site visited, the date and time of your visit, as well as the IP address from which you visited our site.

The data thus collected will be temporarily stored, but not in association with any other of your data.

The basis for this storage is Art. 6 Para. 1 lit. f) GDPR. Our legitimate interest lies in the improvement, stability, functionality, and security of our website.

The data will be deleted within no more than seven days, unless continued storage is required for evidentiary purposes. In which case, all or part of the data will be excluded from deletion until the investigation of the relevant incident is finally resolved.

We use cookies on our website. Cookies are small text files or other storage technologies stored on your computer by your browser. These cookies process certain specific information about you, such as your browser, location data, or IP address.

This processing makes our website more user-friendly, efficient, and secure, allowing us, for example, to display our website in different languages or to offer a shopping cart function.

The legal basis for such processing is Art. 6 Para. 1 lit. b) GDPR, insofar as these cookies are used to collect data to initiate or process contractual relationships.

If the processing does not serve to initiate or process a contract, our legitimate interest lies in improving the functionality of our website. The legal basis is then Art. 6 Para. 1 lit. f) GDPR.

When you close your browser, these session cookies are deleted.

If necessary, our website may also use cookies from companies with whom we cooperate for the purpose of advertising, analyzing, or improving the features of our website.

Please refer to the following information for details, in particular for the legal basis and purpose of such third-party collection and processing of data collected through cookies.

If you prevent or restrict the installation of cookies, not all of the functions on our site may be fully usable.

Social media links via graphics

We also integrate the following social media sites into our website. The integration takes place via a linked graphic of the respective site. The use of these graphics stored on our own servers prevents the automatic connection to the servers of these networks for their display. Only by clicking on the corresponding graphic will you be forwarded to the service of the respective social network.

Once you click, that network may record information about you and your visit to our site. It cannot be ruled out that such data will be processed in the United States.

Initially, this data includes such things as your IP address, the date and time of your visit, and the page visited. If you are logged into your user account on that network, however, the network operator might assign the information collected about your visit to our site to your personal account. If you interact by clicking Like, Share, etc., this information can be stored in your personal user account and possibly posted on the respective network. To prevent this, you need to log out of your social media account before clicking on the graphic. The various social media networks also offer settings that you can configure accordingly.

The following social networks are integrated into our site by linked graphics:

Our website uses Google Maps to display our location and to provide directions. This is a service provided by Google Ireland Limited, Gordon House, Barrow Street, Dublin 4, Irland (hereinafter: Google).

To enable the display of certain fonts on our website, a connection to the Google server in the USA is established whenever our website is accessed.

If you access the Google Maps components integrated into our website, Google will store a cookie on your device via your browser. Your user settings and data are processed to display our location and create a route description . We cannot prevent Google from using servers in the USA.

The legal basis is Art. 6 Para. 1 lit. f) GDPR. Our legitimate interest lies in optimizing the functionality of our website.

By connecting to Google in this way, Google can determine from which website your request has been sent and to which IP address the directions are transmitted.

If you do not agree to this processing, you have the option of preventing the installation of cookies by making the appropriate settings in your browser. Further details can be found in the section about cookies above.


text:
Probability – Why does the value of the CDF in the corresponding range remain the same even after the application of a non-linear transformation?

For random variable transformations, why the value of the CDF in the corresponding range remains the same even after the application of a nonlinear transformation?

For example. X ~ U (0, 2), the PDF of X is $$f_X (x) = frac {1} {2}$$ and the CDF is $$F_X (x) = frac {x} {2}$$. Let Y = $$X ^ 2$$, I can finish derivative $$f_Y$$ and $$F_y$$ by myself. However, I do not understand why $$F_X (x) = F_Y (x ^ 2)$$ is always true.

format: plain


text:
SSC CGL Tier 1 :: GIR Test 58
Home » GIR Test 58 » General Questions

# SSC CGL Tier 1 General Intelligence and Reasoning Questions and Answers Online Test 58

Get free ssc cgl tier 1 free General Intelligence and Reasoning questions and answers free online test mock tests quiz sample questions ssc online test ssc practice test freeonline Test & Mock Test Quiz 58

Exercise

1 .
Select the missing terms in the following question.

CK 16 9 JR

OS 24 19 TX

KM ? ? PV
 14,21 21,14 56,84 84,56
2 .
In the following question, a group of letters is given which are numbered 1, 2, 3, 4, 5 and 6. Below are given four alternatives containing combinations of these numbers. Select that combination of numbers so that letters arranged accordingly, form a meaningful word.

C E L S M U

1 2 3 4 5 6

 4, 6, 3, 5, 2, 1 5, 6, 4, 1, 3, 2 4, 6, 5, 2, 3, 1 5, 2, 3, 1, 6, 4
3 . In Question, which one of the given responses would be a meaningful order of the following ?
1. Curd

2. Milk

3. Butter milk

4. Cow

5. Ghee
 2, 5, 6, 4, 1, 3 4, 6, 2, 1, 3, 5 4, 2, 1, 3, 6, 5 2, 6, 4, 5, 3, 1
4 . In Question, which one of the given responses would be a meaningful order of the following ?

2. Listening

3. Writing

4. Speaking
 4, 2, 1, 3 2, 4, 3, 1 2, 4, 1, 3 4, 3, 2, 1
5 . In Question, which one of the given responses would be a meaningful order of the following ?

2. Infancy

3. Childhood

 1, 3, 4, 2 2, 3, 4, 1 2, 4, 3, 1 1, 2, 3, 4
6 .
A family consisted of a man, his wife, his three sons, their wives and three children in each son's family. How many members are there in the family ?
 12 13 15 17
7 .
From the given alternatives select the word which cannot be formed using the letters of the given word :

$INFLATIONARY$
 FLAIR FAULTY NATIONAL RATION
8 .
Mani is double the age of Prabhu. Ramona is half the age of Prabhu. If Mani is sixty, find out the age of Ramona.
 20 15 10 24
9 .
Some equations are solved on the basis of a certain system. On the same basis, find out the correct answer for the unsolved equation.

2 $\times$ 3 $\times$ 4 = 432,

5 $\times$ 6 $\times$ 7 = 765

7 $\times$ 8 $\times$ 9 = 987,

2 $\times$ 5 $\times$ 7 = ?
 572 752 725 257


text:
# How do you simplify 7^2 * 8^2?

Mar 24, 2018

${7}^{2} \times {8}^{2} = 3136$

#### Explanation:

Expand each number.

${7}^{2}$ can be expressed as $7 \times 7$

Likewise, ${8}^{2}$ can be expressed as $8 \times 8$

Therefore,

${7}^{2} \times {8}^{2} = 7 \times 7 \times 8 \times 8$

$= 49 \times 64$

$= 3136$

Mar 24, 2018

$3136$
$3136$


text:
# Attenuation of Waves

### After reading this section you will be able to do the following:

• Describe what attenuation is and what causes it.
• Use the decibel unit with ratios and absolute quantities.

When a wave travels through a medium, its intensity diminishes with distance.  In idealized materials, the wave amplitude is only reduced by the spreading of the wave. Natural materials, however, all produce an effect which further weakens the wave. This further weakening results from scattering and absorption. Scattering is the reflection of the wave in directions other than its original direction of propagation.  Absorption is the conversion of the wave energy to other forms of energy.  The combined effect of scattering and absorption is called attenuation

The amplitude change of a decaying/attenuating plane wave can be expressed as:

$A=A_{0}e^{-\alpha z}$

In this expression A0 is the unattenuated amplitude of the propagating wave at some location. The amplitude A is the reduced amplitude after the wave has traveled a distance z from that initial location. The quantity $\alpha$ is the attenuation coefficient of the wave traveling in the z-direction. The dimensions of $\alpha$are nepers/length, where a neper is a dimensionless quantity. The term e is the exponential (or Napier's constant) which is equal to approximately 2.71828.

The units of the attenuation value in Nepers per meter (Np/m) can be converted to decibels/length by dividing by 0.1151. Decibels is a more common unit when relating the amplitudes of two signals. More information about decibels is provided below.

## The Decibel

The decibel (dB) is one tenth of a Bel, which is a unit of measure that was developed by engineers at Bell Telephone Laboratories and named for Alexander Graham Bell. The dB is a logarithmic unit that describes a ratio of two measurements. The basic equation that describes the difference in decibels between two measurements is:

$\Delta X(dB)=10log\frac{X_{2}}{X_{1}}$

where: delta X is the difference in some quantity expressed in decibels, X1 and X2 are two different measured values of X, and the log is to base 10.

### Why is the dB unit used?

Use of dB units allows ratios of various sizes to be described using easy to work with numbers. For example, consider the information in the table.

 Ratio between Measurement 1 and 2 Equation dB 1/2 dB = 10 log (1/2) -3 dB 1 dB = 10 log (1) 0 dB 2 dB = 10 log (2) 3 dB 10 dB = 10 log (10) 10 dB 100 dB = 10 log (100) 20 dB 1,000 dB = 10 log (1000) 30 dB 10,000 dB = 10 log (10000) 40 dB 100,000 dB = 10 log (100000) 50 dB 1,000,000 dB = 10 log (1000000) 60 dB 10,000,000 dB = 10 log (10000000) 70 dB 100,000,000 dB = 10 log (100000000) 80 dB 1,000,000,000 dB = 10 log (1000000000) 90 dB

From this table it can be seen that ratios from one up to ten billion can be represented with a single or double digit number. Ease to work with numbers was particularly important in the days before the advent of the calculator or computer. The focus of this discussion is on using the dB in measuring sound levels, but it is also widely used when measuring power, pressure, voltage and a number of other things.

### Use of the dB in Sound Measurements

Sound intensity is defined as the sound power per unit area perpendicular to the wave. Units are typically in watts/m2 or watts/cm2. For sound intensity, the dB equation becomes:

$\Delta I(dB)=10\log\frac{I_{2}}{I_{1}}$

However, the power or intensity of sound is generally not measured directly. Since sound consists of pressure waves, one of the easiest ways to quantify sound is to measure variations in pressure (i.e. the amplitude of the pressure wave). When making ultrasound measurements, a transducer is used, which is basically a small microphone. Transducers like most other microphones produced a voltage that is approximately proportionally to the sound pressure (P). The power carried by a traveling wave is proportional to the square of the amplitude. Therefore, the equation used to quantify a difference in sound intensity based on a measured difference in sound pressure becomes:

$\Delta I(dB)=10\log\frac{I_{2}}{I_{1}}=10\log\frac{P_{2}^{2}}{P_{1}^{2}}=20\log\frac{P_{2}}{P_{1}}$ (The factor of 2 is added to the equation because the logarithm of the square of a quantity is equal to 2 times the logarithm of the quantity.)

Since transducers and microphones produce a voltage that is proportional to the sound pressure, the equation could also be written as:

$\Delta I(dB)=20\log\frac{V_{2}}{V_{1}}$ where delta I is the change in sound intensity incident on the transducer and V1 and V2 are two different transducer output voltages.

Revising the table to reflect the relationship between the ratio of the measured sound pressure and the change in intensity expressed in dB produces:

 Ratio between Measurement 1 and 2 Equation dB 1/2 dB = 20 lag (1/2) -6 dB 1 dB = 20 lag (1) 0 dB 2 dB = 20 lag (2) 6 dB 10 dB = 20 lag (10) 20 dB 100 dB = 20 lag (100) 40 dB 1,000 dB = 20 lag (1000) 60 dB 10,000 dB = 20 lag (10000) 80 dB 100,000 dB = 20 lag (100000) 100 dB 1,000,000 dB = 20 lag (1000000) 120 dB 10,000,000 dB = 20 lag (10000000) 140 dB 100,000,000 dB = 20 lag (100000000) 160 dB 1,000,000,000 dB = 20 lag (1000000000) 180 dB

From the table it can be seen that 6 dB equates to a doubling of the sound pressure. Alternately, reducing the sound pressure by 2, results in a – 6 dB change in intensity.

### "Absolute" Intensity Levels

Whenever the decibel unit is used, it always represents the ratio of two values. Therefore, in order to relate different intensities it is necessary to choose a standard reference level. The reference sound pressure (corresponding to a sound pressure level of 0 dB) commonly used is that at the threshold of human hearing, which is conventionally taken to be 2×10 −5 Newton per square meter, or 20 micropascals (20 μPa). To avoid confusion with other decibel measures, the term dB(SPL) is used. Similarly for EM waves the quantities dBW and dBm have been defined where the reference is 1 Watt and 1 milliwatt, respectively.

### Review:

1. When a wave travels through a medium, its intensity diminishes with distance due to spreading, scattering, and absorption.
2. The dB is a logarithmic unit that describes a ratio of two measurements.


text:
## Algebra 2 (1st Edition)

$y =-2 \cos (\dfrac{\pi}{2}) x +4$
General solution for Trigonometric functions $sine$ and $cosine$ that model a sinusoid is as follows: $y=A \sin B (x-h) +k$ and $y=A \cos B (x-h)+k$ Here, the amplitude is $A=2$ and we can see from the graph that it has flipped nature which means that we have $-2 \cos$ function. Since the time period for a trigonometric function is $4$ and here $B=\dfrac{\pi}{2}$, the midline of the graph has been shifted by $4$ vertically. Thus, we have $y =-2 \cos (\dfrac{\pi}{2}) x +4$


text:
# Cohomology ring of BG

Let $G$ be a compact Lie group, let $T$ be a maximal torus, and let $W$ be the Weyl group. My main question is as follows:

• How does one prove that $H^\ast(BG,\mathbb{Q})$ is isomorphic to the $W$-invariant part of $H^\ast(BT,\mathbb{Q}) \cong \mathbb{Q}[[x_1, \ldots, x_n]]$? This is apparently basic knowledge in algebraic topology, because I keep reading "recall that..." followed by some version of this statement and no references. But I can't find a proof in any of my textbooks.

I would ideally like a reference which also addresses the following secondary question:

• When is the natural map $H^\ast(BG,\mathbb{Z}) \to H^\ast(BT,\mathbb{Z})^W$ an isomorphism, and what can one say about the integral cohomology ring of $BG$ when it is not? Note the fact that the map above is an isomorphism for $G = U(n)$ is equivalent to the statement that the Chern classes are integral.

Thanks!

-
Do you really mean power series $\mathbb{Q}[[x_1, \ldots, x_n]]$ ? –  Ralph Dec 20 '12 at 19:23
I think so... for example, the classifying space of $S^1$ is $\mathbb{C}P^\infty$, and the cohomology of $\mathbb{C}P^\infty$ is well known to be the ring of formal power series in one variable. –  Paul Siegel Dec 20 '12 at 19:39
Paul, sorry, but I doubt that this is well-known. The cohomology of $BS^1$ is a polynomial ring in one variable. Also note that $H^\ast(\mathbb{C}P^n)=\mathbb{Z}[x]/(x^{n+1})$. –  Ralph Dec 20 '12 at 19:55
The differences between the power series and polynomial rings in this case depend upon your choice to define $H^\ast(X)$ as either the product or sum over all $n$ of $H^n(X)$. –  Craig Westerland Dec 20 '12 at 20:04
Ah, quite right - I should have specified that I was defining $H^*(X)$ to be the product of $H^n(X)$ over all $n$. This question came up as I was working through some computations with characteristic classes, and this is apparently a common convention in that context. –  Paul Siegel Dec 20 '12 at 20:16

Q1: Let me first note, that the statement $$H^\ast(BG,\mathbb{Q}) \cong H^\ast(BT,\mathbb{Q})^W\tag{\ast}$$ made in the question requires in addition that $G$ is connected. However, the general case can be reduced to the connected case since $$H^\ast(BG,\mathbb{Q}) \cong H^\ast(BG_0,\mathbb{Q})^{G/G_0}$$ where $G_0$ is the identity component of $G$.

A text book reference for $(\ast)$ can be found in [Hsiang: Cohomology theory of topological transformation groups, Chapter III, §1, Lemma 1.1]. The results of the book that are relevant for your question can also be found in the following paper: http://www.math.uwo.ca/~rgonzal3/qfy.pdf (cf. Remark 9, Lemma 5). Other approaches and more information can be found in

Q2: First note that the kernel of the restriction map $$\rho^\ast: H^\ast(BG;\mathbb{Z}) \to H^\ast(BT;\mathbb{Z})$$ is the tosion subgroup $Tors$ of $H^\ast(BG;\mathbb{Z})$. So, $\rho^\ast$ is injective iff $H^\ast(BG;\mathbb{Z})$ is torsion-free (there is a lot of literature about torsion of $H^\ast(BG;\mathbb{Z})$ so I won't discuss it here).

A short paper of Feshbach [The image of $H^\ast(BG;\mathbb{Z})$ in $H^\ast(BT;\mathbb{Z})$ for $G$ a compact Lie group with maximal torus $T$. Topology 20(1981),93-95] characterizes when the induced map $$\bar{\rho}^\ast: H^\ast(BG;\mathbb{Z})/Tors \to H^\ast(BT;\mathbb{Z})$$ is an isomorphism:

$\quad\bar{\rho}^\ast$ is an isomorphism iff $H^\ast(BG;\mathbb{Z})/Tors \otimes \mathbb{F}_p$ is an integral domain for each prime $p$.

There is also a counter-example that shows that $\bar{\rho}^\ast$ is not always an isomorphism.

-
Thank you for all of the great references! In particular, I plan to spend some time with Feshbach's paper. –  Paul Siegel Dec 20 '12 at 22:43

Notice that there is a sequence of homomorphisms $T \to N \to G$, where $N$ is the maximal torus normaliser (so $W = N/T$). $W$ acts on $BT$ (because it acts on $T$ by conjugation through group homomorphisms), and there is an equivalence from the classifying space of $N$ to the Borel construction for this action:

$$BN \simeq EW \times_W BT.$$

Consequently, we can compute the cohomology of $BN$ from the Leray-Serre spectral sequence

$$H^\ast(W; H^\ast(BT)) \implies H^\ast(BN).$$

Taking rational cohomology, this spectral sequence is concentrated in group-cohomological degree $0$, since $W$ is a finite group. Therefore the spectral sequence collapses at $E_2$, which is $H^0(W, H^\ast BT) = H^\ast(BT)^W$.

It therefore suffices to show that the map $BN \to BG$ is an isomorphism in rational cohomology. If we write $BN$ as $EG / N$, this map is a fibre bundle with fibre $G / N$, so it's enough to show that $G/N$ has the rational homology of a point.

For instance, if $G = SU(2)$, $N = \mathbb{Z} / 2 \ltimes T$, and $T = S^1$. Then $G/T = \mathbb{C} P^1$, and the action of $\mathbb{Z} / 2$ is antipodal, giving $G / N = \mathbb{R} P^2$, which is indeed rationally a point. I don't remember the argument in general, but I think this is always true.

Hopefully this indicates how the corresponding integral statement can fail - there can be torsion contributions from the higher group cohomology of $W$, which needs to be exactly cancelled (via a differential in the second spectral sequence above) with a torsion cohomology class from $G/N$.

-
This looks very nice, thanks! My only apprehension - apart from the fact that I'm not sure either how to calculate the rational homology of $G/N$ in general - is that I would like to avoid spectral sequences when I type this up. That might be awkward in this case... –  Paul Siegel Dec 20 '12 at 20:21
You can avoid the first spectral sequence if you have another way of talking yourself into believing that the cohomology of $BN$ is the same as the $W$-invariants of $H^*(BT)$, e.g., using the transfer. For the latter spectral sequence, you can use the fact that the Euler class of $G/T$ is nonzero, as Chris Gerig indicates in his answer. –  Craig Westerland Dec 20 '12 at 20:27

I don't remember where I heard the following proof/sketch:

Using the fibering $G/T\to BT\to BG$ and the fact that the Euler class of $G/T$ is nonzero, we have that $H^\ast(BG)$ embeds into $H^\ast(BT)$ (it composes with the transfer map to be multiplication by the Euler class); and the desired isomorphism comes from the fact that $W$ acts on $H^*(G/T)$ as the regular representation.

This is actually a special case of equivariant cohomology, where we instead use the Borel construction and the fibering $G/T\to M_T\to M_G$.

-
Chris, this was my memory, too, but it's hard to imagine that it's exactly true: for the case $G=SU(2)$, $N=\mathbb{Z}/2$ and $G/T=P^1$, whose cohomology is indeed free of rank two. However there's no way that $W$ can act on it by the regular representation, since one generator is in dimension 0, and the other in dimension 2. –  Craig Westerland Dec 20 '12 at 20:16
Oh, maybe this is nonsense -- the 0 dimensional class is the trivial factor in the regular representation, and the 2 dimensional factor is the reduced regular representation. What is subtle here is that how the regular representation knows which summands correspond to which cohomological degrees. I suppose that this should be related to the Bruhat order on the Weyl group. –  Craig Westerland Dec 20 '12 at 20:23


text:
# [SOLVED] Ellipse and Circle problem

• May 9th 2009, 08:33 PM
Stealth
[SOLVED] Ellipse and Circle problem
Hey everybody!

I have this problem and my solution was:

(x-h)/40,000 + (y-k)/10,000 = 1

Here's the problem:
The space shuttle travels in an elliptical orbit about the earth. The shuttle orbits such that it reaches a max height above the surface of the earth of 200 miles and a minimum height above the surface of 100 miles. The center of the earth is one focus of the ellipse. Assume that the center of the ellipse is at the origin and the major axis is horizontal. also assume the earth is circular. The approximate diameter of the earth 8000 miles. Write an equation for the shuttle's orbit.

The equation up there is what I got. I just seem a bit hesitant because it seemed really easy. Is it correct?

Thanks,
Stealth
• May 10th 2009, 12:27 AM
Hello Stealth
Quote:

Originally Posted by Stealth
Hey everybody!

I have this problem and my solution was:

(x-h)/40,000 + (y-k)/10,000 = 1

Here's the problem:
The space shuttle travels in an elliptical orbit about the earth. The shuttle orbits such that it reaches a max height above the surface of the earth of 200 miles and a minimum height above the surface of 100 miles. The center of the earth is one focus of the ellipse. Assume that the center of the ellipse is at the origin and the major axis is horizontal. also assume the earth is circular. The approximate diameter of the earth 8000 miles. Write an equation for the shuttle's orbit.

The equation up there is what I got. I just seem a bit hesitant because it seemed really easy. Is it correct?

Thanks,
Stealth

No, I'm afraid it isn't.

The centre of the ellipse is at the origin, so its equation will be of the form

$\frac{x^2}{a^2}+\frac{y^2}{b^2}=1$

The highest and lowest points, the centre and the foci all lie on the major axis. The length of the major axis, $2a$, is therefore $100+8000+200$ miles.

So $a = 4150$ and $a^2 = 17222500$

The centre of the earth is at one of the foci, and this is $50$ miles from the centre of the ellipse.

So $ae = 50$.

And $b^2 = a^2 - a^2e^2 = 4150^2 - 50^2 = 17220000$

So the equation is $\frac{x^2}{17222500}+\frac{y^2}{17220000}=1$

• May 10th 2009, 07:13 AM
Stealth
Just a few questions!

The highest and lowest points, the centre and the foci all lie on the major axis. The length of the major axis, $2a$, is therefore $100+8000+200$ miles.

Why would the lowest point also be on the major axis. I would assume it to be on the minor axis because that would be like the bsquared part of the equation.

So $a = 4150$ and $a^2 = 17222500$

The centre of the earth is at one of the foci, and this is $50$ miles from the centre of the ellipse.

Also, where did the 50 come from? I'm trying to analyze it but I don't see from where it came from.

So $ae = 50$.

And $b^2 = a^2 - a^2e^2 = 4150^2 - 50^2 = 17220000$

Also, is ae just basically the c part of the formula:
[MATH]b^2 = a^2-c^2[/MATH]?

So the equation is $\frac{x^2}{17222500}+\frac{y^2}{17220000}=1$

• May 10th 2009, 08:25 AM
Hello Stealth
Quote:

Originally Posted by Stealth
Just a few questions!

The highest and lowest points, the centre and the foci all lie on the major axis. The length of the major axis, $2a$, is therefore $100+8000+200$ miles.

Why would the lowest point also be on the major axis. I would assume it to be on the minor axis because that would be like the bsquared part of the equation.

Well it just isn't, that's all! If you draw a diagram with a circle inside an ellipse and its centre at one of the foci, the closest point the ellipse gets to the circle, and the most distant point are at the ends of the major axis. Draw it and you'll see what I mean.

Quote:

The centre of the earth is at one of the foci, and this is $50$ miles from the centre of the ellipse.

Also, where did the 50 come from? I'm trying to analyze it but I don't see from where it came from.
Again, draw a diagram. The total distance from the highest point to the lowest is 8300 miles. So the distance from the centre of the ellipse to either end of the major axis is 4150 miles. And the distance from the centre of the earth to the lowest point of the orbit is 4000 + 100 = 4100 miles. So the centre of the earth is 50 miles from the centre of the ellipse.
Quote:

Also, is ae just basically the c part of the formula:
[MATH]b^2 = a^2-c^2[/MATH]?
I don't recognise this formula. For an ellipse, we have:

$a^2e^2 = a^2 - b^2$

This is a standard formula which you should be familiar with.

• May 10th 2009, 09:15 AM
Stealth
Oh ok! I see it now!
(Nod)

• May 10th 2009, 10:33 AM
earboth
Quote:

Originally Posted by Stealth
Oh ok! I see it now!
(Nod)


text:
### Lunar Leaper

Gravity on the Moon is about 1/6th that on the Earth. A pole-vaulter 2 metres tall can clear a 5 metres pole on the Earth. How high a pole could he clear on the Moon?

### Which Twin Is Older?

A simplified account of special relativity and the twins paradox.

### Whoosh

A ball whooshes down a slide and hits another ball which flies off the slide horizontally as a projectile. How far does it go?

# Ideal Gases

##### Stage: 5 Challenge Level:
Remember that the energy of a gas particle is $\frac{3}{2}kT$ where k is Boltzmann's constant and T is temperature in kelvin.


text:
# [SOLVED]Laurent series

#### dwsmith

##### Well-known member
I have never done a Laurent series nor have we went over it in class but I guess I am supposed to know it perfectly already. The explanation in the book isn't that great.

Find the Laurent series of the form $\sum\limits_{n = -\infty}^{\infty}c_nz^n$ for $f(z) = \dfrac{33}{(2z - 1)(z + 5)}$ that converges in an annulus containing the point $z = -3i$

So I have used partial fractions
$$f(z) = \frac{33}{(2z - 1)(z + 5)} = \frac{6}{2z - 1} - \frac{3}{z + 5}$$

What am I supposed to do next?

Is this it

$$\frac{-6}{1-2z}=-6(1+2z+(2z)^2+\cdots )\quad\text{and}\quad \frac{3/5}{1-\left(-z/5\right)} = \frac{3}{5}\left(1+\frac{-z}{5}+\left(\frac{-z}{5}\right)^2+\cdots \right)$$

Last edited:

#### Fantini

MHB Math Helper
There are some cases to be considered. The function is analytic when $$|z| < \frac{1}{2}$$, $$\frac{1}{2} < |z| < 5$$ and $$5 < |z| < \infty$$. The only annulus that contains $$z = -3i$$ is the middle. So, we need that $$|z| > \frac{1}{2}$$ which means $$\left| \frac{1}{2z} \right| < 1$$ and $$|z| < 5$$ with $$\left| \frac{z}{5} \right| < 1$$.

Then $$\frac{6}{2z-1} = \frac{3}{z} \cdot \frac{1}{1 - \frac{1}{2z}} = \frac{3}{z} \sum_{n=0}^{\infty} 2^{-n} z^{-n} = 3 \sum_{n=0}^{\infty} 2^{-n} z^{-(n+1)}$$ and $$\frac{-3}{z+5} = \frac{-3}{5} \cdot \frac{1}{1 - \left( - \frac{z}{5} \right) } = \frac{-3}{5} \sum_{n=0}^{\infty} \frac{(-1)^n z^n}{5^n} = -3 \sum_{n=0}^{\infty} \frac{(-1)^n z^n}{5^{n+1}}.$$

Finally, $$f(z) = 3 \left( \sum_{n=0}^{\infty} 2^{-n} z^{-(n+1)} - \sum_{n=0}^{\infty} \frac{(-1)^n z^n}{5^{n+1}} \right).$$

Hope it's clear. By the way, which book are you using?

Last edited:

#### dwsmith

##### Well-known member
Hope it's clear. By the way, which book are you using?
Complex Analysis by Serge Lang


text:
A single key function, 'Require' that makes rerun-tolerant versions of 'install.packages' and require for CRAN packages, packages no longer on CRAN (i.e., archived), specific versions of packages, and GitHub packages. This approach is developed to create reproducible workflows that are flexible and fast enough to use while in development stages, while able to build snapshots once a stable package collection is found. As with other functions in a reproducible workflow, this package emphasizes functions that return the same result whether it is the first or subsequent times running the function, with subsequent times being sufficiently fast that they can be run every time without undue waiting burden on the user or developer.

This is an "all in one" function that will run install.packages for CRAN and GitHub https://github.com/ packages and will install specific versions of each package if versions are specified either via an (in)equality (e.g., "glue (>=1.6.2)" or "glue (==1.6.2)" for an exact version) or with a packageVersionFile. If require = TRUE, the default, the function will then run require on all named packages that satisfy their version requirements. If packages are already installed (packages supplied), and their optional version numbers are satisfied, then the "install" component will be skipped.

Require(
packages,
packageVersionFile,
libPaths,
install_githubArgs = list(),
install.packagesArgs = list(),
standAlone = getOption("Require.standAlone", FALSE),
install = getOption("Require.install", TRUE),
require = getOption("Require.require", TRUE),
repos = getOption("repos"),
purge = getOption("Require.purge", FALSE),
verbose = getOption("Require.verbose", FALSE),
...
)

## Arguments

packages

Character vector of packages to install via install.packages, then load (i.e., with library). If it is one package, it can be unquoted (as in require). In the case of a GitHub package, it will be assumed that the name of the repository is the name of the package. If this is not the case, then pass a named character vector here, where the names are the package names that could be different than the GitHub repository name.

packageVersionFile

If provided, then this will override all install.package calls with versions::install.versions

libPaths

The library path (or libraries) where all packages should be installed, and looked for to load (i.e., call library). This can be used to create isolated, stand alone package installations, if used with standAlone = TRUE. Currently, the path supplied here will be prepended to .libPaths() (temporarily during this call) to Require if standAlone = FALSE or will set (temporarily) .libPaths() to c(libPaths, tail(libPaths(), 1) to keep base packages.

install_githubArgs

List of optional named arguments, passed to install.packages inside installGitHubPackage.

install.packagesArgs

List of optional named arguments, passed to install.packages.

standAlone

Logical. If TRUE, all packages will be installed to and loaded from the libPaths only. NOTE: If TRUE, THIS WILL CHANGE THE USER'S .libPaths(), similar to e.g., the checkpoint package. If FALSE, then libPath will be prepended to .libPaths() during the Require call, resulting in shared packages, i.e., it will include the user's default package folder(s). This can be create dramatically faster installs if the user has a substantial number of the packages already in their personal library. Default FALSE to minimize package installing.

install

Logical or "force". If FALSE, this will not try to install anything. If "force", then it will force installation of requested packages, mimicking a call to e.g., install.packages. If TRUE, the default, then this function will try to install any missing packages or dependencies.

require

Logical or character string. If TRUE, the default, then the function will attempt to call require on all requested packages, possibly after they are installed. If a character string, then it will only call require on those specific packages (i.e., it will install the ones listed in packages, but load the packages listed in require)

repos

The remote repository (e.g., a CRAN mirror), passed to either install.packages, install_github or installVersions.

purge

Logical. Should all caches be purged? Default is getOption("Require.purge", FALSE). There is a lot of internal caching of results throughout the Require package. These help with speed and reduce calls to internet sources. However, sometimes these caches must be purged. The cached values are renewed when found to be too old, with the age limit. This maximum age can be set in seconds with the environment variable R_AVAILABLE_PACKAGES_CACHE_CONTROL_MAX_AGE, or if unset, defaults to 3600 (one hour -- see utils::available.packages).

Internally, there are calls to available.packages.

verbose

Numeric or logical indicating how verbose should the function be. If -1 or less, then as little verbosity as possible. If 0 or FALSE, then minimal outputs; if 1 or TRUE, more outputs; 2 even more.

...

Passed to install.packages. Good candidates are e.g., type or dependencies. This can be used with install_githubArgs or install.packageArgs which give individual options for those 2 internal function calls.

## Details

standAlone will either put the Required packages and their dependencies all within the libPaths (if TRUE) or if FALSE will only install packages and their dependencies that are otherwise not installed in .libPaths()[1], i.e., the current active R package directory. Any packages or dependencies that are not yet installed will be installed in libPaths.

## Note

For advanced use and diagnosis, the user can set verbose = TRUE or 1 or 2 (or via options("Require.verbose")). This will attach an attribute attr(obj, "Require") to the output of this function.

## GitHub Package

Follows remotes::install_github standard. As with remotes::install_github, it is not possible to specify a past version of a GitHub package unless that version is a tag or the user passes the SHA that had that package version. Similarly, if a developer does a local install e.g., via pkgload::install, of an active project, this package will not be able know of the GitHub state, and thus pkgSnapshot will not be able to recover this state as there is no SHA associated with a local installation. Use Require (or remotes::install_github) to create a record of the GitHub state.

## Package Snapshots

To build a snapshot of the desired packages and their versions, first run Require with all packages, then pkgSnapshot. If a libPaths is used, it must be used in both functions.

## Mutual Dependencies

This function works best if all required packages are called within one Require call, as all dependencies can be identified together, and all package versions will be addressed (if there are no conflicts), allowing a call to pkgSnapshot() to take a snapshot or "record" of the current collection of packages and versions.

## Local Cache of Packages

When installing new packages, Require will put all source and binary files in an R-version specific subfolder of getOption("Require.RPackageCache") whose default is RPackageCache(), meaning cache packages locally in a project-independent location, and will reuse them if needed. To turn off this feature, set options("Require.RPackageCache" = FALSE).

## Author

Maintainer: Eliot J B McIntire eliot.mcintire@canada.ca (ORCID)

Other contributors:

• Her Majesty the Queen in Right of Canada, as represented by the Minister of Natural Resources Canada [copyright holder]

## Examples

if (FALSE) {
# simple usage, like conditional install.packages then library
library(Require)
Require("stats") # analogous to require(stats), but it checks for
#   pkg dependencies, and installs them, if missing
tempPkgFolder <- file.path(tempdir(), "Packages")

# use standAlone, means it will put it in libPaths, even if it already exists
#   in another local library (e.g., personal library)
Require("crayon", libPaths = tempPkgFolder, standAlone = TRUE)

# make a package version snapshot of installed packages
packageVersionFile <- "_.packageVersionTest.txt"
(pkgSnapshot(libPath = tempPkgFolder, packageVersionFile, standAlone = TRUE))

# Restart R -- to remove the old temp folder (it disappears with restarting R)
library(Require)
tempPkgFolder <- file.path(tempdir(), "Packages")
packageVersionFile <- "_.packageVersionTest.txt"
# Reinstall and reload the exact version from previous
Require(packageVersionFile = packageVersionFile, libPaths = tempPkgFolder, standAlone = TRUE)

# Create mismatching versions -- desired version is older than current installed
# This will try to install the older version, overwriting the newer version
desiredVersion <- data.frame(instPkgs = "crayon", instVers = "1.3.2", stringsAsFactors = FALSE)
write.table(file = packageVersionFile, desiredVersion, row.names = FALSE)
newTempPkgFolder <- file.path(tempdir(), "Packages2")

# Note this will install the 1.3.2 version (older that current on CRAN), but
#   because crayon is still loaded in memory, it will return TRUE, using the current version
#   of crayon. To start using the older 1.3.2, need to unload or restart R
Require("crayon",
packageVersionFile = packageVersionFile,
libPaths = newTempPkgFolder, standAlone = TRUE
)

# run again, this time, correct "older" version installs in place of newer one
library(Require)
packageVersionFile <- "_.packageVersionTest.txt"
newTempPkgFolder <- file.path(tempdir(), "Packages3")
Require("crayon",
packageVersionFile = packageVersionFile,
libPaths = newTempPkgFolder, standAlone = TRUE
)

# Mutual dependencies, only installs once -- e.g., httr
tempPkgFolder <- file.path(tempdir(), "Packages")
Require(c("cranlogs", "covr"), libPaths = tempPkgFolder, standAlone = TRUE)

##########################################################################################
# Isolated projects -- Just use a project folder and pass to libPaths or set .libPaths() #
##########################################################################################
# GitHub packages -- restart R because crayon is needed
library(Require)
ProjectPackageFolder <- file.path(tempdir(), "ProjectA")
#  THIS ONE IS LARGE -- > 100 dependencies -- use standAlone = FALSE to
#    reuse already installed packages --> this won't allow as much control
#    of package versioning
libPaths = ProjectPackageFolder, standAlone = FALSE
)

# To keep totally isolated: use standAlone = TRUE
#   --> setting .libPaths() directly means standAlone is not necessary; it will only
#   use .libPaths()
library(Require)
ProjectPackageFolder <- file.path("~", "ProjectA")
setLibPaths(ProjectPackageFolder)
# a specific commit (by using the SHA)

############################################################################
# Mixing and matching GitHub, CRAN, with and without version numbering
############################################################################
pkgs <- c(
"glue (<=1.0.4)", "digest (<= 0.6.28)", "glmm (<=1.3.0)",
"achubaty/amc@development", "PredictiveEcology/LandR@development (>=0.0.1)",
"PredictiveEcology/LandR@development (>=0.0.2)", "ianmseddy/LandR.CS (<=0.0.1)"
)
Require::Require(pkgs)

############################################################################
# Using libPaths -- This will only be used inside this function;
# To change .libPaths() for the whole session use a manually call to
# setLibPaths(newPath) first
############################################################################
Require::Require("SpaDES", libPaths = "~/TempLib2", standAlone = FALSE)

############################################################################
# Persistent separate packages
############################################################################
setLibPaths("~/TempLib2", standAlone = TRUE)
Require::Require("SpaDES") # not necessary to specify standAlone here because .libPaths are set

############################################################################
# Installing on many machines that are connected by a shared drive
############################################################################
options("Require.RPackageCache" = TRUE) # will binaries on the fly.
# Put thes in a shared location.
# May need to install Require in main user library before setting library paths for project
if (!require("Require")) install.packages("Require")
setLibPaths("./packages") # not shared location for library path; no longer using main user lib
Require::Require(
packageVersionFile = "./packageVersions.txt",
standAlone = TRUE
)
}


text:
Hey! I'm David, the author of the Real-World Cryptography book. I'm a crypto engineer at O(1) Labs on the Mina cryptocurrency, previously I was the security lead for Diem (formerly Libra) at Novi (Facebook), and a security consultant for the Cryptography Services of NCC Group. This is my blog about cryptography and security and other related topics that I find interesting.

# BadUSB posted August 2014

An interesting read about how any usb device could be a potential threat. Some scary extracts:

Once reprogrammed, benign devices can turn malicious in many ways, including:

• A device can emulate a keyboard and issue commands on behalf of the logged-in user, for example to exfiltrate files or install malware. Such malware, in turn, can infect the controller chips of other USB devices connected to the computer.
• The device can also spoof a network card and change the computer’s DNS setting to redirect traffic.
• A modified thumb drive or external hard disk can – when it detects that the computer is starting up – boot a small virus, which infects the computer’s operating system prior to boot.

And a scarier one...

No effective defenses from USB attacks are known.

Once infected, computers and their USB peripherals can never be trusted again.

Some proof of concept should be introduced in a week at the incoming Black Hat convention. This is gonna be good :)

EDIT:

There's actually something similar that you can already buy: The USB Rubber Duck

comment on this story

# 80s computer hacking: A Supercut posted July 2014

Pretty funny, and it's sad to see that it hasn't evolved much (besides some rare exceptions like 24 or The Social Network). For example that hacking scene in the last James Bond Skyfall. Never forget.

comment on this story

# A Conversation with Elon Musk posted May 2014

I've always disliked paypal but after watching that video I have a new image of Elon Musk. The guy is pretty humble, clever and knows how to explain an idea. The opposite of a Linus Torvald.

What's also really amazing to me is how diversified his vocabulary is. Here are some words I learned thanks to this video:

• belabor: argue or elaborate (a subject) in excessive detail.

• farcical: of or resembling a farce, especially because of absurd or ridiculous aspects.
comment on this story

# Coinbase: 10$of bitcoins for students in the US posted May 2014 If you're a college student in the US today might be your lucky day. Coinbase is offering 10$ in bitcoin to students from some american universities. I guess if yours is not accepted you can ask them directly.

To support bitcoin awareness among college students, today we are announcing a bitcoin giveaway: we are gifting \$10 worth of bitcoin to students who create a new Coinbase account using their .edu email address.

Here you go

comment on this story

# I got my first dogecoins today posted May 2014

Time to celebrate!

and thanks r/dogecoin for tipping me!

If you want some of my dogecoins just comment :D

comment on this story

# Why can't I copy PS3 games and play them on another console? posted April 2014

I've always wondered how it is that we can't easily copy the entire content of a CD/DVD/Bluray on another one and play it with a PS1/PS2/PS3 and I guess PS4 and its competition.

Here's part of an answer on psx-scene's forum:

Whenever you insert a disc (bluray one that is) the ps3 drive will look at a special area of the disc called the Pic Zone (the BD ROM Mark is actually used in movie discs but not in game unlike what I first thought).This area cannot easily be dumped (you'd pretty much need a bluray drive with a hacked firmware) and of course that specific area cannot be burned on any kind of discs or with any kind of burners commercially available.

reading this made me apply to Sony for an internship :)

comment on this story

# Using Google, Facebook (and others?) to DDoS any websites posted April 2014

chr13 has posted a nice finding on how to DDoS a website thanks to services like facebook and google.

It's actually pretty simple!

You just create notes with img tags, facebook will crawl the website to cache the picture.

In his example he writes a thousand img tags per notes, opens all the notes from several browsers.

..

Thousands of get request are sent to a single server in a couple of seconds. Total number of facebook servers accessing in parallel is 100+.

The funny thought of facebook DDoSing itself crossed my mind. Interestingly someone else's also and chr13 answered that he hadn't tried:

It’s against the bug bounty rules to do this, hence one has to be careful here. I was only using browsers at first just because of that.

comment on this story


text:
# Class 9 Maths Worksheet for Graphing Linear equations in two variable

Given below are the Class 9 Maths linear equation graph worksheet
(a) Concepts questions
(b) Calculation problems
(c) Multiple choice questions
(e) Fill in the blank's

Question 1
Draw the graph of each of the equations given below. Also, find the co-ordinates of the point where the graph cuts the co-ordinates axis:
(a) 6x - 4y = 12
(b) 4y -x= 8
Solution
To draw the graph, we need at least two solutions of the equation We can get two points by putting x=0 and y=0. And then draw the graph. Corrdinates will be given by (x,0) and (0,y)

a.
Coordinates are (2,0) and (0,-4)

b.
Coordinates are (-8,0) and (0,2)

Question 2
The taxi fare in a delhi is as follows: For the first kilometer, the fare is Rs16 and for the subsequent distance it is Rs 10/km. Taking the distance covered as x km and total fare as Rs y, write a linear equation for this information, and draw its graph.
Solution
Total fare = Fare of first kilometer + 10 × subsequent distance travelled
$y= 16 + 10 (x-1)$
$y=16 + 10x- 10$
$y=6+10x$
We can draw the graph by putting points x=0 and x=1

Question 3
If a linear equation has solutions (-2, 2), (0, 0) and (2, -2), then it is of the form
(a) y - x = 0
(b) x + y = 0
(c) -2x + y = 0
(d) -x + 2y = 0
Solution

Question 4
Which of the below statement is true
(a) A linear equation x + 3y = 5 has a unique solution
(b) The graph of the equation y = x + 1 passes through the origin
(c) The line parallel to the y-axis at a distance 4 units to the left of y-axis is given by the equation y = - 4
(d) None of the above
Solution

Question 5
Any point on the y-axis is of the form
(a) (x, 0)
(b) (x, y)
(c) (0, y)
(d) ( y, y)
Solution

Question 6
Draw the graph of the equation 2x + 3y = 12. From the graph, find the coordinates of the point:
Whose y- coordinate is 3
Whose x- coordinate is -3.

Question 7
Draw the graph of the equation 2x + y = 6. Shade the region bounded by the graph and the co- ordinate axis. Also find the area of shaded region.
Solution
The graph of the equation 2x + y = 6 can be drawn by choosing points x=0 i.e y=6 and y=0 i.e x=3

Shading the region bounded by the graph and the co- ordinate axis

This is a right angle triangle with base =3 and height =6
So area = $\frac {1}{2} \times 6 \times 3 = 9$units

Question 8
Draw the graph of the equation $\frac {x}{2} + \frac {y}{3} =1$. Also find the area of triangle formed by the line and the co-ordinates axis.
Solution
The graph of the Linear equation $\frac {x}{2} + \frac {y}{3} =1$ can be drawn by choosing points x=0 i.e y=3 and y=0 i.e x=2

Now the triangle formed by the line and co-ordinates axis is given as below

This is a right angle with base as 2 units and height ad 3 units.
So ,Area = $\frac {1}{2} \times 2 \times 3= 3$ units

Question 9
Draw the graph of y = x + 2
Solution
We can get two points by putting x=0 and y=0. And then draw the graph. Corrdinates will be given by (x,0) and (0,y)

Question 10
Draw the graphs of the linear equations 4x - 3y + 4 = 0 and 4x + 3y - 20 = 0. Find the area bounded by these lines and x = axis.
Solution
The graph of 4x - 3y + 4 = 0 by putting y=0 i.e x= -1 and x=2 i.e y =4
Similarly the graph 4x + 3y - 20 = 0 by putting y=0 i.e x=5 and x=2 i.e y=4

Now we can see that area bounded by these lines and x = axis is a triangle with base = 6 unit and height =4 units.
So area = $\frac {1}{2} \times 6 \times 4 = 12$units

Question 11
Solve for y:
(3y+2)/7+ (4 (y+1))/5= 2/3 (2y+1)

Question 12
The angles of a triangle are 5x, 3 (2x - 5) and 9x -5 Find x and also name the triangle.
Solution
We know that sum of the angles in the triangle is equal to 180
Therefore,
$5x + 3(2x - 5) + 9x -5=180$
$20 x -20 =180$
$x= 10$
Therefore angles are
50°, 45° , 85°
The name of the triangle is scalene triangle

Question 13
Determine the point on graph of equation 2x + 5y = 20 whose x - co-ordinate is 5/2 times its ordinate.
Question 14
If (2a,a-1) is a solution of 2x + 3y - 9 = 0, find a
Solution
If (2a,a - 1) is the solution ,then putting x=2a and y=a-1
$2(2a) + 3(a-1) -9=0$
$4a + 3a -3 -9=0$
$a= 12/7$

Question 15
Draw the graph of linear equation x = 3y
Solution
We can draw the graph by joining for points (0,0) and (3,1)

Question 16
Draw the graph of linear equation 2x -9 = 0
Solution
This can be treated as equation in two variable as $2x + 0 \times y -9=0$
Drawing the graph by putting y=0 and y=2

Question 17
Draw the graph of linear equation x = y
Solution
We can draw the graph by joining for points (0,0) and (1,1)

Question 18
Draw the graphs of linear equation y = x and y = -x on the same Cartesian plane, what do you observe?
Solution
Here is the graph

We can observe that both the graph are symmetrical on both the x-axis and y-axis

Question 19
Find three different solutions of the equation 4x + 3y = 12 from its graph?
Question 20
Draw the graph of the equation x + 2y = 9. Find the vertices of the triangle formed by the line and the co-ordinate axis. Find two more points other than the intercepts on the axis.
Question 21
Draw the graph of the line x - 2y = 3. From the graph, find the co-ordinate of the point when
x = 5
y = -2

Reference Books for class 10

Given below are the links of some of the reference books for class 10 math.

You can use above books for extra knowledge and practicing different questions.

Go back to Class 10 Main Page using below links

### Practice Question

Question 1 What is $1 - \sqrt {3}$ ?
A) Non terminating repeating
B) Non terminating non repeating
C) Terminating
D) None of the above
Question 2 The volume of the largest right circular cone that can be cut out from a cube of edge 4.2 cm is?
A) 19.4 cm3
B) 12 cm3
C) 78.6 cm3
D) 58.2 cm3
Question 3 The sum of the first three terms of an AP is 33. If the product of the first and the third term exceeds the second term by 29, the AP is ?
A) 2 ,21,11
B) 1,10,19
C) -1 ,8,17
D) 2 ,11,20

Note to our visitors :-

Thanks for visiting our website.


text:
# Source code for pacman.model.graphs.graph

# Copyright (c) 2017-2019 The University of Manchester
#
# This program is free software: you can redistribute it and/or modify
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

from collections import OrderedDict
from spinn_utilities.abstract_base import (
AbstractBase, abstractmethod, abstractproperty)
from spinn_utilities.default_ordered_dict import DefaultOrderedDict
from spinn_utilities.ordered_set import OrderedSet
from pacman.exceptions import (
from .abstract_edge_partition import AbstractEdgePartition
from .abstract_edge import AbstractEdge
from .abstract_vertex import AbstractVertex
from pacman.model.graphs.common import ConstrainedObject

[docs]class Graph(ConstrainedObject, metaclass=AbstractBase):
""" A graph that specifies the allowed types of the vertices and edges.
"""

__slots__ = [
# The classes of vertex that are allowed in this graph
"_allowed_vertex_types",
# The classes of edges that are allowed in this graph
"_allowed_edge_types",
# The vertices of the graph
"_vertices",
# The outgoing edge partitions of the graph by
# (edge.pre_vertex, outgoing_edge_partition_name)
"_outgoing_edge_partitions_by_name",
# The outgoing edges by pre-vertex
"_outgoing_edges",
# The incoming edges by post-vertex
"_incoming_edges",
# map between incoming edges and edge.post_vertex, edge_partition_name
"_incoming_edges_by_partition_name",
# the outgoing partitions by edge
"_outgoing_edge_partition_by_edge",
# The label of the graph
"_label",
# map between labels and vertex
"_vertex_by_label",
# count of vertex which had a None or already used label
"_unlabelled_vertex_count"]

def __init__(self, allowed_vertex_types, allowed_edge_types, label):
"""
:param allowed_vertex_types:
A single or tuple of types of vertex to be allowed in the graph
:type allowed_vertex_types: type or tuple(type, ...)
:param allowed_edge_types:
A single or tuple of types of edges to be allowed in the graph
:type allowed_edge_types: type or tuple(type, ...)
:param label: The label on the graph, or None
:type label: str or None
"""
super().__init__(None)
self._allowed_vertex_types = allowed_vertex_types
self._allowed_edge_types = allowed_edge_types
self._vertices = []
self._vertex_by_label = dict()
self._unlabelled_vertex_count = 0
self._outgoing_edge_partitions_by_name = OrderedDict()
self._outgoing_edges = DefaultOrderedDict(OrderedSet)
self._incoming_edges = DefaultOrderedDict(OrderedSet)
self._incoming_edges_by_partition_name = DefaultOrderedDict(list)
self._outgoing_edge_partition_by_edge = OrderedDict()
self._label = label

@property
def label(self):
""" The label of the graph.

:rtype: str
"""
return self._label

def _label_postfix(self):
self._unlabelled_vertex_count += 1
return str(self._unlabelled_vertex_count)

""" Add a vertex to the graph.

:param AbstractVertex vertex: The vertex to add
:raises PacmanInvalidParameterException:
If the vertex is not of a valid type
:raises PacmanConfigurationException:
If there is an attempt to add the same vertex more than once
"""
if not isinstance(vertex, self._allowed_vertex_types):
raise PacmanInvalidParameterException(
"vertex", str(vertex.__class__),
"Vertices of this graph must be one of the following types:"
" {}".format(self._allowed_vertex_types))
if not vertex.label:
vertex.set_label(
vertex.__class__.__name__ + "_" + self._label_postfix())
elif vertex.label in self._vertex_by_label:
if self._vertex_by_label[vertex.label] == vertex:
vertex.set_label(vertex.label + self._label_postfix())
self._vertices.append(vertex)
self._vertex_by_label[vertex.label] = vertex

""" Add a collection of vertices to the graph.

:param iterable(AbstractVertex) vertices: The vertices to add
:raises PacmanInvalidParameterException:
If any vertex is not of a valid type
:raises PacmanConfigurationException:
If there is an attempt to add the same vertex more than once
"""
for v in vertices:

""" Add an edge to the graph and its partition

If required and possible will create a new partition in the graph

Returns the partition the edge was added to

:param AbstractEdge edge: The edge to add
:param str outgoing_edge_partition_name:
The name of the edge partition to add the edge to; each edge
partition is the partition of edges that start at the same vertex
:rtype: AbstractEdgePartition
:raises PacmanInvalidParameterException:
If the edge is not of a valid type or if edges have already been
added to this partition that start at a different vertex to this
one
"""
# Add the edge to the partition
partition = self.get_outgoing_edge_partition_starting_at_vertex(
edge.pre_vertex, outgoing_edge_partition_name)
if partition is None:
partition = self.new_edge_partition(
outgoing_edge_partition_name, edge)
self._register_edge(edge, partition)
return partition

def _register_edge(self, edge, partition):
""" Add an edge to the graph.

:param AbstractEdge edge: The edge to add
:param AbstractEdgePartition partition:
The name of the edge partition to add the edge to; each edge
partition is the partition of edges that start at the same vertex
:raises PacmanInvalidParameterException:
If the edge is not of a valid type or if edges have already been
added to this partition that start at a different vertex to this
one
"""
# verify that the edge is one suitable for this graph
if not isinstance(edge, self._allowed_edge_types):
raise PacmanInvalidParameterException(
"edge", edge.__class__,
"Edges of this graph must be one of the following types:"
" {}".format(self._allowed_edge_types))

if edge.pre_vertex.label not in self._vertex_by_label:
raise PacmanInvalidParameterException(
"Edge", str(edge.pre_vertex),
"Pre-vertex must be known in graph")
if edge.post_vertex.label not in self._vertex_by_label:
raise PacmanInvalidParameterException(
"Edge", str(edge.post_vertex),
"Post-vertex must be known in graph")

# Add the edge to the indices
self._incoming_edges_by_partition_name[
edge.post_vertex, partition.identifier].append(edge)
if edge in self._outgoing_edge_partition_by_edge:
self._outgoing_edge_partition_by_edge[edge] = partition

[docs]    @abstractmethod
def new_edge_partition(self, name, edge):
""" How we create a new :py:class:AbstractSingleSourcePartition in \
the first place. Uses the first/only element in the allowed \
partition types argument to the graph's constructor.

Called from :py:meth:~add_edge.
Can be overridden if different arguments should be passed.

:param str name: The identifier of the partition
:param AbstractEdge edge: An edge for the partition
:return: the new edge partition
:rtype: AbstractSingleSourcePartition
"""

""" Add a collection of edges to the graph.

:param iterable(AbstractEdge) edges: The edges to add
:param str outgoing_edge_partition_name:
The name of the edge partition to add the edges to; each edge
partition is the partition of edges that start at the same vertex
:raises PacmanInvalidParameterException:
If any edge is not of a valid type or if edges have already been
added to this partition that start at a different vertex to this
one
"""
for e in edges:

[docs]    @abstractmethod
""" Add an edge partition to the graph.

:param AbstractEdgePartition edge_partition: The edge partition to add
If a partition already exists with the same pre_vertex and
identifier
"""

@property
def vertices(self):
""" The vertices in the graph.

:rtype: iterable(AbstractVertex)
"""
return self._vertices

[docs]    def vertex_by_label(self, label):
return self._vertex_by_label[label]

@property
def n_vertices(self):
""" The number of vertices in the graph.

:rtype: int
"""
return len(self._vertices)

@property
def edges(self):
# pylint: disable=not-an-iterable
# https://github.com/PyCQA/pylint/issues/3105
""" The edges in the graph

:rtype: iterable(AbstractEdge)
"""
return [
edge
for partition in self.outgoing_edge_partitions
for edge in partition.edges]

@abstractproperty
def outgoing_edge_partitions(self):
""" The edge partitions in the graph.

:rtype: iterable(AbstractEdgePartition)
"""

@abstractproperty
def n_outgoing_edge_partitions(self):
""" The number of outgoing edge partitions in the graph.

:rtype: int
"""

[docs]    def get_outgoing_partition_for_edge(self, edge):
""" Gets the partition this edge is associated with.

:param AbstractEdge edge: the edge to find associated partition
:rtype: AbstractEdgePartition
"""
return self._outgoing_edge_partition_by_edge[edge]

[docs]    def get_edges_starting_at_vertex(self, vertex):
""" Get all the edges that start at the given vertex.

:param AbstractVertex vertex:
The vertex at which the edges to get start
:rtype: iterable(AbstractEdge)
"""
return self._outgoing_edges[vertex]

[docs]    def get_edges_ending_at_vertex(self, vertex):
""" Get all the edges that end at the given vertex.

:param AbstractVertex vertex:
The vertex at which the edges to get end
:rtype: iterable(AbstractEdge)
"""
if vertex not in self._incoming_edges:
return []
return self._incoming_edges[vertex]

[docs]    def get_edges_ending_at_vertex_with_partition_name(
self, vertex, partition_name):
""" Get all the edges that end at the given vertex, and reside in the\
correct partition ID.

:param AbstractVertex vertex: The vertex at which the edges to get end
:param str partition_name: the label for the partition
:return: iterable(AbstractEdge)
"""
key = (vertex, partition_name)
if key not in self._incoming_edges_by_partition_name:
return []
return self._incoming_edges_by_partition_name[key]

[docs]    @abstractmethod
def get_outgoing_edge_partitions_starting_at_vertex(self, vertex):
""" Get all the edge partitions that start at the given vertex.

:param AbstractVertex vertex:
The vertex at which the edge partitions to find starts
:rtype: iterable(AbstractEdgePartition)
"""

[docs]    def get_outgoing_edge_partition_starting_at_vertex(
self, vertex, outgoing_edge_partition_name):
""" Get the given outgoing edge partition that starts at the
given vertex, or None if no such edge partition exists.

:param AbstractVertex vertex:
The vertex at the start of the edges in the partition
:param str outgoing_edge_partition_name:
The name of the edge partition
:return: the named edge partition, or None if no such partition exists
:rtype: AbstractEdgePartition or None
"""
return self._outgoing_edge_partitions_by_name.get(
(vertex, outgoing_edge_partition_name), None)

def __contains__(self, value):
""" Determines if a value is an object that is in the graph.

:param value: The object to see if it is in the graph
:type value: AbstractVertex or AbstractEdge or AbstractEdgePartition
:return: True if the value is in the graph, False otherwise
:rtype: bool
"""
if isinstance(value, AbstractEdgePartition):
return value in self._outgoing_edge_partitions_by_name.values()
elif isinstance(value, AbstractEdge):
return value in self._outgoing_edge_partition_by_edge
elif isinstance(value, AbstractVertex):
return value in self._vertices
return False


text:
lc_circuit

# Differences

This shows you the differences between two versions of the page.

 — lc_circuit [2015/06/07 11:06] (current)admin created 2015/06/07 11:06 admin created 2015/06/07 11:06 admin created Line 1: Line 1: + ====== LC Oscillator Time Domain Analysis ====== + {{:lc_circuit.png?400|}} + + ---- + ===== Nodal Equation ===== + + $i_C+i_L=0$ + + $C\frac{dv_{OUT}}{dt}+\frac{1}{L}\int v_{out}=0$ + + $\frac{d^2v_{OUT}}{dt^2}+\frac{1}{LC}v_{OUT}=0$ + + ---- + ===== Solution using method of homogeneous and particular solutions ===== + + First, notice that the nodal equation is a second order homogeneous equation. + Therefore, we will not need to find a particular solution. + + As usual with problems like these, guess that the solution is $e^{st}$. + + Plugging in $v_{OUT=}e^{st}$ into the nodal equation yields: + + $e^{st}\left ( s^2 + \frac{1}{LC} \right )$ + + Solving the above equation for s gives: + + $s=\pm \sqrt{\frac{-1}{LC}}$ + + $s=\pm j\sqrt{\frac{1}{LC}}$ + + So.. + + $v_{out}=e^{j\sqrt{\frac{1}{LC}}t}$ + + and + + $v_{out}=e^{-j\sqrt{\frac{1}{LC}}t}$ + + There are two properties of homogeneous differential equations that are useful.  A constant times the solution is still a solution, and the sum of solutions is still a solution. + + Using those two properties we can write: + + $v_{out}=Ae^{j\sqrt{\frac{1}{LC}}t}+Ae^{-j\sqrt{\frac{1}{LC}}t}$ + + Any good math student will recognize that is just, + + $v_{out}=A'cos \left [t\sqrt{\frac{1}{LC}} \right ]$ + + At $t=0$, $v_{OUT}=v_{IN}$. + + Finally we get, + + $v_{out}=v_{IN}cos \left [t\sqrt{\frac{1}{LC}} \right ]$ + + ---- + + ===== Example ===== + + Let's try to make a 1khz oscillator.  + + Remember that $w=2\pi f$. + + $f=\frac{1}{2 \pi\sqrt{LC}}$ + + $1000=\frac{1}{2 \pi\sqrt{LC}}$ + + There are many answers that work...Here is one combination of L and C that produces a 1khz oscillator.  + + {{:lc_simulation.jpg?800|}}


text:
# Equations

The equation for an ellipsoid with axises $$e_1, e_2$$ and $$e_3$$: $E(x) := \frac{x_1^2}{e_1^2} + \frac{x_2^2}{e_2^2} + \frac{x_3^2}{e_3^2} - 1 = 0$ Let $$y = \begin{bmatrix} y_1 & y_2 & y_3 \end{bmatrix}^T$$ be a point outside the ellipsoid. For any point $$x = \begin{bmatrix} x_1 & x_2 & x_3 \end{bmatrix}^{T}$$ on the ellipsoid we have1: $y - x = \frac{1}{2} t \nabla E(x),$ or equivalently in component form, $y_k = \left( 1 + \frac{t}{e_k^2} \right) x_k, \qquad k=1,2,3.$ The values $$x_k$$ can be expressed as a function of $$t$$: $x_k(t):=\frac{e_k^2}{t+e_k^2} y_k, \qquad k=1,2,3,$ and their derivatives are given by, $x_k'(t) = -\frac{e_k^2}{(t+e_k^2)^2} y_k = -\frac{x_k(t)}{t+e_k^2}, \qquad k=1,2,3.$ The equation of the ellipsoid is reduced to a scalar equation in $$t$$: $E(t)=\frac{x_1^2(t)}{e_1^2} + \frac{x_2^2(t)}{e_2^2} + \frac{x_3^2(t)}{e_3^2} - 1.$ The derivative $$E'(t)$$ is simply: $E'(t)=\frac{2 x_1(t) x_1'(t)}{e_1^2} + \frac{2 x_2(t) x_2'(t)}{e_2^2} + \frac{2 x_3(t) x_3'(t)}{e_3^2}.$

1. http://www.geometrictools.com/Documentation/DistancePointEllipseEllipsoid.pdf

# Analytical solution

When $$e_1=e_2=e_3=R$$ we can solve $$E(t)=0$$ analytically. $y_1^2+y_2^2+y_3^2-(t+R^2)^2=0$ $t = - R^2 + \sqrt{y_1^2+y_2^2+y_3^2}$ Note: We consider the positive $$t$$. Negative $$t$$ corresponds to the point $$\tilde{x}$$ on the other side of the ellipsoid.

# Numerical algorithm

1. Find a starting guess $$t_0$$.

2. Iterate a few Newton Raphson steps: $t_{n+1} = t_n - \frac{E(t_n)}{E'(t_n)}, \qquad n=0,1,\dots.$

3. Until convergence $$|\Delta t| < TOL$$ and $$|E(t)| < RTOL$$.

# Code

int EllipsoidSolver(Vec3 E, Vec3 y,
float& error, float& resid, Vec3& x, Vec3& n,
float tol=1e-4, float rtol=1e-4,
int maxiter=10, bool useX=false)
{
const float Rmin = 1e-4;
const Vec3 One = Vec3(1.0f);

const Vec3 y2 = y*y;
const Vec3 E2 = E*E;
const float yn = norm(y);
const float R = min(E);

float t;
int iter = 0;

// Check if y is too close to center of the ellipsoid.
if (yn < Rmin)
return -maxiter;

// Start guess.
if (useX)
t = norm(y-x)/norm(x/E2);
else
t = -R + norm(y);

while (iter < maxiter)
{
x = (E2/(Vec3(t)+E2))*y;
Vec3 xp = -x/(Vec3(t)+E2);
float F = dot(One, x*x/E2) - 1.0f;
float Fp = dot(One, 2.0f*x*xp/E2);
float dt = F/Fp;
t = t - dt;
iter = iter + 1;
error = std::fabs(dt);
resid = std::fabs(F);
if (error < tol && resid < rtol)
{
n = x/E2;
float rn = 1.0f/norm(n);
n = rn*n;
return iter;
}
}

return -maxiter;
}


text:
## Epicteatime one year ago If a meterstick moves to your right at a constant velocity of 0.8c, what would you measure its length to be?

1. epicteatime

@nincompoop

2. epicteatime

anyoneee

3. epicteatime

@aaronq

4. Astrophysics

Length contraction

5. Astrophysics

$\huge L = \frac{ L_0 }{ \gamma } = L_0 \sqrt{1-\frac{ v^2 }{ c^2 }}$

6. Astrophysics

$L_0$ is your proper length, L is the length observed by an observer in relative motion (respect to the object), v is your relative velocity, and finally c is the speed of light

7. epicteatime

yep that xD

8. epicteatime

I think the answers 0.6m, what do you think?

9. Astrophysics

$L_0 = 1m$ $v = 0.8c$ $L = 1m \times \sqrt{1-\frac{ (0.8c)^2 }{ c^2 }} = \sqrt{1-\frac{ 0.64c^2 }{ c^2 }}m = 0.6m ~~ \checkmark$

10. epicteatime

HUDDAH!

11. epicteatime

xD Thanks for le confirmation fwendo :D

12. Astrophysics

Np :)

13. epicteatime

but just to be sure, do you cancel out the c^2 or smt?

14. Astrophysics

Yes, it gets cancelled out

15. epicteatime

ah, thanks xD

16. Astrophysics

|dw:1436160757936:dw|

17. epicteatime

:D


text:
# Extracting Clusters from Large Datasets with Multiple Similarity Measures Using IMSCAND

### Abstract

We consider the problem of how to group information when multiple similarities are known. For a group of people, we may know their education, geographic location and family connections and want to cluster the people by treating all three of these similarities simultaneously. Our approach is to store each similarity as a slice in a tensor. The similarity measures are generated by comparing features. Generally, the object similarity matrix is dense. However it can be stored implicitly as the product of a sparse matrix, representing the object-feature matrix, and its transpose. For this new type of tensor where dense slices are stored implicitly, we have created a new decomposition called Implicit Slice Canonical Decomposition (IMSCAND). Our decomposition is equivalent to the tensor CANDECOMP/PARAFAC decomposition, which is a higher-order analogue of the matrix Singular Value decomposition (SVD) and Principal Component Analysis (PCA). From IMSCAND we obtain compilation feature vectors which are clustered using k-means. We demonstrate the applicability of IMSCAND on a set of journal articles with multiple similarities.

Type
Publication
In CSRI Summer Proceedings 2007
Date
Tags
Citation
T. M. Selee, T. G. Kolda, W. P. Kegelmeyer, J. D. Griffin. Extracting Clusters from Large Datasets with Multiple Similarity Measures Using IMSCAND. In CSRI Summer Proceedings 2007, M. L. Parks and S. S. Collis (eds.), Tech. Rep. SAND2007-7977, Sandia National Laboratories, pp. 87-103, 2007. http://www.cs.sandia.gov/CSRI/Proceedings/CSRI2007.pdf

### BibTeX

@inproceedings{SeKoKeGr07,
author = {Teresa M. Selee and Tamara G. Kolda and W. Philip Kegelmeyer and Joshua D. Griffin},
title = {Extracting Clusters from Large Datasets with Multiple Similarity Measures Using {IMSCAND}},
booktitle = {CSRI Summer Proceedings 2007},
editor = {Michael L. Parks and S. Scott Collis},
publisher = {Tech. Rep. SAND2007-7977, Sandia National Laboratories},
pages = {87--103},
month = {December},
year = {2007},
url = {http://www.cs.sandia.gov/CSRI/Proceedings/CSRI2007.pdf},
}